/* ============================================================
   Brichu's Delivery — Shared Styles
   Design: warm cream & terracotta, handcrafted delivery menu
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Alex+Brush&family=Baloo+2:wght@400;500;600;700;800&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* ── CSS Variables ── */
:root {
  --bg:        #FBE9D8;
  --bg-card:   #FFF7EE;
  --fg:        #3B2415;
  --ember:     #C1652F;
  --ember-lt:  #D97F45;
  --gold:      #8B4A26;
  --gold-lt:   #A85D34;
  --muted:     #8A6A54;
  --dim:       #B29A85;
  --border:    rgba(139,74,38,0.18);
  --radius:    0.75rem;
  --header-h:  80px;
  --font-heading: 'Baloo 2', sans-serif;
  --font-body:    'Poppins', sans-serif;
  --font-logo:    'Abril Fatface', serif;
  --font-script:  'Alex Brush', cursive;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(at center top,   rgba(193,101,47,0.06) 0%, transparent 60%),
    radial-gradient(at center bottom, rgba(139,74,38,0.04) 0%, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
}

::selection { background: var(--ember); color: var(--bg); }

a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; color: inherit; font-family: inherit; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* ── Typography helpers ── */
.font-heading {
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}
.font-accent {
  font-family: var(--font-body);
  font-style: italic;
}
.text-ember-glow {
  text-shadow: none;
}
.text-ember { color: var(--ember); }
.text-gold  { color: var(--gold);  }
.text-muted { color: var(--muted); }
.text-dim   { color: var(--dim);   }
.uppercase  { text-transform: uppercase; }

/* ── Noise grain overlay ── */
.bg-grain {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

/* ── Animations ── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ember-flicker {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.75; transform: scale(0.95); }
}
@keyframes spin { to { transform: rotate(360deg); } }

.animate-fade-up { animation: fade-up 0.7s ease both; }
.animate-ember-flicker { animation: ember-flicker 2s ease-in-out infinite; }

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  height: var(--header-h);
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  background: rgba(251,233,216,0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Logo */
.logo-link { display: flex; align-items: center; gap: 0.75rem; }
.logo-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  box-shadow: 0 2px 8px rgba(59,36,21,0.15);
  flex-shrink: 0;
  padding: 0;
  overflow: hidden;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text span:first-child { font-family: var(--font-logo); font-weight: 400; font-size: 1.35rem; letter-spacing: 0.01em; text-transform: uppercase; color: var(--fg); }
.logo-text span:last-child  { font-family: var(--font-logo); font-weight: 400; font-size: 1.35rem; letter-spacing: 0.01em; text-transform: uppercase; color: var(--ember); }
.footer-logo-text { font-family: var(--font-logo); font-weight: 400; letter-spacing: 0.01em; }

/* Nav */
.main-nav { display: none; align-items: center; gap: 2rem; }
@media (min-width: 1024px) { .main-nav { display: flex; } }
.nav-btn {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
  background: none; border: none; padding: 0;
}
.nav-btn:hover, .nav-btn.active { color: var(--ember); }

.mobile-menu-btn { display: flex; padding: 0.5rem; color: var(--fg); }
@media (min-width: 1024px) { .mobile-menu-btn { display: none; } }

/* Mobile drawer */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(251,233,216,0.97);
  backdrop-filter: blur(16px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}
.mobile-nav.open { display: flex; }
#mobile-nav-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 320px;
  padding: 0 2rem;
}
.mobile-nav .nav-btn {
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  padding: 1.1rem 0.5rem;
  border-bottom: 1px solid rgba(139,74,38,0.15);
  text-align: center;
  transition: color 0.2s, background 0.2s;
}
.mobile-nav .nav-btn:last-child { border-bottom: none; }
.mobile-nav .nav-btn:active { background: rgba(193,101,47,0.08); }
.mobile-nav-close { position: absolute; top: 1.5rem; right: 1.5rem; padding: 0.5rem; }
.mobile-nav.open .mobile-nav-close { display: none; }

.hero {
  padding: calc(var(--header-h) + 1.25rem) 1.5rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

/* ── Hero card ── */
.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 1.75rem;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-card) 0%, #FBDCB8 100%);
  border: 1px solid rgba(193,101,47,0.15);
  box-shadow: 0 20px 50px -20px rgba(59,36,21,0.25);
}
@media (min-width: 900px) {
  .hero-card { grid-template-columns: 1.05fr 1fr; min-height: 460px; }
}
.hero-card-media {
  position: relative;
  min-height: 220px;
  order: -1;
}
@media (min-width: 900px) { .hero-card-media { order: 2; } }
.hero-card-media img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; display: block; }
.hero-card-media-fade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(59,36,21,0.35) 0%, transparent 35%);
}
@media (min-width: 900px) {
  .hero-card-media-fade { background: linear-gradient(to right, var(--bg-card) 0%, transparent 18%); }
}
.hero-card-content {
  position: relative; z-index: 1;
  padding: 2.25rem 1.75rem 2.5rem;
  display: flex; flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(255,247,238,0.55), rgba(255,247,238,0.4)),
    url('wood-bg.jpg');
  background-size: cover;
  background-position: center;
}
@media (min-width: 900px) { .hero-card-content { padding: 2.5rem 3rem; } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(193,101,47,0.3);
  background: rgba(255,255,255,0.5);
  align-self: flex-start;
  margin-bottom: 1.25rem;
}
.hero-badge span { font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.hero-title {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--fg);
}
.hero-title .accent { color: var(--ember); }
.hero-tagline { font-family: var(--font-script); font-style: normal; font-weight: 400; font-size: clamp(1.75rem, 3.5vw, 2.35rem); color: var(--gold); margin-top: 0.85rem; max-width: 30rem; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1.85rem;
  background: var(--ember);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  box-shadow: 0 4px 14px rgba(193,101,47,0.35);
  border: none;
}
.btn-primary:hover { background: var(--ember-lt); box-shadow: 0 6px 18px rgba(193,101,47,0.45); transform: translateY(-2px); }
.hero-meta { display: flex; align-items: center; gap: 0.6rem; margin-top: 1.75rem; font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.hero-meta .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ember); animation: ember-flicker 2s ease-in-out infinite; flex-shrink: 0; }

