/* storefront.css — vanilla CSS, no framework. Mirrors the admin UI's
 * design tokens so the two surfaces feel like one product. */

:root {
  /* Typography stack — Inter for body (excellent legibility), Space
     Grotesk for headings + UI labels (more character, food-brand
     friendly). System font fallbacks so first paint isn't blank while
     web fonts load. */
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Master scheme — black + white + red. Used for storefront chrome
     (top bar, cart button, fulfilment pills, checkout summary). */
  --bg:           #ffffff;
  --surface:      #ffffff;
  --border:       #e5e3df;
  --text:         #111111;
  --muted:        #6b6864;
  --accent:       #d92d20;          /* master red */
  --accent-text:  #ffffff;
  --accent-soft:  #fdecea;
  /* Master secondary + tertiary — used as fallbacks when a brand has
     no own secondary/tertiary defined. Restrained so they don't
     compete with the primary accent. */
  --accent-2:       #6b6864;        /* a neutral grey pillar */
  --accent-2-text:  #ffffff;
  --accent-3:       #f3a712;        /* a soft amber for highlights */
  --accent-3-text:  #111111;
  --ok:           #0f7b3f;
  --warn:         #b16500;
  --danger:       #b3261e;
  --danger-soft:  #fde8e6;
  --shadow:       0 1px 3px rgba(0,0,0,.06);
  --radius:       8px;

  /* Per-brand accent. Defaults to master so anything outside a brand
     pane (e.g. chrome) still resolves cleanly. Inside a `.brand-pane`,
     storefront.js overrides --brand-accent + --brand-accent-text from
     the brand's theme_color. The product modal sets the same vars when
     opened from a brand item, so the Add button picks up the brand
     colour as the customer drills down. Secondary/tertiary slots
     follow the same pattern: `theme_color_2` → `--brand-accent-2`,
     `theme_color_3` → `--brand-accent-3`. */
  --brand-accent:        var(--accent);
  --brand-accent-text:   var(--accent-text);
  --brand-accent-soft:   var(--accent-soft);
  --brand-accent-2:      var(--accent-2);
  --brand-accent-2-text: var(--accent-2-text);
  --brand-accent-3:      var(--accent-3);
  --brand-accent-3-text: var(--accent-3-text);
}

* { box-sizing: border-box; }

/* Project-wide policy: the HTML `hidden` attribute always wins. Any
   element with [hidden] is display:none regardless of how its class
   styles `display`. Without !important, our own CSS (e.g. .view,
   .lobby-close) defeats the user agent's `[hidden] { display: none }`
   default. We've hit this twice now — codify it. */
[hidden] { display: none !important; }

/* App-shell layout — body locks to viewport, views own their scroll.
   This is what enables the swipable brand panes (a horizontal-flex
   container that translates) and prevents the page from scrolling
   away from the sticky tabs. */
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 24px; margin-bottom: 6px; font-weight: 700; }
h3 { font-size: 17px; }
p  { margin: 0; }
.muted { color: var(--muted); font-size: 14px; }

code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }

/* Visually hidden but accessible to screen readers */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

/* Main is the flex-1 container that holds whichever view is active.
   Views sit absolutely inside it so the active one fills the space. */
main {
  flex: 1;
  position: relative;
  min-height: 0;        /* important: lets children with overflow:auto work */
}

/* ---- Top bar -------------------------------------------------------- */

.topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.03);
  z-index: 10;
}
.brandline h1 { font-size: 20px; }
.brandline p  { margin-top: 2px; }
/* Top-bar logo image — sized by height so any aspect ratio behaves.
   Hidden when no logo URL is available; the h1 wordmark falls back. */
.brandline img.brand-logo {
  display: block;
  height: 40px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}
.brandline.has-logo h1 {
  /* Visually hide the wordmark when a logo is shown — keep it for SR. */
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.brandline.has-logo p { display: none; }

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(217, 45, 32, 0.25);
  transition: transform 120ms, box-shadow 160ms, filter 120ms;
}
.cart-button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(217, 45, 32, 0.32);
}
.cart-button:active { transform: translateY(0); }
.cart-count {
  background: var(--surface);
  color: var(--accent);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  min-width: 20px;
  text-align: center;
}
.cart-total { font-weight: 600; }

/* 2026-06-09 polish: on mobile, promote the cart-button to a sticky
   thumb-zone CTA. Modern food-app convention — keeps the order summary
   one tap away while the customer scrolls a long menu. Stays a subtle
   topbar pill on desktop where vertical space isn't precious. */
