:root {
  --bg-base: #0d1117;
  --bg-surface: #161b22;
  --bg-surface-elevated: #21262d;
  --border-subtle: #30363d;
  --border-focus: #ff5722;
  --primary: #ff5722;
  --primary-hover: #f4511e;
  --accent-gold: #f59e0b;
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-soft: #c9d1d9;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 30px;
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 10px 28px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-base);
  color: var(--text-main);
  padding-bottom: 100px;
  line-height: 1.6;
}

/* ترويسة الصفحة */
.app-header {
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 14px 20px;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), #e64a19);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.35);
}
.brand-text h1 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}
.brand-text p {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 1px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(36, 161, 72, 0.12);
  border: 1px solid rgba(36, 161, 72, 0.3);
  color: #42be65;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #42be65;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* شريط تصنيفات المنيو */
.categories-bar {
  background: var(--bg-base);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 69px;
  z-index: 90;
  padding: 12px 16px;
}
.categories-scroll {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }

.category-chip {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-soft);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.category-chip:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: #484f58;
}
.category-chip.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(255, 87, 34, 0.35);
}

/* الحاوية وشبكة البطاقات */
.main-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

/* بطاقة الوجبة */
.menu-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.menu-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-focus);
  box-shadow: var(--shadow-hover);
}
.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1c2128;
}
.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.menu-card:hover .card-img {
  transform: scale(1.04);
}
.category-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(13, 17, 23, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}
.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 16px;
  flex: 1;
}
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  margin-top: auto;
}
.card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-gold);
}

.btn-action {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-action:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* شريط السلة العائم */
.floating-cart-bar {
  position: fixed;
  bottom: 18px;
  left: 18px;
  right: 18px;
  max-width: 580px;
  margin: 0 auto;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  display: none;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 12px 36px rgba(0,0,0,0.7);
  z-index: 1000;
  animation: floatUp 0.3s ease;
}
@keyframes floatUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cart-summary-pill {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cart-badge-count {
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-summary-text {
  font-size: 13px;
  color: var(--text-soft);
}
.cart-summary-text strong {
  color: var(--accent-gold);
  font-weight: 700;
}
.btn-view-cart {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-view-cart:hover {
  background: var(--primary-hover);
}

/* النوافذ التفاعلية (Modals) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13, 17, 23, 0.82);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  animation: modalFade 0.25s ease;
}
@keyframes modalFade {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.modal-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}
.modal-head p {
  font-size: 12px;
  color: var(--accent-gold);
  font-weight: 600;
  margin-top: 2px;
}
.btn-close-modal {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-close-modal:hover {
  color: var(--text-main);
  border-color: #6e7681;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

/* الإضافات */
.addons-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.addon-card {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.15s ease;
}
.addon-card:hover {
  border-color: #484f58;
  background: #11151c;
}
.addon-card.selected {
  border-color: var(--primary);
  background: rgba(255, 87, 34, 0.08);
}
.addon-info-side {
  display: flex;
  align-items: center;
  gap: 12px;
}
.addon-info-side input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
  cursor: pointer;
}
.addon-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}
.addon-card.selected .addon-name {
  color: var(--text-main);
  font-weight: 600;
}
.addon-price-chip {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-gold);
  background: rgba(245, 158, 11, 0.12);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}

/* عناصر السلة */
.cart-item-row {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-item-details h4 {
  font-size: 13.5px;
  font-weight: 600;
}
.cart-item-addons {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
}
.cart-item-subtotal {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-gold);
  margin-top: 2px;
}
.qty-counter-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px 4px;
}
.qty-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  width: 24px;
  height: 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.qty-btn:hover { background: #30363d; }
.qty-number {
  font-size: 13px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

/* ملخص الفاتورة */
.invoice-card {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
.invoice-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}
.invoice-row.total {
  color: var(--text-main);
  font-size: 14.5px;
  font-weight: 700;
  border-top: 1px dashed var(--border-subtle);
  padding-top: 10px;
  margin-top: 2px;
}

/* الحقول */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}
.field-input {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 10px 14px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}
.field-input:focus {
  border-color: var(--border-focus);
}

/* الأزرار */
.modal-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 10px;
}
.btn-full {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  transition: all 0.2s ease;
}
.btn-whatsapp-submit {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp-submit:hover {
  background: #20ba5a;
  transform: translateY(-1px);
}
.btn-primary-confirm {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary-confirm:hover {
  background: var(--primary-hover);
}