/* ── Section label ── */
.section-eyebrow { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.5rem; }
.eyebrow-line-l { height: 1px; width: 60px; background: linear-gradient(to right, transparent, var(--ember)); flex-shrink: 0; }
.eyebrow-line-r { height: 1px; flex: 1; background: linear-gradient(to right, var(--ember), rgba(193,101,47,0.4), transparent); }
.eyebrow-num    { font-family: var(--font-heading); font-size: 0.65rem; letter-spacing: 0.3em; color: var(--ember); text-transform: uppercase; }

/* ── Menu intro ── */
.menu-intro { max-width: 1280px; margin: 0 auto; padding: 5rem 1.5rem 2rem; text-align: center; }
.menu-intro-label { font-size: 0.7rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--gold); }
.menu-intro-title { font-family: var(--font-logo); font-weight: 400; font-size: clamp(3rem, 6vw, 5rem); text-transform: uppercase; margin-top: 1rem; }
.menu-intro-tagline { font-family: var(--font-body); font-style: italic; font-size: clamp(1.1rem, 2.5vw, 1.5rem); color: var(--gold); margin-top: 0.75rem; }

/* ── Category section (card preview, vertical scroll between categories) ── */
.category-section {
  scroll-margin-top: var(--header-h);
  padding: 2.75rem 0;
  border-bottom: 1px solid rgba(193,101,47,0.1);
}
.category-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.category-preview-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.cat-title-flat {
  font-family: var(--font-logo);
  font-weight: 400;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  text-transform: uppercase;
  color: var(--fg);
  margin-top: 0.35rem;
}
.cat-subtitle { font-family: var(--font-body); font-style: italic; font-weight: 500; font-size: clamp(0.9rem, 1.5vw, 1.05rem); color: var(--gold); margin-top: 0.35rem; }

/* Dish card row — always shown fully, wrapped as a responsive grid */
.dish-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.1rem;
}

