/* ==========================================================================
   Dippin Dots — style.css
   --------------------------------------------------------------------------
   1. Design tokens          6. Home sections         11. Checkout / Done / More
   2. Base & utilities       7. Product card          12. States (empty, skeleton)
   3. Header & drawer        8. Menu screen           13. Responsive
   4. Bottom navigation      9. Product details
   5. Buttons & controls    10. Cart
   ========================================================================== */

/* ============================ 1. DESIGN TOKENS ========================== */
:root {
  /* Colour */
  --bg: #0e0e0f;
  --surface: #17171a;
  --surface-2: #1f1f24;
  --surface-3: #2a2a30;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #ffffff;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;          /* 7:1 on --bg */
  --yellow: #ffd21f;         /* signature accent */
  --yellow-press: #f0c000;
  --yellow-ink: #17140a;     /* text on yellow */
  --yellow-soft: rgba(255, 210, 31, 0.12);
  --danger: #ff7a7a;
  --danger-soft: rgba(255, 122, 122, 0.12);
  --success: #4ade80;
  --yellow-text: #ffd21f;    /* accent used for TEXT/ICONS (darker in light mode) */
  --glass: rgba(14, 14, 15, 0.88);
  --glass-2: rgba(23, 23, 26, 0.95);
  --hero-grad: linear-gradient(160deg, #1d1d22 0%, #141417 100%);
  --notice-ink: #fff2b0;
  --notice-warn-ink: #ffd0d0;
  color-scheme: dark;

  /* Type */
  --font: 'Plus Jakarta Sans', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Shape & depth */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;
  --shadow-1: 0 2px 10px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 12px 32px rgba(0, 0, 0, 0.5);

  /* Spacing scale: 4 / 8 / 12 / 16 / 24 / 32 / 48 */
  --gutter: 16px;

  /* Layout */
  --header-h: 58px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ============================ LIGHT THEME =============================== */
:root[data-theme='light'] {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f0f0ed;
  --surface-3: #e5e5e1;
  --border: rgba(0, 0, 0, 0.09);
  --border-strong: rgba(0, 0, 0, 0.2);
  --text: #17171a;
  --text-2: #3f3f46;
  --muted: #62626b;
  --yellow-soft: rgba(255, 210, 31, 0.25);
  --yellow-text: #8f6b00;
  --danger: #d12f2f;
  --danger-soft: rgba(209, 47, 47, 0.1);
  --success: #16a34a;
  --shadow-1: 0 1px 6px rgba(0, 0, 0, 0.08);
  --shadow-2: 0 10px 28px rgba(0, 0, 0, 0.14);
  --glass: rgba(246, 246, 244, 0.9);
  --glass-2: rgba(255, 255, 255, 0.96);
  --hero-grad: linear-gradient(160deg, #fff8dc 0%, #ffffff 100%);
  --notice-ink: #5c4600;
  --notice-warn-ink: #8a1f1f;
  color-scheme: light;
}
:root[data-theme='light'] .toast { background: #17171a; color: #fff; }
:root[data-theme='light'] .toast-action { color: var(--yellow); }
:root[data-theme='light'] .badge-off { background: var(--surface-3); }
:root[data-theme='light'] .input::placeholder, :root[data-theme='light'] .textarea::placeholder { color: #8a8a93; }
:root[data-theme='light'] .hero-art { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18)); }
:root[data-theme='light'] .drawer-overlay { background: rgba(0, 0, 0, 0.4); }
:root[data-theme='light'] .promo-yellow .btn { background: #17171a; color: #fff; border-color: #17171a; }
:root[data-theme='light'] .media.is-loading::after { background: linear-gradient(100deg, transparent 20%, rgba(0, 0, 0, 0.06) 50%, transparent 80%) var(--surface-2); background-size: 200% 100%; }

/* ========================== 2. BASE & UTILITIES ========================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.01em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 6px; }
:focus:not(:focus-visible) { outline: none; }
.icon { flex-shrink: 0; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: -60px; z-index: 200;
  background: var(--yellow); color: var(--yellow-ink); padding: 10px 16px;
  border-radius: var(--r-sm); font-weight: 700; transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* Main screen container */
.page {
  max-width: 1200px;
  margin-inline: auto;
  padding: 16px var(--gutter) calc(var(--nav-h) + var(--safe-b) + 32px);
  outline: none;
}
body.no-nav .page { padding-bottom: calc(var(--safe-b) + 32px); }
.page-enter { animation: page-in 0.32s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ============================ 3. HEADER & DRAWER ======================== */
.app-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; margin-right: auto; }
.brand-logo { height: 34px; flex-shrink: 0; display: block; }
.brand-logo img { height: 100%; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-name { font-weight: 800; font-size: 15.5px; letter-spacing: -0.02em; }
.brand-sub { font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 3px; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.header-actions .header-cart { display: none; }   /* phones: cart lives in the bottom bar */
.header-nav { display: none; }

.icon-btn {
  position: relative;
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: background 0.2s, border-color 0.2s, transform 0.15s var(--ease);
}
.icon-btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn-sm { width: 34px; height: 34px; }

.count-badge {
  position: absolute; top: -4px; right: -6px;
  min-width: 19px; height: 19px; padding: 0 5px;
  background: var(--yellow); color: var(--yellow-ink);
  border-radius: var(--r-pill); font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.count-badge.bump { animation: bump 0.35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.35); } }
.count-badge-inline { position: static; margin-left: auto; border-color: var(--surface); }

/* Drawer */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 90; background: rgba(0, 0, 0, 0.6);
  opacity: 0; transition: opacity 0.25s;
}
.drawer-overlay.open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(86vw, 330px); background: var(--surface);
  border-left: 1px solid var(--border); box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; padding: 12px 16px calc(16px + var(--safe-b));
  transform: translateX(100%); visibility: hidden;
  transition: transform 0.3s var(--ease), visibility 0s linear 0.3s;
}
.drawer.open { transform: none; visibility: visible; transition: transform 0.3s var(--ease); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.drawer-links { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.drawer-links a {
  display: flex; align-items: center; gap: 14px; padding: 14px 12px;
  border-radius: var(--r-md); font-weight: 600; color: var(--text-2);
  transition: background 0.2s, color 0.2s;
}
.drawer-links a:hover, .drawer-links a.active { background: var(--surface-2); color: var(--text); }
.drawer-links a.active .icon { color: var(--yellow-text); }
.drawer-foot { margin-top: auto; padding: 12px; color: var(--yellow-text); font-weight: 700; font-size: 14px; }

/* ========================== 4. BOTTOM NAVIGATION ======================== */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--glass-2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s var(--ease);
}
body.no-nav .bottom-nav { transform: translateY(110%); }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  position: relative; transition: color 0.2s;
}
.bottom-nav a .icon { transition: transform 0.2s var(--ease); }
.bottom-nav a.active { color: var(--yellow-text); }
.bottom-nav a.active .icon { transform: translateY(-1px) scale(1.06); }
.bottom-nav a.active::before {
  content: ''; position: absolute; top: 0; width: 28px; height: 3px;
  background: var(--yellow); border-radius: 0 0 4px 4px;
}
.nav-icon-wrap { position: relative; display: inline-flex; }

/* ========================= 5. BUTTONS & CONTROLS ======================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: var(--r-pill);
  font-weight: 700; font-size: 15px; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--border);
  transition: background 0.2s, transform 0.15s var(--ease), border-color 0.2s, opacity 0.2s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--yellow); color: var(--yellow-ink); border-color: var(--yellow); }
.btn-primary:hover { background: var(--yellow-press); }
.btn-ghost { background: transparent; border-color: var(--border-strong); }
.btn-lg { min-height: 54px; font-size: 16px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13.5px; gap: 6px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled='true'] {
  background: var(--surface-2); color: var(--muted); border-color: var(--border);
  opacity: 0.75; transform: none; pointer-events: none;
}
.btn-text { color: var(--yellow-text); font-weight: 700; font-size: 14px; padding: 8px 4px; }
.btn-text:hover { text-decoration: underline; }

/* Quantity stepper */
.qty { display: inline-flex; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); }
.qty button {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s, transform 0.15s var(--ease);
}
.qty button:hover:not(:disabled) { background: var(--surface-3); }
.qty button:active:not(:disabled) { transform: scale(0.9); }
.qty button:disabled { color: var(--muted); opacity: 0.5; }
.qty output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Search */
.search { position: relative; }
.search > .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 50px; padding: 0 46px 0 46px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.search-clear:hover { background: var(--surface-2); color: var(--text); }

/* Form fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 16px; }
.field label, .field-label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field .opt { color: var(--muted); font-weight: 500; }
.input, .textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 13px 14px; transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
.input::placeholder, .textarea::placeholder { color: #71717a; }
.input:focus, .textarea:focus { outline: none; border-color: var(--yellow); box-shadow: 0 0 0 3px var(--yellow-soft); }
.is-invalid { border-color: var(--danger); }
.is-invalid:focus { box-shadow: 0 0 0 3px var(--danger-soft); border-color: var(--danger); }
.error-text { color: var(--danger); font-size: 13px; font-weight: 500; display: flex; gap: 6px; align-items: flex-start; }
.error-text:empty { display: none; }
.hint { color: var(--muted); font-size: 12.5px; }

/* Segmented control (Delivery / Pickup) */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; border-radius: var(--r-pill); font-weight: 700; font-size: 14px; color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.seg input:checked + span { background: var(--yellow); color: var(--yellow-ink); }
.seg input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

/* Checkbox option rows (extras) */
.option {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md);
  transition: border-color 0.2s, background 0.2s;
}
.option + .option { margin-top: 8px; }
.option:hover { border-color: var(--border-strong); }
.option:has(input:checked) { border-color: var(--yellow); background: var(--yellow-soft); }
.option input {
  appearance: none; -webkit-appearance: none; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--border-strong);
  background: transparent center / 14px no-repeat; transition: background-color 0.15s, border-color 0.15s;
}
.option input:checked {
  background-color: var(--yellow); border-color: var(--yellow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317140a' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.option input:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.option-name { flex: 1; font-weight: 600; font-size: 14.5px; }
.option-price { color: var(--muted); font-weight: 600; font-size: 14px; }

/* Toast */
.toast {
  position: fixed; left: 50%; z-index: 150;
  bottom: calc(var(--nav-h) + var(--safe-b) + 14px);
  width: max-content; max-width: calc(100vw - 32px);
  display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px;
  background: #f4f4f5; color: #111; border-radius: var(--r-md); box-shadow: var(--shadow-2);
  font-weight: 600; font-size: 14px;
  transform: translate(-50%, 20px); opacity: 0; transition: transform 0.3s var(--ease), opacity 0.3s;
}
body.no-nav .toast { bottom: calc(var(--safe-b) + 90px); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast-action { color: #8a6d00; font-weight: 800; padding: 4px 6px; border-radius: 6px; }
.toast-action:hover { text-decoration: underline; }

/* =========================== 6. HOME SECTIONS =========================== */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--hero-grad);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 28px 22px 24px; min-height: 250px;
  display: flex; flex-direction: column; justify-content: center;
}
.hero-art { position: absolute; right: 16px; top: 18px; width: 92px; z-index: 0; pointer-events: none; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5)); }
.hero-art img { width: 100%; height: auto; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--yellow-text); background: var(--yellow-soft); padding: 6px 12px; border-radius: var(--r-pill); }
.hero h1 { margin-top: 14px; font-size: clamp(32px, 8.5vw, 52px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; max-width: 11ch; }
.hero h1 em { font-style: normal; color: var(--yellow-text); }
.hero p { margin-top: 12px; color: var(--text-2); max-width: 30ch; font-size: 15px; }
.hero-actions { display: flex; flex-wrap: nowrap; gap: 8px; margin-top: 18px; }
.hero-actions .btn { min-height: 34px; padding: 0 14px; font-size: 13px; font-weight: 700; gap: 5px; white-space: nowrap; flex: 0 0 auto; }

.info-chips { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.info-chips::-webkit-scrollbar { display: none; }
.info-chip { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 6px 11px; white-space: nowrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-pill); }
.info-chip .icon { color: var(--yellow-text); }

.stack { display: flex; flex-direction: column; gap: 24px; }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title { font-size: 19px; font-weight: 800; }
.section-link { display: inline-flex; align-items: center; gap: 2px; color: var(--yellow-text); font-weight: 700; font-size: 14px; }
.section-link:hover { text-decoration: underline; }

/* Category tiles (Home) */
.cat-tiles { display: flex; gap: 10px; overflow-x: auto; padding: 2px var(--gutter) 6px; margin-inline: calc(var(--gutter) * -1); scroll-snap-type: x proximity; scrollbar-width: none; }
.cat-tiles::-webkit-scrollbar { display: none; }
.cat-tile { flex: 0 0 auto; width: 64px; display: flex; flex-direction: column; align-items: center; gap: 6px; scroll-snap-align: start; font-size: 11.5px; letter-spacing: 0.01em; font-weight: 600; color: var(--text-2); text-align: center; }
.cat-icon .icon { stroke-width: 1.6; }
.cat-icon {
  width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--yellow-text);
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s;
}
.cat-tile:hover .cat-icon { background: var(--surface-2); border-color: var(--yellow); transform: translateY(-2px); }