@media (max-width: 640px) {
  .topbar .cart-button {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    justify-content: center;
    padding: 14px 18px;
    font-size: 16px;
    z-index: 50;
    box-shadow: 0 8px 24px rgba(217, 45, 32, 0.35), 0 2px 6px rgba(0,0,0,0.08);
    border-radius: 14px;
  }
  /* Give content room so the sticky bar doesn't cover the last menu
     item. The 80px accounts for bar + breathing room. */
  main {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
}

/* ---- Buttons + form basics ----------------------------------------- */

button {
  font: inherit;
  padding: 10px 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--text);
}
button:hover { background: var(--accent-soft); }
button:disabled { opacity: .5; cursor: not-allowed; }

button.primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 600;
}
button.primary:hover { filter: brightness(1.1); background: var(--accent); }
button.ghost { background: transparent; }
button.danger {
  border-color: var(--danger);
  color: var(--danger);
}
button.danger:hover { background: var(--danger-soft); }
button.link {
  background: none;
  border: none;
  color: var(--accent);
  padding: 4px 0;
  margin-bottom: 12px;
  font-size: 14px;
  cursor: pointer;
}
button.link:hover { text-decoration: underline; background: none; }

input[type="text"], input[type="tel"], input[type="email"], input[type="date"] {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  width: 100%;
  max-width: 360px;
}

fieldset {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 16px 0;
  background: var(--surface);
}
legend { padding: 0 8px; font-weight: 600; font-size: 14px; }
fieldset label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 8px 0;
  font-size: 14px;
}
fieldset label input[type="radio"] { margin-right: 6px; }

/* ---- Views --------------------------------------------------------- */
/* Each view fills its parent (main). Inactive views are hidden via the
   `hidden` attribute. Active view scrolls internally if its content
   overflows — body never scrolls. */
.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  animation: view-fade-in 200ms ease-out;
}
@keyframes view-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0);   }
}
@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
}
.view[hidden] { display: none; }

/* Views OTHER than the shop scroll their own content. (#viewShop has
   its own internal layout where only the brand panes scroll.) */
#viewCart,
#viewCheckout,
#viewConfirmation {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 20px 80px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

/* ---- Lobby modal ---------------------------------------------------- */
/* Mobile-first: slides up from the bottom of the viewport, full-width
   with rounded top corners. On desktop, centres as a roomier card. */
@keyframes lobby-backdrop-in {
  from { background: rgba(0,0,0,0); backdrop-filter: blur(0); }
  to   { background: rgba(0,0,0,.45); backdrop-filter: blur(2px); }
}
@keyframes lobby-dialog-in-mobile {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes lobby-dialog-in-desktop {
  from { transform: scale(.96); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.lobby-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: lobby-backdrop-in 220ms ease-out;
}
@media (min-width: 720px) {
  .lobby-backdrop {
    align-items: center;
    padding: 24px;
  }
}

.lobby-dialog {
  position: relative;
  background: var(--surface);
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 16px);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .22);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: lobby-dialog-in-mobile 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
@media (min-width: 720px) {
  .lobby-dialog {
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .22), 0 4px 12px rgba(0, 0, 0, .08);
    animation: lobby-dialog-in-desktop 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lobby-backdrop, .lobby-dialog { animation: none; }
}

/* The close 'x' is only revealed once the customer has committed a
   selection — the first-time flow is mandatory. After that, reopening
   the modal allows dismiss. */
.lobby-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  background: rgba(0, 0, 0, .06);
  color: var(--muted);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 20px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  transition: background-color 120ms, color 120ms;
}
.lobby-close:hover { background: rgba(0, 0, 0, .12); color: var(--text); }

.lobby-inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 32px 32px calc(28px + env(safe-area-inset-bottom));
}
@media (max-width: 480px) {
  .lobby-inner { padding: 26px 22px calc(24px + env(safe-area-inset-bottom)); }
}
.lobby-inner h2 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}
.lobby-inner > .muted {
  font-size: 15px;
  margin-top: -14px;       /* tighter to heading; airier from the pills */
  line-height: 1.45;
}

/* Programmatically-focused headings (tabindex=-1) get focus for screen
   readers but don't need the visible outline — it reads as a stray
   border. Suppress visual outline only. */
h2[tabindex="-1"]:focus,
h2[tabindex="-1"]:focus-visible { outline: none; }

