/* ==========================================================
   Bocco Eats — design system
   Mobile-first. Tokens, glass surfaces, 3D tilt, floating
   stage, shimmer skeletons, reveal motion, sheets and drawers.
   Breakpoints: base (phone) · 768px (tablet) · 1024px (desktop)
   ========================================================== */

/* ---------- 1. Tokens (bocco Brand Kit v1.0) ---------- */

:root {
  /* bocco redesign — one deliberate dark identity, no light variant.
     Layered surfaces: ground -> surface -> raised, each visibly lighter. */
  --maroon: #8D263C;            /* brand band (marquee), avatar tiles */
  --maroon-deep: #5E1526;
  --coral: #FF6B5E;             /* THE primary action colour */
  --coral-soft: rgba(255, 107, 94, 0.14);
  --gold: #F2B544;              /* Golden Pass, "New" tags, accent */
  --gold-ink: #2A0B12;          /* text on a solid gold fill (was referenced but never defined) */
  --gold-soft: rgba(242, 181, 68, 0.14);
  --gold-metal: linear-gradient(125deg, #FBE3A4 0%, #F2B544 28%, #C98A22 52%, #F6D07A 72%, #B9790C 100%);
  --white: #FFF3EF;
  --soft: #1A0A0D;
  --on-coral: #2A0B12;          /* text on coral, gold and paper surfaces */

  --brand: var(--coral);        /* CTAs, active states, focus accents */
  --brand-2: var(--gold);       /* small emphasis, data points */
  --brand-soft: #3A1D22;        /* icon wells, active nav pill, soft fills */
  --brand-grad: var(--coral);
  --green: #6FD6A1;
  --green-soft: rgba(111, 214, 161, 0.14);
  --violet: var(--maroon);
  --ink: #FFF3EF;               /* primary text */
  --ink-2: #D7B8B6;             /* secondary text */
  --muted: #B39592;             /* tertiary / inactive nav */
  --placeholder: #8F7270;
  --bg: #1A0A0D;                /* page background (ground) */
  --bg-2: #3A1D22;              /* raised: cards-in-cards, icon wells */
  --surface: #2B1418;           /* cards */
  --surface-glass: rgba(26, 10, 13, 0.86);
  --line: #4D2930;
  --accent-text: #FF8C7E;       /* wordmark, links, active nav label */
  --grad-accent: linear-gradient(100deg, #FF6B5E 0%, #F2B544 100%);
  --paper: #F3E6DC;             /* light "paper" cards: reorder hero, photo bg */
  --receipt: #F6ECE4;           /* Orders receipt cards */

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.2);
  --shadow-2: 0 14px 34px -14px rgba(0, 0, 0, 0.65), 0 2px 6px rgba(0, 0, 0, 0.3);
  --shadow-3: 0 30px 60px -20px rgba(242, 181, 68, 0.45), 0 12px 24px -12px rgba(0, 0, 0, 0.5);
  --r-sm: 14px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font-head: "Bricolage Grotesque", system-ui, sans-serif;
  --font: "Figtree", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  color-scheme: dark;
}

/* ---------- 2. Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; letter-spacing: -0.03em; color: var(--ink); font-family: var(--font-head); font-weight: 800; }
h1 { font-size: clamp(2rem, 4.2vw, 3rem); letter-spacing: -0.04em; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; color: var(--ink-2); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link { position: absolute; top: -60px; left: 12px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--r-sm); }
.skip-link:focus { top: 12px; }

.container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.section { padding: 28px 0 8px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head p { font-size: 0.9rem; margin-top: 4px; }
.link-more { font-weight: 600; font-size: 0.9rem; color: var(--brand); white-space: nowrap; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- 3. Buttons, chips, controls ---------- */

.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 16px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.28s var(--ease-spring), box-shadow 0.28s var(--ease-out), background 0.25s, border-color 0.25s, color 0.25s;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.96); transition-duration: 0.1s; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline-offset: 3px; }

