/* =============================================================================
   ZHIHAT CAFE — Premium mobile-first web UI
   Design system: deep emerald-night + fresh metallic green + cream, soft glow,
   glassmorphism, generous spacing, RTL (Persian) first.
   ========================================================================== */

/* ----------------------------------------------------------------- Tokens -- */
:root {
  /* Surfaces (deep emerald-night) */
  --bg-0: #04110b;
  --bg-1: #07180f;
  --bg-2: #0c2417;
  --card-1: rgba(17, 40, 29, 0.72);
  --card-2: rgba(10, 28, 19, 0.66);
  --elevated: #123322;

  /* Accent (fresh emerald, metallic feel) */
  --accent-1: #c5f3d4;            /* light highlight     */
  --accent-2: #57d394;            /* mid                 */
  --accent-3: #2aa873;            /* deep                */
  --accent-4: #1a7a51;            /* shadow              */
  --accent-grad: linear-gradient(135deg, #d6f8e1 0%, #57d394 42%, #2aa873 100%);
  --accent-grad-soft: linear-gradient(135deg, #bdebcb, #4cc488);

  /* Cream / text */
  --cream: #f4e9cf;
  --text-1: #f5efe1;
  --text-2: #c4bda9;
  --text-3: #8b8470;
  --ink: #06231a;              /* text on accent      */

  /* Glow / lines */
  --glow-fresh: rgba(95, 217, 154, 0.45);
  --glow-soft: rgba(95, 217, 154, 0.35);
  --hair: rgba(95, 217, 154, 0.20);
  --hair-soft: rgba(95, 217, 154, 0.10);

  /* Radii / spacing */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Chrome metrics */
  --topbar-h: 64px;
  --nav-h: 78px;
  --app-w: 480px;

  /* Shadows */
  --sh-card: 0 14px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  --sh-soft: 0 8px 22px rgba(0, 0, 0, 0.35);
  --sh-accent: 0 10px 28px rgba(36, 170, 110, 0.34);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----------------------------------------------------------------- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Vazirmatn', system-ui, 'Segoe UI', Tahoma, sans-serif;
  color: var(--text-1);
  background: var(--bg-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;                 /* the .app column owns scrolling */
  overscroll-behavior: none;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

/* Headings get a touch of serif elegance for Latin glyphs; Vazirmatn for fa */
.serif { font-family: 'Cormorant Garamond', 'Vazirmatn', serif; }
.script { font-family: 'Great Vibes', 'Cormorant Garamond', cursive; }

/* ------------------------------------------------------- Ambient backdrop -- */
/* Candlelit room behind the centered device on larger screens */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 600px at 18% -5%, rgba(28, 92, 56, 0.30), transparent 60%),
    radial-gradient(800px 700px at 95% 12%, rgba(32, 100, 90, 0.18), transparent 55%),
    radial-gradient(700px 700px at 50% 115%, rgba(34, 110, 68, 0.20), transparent 60%),
    var(--bg-0);
  z-index: -2;
}
/* subtle film grain */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* --------------------------------------------------------------- App shell - */
.app {
  position: relative;
  width: min(var(--app-w), 100%);
  height: 100dvh;
  margin-inline: auto;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(24, 60, 44, 0.55), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
  overflow: hidden;
  isolation: isolate;
}

/* scrollable content region (sits beneath absolute top/bottom chrome) */
.app__main {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: var(--topbar-h);
  padding-bottom: calc(var(--nav-h) + 14px);
  scrollbar-width: none;
  scroll-behavior: smooth;
}
.app__main::-webkit-scrollbar { width: 0; height: 0; }

/* ------------------------------------------------------------------ Topbar - */
.topbar {
  position: absolute;
  top: 0; inset-inline: 0;
  height: var(--topbar-h);
  z-index: 30;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  transition: background .35s var(--ease), backdrop-filter .35s var(--ease), border-color .35s;
  border-bottom: 1px solid transparent;
}
.topbar--solid {
  background: linear-gradient(180deg, rgba(7, 24, 15, 0.92), rgba(7, 24, 15, 0.74));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hair-soft);
}
.topbar--transparent {
  background: linear-gradient(180deg, rgba(4, 17, 11, 0.55), transparent);
}
.topbar__title {
  text-align: center;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: .2px;
  color: var(--text-1);
}
.topbar__title--logo {
  font-size: 1.9rem;
  line-height: 1;
  color: var(--accent-1);
  text-shadow: 0 0 14px rgba(130, 240, 175, 0.55), 0 0 34px rgba(130, 240, 175, 0.30);
}

/* round icon button */
.iconbtn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  color: var(--accent-1);
  transition: transform .2s var(--ease), background .25s;
}
.iconbtn:hover { background: rgba(95, 217, 154, 0.10); }
.iconbtn:active { transform: scale(0.9); }
.iconbtn .icon { width: 24px; height: 24px; }