/* Big variant of the fulfilment picker — full-width, larger tap
   targets, more visual weight than the inline picker that used to live
   in the hero band. Each pill takes exactly 1/3 of the row regardless
   of label length, so the highlight fill is symmetrical between all
   three options. */
.ftype-picker.ftype-picker-large {
  display: flex;            /* override base inline-flex so width:100% sticks */
  width: 100%;
  padding: 4px;
}
.ftype-picker.ftype-picker-large label {
  flex: 1 1 0;
  min-width: 0;
  display: flex;            /* lets the inner span fill the label's third */
}
.ftype-picker.ftype-picker-large label span {
  flex: 1;                  /* span fills the label horizontally */
  display: block;
  text-align: center;
  padding: 14px 12px;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lobby-pane {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.wait-time-card .wait-time-value {
  font-size: 32px;
  font-weight: 700;
  margin: 6px 0 10px;
}
.wait-time-card .wait-time-value small {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.slot-date-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: 600;
}
.slot-date-select {
  font: inherit;
  font-weight: 500;
  padding: 10px 36px 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background-color: var(--surface);
  /* Custom chev */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.slot-date-select:hover { border-color: var(--accent); }
.slot-date-select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.lobby-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.lobby-actions button { min-width: 220px; }

/* ---- Shop status bar (above the brand tabs) ----------------------- */

.shop-status-bar {
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  display: flex;
  justify-content: flex-start;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 12px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: border-color 140ms, transform 120ms, background 140ms;
}
.status-pill:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}
.status-pill:active { transform: translateY(0); }
.status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  flex-shrink: 0;
}
.status-icon svg { display: block; }
.status-divider {
  color: var(--muted);
  font-weight: 400;
  margin: 0 -2px;
}
.status-chev {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  margin-left: 2px;
}
.status-fulfilment, .status-slot { letter-spacing: 0.01em; }

/* ---- Floating cart button ----------------------------------------- */
/* Always-visible cart access. Positioned bottom-right on desktop /
   tablet, bottom-centre on phone. Animates in when items land in
   the cart and bumps when the count changes. */
.floating-cart {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(217, 45, 32, 0.35), 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 200ms,
              filter 160ms;
  animation: fab-in 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.floating-cart:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 12px 28px rgba(217, 45, 32, 0.42), 0 4px 8px rgba(0,0,0,0.1);
}
.floating-cart:active { transform: translateY(0); }
.floating-cart svg { display: block; }
.floating-cart .fab-count {
  background: var(--surface);
  color: var(--accent);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  min-width: 20px;
  text-align: center;
}
.floating-cart .fab-total { letter-spacing: 0.01em; }
.floating-cart.bump { animation: fab-bump 320ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes fab-in {
  from { transform: translateY(20px) scale(0.8); opacity: 0; }
  to   { transform: translateY(0) scale(1);     opacity: 1; }
}
@keyframes fab-bump {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
@media (max-width: 600px) {
  .floating-cart {
    bottom: 16px;
    right: 16px;
    left: 16px;
    justify-content: center;
    padding: 14px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .floating-cart, .floating-cart.bump { animation: none; transition: none; }
}

/* ---- Toast notifications ------------------------------------------ */
.toast-stack {
  position: fixed;
  top: 86px;       /* clears the topbar */
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 60;
  pointer-events: none;
}
.toast {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #111;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  pointer-events: auto;
  animation: toast-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  max-width: 320px;
}
.toast.toast-out { animation: toast-out 220ms ease-out forwards; }
.toast .toast-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
@keyframes toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes toast-out {
  to { transform: translateX(20px); opacity: 0; }
}
@media (max-width: 600px) {
  .toast-stack {
    left: 16px;
    right: 16px;
    top: 86px;
  }
  .toast { max-width: none; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
}

/* ---- Shop view: hero + tabs + swipable panes --------------------- */

#viewShop {
  display: flex;
  flex-direction: column;
  overflow: hidden;     /* internal layout owns scroll */
}

.hero-band {
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}

/* Pill-toggle fulfilment picker — replaces the radio fieldset. */
.ftype-picker {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  margin: 0;
  gap: 0;
}
.ftype-picker label {
  flex-direction: row;
  margin: 0;
  cursor: pointer;
}
.ftype-picker label input { position: absolute; opacity: 0; pointer-events: none; }
.ftype-picker label span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: background-color 80ms, color 80ms;
}
.ftype-picker label input:checked + span {
  background: var(--accent);
  color: var(--accent-text);
}
/* Hover states — gentle for unselected, slight brighten for selected. */
.ftype-picker label:hover input:not(:checked):not(:disabled) + span {
  background: rgba(0, 0, 0, .04);
  color: var(--text);
}
.ftype-picker label:hover input:checked + span { filter: brightness(1.08); }
.ftype-picker label input:disabled + span { opacity: .55; cursor: not-allowed; }
.ftype-locked-msg { color: var(--warn); margin-top: 8px; }

/* Brand tabs: each tab is a coloured card on the brand's primary
   theme_color, with the logo centred. Equal flex distribution so all
   tabs share the row evenly; on overflow (>4 brands), the strip
   horizontally scrolls. The red underline indicator was dropped — the
   active state is driven by opacity + a soft elevation lift. */
.brand-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.brand-tabs::-webkit-scrollbar { display: none; }

.brand-tabs button[role="tab"] {
  flex: 1 1 0;
  min-width: 86px;
  max-width: 170px;
  height: 64px;
  padding: 8px 12px;
  /* Per-tab vars set inline by JS from the brand's theme_color /
     theme_color_text. Falls back to neutral surface for brands that
     haven't been themed yet. */
  background: var(--tab-bg, var(--bg));
  color: var(--tab-text, var(--text));
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  opacity: 0.5;
  transition: opacity 160ms, transform 160ms, box-shadow 160ms;
}
.brand-tabs button[role="tab"]:hover { opacity: 0.85; }

.brand-tabs button[role="tab"][aria-selected="true"] {
  opacity: 1;
  /* Soft elevation — the brightness contrast against the dimmed
     inactive tabs is the primary "this is selected" cue. No rings: a
     coloured outer ring matched to the tab background creates a
     slightly-different-yellow halo at the boundary that reads as a
     stray border, especially with logos that have their own border
     baked into the image. */
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transform: translateY(-1px);
  z-index: 1;
}

/* Tab logo image — full bleed within the card, contained so any aspect
   ratio sits centred without distortion. Filter is none — the logo is
   on its native brand colour now. */
.brand-tabs button[role="tab"] img.brand-tab-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: none;
}

/* Per-brand logo size correction. Add CSS transform: scale() rules
   below for any logo that fills its tab too tightly or sits too small.
   Right fix is to crop the source PNG, but a CSS scale gets you 90% of
   the way there with no file edit. */
.brand-tabs button[data-brand-slug="lucky-time"] img.brand-tab-logo {
  transform: scale(0.85);
  transform-origin: center;
}

/* Hidden text inside the button still feeds screen readers + acts as a
   fallback when no logo URL is set. */
.brand-tabs button[role="tab"].has-logo .brand-tab-label-text {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.brand-tabs button[role="tab"]:not(.has-logo) .brand-tab-label-text {
  text-align: center;
  word-break: break-word;
  line-height: 1.2;
}

/* Pane container: fills remaining height, hides horizontal overflow.
   The inner `.brand-panes` is a horizontal flex strip translated by JS. */
.brand-panes-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
  min-height: 0;
}
.brand-panes {
  display: flex;
  height: 100%;
  width: 100%;
  transform: translateX(0);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.brand-panes.dragging { transition: none; }
.brand-pane {
  flex: 0 0 100%;
  min-width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 16px 32px;
  max-width: 960px;
  margin: 0 auto;
}
@media (min-width: 720px) {
  .brand-pane { padding: 16px 24px 32px; }
}

/* Brand intro within the pane (above the menu items). The inline
   --brand-accent / --brand-accent-2 / --brand-accent-3 are set per-pane by JS
   from brand.theme_color / theme_color_2 / theme_color_3. The header
   uses primary as background, with a tertiary 'underline' to add a
   second colour pop without competing with the primary fill. */
.brand-pane-header {
  position: relative;
  margin-bottom: 12px;
  padding: 14px 16px;
  background: var(--brand-accent);
  color: var(--brand-accent-text);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}
.brand-pane-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--brand-accent-3);
}
.brand-pane-header img.brand-pane-logo {
  height: 44px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  flex-shrink: 0;
  /* On dark backgrounds we may need to invert PNGs that were drawn
     in black. Brand admins control this via theme_color_text — when
     the text colour is white, we leave the logo as-is. */
}
.brand-pane-header {
  padding: 18px 20px;
}
.brand-pane-header h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  color: inherit;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.brand-pane-header .brand-tagline {
  /* 2026-06-09 polish: more editorial — slightly larger, italic, looser
     letter spacing. Pulls the eye in without competing with the brand
     name above. Renders only when brand.description is populated. */
  font-family: var(--font-body);
  font-size: 15px;
  font-style: italic;
  font-weight: 400;
  margin-top: 6px;
  opacity: .9;
  color: inherit;
  line-height: 1.45;
  letter-spacing: 0.005em;
  max-width: 42em;
}

/* ---- Menu items ---------------------------------------------------- */

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
  color: var(--text);
  transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1),
              box-shadow 160ms,
              border-color 160ms;
  position: relative;
}
.menu-item:hover, .menu-item:focus-visible {
  border-color: var(--brand-accent);
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.menu-item:active { transform: translateY(0); }
.menu-item-thumb {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--bg);
}
.menu-item-info { flex: 1; min-width: 0; }
.menu-item-info h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.menu-item-info .desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.menu-item-price {
  font-weight: 700;
  font-size: 17px;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  color: var(--text);
}
.menu-item-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-accent);
  color: var(--brand-accent-text);
  font-size: 20px;
  font-weight: 600;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 160ms;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.menu-item:hover .menu-item-cta { transform: scale(1.08); }