.dish-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, opacity 0.2s;
}
.dish-card:hover { border-color: rgba(193,101,47,0.4); box-shadow: 0 10px 24px -12px rgba(59,36,21,0.25); transform: translateY(-2px); }
.dish-card.unavailable { opacity: 0.45; }
.dish-card-media { position: relative; aspect-ratio: 1/1; background: rgba(193,101,47,0.06); border-radius: 0.75rem; overflow: hidden; }
.dish-card-media img { width: 100%; height: 100%; object-fit: cover; }
.dish-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(193,101,47,0.35); }
.dish-expand-badge {
  position: absolute; top: 0.5rem; right: 0.5rem;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(30,17,9,0.45);
  display: flex; align-items: center; justify-content: center;
}
.dish-card-body { padding: 0.9rem 1rem 1.1rem; }
.dish-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--fg);
  line-height: 1.25;
}
.dish-desc { font-size: 0.78rem; color: var(--muted); margin-top: 0.35rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: 0.85rem; }
.dish-price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--fg);
  white-space: nowrap;
}
.dish-price .currency { font-size: 0.7rem; color: var(--gold); margin-left: 0.15rem; font-family: var(--font-body); font-weight: 600; }

/* Compact dish cards on mobile — always 3 per row, full detail lives in the modal */
@media (max-width: 640px) {
  .dish-row { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
  .dish-card-body { padding: 0.55rem 0.6rem 0.65rem; }
  .dish-name { font-size: 0.68rem; line-height: 1.3; }
  .dish-desc { display: none; }
  .dish-card-foot { flex-direction: column; align-items: flex-start; gap: 0.4rem; margin-top: 0.5rem; }
  .dish-price { font-size: 0.78rem; }
  .dish-card-foot .qty-btn { width: 22px; height: 22px; font-size: 0.9rem; }
  .dish-card-foot .qty-num { font-size: 0.85rem; min-width: 1.1rem; }
  .dish-card-foot .item-qty-ctrl { gap: 0.35rem; }
}

/* ── Dish detail modal ── */
.dish-modal {
  position: relative;
  background: var(--bg-card);
  border-radius: 1.25rem;
  overflow: hidden;
  width: 100%; max-width: 480px;
  max-height: 88vh;
  display: flex; flex-direction: column;
}
.dish-modal-close {
  position: absolute; top: 0.75rem; right: 0.75rem; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(30,17,9,0.5);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.dish-modal-close:hover { background: rgba(30,17,9,0.7); }
.dish-modal-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.dish-modal-media { position: relative; aspect-ratio: 3/4; background: rgba(193,101,47,0.08); border-radius: 1rem; overflow: hidden; }
.dish-modal-media img { width: 100%; height: 100%; object-fit: cover; }
.dish-modal-media .dish-placeholder svg { width: 56px; height: 56px; }
.dish-modal-body { padding: 1.5rem; }
.dish-modal-name { font-size: 1.35rem; text-transform: uppercase; color: var(--fg); }
.dish-modal-desc { font-size: 0.9rem; color: var(--muted); margin-top: 0.75rem; line-height: 1.65; }
.dish-modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.dish-modal-price { font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem; color: var(--fg); }
.dish-modal-price .currency { font-size: 0.8rem; color: var(--gold); margin-left: 0.25rem; font-family: var(--font-body); font-weight: 600; }
#dish-modal-qty { display: none; }
body.delivery-mode #dish-modal-qty { display: flex; }

/* ── Combos section (2-column banner cards) ── */
.combos-section { padding: 1.5rem 0 1rem; }
.combos-inner { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; text-align: center; }
.combos-title { font-family: var(--font-heading); font-size: clamp(1.75rem, 3.5vw, 2.5rem); text-transform: uppercase; margin-top: 0.5rem; }
.combos-subtitle { font-family: var(--font-body); font-style: italic; font-size: clamp(1rem, 2vw, 1.2rem); color: var(--gold); margin-top: 0.5rem; }
.combos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2.5rem;
  text-align: left;
}
@media (min-width: 720px) { .combos-grid { grid-template-columns: 1fr 1fr; } }

.combo-card {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  border: 1px solid rgba(193,101,47,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}
.combo-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -16px rgba(59,36,21,0.35); }
.combo-card-media { position: absolute; inset: 0; background: rgba(193,101,47,0.1); }
.combo-card-media img { width: 100%; height: 100%; object-fit: cover; }
.combo-card-media .dish-placeholder { color: rgba(193,101,47,0.3); }
.combo-card-fade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(30,17,9,0.88) 0%, rgba(30,17,9,0.45) 55%, rgba(30,17,9,0.05) 100%); }
.combo-card-content { position: relative; z-index: 1; padding: 1.5rem; width: 100%; }
.combo-name { font-size: clamp(1.2rem, 2.2vw, 1.6rem); text-transform: uppercase; color: #fff; line-height: 1.2; }
.combo-desc { font-size: 0.85rem; color: rgba(255,255,255,0.85); margin-top: 0.4rem; line-height: 1.5; }
.combo-includes { font-size: 0.75rem; color: rgba(255,255,255,0.65); margin-top: 0.4rem; font-style: italic; }
.combo-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1rem; }
.combo-price { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; color: #fff; white-space: nowrap; }
.combo-price .currency { font-size: 0.7rem; color: rgba(255,255,255,0.75); margin-left: 0.2rem; font-family: var(--font-body); font-weight: 600; }
.combo-card.in-cart { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(193,101,47,0.25); }

/* Qty stepper on dark combo overlay */
.combo-card .qty-btn { border-color: rgba(255,255,255,0.4); color: #fff; }
.combo-card .qty-btn:hover { border-color: #fff; background: rgba(255,255,255,0.15); }
.combo-card .qty-num { color: #fff; }
.combo-card .qty-num.has-qty { color: var(--ember-lt); }

/* ── Footer ── */
.site-footer {
  background:
    linear-gradient(135deg, rgba(255,247,238,0.55), rgba(255,247,238,0.4)),
    url('wood-bg.jpg');
  background-size: cover;
  background-position: center;
  border-top: 1px solid rgba(193,101,47,0.15);
  margin-top: 0;
}
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 4rem 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-title { font-family: var(--font-heading); font-size: 0.8rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.25rem; }
.footer-logo-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.7; max-width: 20rem; }
.footer-list { display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; color: var(--muted); }
.footer-list li { display: flex; align-items: center; gap: 0.75rem; }
.footer-list svg { color: var(--ember); flex-shrink: 0; }
.social-row { display: flex; gap: 0.75rem; }
.social-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(193,101,47,0.3);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: border-color 0.2s, color 0.2s;
}
.social-btn:hover { border-color: var(--ember); color: var(--ember); }
.admin-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin-top: 2.5rem;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--dim);
  transition: color 0.2s;
}
.admin-link:hover { color: var(--ember); }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(193,101,47,0.1);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem; color: var(--dim);
}
.footer-bottom em { font-family: var(--font-body); font-style: italic; color: var(--gold); }
.footer-bottom-left { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; }
.dev-credit { font-family: 'Courier New', monospace; font-weight: 600; color: var(--dim); font-size: 0.75rem; letter-spacing: 0.02em; }