/* generic icon sizing */
.icon { width: 24px; height: 24px; display: inline-block; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.icon--fill { fill: currentColor; stroke: none; }

/* --------------------------------------------------------------- Screens --- */
.screen { display: none; padding: 4px 18px 8px; }
.screen.is-active { display: block; animation: screenIn .5s var(--ease-out); }
@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* home pulls up so the hero sits beneath the transparent topbar */
.screen--home { padding: 0 0 8px; margin-top: calc(-1 * var(--topbar-h)); }

/* section heading used across screens */
.section-head { display: flex; align-items: center; justify-content: space-between;
  margin: 26px 4px 14px; }
.section-head h2 { font-size: 1.22rem; font-weight: 700; letter-spacing: .2px; }
.section-head .link { font-size: .82rem; color: var(--accent-2); display: inline-flex; align-items: center; gap: 4px; }
.section-head .link .icon { width: 16px; height: 16px; }

/* accent word highlight inside Persian headings */
.hl { color: transparent; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; }

/* decorative accent divider (— ❖ —) */
.divider { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--accent-3); }
.divider::before, .divider::after { content: ''; height: 1px; width: 46px;
  background: linear-gradient(90deg, transparent, var(--accent-3)); }
.divider .gem { width: 16px; height: 16px; opacity: .9; }

/* =====================================================================
   HOME
   ===================================================================== */
.hero {
  position: relative;
  min-height: 560px;
  padding: calc(var(--topbar-h) + 30px) 24px 30px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  overflow: hidden;
  border-bottom-left-radius: 34px;
  border-bottom-right-radius: 34px;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12); transition: transform .6s var(--ease); will-change: transform; }
.hero__media::after {            /* cinematic dark gradient overlay */
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(4, 17, 11,0.15), transparent 45%),
    linear-gradient(180deg, rgba(4, 17, 11,0.35) 0%, rgba(4, 17, 11,0.55) 45%, rgba(5, 20, 13,0.96) 100%);
}
.hero__logo {
  font-size: 3.9rem; line-height: 1; color: var(--accent-1); margin-top: 6px;
  text-shadow: 0 0 16px rgba(130, 240, 175,0.7), 0 0 46px rgba(130, 240, 175,0.35), 0 0 80px rgba(70, 215, 140,0.25);
  animation: neon 4s ease-in-out infinite;
}
@keyframes neon {
  0%, 100% { text-shadow: 0 0 16px rgba(130, 240, 175,0.70), 0 0 46px rgba(130, 240, 175,0.35), 0 0 80px rgba(70, 215, 140,0.25); }
  50%      { text-shadow: 0 0 10px rgba(130, 240, 175,0.55), 0 0 30px rgba(130, 240, 175,0.25), 0 0 60px rgba(70, 215, 140,0.18); }
}
.hero__welcome { margin-top: auto; font-size: 2.2rem; font-weight: 800; line-height: 1.35; letter-spacing: .3px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.6); }
.hero__tag { margin-top: 12px; color: var(--cream); font-size: .98rem; opacity: .92; }
.hero__divider { margin-top: 16px; }