.menu-item.unavailable { opacity: .55; cursor: not-allowed; }
.menu-item.unavailable:hover { transform: none; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.menu-item.unavailable .menu-item-price::after {
  content: " · unavailable";
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  font-family: var(--font-body);
}

/* ---- Menu category headings --------------------------------------- */

.menu-category { margin-top: 24px; }
.menu-category:first-child { margin-top: 8px; }
.category-heading {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--brand-accent);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

/* ---- Product detail modal ----------------------------------------- */

.product-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;             /* slide up from bottom on mobile */
  justify-content: center;
  z-index: 100;
}
@media (min-width: 720px) {
  .product-backdrop {
    align-items: center;
    padding: 16px;
  }
}
.product-backdrop[hidden] { display: none; }

.product-dialog {
  position: relative;
  background: var(--surface);
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 16px);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 32px rgba(0,0,0,.18);
  overflow: hidden;
}
@media (min-width: 720px) {
  .product-dialog {
    border-radius: var(--radius);
  }
}

.product-close {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 2;
  background: rgba(0,0,0,.55);
  color: white;
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 20px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  flex-shrink: 0;
}
.product-close:hover { background: rgba(0,0,0,.75); }

.product-media:not(:empty) {
  flex-shrink: 0;
  background: #000;
  overflow: hidden;
}
.product-media img,
.product-media video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 50vh;
  object-fit: cover;
}
.product-media video { background: #000; }

.product-body {
  padding: 18px 22px 16px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}
.product-body h2 {
  margin: 0 0 4px;
  font-size: 22px;
}
.product-body > .muted { font-size: 14px; }
.product-body > .muted + .muted { margin-top: 4px; }
.product-body form { margin-top: 4px; }

/* When media is empty, the dialog still looks fine — give the close
   button a darker plate so it doesn't disappear. */
.product-media:empty + .product-close,
.product-dialog:not(:has(.product-media:not(:empty))) .product-close {
  background: rgba(0,0,0,.35);
}

/* Modifier groups in the product modal. Two interaction modes:
     - PICK-ONE (max_select=1): segmented pill row. Click to toggle.
       Optional groups (min=0) allow deselect by clicking the active pill.
       Required groups (min>=1) keep one always selected.
     - STEPPER (max_select>1): per-option row with a quantity stepper.
       Group total cap enforced live (+ disables when total = max).

   Both modes drop the old tick-box-on-the-right pattern entirely. */
.modgroup {
  margin: 0;
  padding: 20px 0 8px;
  border: none;
  border-top: 1px solid var(--border);
  background: transparent;
}
.modgroup:first-of-type { border-top: none; padding-top: 10px; }

.modgroup h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.modgroup-rule {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.modgroup.required > h3::after {
  content: "Required";
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--danger-soft);
  color: var(--danger);
  padding: 3px 8px;
  border-radius: 999px;
  margin-left: auto;
}

/* ── Pick-one (pills) ─────────────────────────────────────────────── */
.modgroup-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.modgroup-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 11px 16px;
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 140ms, color 140ms,
              border-color 140ms, transform 120ms;
}
.modgroup-pill .modopt-price {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.7;
  letter-spacing: 0;
}
.modgroup-pill:hover {
  border-color: var(--brand-accent);
  background: var(--brand-accent-soft);
}
.modgroup-pill[aria-pressed="true"] {
  background: var(--brand-accent);
  color: var(--brand-accent-text);
  border-color: var(--brand-accent);
}
.modgroup-pill[aria-pressed="true"] .modopt-price { opacity: 0.85; }
.modgroup-pill[aria-pressed="true"]:hover { filter: brightness(1.06); }
.modgroup-pill:active { transform: scale(0.97); }