/* ── Admin layout ── */
.admin-body {
  background: var(--bg);
  min-height: 100vh;
}

/* Login */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2.5rem;
  width: 100%; max-width: 400px;
}
.login-logo { display: flex; justify-content: center; margin-bottom: 2rem; }
.login-title { font-family: var(--font-heading); font-size: 1.5rem; text-transform: uppercase; letter-spacing: 0.05em; text-align: center; margin-bottom: 0.5rem; }
.login-sub { text-align: center; color: var(--muted); font-size: 0.875rem; margin-bottom: 2rem; }
.login-err { background: rgba(255,50,50,0.1); border: 1px solid rgba(255,50,50,0.3); color: #ff6b6b; border-radius: 0.5rem; padding: 0.75rem 1rem; font-size: 0.875rem; margin-bottom: 1rem; display: none; }

/* Form controls */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  background: rgba(59,36,21,0.04);
  border: 1px solid rgba(193,101,47,0.2);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--ember);
  box-shadow: 0 0 0 3px rgba(193,101,47,0.12);
}
.form-select option { background: #FFF7EE; }
.form-textarea { resize: vertical; min-height: 80px; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--dim); }

/* Admin shell */
.admin-shell { display: flex; min-height: 100vh; }

/* Sidebar */
.admin-sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  flex-shrink: 0;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 30;
  transition: transform 0.3s;
}
.admin-sidebar.closed { transform: translateX(-100%); }
@media (min-width: 1024px) { .admin-sidebar { position: sticky; transform: none !important; } }

.sidebar-head { padding: 1.5rem; border-bottom: 1px solid var(--border); }
.sidebar-logo { display: flex; align-items: center; gap: 0.75rem; }
.sidebar-badge { font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ember); background: rgba(193,101,47,0.1); border: 1px solid rgba(193,101,47,0.2); border-radius: 999px; padding: 0.15rem 0.5rem; margin-top: 0.25rem; }