/* Horizontal rail of cards */
.rail { display: flex; gap: 12px; overflow-x: auto; padding: 2px var(--gutter) 8px; margin-inline: calc(var(--gutter) * -1); scroll-snap-type: x proximity; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail .pcard { flex: 0 0 min(64vw, 240px); scroll-snap-align: start; }

/* Promo banners */
.promos { display: grid; gap: 12px; }
.promo { position: relative; overflow: hidden; border-radius: var(--r-lg); padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 140px; }
.promo-yellow { background: var(--yellow); color: var(--yellow-ink); }
.promo-dark { background: var(--surface); border: 1px solid var(--border); }
.promo h3 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; max-width: 14ch; }
.promo p { font-size: 14px; max-width: 30ch; opacity: 0.85; }
.promo .btn { margin-top: auto; }
.promo-yellow .btn { background: var(--yellow-ink); color: #fff; border-color: var(--yellow-ink); }
.promo-art { position: absolute; right: -14px; bottom: -22px; width: 130px; height: 130px; opacity: 0.18; }
.promo-dark .promo-art { opacity: 0.12; color: var(--yellow-text); }

/* ============================ 7. PRODUCT CARD =========================== */
.grid-products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pcard {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--shadow-1); transition: border-color 0.2s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.pcard:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.pcard-media { position: relative; display: block; }
.media { position: relative; overflow: hidden; background: var(--surface-2); aspect-ratio: 16 / 11; }
.media.ratio-square { aspect-ratio: 1 / 1; }
.media.ratio-wide { aspect-ratio: 16 / 10; }
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease), opacity 0.35s; }
.pcard:hover .media img { transform: scale(1.05); }
.media.is-loading img { opacity: 0; }
.media.is-loading::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.07) 50%, transparent 80%) var(--surface-2);
  background-size: 200% 100%; animation: shimmer 1.3s linear infinite;
}
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