/* ── Stepper (multi-qty) ──────────────────────────────────────────── */
.modgroup-rows {
  display: flex;
  flex-direction: column;
}
.modgroup-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  font-size: 15px;
  border-bottom: 1px solid var(--border);
}
.modgroup-row:last-child { border-bottom: 0; }
.modgroup-row .modopt-name {
  flex: 1;
  min-width: 0;
  font-weight: 500;
}
.modgroup-row .modopt-price {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-display);
  white-space: nowrap;
}
.modgroup-row .qty-stepper-mod {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  flex-shrink: 0;
}
.modgroup-row .qty-stepper-mod button {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--brand-accent);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  border-radius: 999px;
  transition: background-color 120ms;
}
.modgroup-row .qty-stepper-mod button:hover:not(:disabled) {
  background: var(--brand-accent-soft);
}
.modgroup-row .qty-stepper-mod button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.modgroup-row .qty-stepper-mod .qty-value {
  padding: 0 10px;
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 14px;
}
.modgroup-row.has-qty {
  /* Subtle highlight when an option has at least one selected */
  background: var(--brand-accent-soft);
  border-radius: 8px;
  margin: 0 -8px;
  padding: 10px 12px;
  border-bottom: 0;
}
.modgroup-row.has-qty + .modgroup-row { border-top: 1px solid var(--border); }