.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.sidebar-section { padding: 0.5rem 1rem 0.25rem; font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.sidebar-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.65rem 1.25rem;
  font-size: 0.875rem; font-weight: 500;
  color: var(--muted);
  border-left: 3px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  cursor: pointer;
}
.sidebar-item:hover { color: var(--fg); background: rgba(193,101,47,0.05); }
.sidebar-item.active { color: var(--ember); background: rgba(193,101,47,0.08); border-left-color: var(--ember); }
.sidebar-item svg { flex-shrink: 0; }

.sidebar-foot { padding: 1rem 1.25rem; border-top: 1px solid var(--border); }
.sidebar-logout { display: flex; align-items: center; gap: 0.75rem; font-size: 0.875rem; color: var(--muted); transition: color 0.2s; width: 100%; text-align: left; }
.sidebar-logout:hover { color: #ff6b6b; }

/* Main content */
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; margin-left: 0; }
@media (min-width: 1024px) { .admin-main { margin-left: 260px; } }

.admin-topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(251,233,216,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 64px;
  display: flex; align-items: center; gap: 1rem;
}
.topbar-menu-btn { display: flex; padding: 0.5rem; }
@media (min-width: 1024px) { .topbar-menu-btn { display: none; } }
.topbar-title { font-family: var(--font-heading); font-size: 1.1rem; letter-spacing: 0.05em; text-transform: uppercase; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

.admin-content { padding: 2rem 1.5rem; flex: 1; }

/* Admin page header */
.page-header { margin-bottom: 2rem; }
.page-title { font-family: var(--font-heading); font-size: 1.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
.page-sub { color: var(--muted); font-size: 0.875rem; margin-top: 0.35rem; }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}
.card-title { font-family: var(--font-heading); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1.25rem; color: var(--muted); }

/* Stats grid */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.25rem; }
.stat-label { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); }
.stat-value { font-family: var(--font-heading); font-size: 2rem; margin-top: 0.25rem; color: var(--fg); }
.stat-value .stat-accent { color: var(--ember); }

