/* ══════════════════════════════════════════════════
   ثيم 2: الليلي الذهبي (Midnight Gold)
   وضع داكن فخم بلمسات ذهبية — يناسب أجواء المقاهي المسائية
   نفس أسماء الكلاسات بالضبط، فقط استبدل رابط ملف الـ CSS بالصفحة
   ══════════════════════════════════════════════════ */
:root {
  --primary: #d4a24a;
  --primary-dk: #a97c2f;
  --ink: #f5efe2;
  --ink-2: #d9cdb8;
  --ink-3: #a89a82;
  --cream: #14100b;
  --cream-2: #1e1811;
  --cream-3: #2b2318;
  --gold: #e8c471;
  --gold-dk: #a97c2f;
  --ember: #e2703a;
  --ok: #34d399;
  --font: 'Cairo', sans-serif;
}

body {
  font-family: var(--font);
  background-color: var(--cream);
  color: var(--ink);
  padding-bottom: 120px;
}

/* ── إشعار إضافة المنتج (في المنتصف) ── */
.center-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(20, 16, 11, 0.92);
    border: 1px solid rgba(212,162,74,0.35);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 900;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
.center-toast.show { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.center-toast i { font-size: 2.5rem; color: var(--gold); margin-bottom: 4px; }

/* ══════════ HERO HEADER ══════════ */
.hero-header {
  background: linear-gradient(160deg, #241c10 0%, #14100b 60%, #0c0906 100%);
  padding: 14px 16px 55px;
  position: relative;
  border-radius: 0 0 22px 22px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  border-bottom: 1px solid rgba(212,162,74,0.25);
}
.loc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  margin-bottom: 14px;
}
.loc-info { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; }
.loc-icon-circle {
  width: 34px; height: 34px;
  background: rgba(212,162,74,0.15);
  color: var(--gold);
  border: 1px solid rgba(212,162,74,0.35);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.loc-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.loc-title { font-size: 10.5px; color: var(--ink-3); font-weight: 700; }
.loc-desc {
  font-size: 13.5px; font-weight: 900; color: var(--ink);
  display: flex; align-items: center; gap: 5px;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.session-chip {
  font-size: .72rem; font-weight: 800; color: var(--gold);
  background: rgba(212,162,74,0.12);
  border: 1px solid rgba(212,162,74,0.3);
  padding: 6px 12px; border-radius: 20px;
  flex-shrink: 0; white-space: nowrap;
}
.login-chip {
  font-size: .74rem; font-weight: 900; color: #14100b;
  background: var(--gold);
  padding: 7px 14px; border-radius: 20px;
  flex-shrink: 0; white-space: nowrap;
  text-decoration: none;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}

.search-bar-wrap { position: relative; }
.search-bar-wrap i.fa-magnifying-glass {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--ink-3); font-size: 14px;
}
#searchInput {
  width: 100%; box-sizing: border-box;
  border: 1px solid rgba(212,162,74,0.25); outline: none;
  border-radius: 14px;
  padding: 13px 44px 13px 16px;
  font-family: var(--font); font-size: .85rem; font-weight: 700;
  color: var(--ink);
  background: var(--cream-2);
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
}
#searchInput::placeholder { color: var(--ink-3); font-weight: 600; }

/* ══════════ شبكة الأصناف ══════════ */
.cat-grid-wrap { padding: 0 16px; margin-top: -38px; margin-bottom: 4px; }
.cat-grid {
  background: var(--cream-2);
  border: 1px solid var(--cream-3);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  padding: 14px 6px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 14px;
}
.cat-grid-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; border: none; background: none; font-family: var(--font);
  padding: 4px;
}
.cat-grid-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--cream-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  transition: all .15s;
}
.cat-grid-item.active .cat-grid-icon {
  background: linear-gradient(145deg, var(--gold), var(--primary-dk));
  box-shadow: 0 6px 16px rgba(212,162,74,0.35);
}
.cat-grid-label { font-size: .72rem; font-weight: 800; color: var(--ink-2); }

/* ══════════ العروض اليومية ══════════ */
.section-title-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 10px;
}
.section-title { font-size: .95rem; font-weight: 900; color: var(--ink); }
.section-title .fa-fire { color: var(--ember); margin-left: 4px; }