/* Sticky modal footer with qty stepper + Add button. Always reachable. */
.product-modal-footer {
  flex-shrink: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  gap: 10px;
  align-items: center;
}
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  flex-shrink: 0;
}
.qty-stepper button {
  width: 36px; height: 36px;
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--brand-accent);
  padding: 0;
  border-radius: 999px;
}
.qty-stepper button:hover { background: var(--brand-accent-soft); }
.qty-stepper button:disabled { opacity: .35; cursor: not-allowed; }
.qty-stepper .qty-value {
  padding: 0 12px;
  min-width: 28px;
  text-align: center;
  font-weight: 700;
}
.modal-add {
  flex: 1;
  padding: 12px 18px;
  background: var(--brand-accent);
  color: var(--brand-accent-text);
  border: none;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  /* Subtle 1px outline in the secondary colour — only visible on hover/focus */
  box-shadow: 0 0 0 0 var(--brand-accent-2);
  transition: box-shadow 120ms, filter 120ms;
}
.modal-add:hover { background: var(--brand-accent); color: var(--brand-accent-text); filter: brightness(1.08); box-shadow: 0 0 0 3px var(--brand-accent-2); }
.modal-add:focus-visible { box-shadow: 0 0 0 3px var(--brand-accent-2); outline: none; }
.modal-add:disabled { opacity: .55; cursor: not-allowed; }

/* Modifier list shown under cart items */
.cart-line .line-mods {
  grid-column: 1 / -1;
  padding-left: 0;
  margin-top: -4px;
  font-size: 12px;
  color: var(--muted);
}
.cart-line .line-mods li { display: list-item; margin-left: 18px; }

/* ---- Upsell at checkout ------------------------------------------- */

.upsell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}
.upsell-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  color: var(--text);
}
.upsell-card:hover { border-color: var(--accent); }
.upsell-card .upsell-name  { font-weight: 600; font-size: 15px; }
.upsell-card .upsell-brand { color: var(--muted); font-size: 12px; margin-top: 2px; }
.upsell-card .upsell-price { color: var(--accent); font-weight: 600; margin-top: 6px; }

/* ---- Cart view ----------------------------------------------------- */

.cart-empty {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}