.btn-primary {
  background: linear-gradient(150deg, #ff7862 0%, var(--coral) 45%, #e8443f 100%);
  color: var(--on-coral);
  box-shadow: 0 10px 22px -8px rgba(253, 91, 87, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -2px 4px rgba(94, 21, 38, 0.1);
}
.btn-primary:hover {
  box-shadow: 0 18px 32px -10px rgba(253, 91, 87, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(94, 21, 38, 0.1);
}
.btn-primary:active { box-shadow: 0 6px 14px -6px rgba(253, 91, 87, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: 0 2px 8px -4px rgba(20, 16, 18, 0.08);
}
.btn-ghost:hover {
  border-color: color-mix(in srgb, var(--brand) 55%, var(--line));
  background: var(--brand-soft);
  color: var(--accent-text);
  box-shadow: 0 10px 20px -10px rgba(253, 91, 87, 0.3);
}

.btn-dark {
  background: linear-gradient(150deg, #a33350 0%, var(--maroon) 55%, var(--maroon-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 22px -8px rgba(94, 21, 38, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-dark:hover { box-shadow: 0 18px 30px -10px rgba(94, 21, 38, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.2); }

.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.85rem; border-radius: 12px; }

/* Shine sweep on primary buttons */
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-20deg);
  animation: sweep 3.6s var(--ease-out) infinite;
  pointer-events: none;
}
@keyframes sweep { 0%, 60% { left: -60%; } 100% { left: 130%; } }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 8px -4px rgba(20, 16, 18, 0.1);
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s, background 0.25s, color 0.25s, border-color 0.25s;
}
.icon-btn:hover {
  transform: translateY(-3px) scale(1.05);
  color: var(--accent-text);
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  box-shadow: 0 14px 24px -10px rgba(253, 91, 87, 0.4);
}
.icon-btn:active { transform: translateY(-1px) scale(0.95); }
.icon-btn.spin svg { animation: spin 0.6s var(--ease-out); }
@keyframes spin { from { transform: rotate(-200deg) scale(.6); } to { transform: none; } }

.chip-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 8px; scroll-snap-type: x proximity; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: transform 0.28s var(--ease-spring), box-shadow 0.28s, background 0.25s, border-color 0.25s, color 0.25s;
}
.chip:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: 0 8px 16px -8px rgba(253, 91, 87, 0.3); }
.chip:active { transform: translateY(0) scale(0.96); }
.chip[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--maroon), var(--maroon-deep));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 20px -10px rgba(94, 21, 38, 0.6);
}

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 8px; font-size: 0.76rem; font-weight: 700; }
.badge-rating { background: var(--maroon); color: #fff; }
.badge-soft { background: var(--brand-soft); color: var(--accent-text); }
.badge-gold { background: var(--gold); color: var(--gold-ink); }
.badge-veg { background: var(--green-soft); color: var(--green); }
.badge-glass { background: rgba(255,255,255,.85); color: var(--ink); backdrop-filter: blur(6px); }

.veg-dot { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1.5px solid; border-radius: 4px; flex-shrink: 0; }
.veg-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.veg-dot.veg { color: var(--green); }
.veg-dot.nonveg { color: #d6322a; }

/* Quantity stepper */
.stepper {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--brand);
  box-shadow: 0 8px 18px -12px rgba(253, 91, 87,.7);
  overflow: hidden;
}
.stepper button {
  width: 34px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--accent-text);
  font-size: 1.15rem;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s, transform .15s var(--ease-out);
}
.stepper button:hover { background: var(--brand-soft); }
.stepper button:active { transform: scale(0.85); }
.stepper output { min-width: 26px; text-align: center; font-weight: 800; color: var(--accent-text); font-variant-numeric: tabular-nums; }

/* Add button used on menu and product cards: a full pill, like a chip you tap */
.add-btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 84px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--brand);
  background: var(--surface);
  color: var(--accent-text);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 8px 16px -10px rgba(253, 91, 87, .55);
  transition: transform .3s var(--ease-spring), box-shadow .3s, background .25s, color .25s, border-color .25s;
}
.add-btn:hover {
  background: linear-gradient(150deg, #ff7862, var(--coral) 60%, #e8443f);
  border-color: transparent;
  color: var(--on-coral);
  transform: translateY(-2px);
  box-shadow: 0 14px 24px -10px rgba(253, 91, 87, .75);
}
.add-btn:active { transform: scale(.93); }
.add-btn .plus {
  display: inline-grid;
  place-items: center;
  width: 15px;
  height: 15px;
  margin-left: 2px;
  border-radius: 50%;
  background: currentColor;
  color: var(--surface);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  transition: transform .3s var(--ease-spring);
}
.add-btn:hover .plus { transform: rotate(90deg); }

/* ---------- 4. Glass header + bottom nav ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface-glass);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.topbar.scrolled { border-color: var(--line); box-shadow: 0 8px 24px -18px rgba(20,22,31,.35); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }

/* Every page's header: same fine gradient line on the header's bottom
   edge, same icon treatment — so account/delivery/etc. pages carry
   the exact header home.html uses, not a separate look. */
.topbar { border-bottom: 0; }
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(253,91,87,0), #FD5B57 22%, #FEB03D 50%, #8D263C 78%, rgba(141,38,60,0));
  background-size: 200% 100%;
  box-shadow: 0 4px 14px -4px rgba(253,91,87,0.55);
  animation: sheen 8s linear infinite;
}
@keyframes sheen { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .topbar::after { animation: none; } }
@media (max-width: 767px) { .topbar .logo-h { font-size: 24px; } }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.account-icon {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--accent-text);
  box-shadow: var(--shadow-1);
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s;
}
.account-icon:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); text-decoration: none; }

/* Back button: replaces the long nav-link list on every non-home screen */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s, border-color 0.25s;
}
.back-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--accent-text); text-decoration: none; }
.back-btn svg { flex: 0 0 auto; }
@media (max-width: 480px) { .back-btn span { display: none; } .back-btn { width: 44px; height: 44px; padding: 0; justify-content: center; } }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.15rem; letter-spacing: -0.03em; }
/* Typographic wordmark — the redesign drops the maroon lockup SVG in
   favour of the display face itself as the mark, per every reference
   screen in bocco-redesign/. */
.logo-h { display: inline-block; font-family: var(--font-head); font-weight: 800; font-size: 32px; letter-spacing: -0.045em; line-height: 1; color: var(--accent-text); }
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--brand-grad);
  color: #fff;
  font-size: 1.05rem;
  box-shadow: 0 8px 18px -8px rgba(253, 91, 87,.9);
  transform-style: preserve-3d;
  transition: transform .6s var(--ease-spring);
}


.location {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  background: none;
  border: 0;
  text-align: left;
}
.location:hover { background: var(--bg-2); }
.location small { font-size: 0.75rem; font-weight: 700; color: var(--accent-text); text-transform: uppercase; letter-spacing: .08em; }
.location strong { font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }

.search {
  position: relative;
  flex: 1;
  min-width: 0;
}
.search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  transition: border-color .2s, box-shadow .2s, transform .3s var(--ease-out);
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 600 0.72rem var(--font); color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; background: var(--bg); }

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #8D263C, #FD5B57, #FEB03D, #8D263C);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  animation: rotate-ring 8s linear infinite;
}
.avatar span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); color: var(--ink); animation: rotate-ring-rev 8s linear infinite; }
@keyframes rotate-ring { to { transform: rotate(360deg); } }
@keyframes rotate-ring-rev { to { transform: rotate(-360deg); } }

.cart-link {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  transition: transform .3s var(--ease-spring);
}
.cart-link:hover { transform: translateY(-2px) scale(1.04); }
.count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: var(--on-coral);
  font-size: 0.72rem;
  font-weight: 800;
  border: 2px solid var(--bg);
}
.count-badge.pop { animation: pop .5s var(--ease-spring); }
@keyframes pop { 0% { transform: scale(.4); } 60% { transform: scale(1.35); } 100% { transform: scale(1); } }

.top-nav { display: none; gap: 22px; font-weight: 600; font-size: 0.92rem; color: var(--ink-2); }
.top-nav a { position: relative; padding: 6px 0; }
.top-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.top-nav a:hover::after, .top-nav a[aria-current="page"]::after { transform: scaleX(1); }
.top-nav a[aria-current="page"] { color: var(--ink); }

.bottom-nav {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px;
  border-radius: 22px;
  background: var(--surface-glass);
  backdrop-filter: saturate(170%) blur(18px);
  -webkit-backdrop-filter: saturate(170%) blur(18px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  transition: color .25s;
}
/* Only the icon well gets the active pill (spec: "a raised pill behind its
   icon"), not the whole row — the label stays plain text below it. */
.bottom-nav a .ico { display: grid; place-items: center; height: 24px; padding: 4px 18px; border-radius: 999px; }
.bottom-nav a .ico svg { width: 22px; height: 22px; }
.bottom-nav a .ico { transition: transform .4s var(--ease-spring), background .25s; }
.bottom-nav a[aria-current="page"] { color: var(--accent-text); font-weight: 700; }
.bottom-nav a[aria-current="page"] .ico { background: var(--brand-soft); transform: translateY(-2px) scale(1.12); }
.bottom-nav a:active .ico { transform: scale(.85); }

/* Bottom dock: a fixed bar along the bottom edge on phones, always
   visible, same on every page that has one. 78px tall, ground background,
   a single hairline top border — calm, not a decorative chrome strip. */
@media (max-width: 1023px) {
  .bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    height: 78px;
    margin: 0;
    padding: 8px 10px max(10px, env(safe-area-inset-bottom));
    border-radius: 0;
    background: var(--bg);
    border: 0;
    border-top: 1px solid var(--brand-soft);
    box-shadow: none;
  }
}

/* Floating cart bar (mobile & desktop) */
.cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(max(10px, env(safe-area-inset-bottom)) + 76px);
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 62px;
  padding: 0 16px 0 10px;
  border-radius: 20px;
  background: var(--coral);
  color: var(--on-coral);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transform: translateY(160%) scale(.96);
  opacity: 0;
  pointer-events: none;
  transition: transform .5s var(--ease-spring), opacity .3s;
}
.cart-bar.show { transform: none; opacity: 1; pointer-events: auto; }
.cart-bar .thumbs { display: flex; flex: 0 0 auto; }
.cart-bar .thumbs img { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; border: 2px solid var(--coral); background: var(--paper); }
.cart-bar .thumbs img + img { margin-left: -14px; }
.cart-bar .info { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.cart-bar .info strong { font-weight: 700; font-size: 1rem; }
.cart-bar .info small { font-weight: 500; font-size: 0.78rem; opacity: 0.8; }
.cart-bar .cta { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 0.92rem; white-space: nowrap; }

/* ---------- 5. Hero (home) ---------- */

.hero { position: relative; display: grid; gap: 22px; align-items: center; padding: 22px 0 8px; }
.hero-copy .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-2);
  box-shadow: var(--shadow-1);
  margin-bottom: 14px;
}
.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.pulse-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--green); animation: ping 1.8s var(--ease-out) infinite; }
@keyframes ping { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }

.hero h1 .grad {
  background: linear-gradient(100deg, var(--coral) 0%, var(--maroon) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: gradient-shift 6s ease infinite;
}
@keyframes gradient-shift { to { background-position: 200% center; } }

.hero-lede { margin-top: 14px; font-size: 1.02rem; max-width: 52ch; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.stat-pill {
  display: flex;
  flex-direction: column;
  padding: 10px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  min-width: 118px;
}
.stat-pill strong { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-pill span { font-size: 0.76rem; color: var(--muted); font-weight: 600; }

/* 3D floating food stage */
.stage {
  position: relative;
  height: 280px;
  perspective: 1100px;
  transform-style: preserve-3d;
  --px: 0deg;
  --py: 0deg;
}
.stage-scene {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(var(--py)) rotateY(var(--px));
  transition: transform .6s var(--ease-out);
}
.stage-plate {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  height: 220px;
  margin: -110px 0 0 -110px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0%, #FFE5E3 45%, #FDA9A5 100%);
  box-shadow: inset 0 -14px 30px rgba(94, 21, 38, .25), 0 40px 60px -20px rgba(253, 91, 87, .55);
  transform: translateZ(-40px) rotateX(70deg);
  animation: plate-spin 22s linear infinite;
}
.stage-plate::after {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  border: 2px dashed rgba(253, 91, 87, .25);
}
@keyframes plate-spin { to { transform: translateZ(-40px) rotateX(70deg) rotateZ(360deg); } }

.float-item {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: var(--s, 64px);
  line-height: 1;
  filter: drop-shadow(0 18px 18px rgba(20,22,31,.25));
  transform: translate(-50%, -50%) translate3d(var(--x), var(--y), var(--z, 0));
  animation: hover-y var(--d, 6s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
  user-select: none;
}
@keyframes hover-y {
  0%, 100% { transform: translate(-50%, -50%) translate3d(var(--x), var(--y), var(--z, 0)) rotateY(0deg); }
  50% { transform: translate(-50%, calc(-50% - 16px)) translate3d(var(--x), var(--y), var(--z, 0)) rotateY(14deg); }
}

.stage-badge {
  position: absolute;
  left: 4%;
  bottom: 6%;
  transform: translateZ(60px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  background: var(--surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  font-size: .85rem;
  font-weight: 700;
  animation: float-card 5s ease-in-out infinite;
}
.stage-badge small { display: block; color: var(--muted); font-weight: 600; font-size: .72rem; }
.stage-badge .tick { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--green-soft); color: var(--green); }
@keyframes float-card { 0%, 100% { transform: translateZ(60px) translateY(0); } 50% { transform: translateZ(60px) translateY(-8px); } }

/* ---------- 6. Offers carousel ---------- */

.offers { display: grid; grid-auto-flow: column; grid-auto-columns: min(82%, 340px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 14px; scrollbar-width: none; }
.offers::-webkit-scrollbar { display: none; }
.offer {
  position: relative;
  overflow: hidden;
  scroll-snap-align: start;
  min-height: 140px;
  padding: 18px;
  border-radius: var(--r-lg);
  color: #fff;
  background: linear-gradient(135deg, var(--g1), var(--g2, var(--g1)));
  box-shadow: 0 18px 30px -18px var(--g1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transform: perspective(700px) rotateY(0deg);
  transition: transform .5s var(--ease-out), box-shadow .5s;
}
.offer:hover { transform: perspective(700px) rotateY(-4deg) translateY(-4px); box-shadow: 0 26px 40px -18px var(--g1); }
.offer::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.35), transparent 40%);
  animation: drift 9s ease-in-out infinite alternate;
}
@keyframes drift { to { transform: translate(-8%, 6%) rotate(12deg); } }
.offer::after {
  content: "";
  position: absolute;
  top: -50%; bottom: -50%; left: -40%;
  width: 30%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg);
  animation: sweep 5s var(--ease-out) infinite;
  pointer-events: none;
}
.offer > * { position: relative; z-index: 1; }
.offer .emoji { font-size: 2.6rem; filter: drop-shadow(0 8px 10px rgba(0,0,0,.2)); transition: transform .6s var(--ease-spring); }
.offer:hover .emoji { transform: scale(1.15) rotate(-8deg); }
.offer h3 { color: #fff; font-size: 1.15rem; }
.offer p { color: rgba(255,255,255,.9); font-size: .86rem; }
.offer .code { align-self: flex-start; margin-top: 8px; padding: 4px 10px; border-radius: 8px; background: rgba(255,255,255,.22); border: 1px dashed rgba(255,255,255,.7); font-size: .75rem; font-weight: 800; letter-spacing: .08em; }

/* ---------- 7. Category tiles (grocery) ---------- */

.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.cat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 6px 12px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--g);
  cursor: pointer;
  transform-style: preserve-3d;
  transform: perspective(600px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .4s var(--ease-out), box-shadow .4s;
  box-shadow: var(--shadow-1);
  overflow: hidden;
  text-align: center;
}
.cat:hover { box-shadow: var(--shadow-2); }
.cat .emoji { font-size: 2.1rem; transform: translateZ(28px); transition: transform .4s var(--ease-spring); }
.cat:hover .emoji { transform: translateZ(28px) scale(1.12) rotate(-6deg); }
.cat span.label { font-size: .8rem; font-weight: 700; color: #22263a; transform: translateZ(14px); }
.cat .gloss { position: absolute; inset: 0; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.55), transparent 55%); pointer-events: none; opacity: .9; }

/* ---------- 8. Products (grocery) ---------- */

.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.product {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  transform-style: preserve-3d;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .45s var(--ease-out), box-shadow .45s, border-color .3s;
}
.product:hover { box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
.product .thumb {
  position: relative;
  display: grid;
  place-items: center;
  height: 110px;
  border-radius: 12px;
  background: linear-gradient(160deg, var(--brand-soft), var(--bg-2));
  transform: translateZ(24px);
  overflow: hidden;
}
.product .thumb .emoji { font-size: 3.2rem; transition: transform .6s var(--ease-spring); }
.product:hover .thumb .emoji { transform: scale(1.14) rotate(-8deg); }
.product .off { position: absolute; top: 8px; left: 8px; }
.product .name { font-weight: 700; font-size: .95rem; color: var(--ink); }
.product .qty { font-size: .8rem; color: var(--muted); }
.product .price-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.price { display: flex; align-items: baseline; gap: 6px; }
.price strong { font-size: 1rem; font-weight: 800; }
.price s { font-size: .8rem; color: var(--muted); }
.delivery-tag { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; color: var(--green); }

/* ---------- 9. Restaurant cards ---------- */

.filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sort-select {
  height: 38px;
  padding: 0 34px 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7185' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
  color: var(--ink);
  font: inherit;
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
}

.rgrid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.rcard {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateZ(0);
  transition: transform .5s var(--ease-out), box-shadow .5s, border-color .3s;
  color: inherit;
}
.rcard:hover { box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.rcard:focus-visible { outline-offset: 4px; }
.rcard .media {
  position: relative;
  height: 158px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  overflow: hidden;
  transform: translateZ(20px);
}
.rcard .media::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,.4), transparent 45%);
  animation: drift 10s ease-in-out infinite alternate;
}
.rcard .media .emoji { position: relative; font-size: 4.6rem; filter: drop-shadow(0 14px 16px rgba(0,0,0,.25)); transition: transform .7s var(--ease-spring); }
.rcard:hover .media .emoji { transform: scale(1.12) rotate(-6deg) translateY(-4px); }
.rcard .media .corner { position: absolute; top: 12px; left: 12px; }
.rcard .media .time { position: absolute; bottom: 12px; right: 12px; }
.rcard .body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.rcard .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rcard h3 { font-size: 1.05rem; }
.rcard .meta { font-size: .84rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rcard .divider { height: 1px; background: var(--line); margin: 4px 0; }
.rcard .offer-line { display: flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; color: var(--accent-text); }
.rcard .offer-line .tag { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 6px; background: var(--brand-soft); font-size: .7rem; }

/* 3D sheen that follows the pointer */
.rcard::after,
.cat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.22), transparent 42%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.rcard:hover::after, .cat:hover::after { opacity: 1; }

/* Skeletons */
.skeleton { position: relative; overflow: hidden; background: var(--bg-2); border-radius: var(--r-md); }
.skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); transform: translateX(-100%); animation: shimmer 1.3s infinite; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); } }
:root[data-theme="dark"] .skeleton::after { background: linear-gradient(90deg, transparent, rgba(255,255,255,.06), transparent); }
@keyframes shimmer { to { transform: translateX(100%); } }
.sk-card { height: 290px; }
.sk-line { height: 14px; margin: 14px 16px 0; width: 60%; }
.sk-line.short { width: 38%; margin-top: 10px; }