.badge {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  background: var(--yellow); color: var(--yellow-ink); font-size: 11px; font-weight: 800;
  padding: 4px 9px; border-radius: var(--r-pill); letter-spacing: 0.02em;
}
.badge-off { background: #2d2d33; color: var(--text-2); border: 1px solid var(--border-strong); }
.pcard.is-off .media img { filter: grayscale(1) brightness(0.7); }

.pcard-body { display: flex; flex-direction: column; flex: 1; padding: 9px 10px 10px; gap: 3px; }
.pcard-title { font-weight: 700; font-size: 13.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-title:hover { color: var(--yellow-text); }
.pcard-desc { color: var(--muted); font-size: 11.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: calc(1.4em * 2); }
.pcard-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============================== 8. MENU SCREEN ========================== */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.menu-tools { position: sticky; top: var(--header-h); z-index: 30; margin: 0 calc(var(--gutter) * -1); padding: 10px var(--gutter) 12px; background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.chips { display: flex; gap: 8px; overflow-x: auto; margin: 12px calc(var(--gutter) * -1) 0; padding: 2px var(--gutter); scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 16px;
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--border);
  font-weight: 600; font-size: 14px; color: var(--text-2); transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.chip:hover { border-color: var(--border-strong); }
.chip[aria-pressed='true'] { background: var(--yellow); color: var(--yellow-ink); border-color: var(--yellow); }
.results-meta { margin: 16px 0 12px; color: var(--muted); font-size: 13.5px; }
.menu-group + .menu-group { margin-top: 28px; }
.menu-group-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.menu-group-title .icon { color: var(--yellow-text); }

/* ========================== 9. PRODUCT DETAILS ========================== */
.pd { display: grid; gap: 20px; }
.pd-media { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); }
.pd-media .media { aspect-ratio: 4 / 3; }
.pd-media .pd-back { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.pd-cat { color: var(--yellow-text); font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.pd-title { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 4px; }
.pd-price { font-size: 22px; font-weight: 800; color: var(--yellow-text); margin-top: 6px; }
.pd-desc { color: var(--text-2); margin-top: 10px; }
.pd-block { margin-top: 24px; }
.pd-block h2 { font-size: 16px; font-weight: 800; margin-bottom: 12px; display: flex; align-items: baseline; gap: 8px; }
.pd-block h2 small { color: var(--muted); font-weight: 500; font-size: 13px; }
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: flex; align-items: center; gap: 12px; padding: 12px var(--gutter) calc(12px + var(--safe-b));
  background: var(--glass-2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}
.actionbar .btn { flex: 1; }
.pd-spacer { height: 84px; }

/* ================================ 10. CART ============================== */
.cart-layout { display: grid; gap: 20px; }
.cart-list { display: flex; flex-direction: column; gap: 12px; }
.cline { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.cline-media { border-radius: var(--r-md); overflow: hidden; align-self: start; }
.cline-media .media { aspect-ratio: 1 / 1; }
.cline-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cline-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cline-title { font-weight: 700; font-size: 15px; line-height: 1.3; }
.cline-meta { color: var(--muted); font-size: 12.5px; line-height: 1.4; word-break: break-word; }
.cline-meta strong { color: var(--text-2); font-weight: 600; }
.cline-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.cline.is-off { border-color: rgba(255, 122, 122, 0.45); }
.cline.is-off .media img { filter: grayscale(1) brightness(0.7); }

.summary { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; }
.summary h2 { font-size: 17px; font-weight: 800; margin-bottom: 14px; }
.row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 5px 0; color: var(--text-2); font-variant-numeric: tabular-nums; }
.row span:last-child { color: var(--text); font-weight: 600; }
.row-total { margin-top: 8px; padding-top: 14px; border-top: 1px dashed var(--border-strong); font-size: 18px; color: var(--text); font-weight: 800; }
.row-total span:last-child { color: var(--yellow-text); font-weight: 800; }
.summary .seg { margin-bottom: 14px; }
.summary .btn { margin-top: 16px; }
.summary .btn + .btn { margin-top: 10px; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); font-size: 13.5px; line-height: 1.45; background: var(--yellow-soft); border: 1px solid rgba(255, 210, 31, 0.3); color: var(--notice-ink); }
.notice .icon { margin-top: 2px; color: var(--yellow-text); }
.notice-warn { background: var(--danger-soft); border-color: rgba(255, 122, 122, 0.4); color: var(--notice-warn-ink); }
.notice-warn .icon { color: var(--danger); }
.notice + .notice, .notice + .summary, .summary + .notice { margin-top: 12px; }

/* ===================== 11. CHECKOUT / DONE / MORE ======================= */
.co-layout { display: grid; gap: 20px; }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; }
.form-card + .form-card { margin-top: 16px; }
.form-card > h2 { font-size: 17px; font-weight: 800; margin-bottom: 16px; }
.co-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.co-item { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.co-item-name { font-weight: 600; }
.co-item .cline-meta { margin-top: 1px; }
.co-item-price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fine-print { margin-top: 12px; text-align: center; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.done { max-width: 560px; margin: 8px auto 0; text-align: center; }
.done-icon { width: 76px; height: 76px; margin: 8px auto 18px; border-radius: 50%; background: var(--yellow); color: var(--yellow-ink); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 10px var(--yellow-soft); }
.done h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.done > p { color: var(--text-2); margin-top: 10px; }
.ref-pill { display: inline-block; margin-top: 14px; padding: 6px 14px; border-radius: var(--r-pill); background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; font-size: 13.5px; letter-spacing: 0.04em; }
.steps { text-align: left; margin: 24px 0; display: flex; flex-direction: column; gap: 10px; counter-reset: step; }
.steps li { counter-increment: step; display: flex; gap: 14px; align-items: flex-start; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--text-2); font-size: 14.5px; }
.steps li::before { content: counter(step); flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--yellow); color: var(--yellow-ink); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.done-actions { display: flex; flex-direction: column; gap: 10px; }
.msg-preview { margin-top: 18px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.msg-preview summary { cursor: pointer; padding: 14px 16px; font-weight: 700; font-size: 14px; }
.msg-preview pre { margin: 0; padding: 0 16px 16px; white-space: pre-wrap; word-break: break-word; font: 13px/1.55 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: var(--text-2); }

.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.info-card + .info-card { margin-top: 16px; }
.info-card h2 { font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.info-card p { color: var(--text-2); }
.info-list { display: flex; flex-direction: column; }
.info-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-top: 1px solid var(--border); }
.info-row:first-child { border-top: 0; padding-top: 4px; }
.info-row .icon { margin-top: 2px; color: var(--yellow-text); }
.info-row small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.info-row a:hover { color: var(--yellow-text); }
.more-grid { display: grid; gap: 16px; }
.more-grid .info-card + .info-card { margin-top: 0; }
.more-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.more-brand .brand-logo { height: 72px; }
.more-brand .tag { color: var(--yellow-text); font-weight: 700; }

/* ===================== 12. STATES (EMPTY / SKELETON) ==================== */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 48px 20px; }
.empty-icon { width: 84px; height: 84px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--yellow-text); margin-bottom: 10px; }
.empty h2 { font-size: 20px; font-weight: 800; }
.empty p { color: var(--muted); max-width: 34ch; }
.empty .btn { margin-top: 14px; }

.skeleton { background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--r-md); }
.sk-hero { height: 250px; border-radius: var(--r-lg); }
.sk-bar { height: 50px; border-radius: var(--r-pill); margin-top: 16px; }
.sk-card { aspect-ratio: 3 / 4; border-radius: var(--r-lg); }

/* ============================= 13. RESPONSIVE =========================== */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .grid-products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .promos { grid-template-columns: 1fr; }
  .hero { padding: 40px 36px; min-height: 320px; }
  .hero-art { width: 230px; right: 40px; top: 50%; transform: translateY(-50%); }
  .done-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; }
  .done-actions .btn { flex: 1 1 auto; }
}