.cart-brand-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
}
.cart-brand-group h3 { font-size: 16px; margin-bottom: 8px; }

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.cart-line:first-of-type { border-top: none; }
.qty-controls {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.qty-controls button {
  border: none;
  padding: 4px 10px;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
}
.qty-controls .qty-value {
  padding: 0 12px;
  min-width: 32px;
  text-align: center;
  font-weight: 600;
}
.line-total { font-weight: 600; min-width: 60px; text-align: right; }
.remove-link {
  border: none;
  background: none;
  color: var(--danger);
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
}
.remove-link:hover { text-decoration: underline; background: none; }

.cart-totals {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 600;
  margin: 16px 0;
}
.cart-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.cart-actions button { flex: 1 1 auto; max-width: 240px; }

/* ---- Checkout ------------------------------------------------------ */

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.slot-button {
  padding: 10px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}
.slot-button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.slot-button.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.slot-button:disabled {
  cursor: not-allowed;
  background: #f3f1ec;
  color: var(--muted);
}
.slot-time { font-weight: 600; display: block; }
.slot-remaining { font-size: 12px; }

.checkout-summary {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 18px;
  font-weight: 600;
  margin: 16px 0;
}
.checkout-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.error {
  color: var(--danger);
  background: var(--danger-soft);
  padding: 10px 14px;
  border-radius: 6px;
  margin: 12px 0 0;
  display: none;
}
.error.show { display: block; }

/* ---- Confirmation -------------------------------------------------- */

.confirmation-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 16px 0;
  box-shadow: var(--shadow);
}
.confirmation-card .order-id {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
}

/* ---- ASAP / Schedule mode picker (lobby) --------------------------- */

.delivery-mode-picker {
  display: flex;
  gap: 8px;
  border: none;
  padding: 0;
  margin: 0 0 14px;
}
.delivery-mode-picker label {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  transition: background 100ms, color 100ms, border-color 100ms;
}
.delivery-mode-picker label:has(input:checked) {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}
.delivery-mode-picker input { position: absolute; opacity: 0; pointer-events: none; }

.asap-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.asap-icon {
  font-size: 26px;
  flex-shrink: 0;
}
.asap-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}
.asap-text strong { font-size: 15px; }

/* ---- Address autocomplete (getAddress.io) -------------------------- */

.address-typeahead {
  position: relative;
}
.address-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  max-height: 260px;
  overflow-y: auto;
  margin-top: 4px;
}
.address-suggestion {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.address-suggestion:last-child { border-bottom: none; }
.address-suggestion:hover, .address-suggestion:focus {
  background: var(--accent-soft);
  outline: none;
}
.address-suggestion-empty {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* ---- Discount code (checkout) -------------------------------------- */

.discount-panel {
  margin: 12px 0 4px;
}
.discount-row {
  display: flex;
  gap: 8px;
}
.discount-row input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
  background: var(--surface);
  color: var(--text);
}
.discount-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.discount-row button {
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.discount-row button:hover { background: var(--accent-soft); }
.discount-applied {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #e8f6ee;
  border: 1px solid var(--ok);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ok);
}
.discount-applied button.link {
  background: none; border: none; color: var(--ok);
  text-decoration: underline; cursor: pointer; padding: 0; font: inherit;
}

/* ============================================================ */
/*  Order status page — slick post-order experience              */
/* ============================================================ */

.status-body {
  background: linear-gradient(180deg, #fafaf9 0%, #ffffff 60%);
  min-height: 100vh;
}

.status-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ---- Hero confirmation ---- */

.status-hero {
  text-align: center;
  padding: 28px 20px 12px;
}
.status-hero-icon {
  width: 84px; height: 84px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  font-weight: 700;
  background: var(--brand-accent, var(--accent));
  color: var(--brand-accent-text, white);
  box-shadow: 0 6px 20px rgba(217, 45, 32, .25);
  animation: hero-pop .35s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes hero-pop {
  from { transform: scale(.6); opacity: 0; }
  to   { transform: scale(1);  opacity: 1; }
}
.status-hero-title {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 6px 0 4px;
  letter-spacing: -.01em;
}
.status-hero-sub {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---- Status timeline ---- */

.status-timeline {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 18px 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.timeline-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  position: relative;
}
.timeline-steps::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 22px; right: 22px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.timeline-steps .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  position: relative;
  z-index: 1;
}
.step-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all .25s ease;
}
.step-label {
  font-size: 11px;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  max-width: 80px;
  line-height: 1.25;
}
.step.done   .step-icon { background: var(--ok); border-color: var(--ok); color: white; }
.step.done   .step-label { color: var(--text); }
.step.active .step-icon {
  background: var(--brand-accent, var(--accent));
  border-color: var(--brand-accent, var(--accent));
  color: var(--brand-accent-text, white);
  box-shadow: 0 0 0 6px rgba(217, 45, 32, .15);
  animation: step-pulse 1.6s ease-in-out infinite;
}
@keyframes step-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(217, 45, 32, .15); }
  50%      { box-shadow: 0 0 0 10px rgba(217, 45, 32, .08); }
}
.step.active .step-label { color: var(--text); font-weight: 700; }
.step.pending .step-icon { opacity: .5; }
.timeline-update {
  text-align: center;
  margin: 12px 0 0;
  font-size: 13px;
}