/* Order CTA card */
.order-cta {
  margin: -26px 18px 0;            /* overlaps hero bottom slightly */
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: center;
  padding: 18px;
  border-radius: var(--r-lg);
  background: linear-gradient(155deg, var(--card-1), var(--card-2));
  border: 1px solid var(--hair);
  box-shadow: var(--sh-card);
  backdrop-filter: blur(14px);
}
.order-cta__art {
  width: 92px; height: 92px; display: grid; place-items: center;
  border-radius: var(--r-md);
  background: radial-gradient(120% 120% at 30% 20%, rgba(95, 217, 154,0.18), rgba(95, 217, 154,0.04));
  border: 1px solid var(--hair-soft);
  color: var(--accent-1);
}
.order-cta__art .icon { width: 56px; height: 56px; }
.order-cta__body h3 { font-size: 1.25rem; font-weight: 800; }
.order-cta__body p { color: var(--text-2); font-size: .86rem; margin: 6px 0 14px; }

/* accent pill button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--r-pill); font-weight: 700; font-size: .95rem;
  position: relative; overflow: hidden; transition: transform .18s var(--ease), box-shadow .25s, filter .2s;
}
.btn .icon { width: 18px; height: 18px; }
.btn--accent { color: var(--ink); background: var(--accent-grad); box-shadow: var(--sh-accent); }
.btn--accent:hover { filter: brightness(1.05); box-shadow: 0 14px 34px rgba(36, 170, 110,0.5); }
.btn--accent:active { transform: scale(0.97); }
.btn--ghost { color: var(--accent-1); border: 1px solid var(--hair); background: rgba(95, 217, 154,0.05); }
.btn--ghost:hover { background: rgba(95, 217, 154,0.12); }
.btn--block { width: 100%; }
.btn--lg { padding: 15px 26px; font-size: 1.02rem; }
/* tap shine */
.btn--accent::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.55) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s var(--ease);
}
.btn--accent:hover::after { transform: translateX(120%); }
.btn .badge-circle { width: 26px; height: 26px; border-radius: 50%; background: rgba(5, 35, 24,0.18);
  display: grid; place-items: center; }
.btn .badge-circle .icon { width: 14px; height: 14px; stroke-width: 2.4; }

/* quick-access trio */
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 22px 18px 4px; }
.quick__card {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px;
  padding: 18px 10px;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, var(--card-1), var(--card-2));
  border: 1px solid var(--hair-soft);
  box-shadow: var(--sh-soft);
  backdrop-filter: blur(10px);
  transition: transform .2s var(--ease), border-color .25s, box-shadow .25s;
}
.quick__card:hover { transform: translateY(-3px); border-color: var(--hair); box-shadow: var(--sh-card); }
.quick__card:active { transform: translateY(0) scale(0.98); }
.quick__icon {
  width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px;
  color: var(--accent-1);
  background: radial-gradient(120% 120% at 30% 20%, rgba(95, 217, 154,0.16), rgba(95, 217, 154,0.03));
  border: 1px solid var(--hair-soft);
}
.quick__icon .icon { width: 26px; height: 26px; }
.quick__card h4 { font-size: .98rem; font-weight: 700; }
.quick__card p { font-size: .72rem; color: var(--text-3); line-height: 1.5; }