.empty { text-align: center; padding: 40px 16px; border: 1px dashed var(--line); border-radius: var(--r-lg); }
.empty .emoji { font-size: 2.6rem; display: inline-block; animation: wobble 2.4s ease-in-out infinite; }
@keyframes wobble { 0%,100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }

/* ---------- 10. Restaurant page ---------- */

.rhero { position: relative; height: 230px; overflow: hidden; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.rhero::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(circle at 75% 25%, rgba(255,255,255,.45), transparent 40%), radial-gradient(circle at 15% 90%, rgba(0,0,0,.18), transparent 40%); }
.rhero .big { position: absolute; right: 8%; top: 50%; font-size: 9rem; transform: translateY(-50%) translateZ(0); filter: drop-shadow(0 24px 30px rgba(0,0,0,.25)); will-change: transform; animation: hover-y 7s ease-in-out infinite; }
.rhero .back { position: absolute; top: 16px; left: 16px; z-index: 2; }

.rinfo {
  position: relative;
  margin-top: -64px;
  padding: 20px;
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  display: grid;
  gap: 10px;
  z-index: 2;
}
.rinfo h1 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.rinfo .stats { display: flex; flex-wrap: wrap; gap: 8px; }
.rinfo .stat { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--bg); font-size: .84rem; font-weight: 700; color: var(--ink-2); }
.rinfo .stat svg { color: var(--accent-text); }