/* ---- Delay banner ---- */

.delay-banner {
  background: #fff8eb;
  border: 1px solid var(--warn, #b16500);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: #6b4500;
}

/* ---- Order card ---- */

.status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.status-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.status-meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 0 0 2px;
  font-weight: 600;
}
.status-order-id {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--brand-accent, var(--accent));
}
.status-card-head-right { text-align: right; }
.status-slot-label { margin: 0; font-weight: 600; }

.status-delivery {
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.status-address {
  margin: 0;
  font-weight: 600;
  font-size: 14px;
}
.status-notes {
  margin: 4px 0 0;
  font-size: 13px;
}

.status-section-heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 8px 0 10px;
}

.status-items {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.status-brand-group h4 {
  font-family: var(--font-display);
  font-size: 14px;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.status-brand-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.status-brand-group li {
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.status-brand-group li .note {
  font-size: 12px;
}
.status-modifier-list {
  margin: 4px 0 0 14px !important;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.status-modifier-list li {
  font-size: 12px !important;
  color: var(--muted);
}

/* ---- Action CTAs ---- */

.status-actions {
  display: flex;
  gap: 10px;
}
.status-action-btn {
  flex: 1;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-family: inherit;
  transition: filter 100ms;
}
.status-action-btn:active { filter: brightness(.92); }
.status-action-btn.primary {
  background: var(--brand-accent, var(--accent));
  color: var(--brand-accent-text, white);
  border-color: var(--brand-accent, var(--accent));
}
.status-action-btn.ghost { background: var(--surface); }

/* ---- App install banner (web only) ---- */

.app-install-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #111;
  color: #fff;
  border-radius: 12px;
  flex-wrap: wrap;
}
.app-install-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.app-install-text .muted { color: #ccc; }
.app-install-links { display: flex; gap: 8px; }
.store-link {
  background: white;
  color: #111;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

/* ---- Loading / empty / footer ---- */

.status-loading,
.status-empty {
  text-align: center;
  padding: 40px 20px;
}
.status-empty h3 { font-size: 18px; margin-bottom: 6px; }

.status-footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
  color: var(--muted);
}
.status-footer p { margin: 2px 0; }

/* ---- Driver tracking (order-status page) --------------------------- */

.tracking-section {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.tracking-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.tracking-icon { font-size: 24px; flex-shrink: 0; }

.tracking-map-wrap {
  height: 260px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ---- Footer -------------------------------------------------------- */

footer {
  flex-shrink: 0;
  text-align: center;
  padding: 8px 20px;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ---- A11y --------------------------------------------------------- */

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, .brand-panes { transition: none !important; animation: none !important; }
}

/* ---- Responsive --------------------------------------------------- */

@media (max-width: 600px) {
  .topbar { padding: 12px 16px; }
  .cart-line { grid-template-columns: 1fr; gap: 6px; }
  .cart-line .line-total { text-align: left; }
  .cart-actions button { max-width: none; }
}

/* ---------------------------------------------------------------------------
 * Shop hero strip (2026-06-09 / task #C2).
 *
 * Sits between the topbar and the brand-tabs. CSS-only by default —
 * uses a gradient pulled from the brand palette so it feels editorial
 * without requiring a real photo. To swap in a real hero image:
 *
 *   .shop-hero {
 *     background-image: url("hero.jpg");
 *     background-size: cover;
 *     background-position: center;
 *   }
 *
 * Mobile hides it to keep the menu close to the thumb — a customer on
 * their phone has already arrived intentionally and doesn't need
 * decorative chrome between them and the menu.
 * --------------------------------------------------------------------------- */
.shop-hero {
  position: relative;
  padding: 28px 24px 24px;
  margin: 0 0 4px;
  background:
    linear-gradient(135deg,
      var(--brand-accent, var(--accent)) 0%,
      rgba(217, 45, 32, 0.7) 60%,
      rgba(31, 31, 31, 0.85) 100%);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.shop-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,255,255,0.18), transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(0,0,0,0.18), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.shop-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}
.shop-hero-eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  margin: 0 0 6px;
}
.shop-hero-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}
.shop-hero-title #heroVenueName {
  font-style: italic;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(255,255,255,0.5);
}

@media (max-width: 640px) {
  .shop-hero { display: none; }
}