/* featured horizontal rail */
.rail {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 18px 8px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.feat-card {
  flex: 0 0 76%; max-width: 280px; scroll-snap-align: start;
  border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(160deg, var(--card-1), var(--card-2));
  border: 1px solid var(--hair-soft); box-shadow: var(--sh-card);
}
.feat-card__media { position: relative; height: 168px; }
.feat-card__media .ph-img, .feat-card__media img { width: 100%; height: 100%; object-fit: cover; }
.feat-card__media::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(6, 21, 14,0.85)); }
.feat-card__body { padding: 14px 16px 16px; }
.feat-card__body h4 { font-size: 1.06rem; font-weight: 700; }
.feat-card__body p { font-size: .8rem; color: var(--text-3); margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.feat-card__row { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.price { color: var(--accent-1); font-weight: 800; font-size: 1.02rem; }
.price small { font-weight: 600; font-size: .72rem; color: var(--accent-3); margin-inline-start: 3px; }

/* home footer */
.home-foot { text-align: center; padding: 30px 18px 26px; color: var(--text-3); }
.home-foot .script { font-size: 1.9rem; color: var(--accent-1); margin: 10px 0 8px;
  text-shadow: 0 0 18px rgba(130, 240, 175,0.4); }
.home-foot .est { letter-spacing: 4px; font-size: .68rem; }

/* =====================================================================
   MENU
   ===================================================================== */
.search {
  margin: 8px 4px 4px;
  display: grid; grid-template-rows: 0fr; transition: grid-template-rows .35s var(--ease);
}
.search.is-open { grid-template-rows: 1fr; }
.search__inner { overflow: hidden; }
.search__field {
  display: flex; align-items: center; gap: 10px; margin-bottom: 6px;
  padding: 12px 16px; border-radius: var(--r-pill);
  background: rgba(10, 28, 19,0.8); border: 1px solid var(--hair);
}
.search__field .icon { color: var(--accent-2); width: 20px; height: 20px; flex-shrink: 0; }
.search__field input { flex: 1; background: none; border: none; color: var(--text-1); font-size: .95rem; }
.search__field input::placeholder { color: var(--text-3); }

/* category tabs */
.cats { display: flex; gap: 10px; overflow-x: auto; padding: 6px 4px 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  flex: 0 0 auto; min-width: 76px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 12px 10px; border-radius: var(--r-md);
  background: linear-gradient(160deg, var(--card-1), var(--card-2));
  border: 1px solid var(--hair-soft); color: var(--text-2);
  transition: all .25s var(--ease);
}
.cat .icon { width: 26px; height: 26px; color: var(--accent-2); transition: color .25s; }
.cat span { font-size: .76rem; font-weight: 600; }
.cat.is-active {
  background: var(--accent-grad); color: var(--ink); border-color: transparent;
  box-shadow: var(--sh-accent); transform: translateY(-2px);
}
.cat.is-active .icon { color: var(--ink); }

/* menu item card  (RTL visual order:  [+]  [text]  [image] ) */
.mlist { display: flex; flex-direction: column; gap: 14px; padding: 8px 0 4px; }
.mcard {
  display: grid; grid-template-columns: 56px 1fr 104px; gap: 12px; align-items: center;
  padding: 12px; border-radius: var(--r-lg);
  background: linear-gradient(150deg, var(--card-1), var(--card-2));
  border: 1px solid var(--hair-soft); box-shadow: var(--sh-card);
  backdrop-filter: blur(10px);
  transition: transform .2s var(--ease), border-color .25s;
  animation: cardIn .5s var(--ease-out) both;
}
.mcard:active { transform: scale(0.99); }
.mcard--in-cart { border-color: rgba(95, 217, 154, 0.38); }
@keyframes cardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.mcard__add {
  grid-column: 1; justify-self: start;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink);
  background: var(--accent-grad); box-shadow: var(--sh-accent);
  transition: transform .18s var(--ease), filter .2s;
}
.mcard__add .icon { width: 22px; height: 22px; stroke-width: 2.6; }
.mcard__add:hover { filter: brightness(1.06); }
.mcard__add:active { transform: scale(0.85) rotate(90deg); }
.mcard__add.in-cart { background: linear-gradient(135deg, #1a7a51, #2aa873); }
.add-qty { font-size: 1.15rem; font-weight: 800; color: var(--ink); line-height: 1; }
.mcard__body { grid-column: 2; min-width: 0; }
.mcard__body h3 { font-size: 1.12rem; font-weight: 800; }
.mcard__body p { color: var(--text-2); font-size: .82rem; margin: 5px 0 9px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard__thumb {
  grid-column: 3; position: relative; width: 104px; height: 104px; border-radius: var(--r-md);
  overflow: hidden; border: 1px solid var(--hair-soft);
}
.mcard__thumb .ph-img, .mcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mcard__fav {
  position: absolute; top: 6px; inset-inline-end: 6px; z-index: 3; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; color: var(--cream);
  background: rgba(4, 17, 11,0.5); backdrop-filter: blur(4px); border: 1px solid var(--hair-soft);
  transition: transform .2s var(--ease), color .2s;
}
.mcard__fav .icon { width: 16px; height: 16px; }
.mcard__fav.is-fav { color: #ff6b81; }
.mcard__fav.is-fav .icon { fill: currentColor; stroke: currentColor; }
.mcard__fav:active { transform: scale(1.3); }

/* badge chip on imagery */
.chip {
  position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: var(--r-pill); font-size: .66rem; font-weight: 700;
  background: rgba(4, 17, 11,0.7); color: var(--accent-1); border: 1px solid var(--hair);
  backdrop-filter: blur(6px);
}
.chip .icon { width: 12px; height: 12px; }
.chip--new { color: #9fe0c0; border-color: rgba(159,224,192,0.4); }
.chip--suggested { color: #cfe9a3; }

/* full-menu promo banner (bottom of menu) */
.promo {
  margin: 18px 0 6px; display: grid; grid-template-columns: 70px 1fr; gap: 14px; align-items: center;
  padding: 18px; border-radius: var(--r-lg);
  background:
    linear-gradient(150deg, rgba(95, 217, 154,0.10), rgba(10, 28, 19,0.5)),
    var(--card-2);
  border: 1px solid var(--hair); box-shadow: var(--sh-card);
}
.promo__art { width: 70px; height: 70px; display: grid; place-items: center; color: var(--accent-1);
  border-radius: var(--r-md); background: rgba(95, 217, 154,0.08); border: 1px solid var(--hair-soft); }
.promo__art .icon { width: 38px; height: 38px; }
.promo h3 { font-size: 1.1rem; font-weight: 800; }
.promo p { font-size: .78rem; color: var(--text-2); margin: 4px 0 12px; }

/* loading skeletons */
.skel {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--card-1), var(--card-2));
  border: 1px solid var(--hair-soft); border-radius: var(--r-lg);
  display: grid; grid-template-columns: 56px 1fr 104px; gap: 12px; align-items: center; padding: 12px;
}
.skel__line { height: 12px; border-radius: 6px; background: rgba(255,255,255,0.06); }
.skel__circle { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,0.06); }
.skel__thumb { width: 104px; height: 104px; border-radius: var(--r-md); background: rgba(255,255,255,0.06); }
.skel__body { display: flex; flex-direction: column; gap: 9px; }
.skel::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(95, 217, 154,0.10), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* =====================================================================
   Image fallback (SVG/gradient food tiles when a photo fails to load)
   ===================================================================== */
.ph-img { position: relative; width: 100%; height: 100%; }
.ph-img--coffee { background: radial-gradient(120% 120% at 30% 20%, #5a3a22, #2a1810 70%); }
.ph-img--cold   { background: radial-gradient(120% 120% at 30% 20%, #4a6a72, #16323a 70%); }
.ph-img--cake   { background: radial-gradient(120% 120% at 30% 20%, #6b4128, #2c1812 70%); }
.ph-img--bread  { background: radial-gradient(120% 120% at 30% 20%, #7a5a2e, #33240f 70%); }
.ph-img__icon { position: absolute; inset: 0; margin: auto; width: 46%; height: 46%; z-index: 0;
  color: rgba(184, 242, 201,0.85); display: grid; place-items: center; }
.ph-img__icon .icon { width: 100%; height: 100%; }
/* real photo overlays the fallback icon; removed by JS onerror to reveal it */
.ph-img img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }

/* =====================================================================
   ORDER / CART
   ===================================================================== */
.page-head { padding: 8px 4px 6px; }
.page-head h2 { font-size: 1.5rem; font-weight: 800; }
.page-head p { color: var(--text-2); font-size: .88rem; margin-top: 4px; }

.field { margin: 16px 0; }
.field > label { display: block; font-size: .85rem; color: var(--text-2); margin: 0 4px 8px; font-weight: 600; }
.field__control {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--r-md);
  background: rgba(10, 28, 19,0.8); border: 1px solid var(--hair);
}
.field__control:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(95, 217, 154,0.12); }
.field__control .icon { color: var(--accent-2); flex-shrink: 0; }
.field__control input, .field__control textarea {
  flex: 1; background: none; border: none; color: var(--text-1); font-size: 1rem; resize: none;
}
.field__control input::placeholder, .field__control textarea::placeholder { color: var(--text-3); }
.field--table input { font-size: 1.4rem; font-weight: 800; letter-spacing: 1px; text-align: center; }

/* table quick-pick chips */
.tablepick { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tablepick button {
  min-width: 44px; padding: 8px 12px; border-radius: var(--r-pill); font-weight: 700; font-size: .9rem;
  color: var(--text-2); border: 1px solid var(--hair-soft); background: rgba(10, 28, 19,0.6);
  transition: all .2s var(--ease);
}
.tablepick button.is-active { background: var(--accent-grad); color: var(--ink); border-color: transparent; }

/* cart list */
.cart { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.citem {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center;
  padding: 10px; border-radius: var(--r-md);
  background: linear-gradient(150deg, var(--card-1), var(--card-2));
  border: 1px solid var(--hair-soft);
}
.citem__thumb { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; border: 1px solid var(--hair-soft); }
.citem__thumb .ph-img, .citem__thumb img { width: 100%; height: 100%; object-fit: cover; }
.citem__info { min-width: 0; }
.citem__info h4 { font-size: .98rem; font-weight: 700; }
.citem__info .price { font-size: .9rem; }
.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 4px;
  border-radius: var(--r-pill); background: rgba(10, 28, 19,0.8); border: 1px solid var(--hair-soft); }
.stepper button { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  color: var(--accent-1); transition: background .2s; }
.stepper button:hover { background: rgba(95, 217, 154,0.12); }
.stepper button .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.stepper .qty { min-width: 24px; text-align: center; font-weight: 800; }

/* order summary */
.summary { margin-top: 18px; padding: 16px 18px; border-radius: var(--r-lg);
  background: linear-gradient(150deg, var(--card-1), var(--card-2)); border: 1px solid var(--hair); }
.summary__row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; color: var(--text-2); font-size: .9rem; }
.summary__row--total { border-top: 1px dashed var(--hair); margin-top: 6px; padding-top: 12px;
  color: var(--text-1); font-weight: 800; font-size: 1.05rem; }
.summary__row--total .price { font-size: 1.2rem; }

/* empty states */
.empty { text-align: center; padding: 50px 24px; color: var(--text-3); }
.empty__icon { width: 84px; height: 84px; margin: 0 auto 18px; display: grid; place-items: center;
  border-radius: 28px; color: var(--accent-2);
  background: radial-gradient(120% 120% at 30% 20%, rgba(95, 217, 154,0.12), rgba(95, 217, 154,0.02));
  border: 1px solid var(--hair-soft); }
.empty__icon .icon { width: 42px; height: 42px; }
.empty h3 { color: var(--text-1); font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; }
.empty p { font-size: .86rem; max-width: 250px; margin: 0 auto 18px; }

/* =====================================================================
   FEEDBACK
   ===================================================================== */
.stars { display: flex; gap: 10px; justify-content: center; padding: 6px 0 2px; }
.stars button { color: var(--text-3); transition: transform .15s var(--ease), color .2s; }
.stars button .icon { width: 38px; height: 38px; }
.stars button:hover { transform: scale(1.12); }
.stars button.is-on { color: var(--accent-1); }
.stars button.is-on .icon { fill: currentColor; filter: drop-shadow(0 0 10px rgba(130, 240, 175,0.6)); }
.rating-label { text-align: center; color: var(--accent-2); font-size: .85rem; font-weight: 600; min-height: 1.2em; margin-top: 6px; }

/* =====================================================================
   PROFILE / FAVORITES
   ===================================================================== */
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 14px 0 6px; }
.avatar { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
  color: var(--accent-1); margin-bottom: 12px;
  background: radial-gradient(120% 120% at 30% 20%, rgba(95, 217, 154,0.18), rgba(95, 217, 154,0.03));
  border: 1px solid var(--hair); box-shadow: var(--sh-soft); }
.avatar .icon { width: 46px; height: 46px; }
.profile-head h2 { font-size: 1.3rem; font-weight: 800; }
.profile-head p { color: var(--text-3); font-size: .85rem; }

.menu-list { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.menu-row { display: flex; align-items: center; gap: 14px; padding: 16px;
  border-radius: var(--r-md); background: linear-gradient(150deg, var(--card-1), var(--card-2));
  border: 1px solid var(--hair-soft); transition: border-color .2s, transform .2s var(--ease); }
.menu-row:hover { border-color: var(--hair); transform: translateY(-2px); }
.menu-row__ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: var(--accent-1); background: rgba(95, 217, 154,0.08); border: 1px solid var(--hair-soft); }
.menu-row__ic .icon { width: 22px; height: 22px; }
.menu-row__tx { flex: 1; }
.menu-row__tx h4 { font-size: .98rem; font-weight: 700; }
.menu-row__tx p { font-size: .76rem; color: var(--text-3); }
.menu-row__arrow { color: var(--text-3); }
.menu-row__arrow .icon { width: 18px; height: 18px; }

/* contact lines */
.info-list { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.info-line { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: .88rem; padding: 4px 4px; }
.info-line .icon { width: 18px; height: 18px; color: var(--accent-2); flex-shrink: 0; }

/* =====================================================================
   BOTTOM NAV
   ===================================================================== */
.bottomnav {
  position: absolute; bottom: 0; inset-inline: 0; z-index: 30; height: var(--nav-h);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  padding: 0 10px;
  background: linear-gradient(180deg, rgba(9, 27, 18,0.78), rgba(6, 21, 14,0.96));
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--hair-soft);
  border-top-left-radius: 24px; border-top-right-radius: 24px;
}
.navbtn {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  color: var(--text-3); font-size: .68rem; font-weight: 600; padding-top: 6px;
  transition: color .25s;
}
.navbtn .icon { width: 24px; height: 24px; transition: transform .25s var(--ease); }
.navbtn.is-active { color: var(--accent-1); }
.navbtn.is-active .icon { transform: translateY(-2px); filter: drop-shadow(0 4px 10px rgba(130, 240, 175,0.5)); }

/* center elevated order button */
.navbtn--center { position: relative; }
.navbtn--center .fab {
  width: 60px; height: 60px; border-radius: 50%; margin-top: -34px;
  display: grid; place-items: center; color: var(--ink);
  background: var(--accent-grad);
  border: 4px solid var(--bg-1);
  box-shadow: 0 10px 26px rgba(36, 170, 110,0.5), 0 0 0 1px rgba(95, 217, 154,0.4);
  transition: transform .25s var(--ease);
}
.navbtn--center .fab .icon { width: 28px; height: 28px; }
.navbtn--center.is-active .fab { transform: scale(1.06); }
.navbtn--center:active .fab { transform: scale(0.93); }
.navbtn--center span { margin-top: 4px; }
/* cart count badge on the fab */
.fab__count {
  position: absolute; top: -34px; left: 50%; transform: translateX(16px);
  min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: #ff6b81; color: #fff; font-size: .68rem; font-weight: 800; line-height: 1;
  display: none; place-items: center; box-shadow: 0 2px 8px rgba(0,0,0,0.4); border: 2px solid var(--bg-1);
}
.fab__count.show { display: grid; }

/* =====================================================================
   TOAST
   ===================================================================== */
.toastwrap { position: absolute; left: 0; right: 0; bottom: calc(var(--nav-h) + 16px); z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 20px; }
.toast {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: var(--r-pill);
  background: linear-gradient(150deg, rgba(17, 40, 29,0.96), rgba(10, 28, 19,0.96));
  border: 1px solid var(--hair); color: var(--text-1); font-size: .88rem; font-weight: 600;
  box-shadow: var(--sh-card); backdrop-filter: blur(10px);
  animation: toastIn .35s var(--ease-out);
}
.toast .icon { width: 20px; height: 20px; color: var(--accent-1); }
.toast.out { animation: toastOut .3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.97); } }

/* =====================================================================
   DRAWER (hamburger)
   ===================================================================== */
.scrim { position: absolute; inset: 0; z-index: 40; background: rgba(2, 14, 9,0.6);
  backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.scrim.show { opacity: 1; visibility: visible; }
.drawer {
  position: absolute; top: 0; bottom: 0; inset-inline-end: 0; z-index: 50; width: 80%; max-width: 320px;
  background: linear-gradient(160deg, var(--bg-2), var(--bg-1));
  border-inline-start: 1px solid var(--hair);
  transform: translateX(100%); transition: transform .35s var(--ease-out);
  display: flex; flex-direction: column; padding: 26px 22px;
  box-shadow: -20px 0 50px rgba(0,0,0,0.5);
}
[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.show { transform: translateX(0) !important; }
.drawer__brand { text-align: center; padding-bottom: 18px; border-bottom: 1px solid var(--hair-soft); }
.drawer__brand .script { font-size: 2.2rem; color: var(--accent-1); text-shadow: 0 0 16px rgba(130, 240, 175,0.4); }
.drawer__brand p { color: var(--text-3); font-size: .76rem; letter-spacing: 2px; }
.drawer__nav { margin-top: 18px; display: flex; flex-direction: column; gap: 4px; }
.drawer__link { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-radius: var(--r-md);
  color: var(--text-1); font-weight: 600; transition: background .2s, color .2s; }
.drawer__link .icon { width: 22px; height: 22px; color: var(--accent-2); }
.drawer__link:hover { background: rgba(95, 217, 154,0.08); }
.drawer__foot { margin-top: auto; text-align: center; color: var(--text-3); font-size: .76rem; padding-top: 16px;
  border-top: 1px solid var(--hair-soft); }
.drawer__close { position: absolute; top: 18px; inset-inline-start: 18px; }

/* =====================================================================
   Misc / a11y
   ===================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* =====================================================================
   PAST ORDERS
   ===================================================================== */
.past-order {
  padding: 14px 16px; border-radius: var(--r-md);
  background: linear-gradient(150deg, var(--card-1), var(--card-2));
  border: 1px solid var(--hair-soft); margin-bottom: 10px;
}
.past-order__head { display: flex; justify-content: space-between; align-items: center; }
.past-order__table { font-weight: 700; font-size: .95rem; }
.past-order__total { color: var(--accent-1); font-weight: 800; font-size: .92rem; }
.past-order__total small { font-size: .7rem; color: var(--accent-3); margin-inline-start: 3px; }
.past-order__meta { font-size: .75rem; color: var(--text-3); margin-top: 3px; }
.past-order__items { font-size: .82rem; color: var(--text-2); margin-top: 7px; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* very small phones */
@media (max-width: 360px) {
  .quick { gap: 8px; }
  .quick__card p { display: none; }
  .mcard { grid-template-columns: 50px 1fr 92px; }
  .mcard__thumb { width: 92px; height: 92px; }
}
