/* تنسيقات عامة */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Cairo', sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

#app {
  position: relative;
  min-height: 100vh;
}

/* شاشة التحميل */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 50vh;
  font-size: 1.2rem;
  color: #666;
}

.loading i {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #ff6b35;
}

/* المحتوى الرئيسي */
#main-content {
  display: none;
}

h1 {
  text-align: center;
  color: #ff6b35;
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* أيقونة السلة */
.cart-icon {
  position: fixed;
  top: 20px;
  left: 20px;
  background: #ff6b35;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.cart-icon:hover {
  transform: scale(1.1);
}

.cart-icon i {
  font-size: 1.5rem;
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
}

/* القائمة */
.menu-container {
  margin-bottom: 2rem;
}

.title {
  text-align: center;
  color: #2d3436;
  margin-bottom: 2rem;
  font-size: 2rem;
  border-bottom: 2px solid #ff6b35;
  padding-bottom: 0.5rem;
}

.menu-category {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.menu-category h3 {
  color: #2d3436;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  border-bottom: 2px solid #ff6b35;
  padding-bottom: 0.5rem;
}

.category-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.menu-item {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 4px solid #ff6b35;
  transition: transform 0.3s ease;
}

.menu-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.item-info {
  flex: 1;
}

.item-name {
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 0.5rem;
}

.item-description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.item-price {
  font-weight: bold;
  color: #ff6b35;
  margin: 0 1rem;
}

.add-item-btn {
  background: #ff6b35;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.add-item-btn:hover {
  background: #e25a2c;
}

/* النوافذ المنبثقة */
.quantity-popup,
.cart-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.quantity-content,
.cart-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.quantity-content h3 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #2d3436;
}

.quantity-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.quantity-btn {
  background: #ff6b35;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.quantity-btn:hover {
  background: #e25a2c;
}

.quantity-input {
  width: 60px;
  height: 40px;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 1.1rem;
}

.error-message {
  color: #ff4757;
  text-align: center;
  margin-bottom: 1rem;
  display: none;
}

.popup-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.popup-buttons button {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.popup-buttons button:first-child {
  background: #ddd;
  color: #333;
}

.popup-buttons button:first-child:hover {
  background: #ccc;
}

.popup-buttons button:last-child {
  background: #ff6b35;
  color: white;
}

.popup-buttons button:last-child:hover {
  background: #e25a2c;
}

/* سلة الطلبات */
.cart-items {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.item-details {
  flex: 1;
}

.item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.remove-item {
  color: #ff4757;
  cursor: pointer;
  margin-left: 0.5rem;
}

.item-quantity {
  font-weight: bold;
  margin: 0 0.5rem;
}

.cart-empty {
  text-align: center;
  color: #666;
  padding: 2rem;
}

.cart-summary {
  border-top: 2px solid #eee;
  padding-top: 1rem;
  margin-bottom: 1.5rem;
}

.cart-summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cart-summary-item.total {
  font-weight: bold;
  font-size: 1.2rem;
  color: #ff6b35;
  border-top: 2px solid #eee;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

/* نموذج الطلب */
#order-form {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.user-info-title {
  color: #2d3436;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.dining-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dining-option {
  flex: 1;
  padding: 1rem;
  border: 2px solid #ddd;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dining-option.selected {
  border-color: #ff6b35;
  background: #fff4f0;
}

.dining-option i {
  font-size: 2rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.dining-option.selected i {
  color: #ff6b35;
}

.dining-option h4 {
  color: #666;
}

.dining-option.selected h4 {
  color: #ff6b35;
  font-weight: bold;
}

.delivery-fee {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 0.5rem;
  background: #f1f3f5;
  border-radius: 5px;
  font-weight: bold;
}

#order-form input {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 2px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

#order-form input:focus {
  outline: none;
  border-color: #ff6b35;
}

#order-form button[type="submit"] {
  width: 100%;
  padding: 1rem;
  background: #ff6b35;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

#order-form button[type="submit"]:hover {
  background: #e25a2c;
}

/* رسالة التأكيد */
#confirmation-message {
  background: #4cd137;
  color: white;
  padding: 1rem;
  border-radius: 5px;
  text-align: center;
  margin-bottom: 1rem;
  font-weight: bold;
}

.footer-link {
  display: block;
  text-align: center;
  color: #ff6b35;
  text-decoration: none;
  margin-top: 1rem;
  font-weight: bold;
}

.footer-link:hover {
  text-decoration: underline;
}

/* التجاوب مع الشاشات المختلفة */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .category-items {
    grid-template-columns: 1fr;
  }
  
  .dining-options {
    flex-direction: column;
  }
  
  .cart-icon {
    top: 10px;
    left: 10px;
    width: 50px;
    height: 50px;
  }
  
  .cart-icon i {
    font-size: 1.2rem;
  }
  
  .cart-count {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }
  
  .quantity-content,
  .cart-content {
    width: 95%;
    padding: 1.5rem;
  }
}