.catnav {
  position: sticky;
  top: 64px;
  z-index: 40;
  margin: 18px -16px 0;
  padding: 10px 16px 0;
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.catnav .chip-row { padding-bottom: 10px; }
.catnav .chip[aria-current="page"], .catnav .chip[aria-selected="true"] { background: var(--maroon); color: #fff; border-color: transparent; box-shadow: 0 10px 20px -10px rgba(253, 91, 87,.8); }

.menu { display: grid; gap: 26px; margin-top: 22px; padding-bottom: 120px; }
.menu-section h2 { font-size: 1.2rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.menu-section h2 small { font-size: .8rem; color: var(--muted); font-weight: 600; }
.mlist { display: grid; gap: 12px; }
.mitem {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 14px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .4s var(--ease-out), box-shadow .4s, border-color .3s;
}
.mitem:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.mitem .info { display: grid; gap: 6px; align-content: start; min-width: 0; }
.mitem .head { display: flex; align-items: center; gap: 8px; }
.mitem .name { font-weight: 700; font-size: .98rem; }
.mitem .desc { font-size: .84rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mitem .price { font-weight: 800; font-size: .95rem; }
.mitem .media { position: relative; height: 104px; width: 104px; }
.mitem .plate {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(150deg, var(--brand-soft), var(--bg-2));
  overflow: visible;
}
.mitem .plate .emoji { font-size: 3rem; transition: transform .6s var(--ease-spring); }
.mitem:hover .plate .emoji { transform: rotate(-8deg) scale(1.1); }
.mitem .add-wrap { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); }
.mitem .add-wrap .add-btn, .mitem .add-wrap .stepper { min-width: 92px; }
.mitem .tag { position: absolute; top: 10px; left: 10px; }
.mitem .add-img { position: absolute; inset: 0; }

/* Flip animation when an item is added */
.mitem.flip .plate { animation: flip 0.7s var(--ease-out); }
@keyframes flip { from { transform: rotateY(0); } 50% { transform: rotateY(180deg) scale(1.08); } to { transform: rotateY(360deg); } }

/* ---------- 11. Cart page ---------- */

.cart-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px 0 140px; align-content: start; }
.cart-page > .page-title { margin-bottom: 0; }
.cart-page > .acct-bar { margin-bottom: 0; }
.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.panel {
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-1);
}
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.panel-title h2 { font-size: 1.05rem; }

.cart-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.cart-line:first-of-type { border-top: 0; padding-top: 0; }
.cart-line .thumb { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); font-size: 1.8rem; }
.cart-line .name { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.cart-line .vendor { font-size: .8rem; color: var(--muted); }
.cart-line .side { display: grid; justify-items: end; gap: 6px; }
.cart-line .amount { font-weight: 800; font-variant-numeric: tabular-nums; }
.cart-line.leaving { animation: leave .35s var(--ease-out) forwards; }
@keyframes leave { to { opacity: 0; transform: translateX(30px) scale(.96); height: 0; padding: 0; margin: 0; } }

.vendor-head { display: flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 800; color: var(--ink-2); margin: 4px 0 6px; }

.address-list, .pay-list { display: grid; gap: 10px; }
.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color .25s, box-shadow .25s, transform .3s var(--ease-out);
}
.option:hover { transform: translateX(3px); box-shadow: 0 8px 18px -10px rgba(253, 91, 87, 0.3); }
.option[aria-checked="true"] { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), 0 8px 18px -10px rgba(253, 91, 87, 0.35); }
.option .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex-shrink: 0; transition: border-color .25s; }
.option[aria-checked="true"] .radio { border-color: var(--brand); }
.option[aria-checked="true"] .radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); animation: pop .4s var(--ease-spring); }
.option .opt-ico { font-size: 1.4rem; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-2); flex-shrink: 0; }
.option strong { display: block; font-size: .95rem; }
.option small { color: var(--muted); font-size: .82rem; }

.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px dashed var(--line); background: var(--bg); color: var(--ink); font: inherit; text-transform: uppercase; letter-spacing: .06em; }
.coupon input:focus { outline: none; border-color: var(--brand); }
.coupon-msg { font-size: .82rem; margin-top: 8px; min-height: 1.2em; font-weight: 600; }
.coupon-msg.ok { color: var(--green); }
.coupon-msg.bad { color: #d6322a; }

.bill { display: grid; gap: 10px; }
.bill-row { display: flex; justify-content: space-between; font-size: .92rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bill-row.discount { color: var(--green); }
.bill-row.total { padding-top: 12px; border-top: 1px dashed var(--line); font-size: 1.08rem; font-weight: 800; color: var(--ink); }
.bill-row .free { color: var(--green); font-weight: 700; }

.bill-cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.placing .btn-primary { pointer-events: none; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin-loop .7s linear infinite; }
@keyframes spin-loop { to { transform: rotate(360deg); } }

.cart-empty { display: grid; place-items: center; text-align: center; gap: 12px; padding: 48px 16px; }
.cart-empty .big { font-size: 5rem; animation: hover-y 4s ease-in-out infinite; }

/* Mobile sticky checkout bar on cart page */
.checkout-bar {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 18px;
  border-radius: 20px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: var(--shadow-2);
}
.checkout-bar[hidden] { display: none; }
.checkout-bar small { opacity: .7; font-weight: 600; }
.checkout-bar strong { font-size: 1.1rem; }
.checkout-bar .btn { min-width: 170px; min-height: 44px; }

/* ---------- 12. Tracking ---------- */

.track-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 22px 0 120px; }
.eta-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-radius: var(--r-xl);
  color: #fff;
  background: linear-gradient(135deg, var(--maroon), var(--maroon-deep));
  box-shadow: var(--shadow-2);
}
.eta-card::before { content: ""; position: absolute; width: 360px; height: 360px; right: -120px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(254, 176, 61,.55), transparent 65%); animation: drift 8s ease-in-out infinite alternate; }
.eta-card > * { position: relative; }
.eta-card p { color: rgba(255,255,255,.75); }
.eta-big { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 900; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.eta-card .status { font-weight: 800; font-size: 1.05rem; margin-bottom: 4px; }

.map {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 11;
  box-shadow: var(--shadow-2);
}
.map svg { width: 100%; height: 100%; }
[data-theme="dark"] .map { background: #2A1119; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map { background: #2A1119; } }
.route-base { fill: none; stroke: rgba(141,38,60,.14); stroke-width: 16; stroke-linecap: round; }
.route-live { fill: none; stroke: url(#routeGrad); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 2 14; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -32; } }
.rider-pin { font-size: 26px; }
.map-pill { position: absolute; left: 12px; top: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--surface-glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: .8rem; font-weight: 700; border: 1px solid var(--line); }

.steps { display: grid; gap: 0; }
.step { position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding-bottom: 22px; }
.step:last-child { padding-bottom: 0; }
.step::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step.done::before { background: var(--brand); }
.step .dot { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-2); font-size: 1.1rem; transition: all .5s var(--ease-spring); }
.step.done .dot { background: var(--brand-grad); color: var(--on-coral); box-shadow: 0 10px 20px -10px rgba(253, 91, 87,.9); }
.step.active .dot { background: var(--brand-soft); box-shadow: 0 0 0 6px var(--brand-soft); animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 0 12px rgba(253, 91, 87,.08); } }
.step strong { display: block; font-size: .98rem; }
.step small { color: var(--muted); }
.step.pending strong { color: var(--muted); }

.rider-card { display: flex; align-items: center; gap: 14px; }
.rider-card .avatar { width: 52px; height: 52px; }
.rider-card .avatar span { width: 46px; height: 46px; font-size: .95rem; }

.rate { display: flex; gap: 6px; font-size: 1.8rem; }
.rate button { background: none; border: 0; cursor: pointer; transition: transform .25s var(--ease-spring); filter: grayscale(1); opacity: .5; padding: 2px; }
.rate button:hover { transform: scale(1.25); }
.rate button.on { filter: none; opacity: 1; }

/* ---------- 13. Sheet (mobile) / side panel ---------- */

.sheet-scrim { position: fixed; inset: 0; background: rgba(10,10,16,.45); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .3s; }
.sheet-scrim.show { opacity: 1; pointer-events: auto; }

/* ---------- 14. Toasts + particles ---------- */

.toast-region { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--ink);
  color: var(--bg);
  font-size: .9rem;
  font-weight: 600;
  box-shadow: var(--shadow-2);
  animation: toast-in .5s var(--ease-spring) both;
}
.toast.out { animation: toast-out .25s var(--ease-out) both; }
.toast-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: var(--brand-grad); color: var(--on-coral); font-size: .8rem; flex-shrink: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px) scale(.96); } }