.offers-scroll {
  display: flex; gap: 10px; overflow-x: auto; padding: 0 16px 6px;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.offers-scroll::-webkit-scrollbar { display: none; }
.offer-card {
  flex: 0 0 auto;
  width: 128px;
  background: var(--cream-2);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  cursor: pointer;
  scroll-snap-align: start;
  border: 1px solid var(--cream-3);
}
.offer-card-img { width: 100%; height: 88px; background: var(--cream-3); display: flex; align-items: center; justify-content: center; font-size: 2rem; overflow: hidden; }
.offer-card-img img { width: 100%; height: 100%; object-fit: cover; }
.offer-card-body { padding: 8px 9px 10px; }
.offer-card-name { font-size: .74rem; font-weight: 800; color: var(--ink); line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.4em; }
.offer-card-price { font-size: .78rem; font-weight: 900; color: var(--gold); }

/* ══════════ عرض المنتجات ══════════ */
#menuItemsWrap { display:flex; flex-direction:column; gap:0.7rem; padding: 0 16px; }
.menu-item-horizontal {
  background: var(--cream-2);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--cream-3);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.item-details { flex: 1; display: flex; flex-direction: column; }
.item-title-row { font-size: 0.95rem; font-weight: 900; color: var(--ink); margin-bottom: 4px; }
.item-desc-text { font-size: 0.75rem; color: var(--ink-3); line-height: 1.4; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-price-row { font-size: 1rem; font-weight: 900; color: var(--gold); }
.item-img-container { width: 95px; height: 95px; border-radius: 10px; overflow: hidden; position: relative; background: var(--cream-3); flex-shrink: 0; }
.item-img-src { width: 100%; height: 100%; object-fit: cover; }
.item-img-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.2rem; }
.no-results { text-align: center; padding: 3rem 1rem; color: var(--ink-3); font-weight: 700; font-size: .85rem; }

/* السلة العائمة بالأسفل */
.floating-basket-bar {
  position: fixed; bottom: 75px; left: 12px; right: 12px;
  background: linear-gradient(135deg, var(--gold), var(--primary-dk)); border-radius: 12px; padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  color: #14100b; font-weight: 900;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  cursor: pointer; z-index: 100; border: none; width: calc(100% - 24px);
}
.basket-count-badge { background: #14100b; color: var(--gold); width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }

/* العناصر التقليدية المدمجة داخل المودال */
.cart-item { display:flex; justify-content:space-between; align-items:center; padding:.75rem 0; border-bottom:1px dashed var(--cream-3); font-size:.9rem; }
.cart-qty-ctrl { display:flex; align-items:center; gap:.75rem; }
.qty-btn { width:28px; height:28px; border-radius:50%; border:1.5px solid var(--cream-3); background:var(--cream-2); color: var(--ink); font-size:.9rem; display:flex; align-items:center; justify-content:center; cursor:pointer; font-weight:bold;}
.qty-btn.plus { background:var(--gold); color:#14100b; border-color:var(--gold); }
.qty-num { font-size:.95rem; font-weight:900; color:var(--ink); min-width:20px; text-align:center; }

.dlv-select { width: 100%; padding: 12px; border-radius: 8px; border: 1.5px solid var(--cream-3); font-family: var(--font); font-weight: bold; background: var(--cream-2); color: var(--ink); outline: none; margin-bottom: 10px; font-size: 0.9rem; }
.warning-box { background: rgba(226,112,58,0.12); border: 1px solid var(--ember); color: var(--ember); padding: 10px; border-radius: 8px; font-size: 0.8rem; font-weight: bold; margin-top: 5px; text-align: center; }
.pref-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.pref-label { padding: 6px 14px; background: var(--cream-3); color: var(--ink-2); border-radius: 20px; font-size: 0.8rem; font-weight: bold; cursor: pointer; }
.pref-label.sel { background: var(--gold); color: #14100b; }

/* تصميم المودالات المتجاوب */
.modal-mask { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.7); backdrop-filter:blur(4px); z-index:300; align-items:flex-end; justify-content:center; }
.modal-sheet { background:var(--cream-2); border:1px solid var(--cream-3); color: var(--ink); border-radius:20px 20px 0 0; padding:1.5rem 1.25rem 2.5rem; width:100%; max-width:500px; max-height:85vh; overflow-y:auto; }
.modal-title-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:1rem; padding-bottom:.5rem; border-bottom:1px solid var(--cream-3); font-weight:900; color: var(--ink); }
.close-circle { width:30px; height:30px; background:var(--cream-3); color: var(--ink); border:none; border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.btn-orange { width:100%; background:linear-gradient(135deg, var(--gold), var(--primary-dk)); color:#14100b; border:none; padding:14px; border-radius:10px; font-weight:900; font-size:1rem; cursor:pointer; }