/* Table */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th { text-align: left; font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table td { padding: 0.875rem 1rem; border-bottom: 1px solid rgba(193,101,47,0.06); vertical-align: middle; }
.admin-table tr:hover td { background: rgba(193,101,47,0.03); }
.admin-table .item-cat { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em; }
.badge-available { background: rgba(37,211,102,0.1); color: #25D366; border: 1px solid rgba(37,211,102,0.2); }
.badge-unavailable { background: rgba(193,101,47,0.1); color: var(--ember); border: 1px solid rgba(193,101,47,0.2); }

/* Toggle */
.toggle {
  position: relative; display: inline-block;
  width: 44px; height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: rgba(139,74,38,0.18);
  border-radius: 999px;
  transition: background 0.2s;
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(59,36,21,0.3);
  left: 3px; top: 3px;
  transition: transform 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--ember); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.05em;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  border: 1px solid transparent;
}
.btn-sm { padding: 0.4rem 0.875rem; font-size: 0.75rem; }
.btn-ember { background: var(--ember); color: #fff; }
.btn-ember:hover { background: var(--ember-lt); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn-ghost:hover { border-color: var(--ember); color: var(--ember); }
.btn-danger { background: transparent; border-color: rgba(255,80,80,0.3); color: #ff6b6b; }
.btn-danger:hover { background: rgba(255,80,80,0.1); }
.btn-full { width: 100%; justify-content: center; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-title { font-family: var(--font-heading); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.modal-close { color: var(--muted); transition: color 0.2s; }
.modal-close:hover { color: var(--fg); }
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* Toast */
.toast-container { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; min-width: 280px; }
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.875rem 1.25rem;
  font-size: 0.875rem; font-weight: 500;
  display: flex; align-items: center; gap: 0.75rem;
  animation: fade-up 0.3s ease;
  pointer-events: all;
}
.toast.success { border-color: rgba(37,211,102,0.4); }
.toast.success svg { color: #25D366; }
.toast.error { border-color: rgba(255,80,80,0.4); }
.toast.error svg { color: #ff6b6b; }

/* Overlay for sidebar on mobile */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 29; }
.sidebar-overlay.open { display: block; }

/* Responsive utils */
.hidden { display: none !important; }
@media (min-width: 768px) { .md\:block { display: block; } }
@media (min-width: 1024px) { .lg\:block { display: block; } }

/* Search bar */
.search-wrap { position: relative; }
.search-wrap svg { position: absolute; left: 0.875rem; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search-input { padding-left: 2.5rem; }

/* Category tabs in admin */
.cat-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.cat-tab {
  padding: 0.4rem 0.875rem;
  border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.05em;
  background: rgba(59,36,21,0.04);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  cursor: pointer;
}
.cat-tab:hover { border-color: rgba(193,101,47,0.4); color: var(--ember); }
.cat-tab.active { background: rgba(193,101,47,0.12); border-color: var(--ember); color: var(--ember); }

/* Drag handle */
.drag-handle { cursor: grab; color: var(--dim); padding: 0 0.25rem; }
.drag-handle:active { cursor: grabbing; }

/* ── Utility ── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.w-full { width: 100%; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-semibold { font-weight: 600; }
.text-right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ============================================================
   Delivery Mode & Reservation — Additions
   ============================================================ */

/* ── Item quantity control ── */
.item-qty-ctrl {
  display: none;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
body.delivery-mode .menu-item:not(.unavailable) .item-qty-ctrl { display: flex; }
body.delivery-mode .menu-item.unavailable { opacity: 0.25; pointer-events: none; }

.qty-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  color: var(--fg);
  font-size: 1.2rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.qty-btn:hover { border-color: var(--ember); color: var(--ember); }
.qty-btn:active { background: rgba(193,101,47,0.1); }
.qty-btn:disabled { opacity: 0.3; pointer-events: none; }

.qty-num {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  min-width: 2rem;
  text-align: center;
  color: var(--fg);
  transition: color 0.2s;
}
.qty-num.has-qty { color: var(--ember); }

/* Item highlight in delivery mode */
body.delivery-mode .menu-item:not(.unavailable) { cursor: default; transition: border-color 0.2s, box-shadow 0.2s; }
body.delivery-mode .menu-item.in-cart {
  border-color: var(--ember) !important;
  box-shadow: 0 0 0 2px rgba(193,101,47,0.15);
}

/* Compact qty stepper inside cards */
.dish-card-foot .item-qty-ctrl, .combo-card-foot .item-qty-ctrl { gap: 0.5rem; }
.dish-card-foot .qty-btn, .combo-card-foot .qty-btn { width: 26px; height: 26px; font-size: 1.05rem; }
.dish-card-foot .qty-num, .combo-card-foot .qty-num { font-size: 1rem; min-width: 1.4rem; }

/* ── Cart FAB ── */
.cart-fab {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: 0.5rem;
}
.cart-fab-btn {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  background: var(--bg-card);
  border: 2px solid var(--ember);
  border-radius: 999px;
  padding: 0.65rem 1.25rem 0.65rem 0.875rem;
  color: var(--fg);
  box-shadow: 0 4px 16px rgba(59,36,21,0.2);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.cart-fab-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(59,36,21,0.28); }
.cart-fab-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ember);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.cart-fab-badge {
  position: absolute;
  top: -5px; right: -5px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--bg);
  font-size: 0.6rem;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cart-fab-info { display: flex; flex-direction: column; line-height: 1.2; }
.cart-fab-label { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.cart-fab-price { font-family: var(--font-heading); font-size: 1rem; color: var(--ember); }

/* ── Reservation & Order modals — form tweaks ── */
.modal-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.order-summary {
  background: rgba(193,101,47,0.04);
  border: 1px solid rgba(193,101,47,0.15);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
  max-height: 200px;
  overflow-y: auto;
}
.order-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(193,101,47,0.08);
  font-size: 0.875rem;
}
.order-row:last-child { border-bottom: none; }
.order-row-name { color: var(--fg); flex: 1; }
.order-row-qty { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.order-row-price { color: var(--ember); font-family: var(--font-heading); white-space: nowrap; }
.order-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0 0;
  border-top: 1px solid rgba(193,101,47,0.2);
  margin-top: 0.25rem;
}
.order-total-label { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.order-total-price { font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem; color: var(--ember); }
.order-note { font-size: 0.75rem; color: var(--dim); margin-top: 0.35rem; font-style: italic; }

/* WA send button */
.btn-wa {
  background: #25D366;
  color: #fff;
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  flex: 1;
  justify-content: center;
}
.btn-wa:hover { background: #20bd5a; transform: translateY(-1px); }