.fly-dot { position: fixed; z-index: 150; width: 18px; height: 18px; border-radius: 50%; background: var(--brand-grad); box-shadow: 0 0 0 4px rgba(253, 91, 87,.2); pointer-events: none; }
.confetti { position: fixed; z-index: 160; width: 9px; height: 14px; border-radius: 3px; pointer-events: none; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.45); transform: scale(0); animation: ripple .6s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }

[data-cart-target].bump { animation: bump .5s var(--ease-spring); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18) rotate(-8deg); } 100% { transform: scale(1); } }

/* ---------- 15. Reveal on scroll ---------- */

[data-reveal] { opacity: 0; transform: translateY(26px) scale(.985); transition: opacity .8s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--stagger, 0ms); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* Scroll-driven parallax when supported */
@supports (animation-timeline: view()) {
  .rhero .big { animation: hover-y 7s ease-in-out infinite, parallax-y linear both; animation-timeline: auto, view(); animation-range: normal, cover 0% cover 100%; }
  @keyframes parallax-y { from { margin-top: -30px; } to { margin-top: 60px; } }
}

/* ---------- 16. Footer ---------- */

.foot { margin-top: 48px; padding: 28px 0 120px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.foot-grid { display: grid; gap: 18px; }

/* ==========================================================
   Responsive
   ========================================================== */

@media (min-width: 560px) {
  .rgrid { grid-template-columns: repeat(2, 1fr); }
  .products { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .container { width: min(1240px, 100% - 48px); }
  .cats { grid-template-columns: repeat(8, 1fr); }
  .products { grid-template-columns: repeat(4, 1fr); }
  .hero { grid-template-columns: 1.1fr 0.9fr; gap: 32px; padding: 40px 0 12px; }
  .stage { height: 380px; }
  .stage-plate { width: 300px; height: 300px; margin: -150px 0 0 -150px; }
  .bottom-nav { display: none; }
  .mitem { grid-template-columns: 1fr 140px; }
  .mitem .media { width: 140px; height: 130px; }
  .mitem .plate { }
  .mitem .add-wrap { bottom: -14px; }
  .rhero { height: 300px; }
  .rinfo { margin-top: -90px; padding: 28px; }
  .cart-bar { bottom: 20px; left: auto; right: 24px; width: 380px; }
  .toast-region { bottom: 28px; }
  .foot { padding-bottom: 40px; }
  .checkout-bar { display: none; }
  .cart-page { padding-bottom: 60px; }
  .track-grid { padding-bottom: 60px; grid-template-columns: 1.15fr 0.85fr; align-items: start; }
  .track-grid > .map { grid-row: span 2; }
}

@media (min-width: 1024px) {
  .top-nav { display: flex; }
  .topbar-inner { min-height: 72px; }
  .search { max-width: 520px; }
  .hero { padding-top: 54px; }
  .rgrid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .products { grid-template-columns: repeat(4, 1fr); }
  .cart-grid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); }
  .cart-grid .summary { position: sticky; top: 92px; }
  .cart-bar { width: 420px; }
  .catnav { top: 72px; }
  .rcard .media { height: 180px; }
  .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .foot { padding-bottom: 48px; }
  .stage { height: 440px; }
  .stage-plate { width: 340px; height: 340px; margin: -170px 0 0 -170px; }
}

@media (min-width: 1360px) {
  .rgrid { grid-template-columns: repeat(4, 1fr); }
}

/* Section anchors clear the sticky header and category bar */
.menu-section { scroll-margin-top: 150px; }
.menu-section .badge-gold { background: var(--gold-soft); color: var(--gold-ink); }
.section { scroll-margin-top: 80px; }