@media (min-width: 900px) {
  :root { --header-h: 64px; }
  body { font-size: 16px; }
  .bottom-nav { display: none; }
  .page, body.no-nav .page { padding-bottom: 56px; }
  .toast, body.no-nav .toast { bottom: 28px; }

  .header-nav { display: flex; gap: 4px; margin: 0 auto 0 28px; }
  .header-nav a { padding: 9px 16px; border-radius: var(--r-pill); font-weight: 600; color: var(--text-2); transition: background 0.2s, color 0.2s; }
  .header-nav a:hover { background: var(--surface-2); color: var(--text); }
  .header-nav a.active { color: var(--yellow-text); background: var(--yellow-soft); }
  .brand { margin-right: 0; }
  .header-actions .header-cart { display: inline-flex; }
  #drawer-toggle { display: none; }
  .header-actions { margin-left: auto; }

  .grid-products { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  .menu-tools { position: static; margin: 0; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .chips { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; overflow: visible; }
  .cat-tiles { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; gap: 16px; }
  .cat-tile { width: 72px; }
  .cat-icon { width: 54px; height: 54px; }
  .rail { margin-inline: 0; padding-inline: 0; }
  .rail .pcard { flex-basis: 250px; }
  .section { margin-top: 44px; }
  .section-title { font-size: 22px; }
  .hero { min-height: 380px; padding: 56px; }
  .hero-art { width: 360px; right: 72px; top: 50%; transform: translateY(-50%); }
  .hero h1 { max-width: 12ch; }
  .promo { min-height: 170px; padding: 28px; }
  .page-title { font-size: 32px; }

  .pd { grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
  .pd-media { position: sticky; top: calc(var(--header-h) + 24px); }
  .actionbar { position: static; padding: 0; margin-top: 28px; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .pd-spacer { display: none; }
  .pd-title { font-size: 36px; }

  .cart-layout, .co-layout { grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
  .cart-layout .summary, .co-layout .co-side { position: sticky; top: calc(var(--header-h) + 24px); }
  .cline { grid-template-columns: 110px 1fr; padding: 16px; }
  .more-grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (min-width: 1200px) {
  .grid-products { gap: 24px; }
}

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

.pcard .btn-sm { min-height: 30px; padding: 0 11px; font-size: 12.5px; }
.badge { top: 8px; left: 8px; font-size: 10px; padding: 3px 8px; }
@media (max-width: 899px) { .rail .pcard { flex-basis: min(52vw, 200px); } }


/* ======================= 14. APP FEEL + INSTALL SHEET ======================= */
html, body { overscroll-behavior-y: none; }               /* no pull-to-refresh bounce */
body { -webkit-touch-callout: none; touch-action: manipulation; }
body :not(input):not(textarea):not([contenteditable]) { -webkit-user-select: none; user-select: none; }
img { -webkit-user-drag: none; }

/* Installed (standalone) mode: respect the notch / status bar */
@media (display-mode: standalone) {
  .app-header { padding-top: env(safe-area-inset-top, 0px); }
  .menu-tools { top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); }
  html { scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 12px); }
}

.install-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  max-width: 520px; margin-inline: auto;
  padding: 10px 18px calc(18px + var(--safe-b));
  background: var(--surface); border: 1px solid var(--border-strong); border-bottom: 0;
  border-radius: 22px 22px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(110%); transition: transform 0.4s var(--ease);
}
.install-sheet.show { transform: none; }
.install-grip { width: 38px; height: 4px; border-radius: 4px; background: var(--border-strong); margin: 0 auto 14px; }
.install-row { display: flex; align-items: center; gap: 14px; }
.install-logo { width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; border: 1px solid var(--border); }
.install-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.install-text strong { font-size: 16px; font-weight: 800; }
.install-text span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.install-actions { display: flex; gap: 10px; margin-top: 16px; }
.install-actions .btn { flex: 1; min-height: 42px; font-size: 14px; }
.install-ios-steps { margin-top: 12px; font-size: 13px; color: var(--text-2); line-height: 1.6; }