/* Compact header on phones: the horizontal logo keeps its 200px minimum width */
@media (max-width: 767px) {
  .brand-text { display: none; }
  #theme-toggle { display: none; }
  .topbar-inner { gap: 8px; flex-wrap: wrap; min-height: 0; padding: 10px 0; }
  .search { order: 10; flex: 0 0 100%; }
  .search kbd { display: none; }
  .location strong { max-width: 130px; }
}

@media (max-width: 380px) {
  .location strong { max-width: 120px; }
  .hero h1 { font-size: 1.8rem; }
  .cats { gap: 8px; }
  .cat .emoji { font-size: 1.7rem; }
}

/* ==========================================================
   Reduced motion: keep layout, drop motion
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Generated photography */
.stage-photo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(74%, 330px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  border: 10px solid var(--surface);
  box-shadow: 0 40px 60px -24px rgba(94, 21, 38, .55);
  transform: translate(-50%, -50%) translateZ(-40px);
}
.rhero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.rhero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(42, 11, 18, .45));
  z-index: 1;
}

/* 3D photo ring (hero). Cards sit on a circle; the ring rotates in 3D. */
.ring-wrap { display: grid; gap: 12px; justify-items: center; }
.ring-stage {
  position: relative;
  width: 100%;
  height: 300px;
  perspective: 1400px;
  perspective-origin: 50% 40%;
  touch-action: pan-y;
  cursor: grab;
}
.ring-stage.dragging { cursor: grabbing; }
.ring {
  position: absolute;
  left: 50%;
  top: 46%;
  width: 0;
  height: 0;
  transform-style: preserve-3d;
  transform: rotateX(-6deg) rotateY(var(--rot, 0deg));
  transition: transform 0.9s var(--ease-out);
}
.ring.dragging { transition: none; }
.ring-card {
  position: absolute;
  left: calc(var(--w) / -2);
  top: calc(var(--h) / -2);
  width: var(--w);
  height: var(--h);
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 24px 40px -22px rgba(60, 14, 26, 0.55);
  transform: rotateY(var(--a)) translateZ(var(--r));
  backface-visibility: hidden;
  transition: opacity 0.4s, box-shadow 0.4s;
  color: inherit;
}
.ring-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ring-card .cap {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(42, 11, 18, 0.72);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ring-card.active { box-shadow: 0 30px 60px -20px rgba(253, 91, 87, 0.55), 0 0 0 3px var(--coral); }
.ring-card:focus-visible { outline-offset: 4px; }
.ring-floor {
  position: absolute;
  left: 50%;
  top: 88%;
  width: 60%;
  height: 40px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(94, 21, 38, 0.28), transparent);
  filter: blur(4px);
  pointer-events: none;
}
.ring-controls { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 520px; }
.ring-caption { flex: 1; text-align: center; margin: 0; font-weight: 600; color: var(--ink); font-family: var(--font-head); }
@media (min-width: 1024px) { .ring-stage { height: 420px; } }
@media (prefers-reduced-motion: reduce) { .ring { transition: none; } }

/* Menu card photos */
.rcard .media .media-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform 0.8s var(--ease-out); }
.rcard:hover .media .media-photo { transform: scale(1.06); }
.rcard .media .corner, .rcard .media .time { z-index: 1; }

/* ---------- Item sheet (shared) ---------- */
.sheet-root.show .sheet-scrim { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 81;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 28px 28px 0 0;
  box-shadow: var(--shadow-2);
  transform: translateY(105%);
  transition: transform 0.45s var(--ease-out);
}
.sheet-root.show .sheet { transform: none; }
.sheet-media { position: relative; aspect-ratio: 4 / 3; background: var(--brand-soft); overflow: hidden; }
.sheet-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: var(--surface); }
.sheet-new { position: absolute; left: 14px; top: 14px; }
.sheet-body { display: grid; gap: 12px; padding: 20px 22px 26px; }
.sheet-body h2 { font-size: 1.5rem; }
.sheet-desc { margin: 0; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-price { font-family: var(--font-head); font-weight: 600; font-size: 1.4rem; color: var(--accent-text); }
.eyebrow-sm { margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
@media (min-width: 768px) {
  .sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: min(720px, 92vw);
    max-height: 86vh;
    border-radius: 28px;
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.97);
  }
  .sheet-root.show .sheet { opacity: 1; transform: translate(-50%, -50%); }
  .sheet-root .sheet-body { grid-template-columns: 1fr; }
}

/* Item photos inside menu rows and cart thumbnails */
.mitem .plate { overflow: hidden; cursor: zoom-in; }
.mitem .plate img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 16px; transition: transform 0.8s var(--ease-out); }
.mitem:hover .plate img { transform: scale(1.06); }
.cart-line .thumb { overflow: hidden; padding: 0; }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Form fields (shared by account and checkout pages) ---------- */
.input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  transition: border-color 0.2s, outline-color 0.2s;
}
.input::placeholder { color: var(--placeholder); opacity: 1; }
.input:focus { outline: 2px solid var(--coral); outline-offset: 1px; border-color: var(--coral); }
.input[aria-invalid="true"] { border-color: #E5484D; outline: 2px solid rgba(229, 72, 77, 0.4); outline-offset: 1px; }
select.input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23B39592' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
textarea.input { min-height: 96px; resize: vertical; }
