/* Pedrito's Hideout — Customer Smart Menu
   Layout: compact teal header, hero + promos, sticky search/category bar,
   product grid; desktop adds a sticky cart column on the right. */
:root {
  --teal: #1A4955;
  --teal-deep: #123A44;
  --peach: #F6B193;
  --peach-deep: #EE9A78;
  --sun: #FFBD59;
  --offwhite: #F6F6F6;
  --white: #FFFFFF;

  --bg: #F6F6F6;
  --surface: #FFFFFF;
  --surface-2: #EEF3F3;
  --ink: #15323A;
  --ink-soft: #4F676D;
  --line: #DCE5E6;
  --header-bg: #1A4955;
  --header-ink: #FFFFFF;
  --accent: #F6B193;
  --accent-ink: #15323A;
  --focus: #1A4955;
  --ph-a: #E3EEF0;
  --ph-b: #CFE0E3;
  --ok: #2F7D5B;
  --ok-bg: #E2F3EA;
  --warn: #9A5B00;
  --warn-bg: #FFF1D6;
  --bad: #B23B2E;
  --bad-bg: #FBE6E2;
  --demo-bg: #FFBD59;
  --demo-ink: #15323A;
  --shadow: 0 1px 2px rgba(18, 58, 68, .06), 0 8px 24px rgba(18, 58, 68, .08);

  --font-display: "Bricolage Grotesque", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --header-h: 60px;
  --bar-h: 0px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E242A; --surface: #15323A; --surface-2: #1B3D46; --ink: #EDF3F3; --ink-soft: #A5BBBF; --line: #2A4C55;
    --header-bg: #123A44; --header-ink: #FFFFFF; --accent: #F6B193; --accent-ink: #15323A; --focus: #F6B193;
    --ph-a: #1B3D46; --ph-b: #234A54; --ok: #7FD1A8; --ok-bg: #18382C; --warn: #FFCF7A; --warn-bg: #3A2E14;
    --bad: #FF9C8F; --bad-bg: #3D1F1B; --demo-bg: #FFBD59; --demo-ink: #15323A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E242A; --surface: #15323A; --surface-2: #1B3D46; --ink: #EDF3F3; --ink-soft: #A5BBBF; --line: #2A4C55;
  --header-bg: #123A44; --header-ink: #FFFFFF; --accent: #F6B193; --accent-ink: #15323A; --focus: #F6B193;
  --ph-a: #1B3D46; --ph-b: #234A54; --ok: #7FD1A8; --ok-bg: #18382C; --warn: #FFCF7A; --warn-bg: #3A2E14;
  --bad: #FF9C8F; --bad-bg: #3D1F1B; --demo-bg: #FFBD59; --demo-ink: #15323A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 var(--font-body);
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px));
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--header-bg); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; display: block; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1240px; margin: 0 auto; }

/* ---------- Demo strip ---------- */
.demo-strip { background: var(--demo-bg); color: var(--demo-ink); font-size: 13px; }
.demo-strip .wrap { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-block: 6px; }
.demo-strip strong { letter-spacing: .06em; text-transform: uppercase; font-size: 11px; margin-right: 6px; }
.demo-strip button { border: 1.5px solid currentColor; background: transparent; border-radius: 999px; padding: 4px 12px; font-weight: 600; font-size: 13px; white-space: nowrap; min-height: 32px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; padding-top: env(safe-area-inset-top, 0px); z-index: 50; background: var(--header-bg); color: var(--header-ink); }
.site-header .wrap { height: var(--header-h); display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 38px; width: auto; }
.context-chip {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px;
  border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: inherit;
  font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48vw;
}
.context-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); flex-shrink: 0; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .1); color: inherit; flex-shrink: 0;
}
.icon-btn svg { width: 22px; height: 22px; }
.profile-initial { display: none; }
.profile-btn { text-decoration: none; }
.profile-btn.signed-in { background: var(--sun); color: var(--teal-deep); }
.profile-btn.signed-in svg { display: none; }
.profile-btn.signed-in .profile-initial { display: block; font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1; }
.badge {
  position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--sun); color: var(--teal-deep); font-size: 12px; font-weight: 700; display: grid; place-items: center;
}
.badge[data-count="0"] { display: none; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 16px 40px; }
@media (min-width: 1024px) {
  .layout.with-cart { grid-template-columns: minmax(0, 1fr) 360px; }
}
.cart-aside { display: none; }
@media (min-width: 1024px) {
  .layout.with-cart .cart-aside { display: block; position: sticky; top: calc(var(--header-h) + 16px + env(safe-area-inset-top, 0px)); align-self: start; max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; border-radius: var(--r-lg); }
  .layout.with-cart .cart-aside .cart { padding-bottom: 0; }
  .layout.with-cart .cart-aside .cart-foot { padding-bottom: 18px; }
}

/* ---------- Hero banners ---------- */
.menu-col { min-width: 0; display: grid; gap: 24px; align-content: start; }
.menu-col > * { min-width: 0; }

.hero { position: relative; }
.hero-track { display: grid; grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: var(--r-lg); scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.slide {
  scroll-snap-align: start; position: relative; overflow: hidden; min-height: 190px; padding: 26px 24px 28px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; border: 0; text-align: left; color: inherit; font: inherit;
}
.slide[data-link] { cursor: pointer; }
.slide.tone-teal { background: var(--teal); color: #fff; }
.slide.tone-peach { background: var(--peach); color: var(--teal-deep); }
.slide.tone-yellow { background: var(--sun); color: var(--teal-deep); }
.slide .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.slide h2 { font-size: clamp(26px, 5vw, 40px); font-weight: 800; max-width: 16ch; position: relative; }
.slide p { max-width: 40ch; position: relative; font-size: 15px; }
.slide img.banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Sun-and-board motif borrowed from the logo's geometry */
.slide .motif { position: absolute; right: 24px; top: 22px; width: 132px; height: 80px; pointer-events: none; }
.slide .motif::before { content: ""; position: absolute; left: 26px; top: 0; width: 80px; height: 40px; border-radius: 80px 80px 0 0; background: var(--peach); }
.slide .motif::after { content: ""; position: absolute; left: 0; top: 48px; width: 132px; height: 7px; border-radius: 50%; background: #fff; }
.slide.tone-peach .motif::before { background: var(--sun); }
.slide.tone-peach .motif::after, .slide.tone-yellow .motif::after { background: var(--teal); }
.slide.tone-yellow .motif::before { background: var(--peach-deep); }
.slide .wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 26px; opacity: .14; }
@media (max-width: 520px) { .slide .motif { transform: scale(.7); transform-origin: top right; right: 14px; top: 14px; } }
.hero-dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.hero-dots button { width: 28px; height: 28px; border: 0; background: transparent; display: grid; place-items: center; padding: 0; }
.hero-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width .2s; }
.hero-dots button[aria-current="true"]::before { width: 22px; background: var(--teal); }

/* ---------- Promos ---------- */
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title h2 { font-size: 22px; }
.promos { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.promo {
  border: 1.5px dashed var(--line); background: var(--surface); border-radius: var(--r-md); padding: 14px 16px;
  display: grid; gap: 4px; text-align: left; min-height: 96px;
}
.promo .tag { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.promo strong { font-family: var(--font-display); font-size: 18px; }
.promo span { font-size: 14px; color: var(--ink-soft); }
.promo code { font-weight: 700; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

/* ---------- Search + categories ---------- */
.menu-tools {
  position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 30; background: var(--bg);
  padding-block: 12px 8px; margin-inline: -4px; padding-inline: 4px;
}
.menu-heading { font-size: clamp(24px, 4vw, 30px); margin-bottom: 10px; }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--ink-soft); }
.search input {
  width: 100%; height: 48px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface);
  padding: 0 44px 0 44px; font-size: 16px;
}
.search input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 25%, transparent); }
.search .clear { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-soft); font-size: 20px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; padding-bottom: 4px; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .menu-tools .tabs { flex-wrap: wrap; overflow: visible; } }
.tab {
  flex-shrink: 0; scroll-snap-align: start; min-height: 40px; padding: 8px 16px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap;
}
.tab[aria-selected="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }

/* ---------- Product grid ---------- */
.cat-block + .cat-block { margin-top: 28px; }
.cat-block h3 { font-size: 20px; margin-bottom: 12px; }
.best-sellers h3 span { color: var(--sun); margin-right: 4px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 680px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .layout.with-cart .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .layout:not(.with-cart) .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card {
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); min-width: 0;
}
.card-media { position: relative; aspect-ratio: 4 / 3; width: 100%; border: 0; padding: 0; background: var(--ph-a); display: block; }
.card-media img, .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(180deg, var(--ph-a), var(--ph-b)); color: var(--ink-soft); font-size: 12px; font-weight: 600; letter-spacing: .04em;
}
.ph .sun { width: 44px; height: 22px; border-radius: 44px 44px 0 0; background: var(--peach); opacity: .9; }
.ph .board { width: 70px; height: 4px; border-radius: 50%; background: var(--teal); opacity: .5; margin-top: -4px; }
.ph small { font-size: 11px; margin-top: 4px; }
.card-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.card-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.2; border: 0; background: none; padding: 0; text-align: left; }
.card-desc { font-size: 13px; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.price small { font-weight: 500; color: var(--ink-soft); font-size: 12px; margin-right: 2px; }
.btn-add {
  min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 14px;
}
.btn-add:disabled { background: var(--surface-2); color: var(--ink-soft); cursor: not-allowed; }
.soldout { position: absolute; left: 10px; top: 10px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.card.is-soldout .card-media img, .card.is-soldout .ph { filter: grayscale(1); opacity: .6; }
.signature { position: absolute; right: 10px; top: 10px; background: var(--sun); color: var(--teal-deep); font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; }
.empty { padding: 36px 16px; text-align: center; color: var(--ink-soft); background: var(--surface); border-radius: var(--r-md); border: 1px dashed var(--line); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent; font-weight: 700; font-size: 16px; text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--peach-deep); }
.btn-dark { background: var(--teal); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.link-btn { border: 0; background: none; padding: 4px 0; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }

/* ---------- Cart ---------- */
.cart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 14px; }
.cart-head { display: flex; justify-content: space-between; align-items: baseline; }
.cart-head h2 { font-size: 22px; }
.cart-lines { display: grid; gap: 12px; list-style: none; padding: 0; margin: 0; }
.cart-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.cart-line .name { font-weight: 700; }
.cart-line .mods { grid-column: 1 / -1; font-size: 13px; color: var(--ink-soft); display: grid; gap: 2px; }
.cart-line .mods .req { color: var(--warn); }
.cart-line .controls { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; }
.stepper button { width: 40px; height: 40px; border: 0; background: transparent; font-size: 20px; font-weight: 600; border-radius: 50%; }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.line-actions { display: flex; gap: 14px; }
.totals { display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.totals .row { display: flex; justify-content: space-between; gap: 12px; }
.totals .disc { color: var(--ok); }
.totals .grand { font-size: 20px; font-weight: 800; font-family: var(--font-display); padding-top: 8px; border-top: 1px solid var(--line); }
.notes { font-size: 13px; color: var(--ink-soft); }
.upsell { background: var(--surface-2); border-radius: var(--r-md); padding: 14px; display: grid; gap: 10px; }
.upsell h3 { font-size: 15px; }
.upsell-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
.upsell-item .why { font-size: 12px; color: var(--ink-soft); grid-column: 1; }
.upsell-item button { grid-row: 1 / span 2; grid-column: 2; min-height: 40px; border-radius: 999px; border: 1.5px solid var(--teal); background: var(--surface); color: var(--ink); font-weight: 700; padding: 0 14px; font-size: 14px; }
.cart-foot { display: grid; gap: 12px; }
.cart-aside .cart-foot, .sheet .cart-foot { position: sticky; bottom: 0; background: var(--surface); padding-top: 10px; margin-top: -4px; box-shadow: 0 -10px 12px -10px rgba(18, 58, 68, .18); }
.sheet .cart-foot { padding-bottom: 4px; }
.cart-empty { color: var(--ink-soft); text-align: center; padding: 18px 0; }
.editing-banner { background: var(--warn-bg); color: var(--warn); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }

/* Mobile cart bar */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px);
}
.cart-bar button { width: 100%; display: flex; justify-content: space-between; align-items: center; min-height: 54px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--teal); color: #fff; font-weight: 700; font-size: 16px; box-shadow: var(--shadow); }
.cart-bar .count { background: var(--sun); color: var(--teal-deep); border-radius: 999px; padding: 2px 10px; margin-right: 10px; font-size: 14px; }
@media (min-width: 1024px) { .cart-bar.menu-view { display: none; } }

/* ---------- Dialogs ---------- */
dialog { border: 0; padding: 0; background: var(--surface); color: var(--ink); max-width: 560px; width: 100%; border-radius: var(--r-lg); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(10, 30, 36, .55); }
@media (max-width: 640px) {
  dialog.sheet { margin: auto 0 0; max-width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0; max-height: 92vh; }
}
.dlg { display: flex; flex-direction: column; max-height: min(88vh, 860px); }
@media (max-width: 640px) { .sheet .dlg { max-height: 92vh; } }
.dlg-scroll { overflow: auto; padding: 0 20px 16px; }
.dlg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 8px; }
.dlg-head h2 { font-size: 22px; }
.dlg-close { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface-2); font-size: 22px; flex-shrink: 0; }
.dlg-foot { padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); display: flex; gap: 12px; align-items: center; background: var(--surface); }
.pd-media { position: relative; aspect-ratio: 16 / 9; margin: 0 -20px 16px; background: var(--ph-a); }
.pd-media img, .pd-media .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-desc { color: var(--ink-soft); margin-bottom: 8px; }
.pd-base { font-weight: 700; margin-bottom: 14px; }
.group { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.group legend { font-weight: 700; font-size: 16px; padding: 0; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; width: 100%; }
.group legend .hint { font-weight: 500; font-size: 13px; color: var(--ink-soft); }
.group legend .req { margin-left: auto; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--surface-2); padding: 2px 8px; border-radius: 99px; }
.group.has-error legend .req { background: var(--bad-bg); color: var(--bad); }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.opt:has(input:checked) { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 8%, var(--surface)); }
.opt:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.opt input { width: 20px; height: 20px; accent-color: var(--teal); margin: 0; flex-shrink: 0; }
.opt .on { flex: 1; }
.opt .op { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 14px; }
.field { display: grid; gap: 6px; }
.field label, .field .label { font-weight: 700; font-size: 15px; }
.field .help { font-size: 13px; color: var(--ink-soft); }
.input, textarea.input, select.input { width: 100%; min-height: 48px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 10px 12px; font-size: 16px; }
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 22%, transparent); }
.error-box { background: var(--bad-bg); color: var(--bad); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; font-weight: 600; }
.info-box { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; color: var(--ink-soft); }
.ok-box { background: var(--ok-bg); color: var(--ok); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; font-weight: 600; }
.warn-box { background: var(--warn-bg); color: var(--warn); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; font-weight: 600; }

/* ---------- Checkout ---------- */
.page { padding-block: 20px 48px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: clamp(26px, 4vw, 34px); }
.steps-mini { display: flex; gap: 8px; margin-left: auto; font-size: 13px; color: var(--ink-soft); }
.steps-mini span[aria-current="step"] { color: var(--ink); font-weight: 700; }
.co-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .co-grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .co-grid .summary { position: sticky; top: calc(var(--header-h) + 16px); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 16px; min-width: 0; }
.panel h2 { font-size: 19px; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.seg.seg-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .seg.seg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.seg label { display: grid; place-items: center; text-align: center; min-height: 56px; padding: 8px 6px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-weight: 700; font-size: 14px; cursor: pointer; line-height: 1.2; }
.seg label small { display: block; font-weight: 500; font-size: 12px; color: var(--ink-soft); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { border-color: var(--teal); background: var(--teal); color: #fff; }
.seg label:has(input:checked) small { color: rgba(255, 255, 255, .8); }
.seg label:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.pay-opts { display: grid; gap: 8px; }
.pay-opts .opt { align-items: flex-start; }
.pay-opts .opt small { display: block; color: var(--ink-soft); font-size: 13px; }
details.more { border: 1px solid var(--line); border-radius: var(--r-sm); }
details.more summary { cursor: pointer; padding: 12px 14px; font-weight: 700; min-height: 48px; display: flex; align-items: center; justify-content: space-between; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; font-size: 20px; color: var(--ink-soft); }
details.more[open] summary::after { content: "−"; }
details.more .inner { padding: 0 14px 14px; display: grid; gap: 10px; }
.inline { display: flex; gap: 8px; }
.inline .input { flex: 1; min-width: 0; }
.review-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.review-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.review-list .mods { grid-column: 1 / -1; font-size: 13px; color: var(--ink-soft); }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 15px; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; font-weight: 600; }
.fine { font-size: 13px; color: var(--ink-soft); }

/* ---------- Tracking ---------- */
.track-head { display: grid; gap: 4px; }
.order-no { font-family: var(--font-display); font-size: clamp(40px, 9vw, 56px); font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--demo-bg); color: var(--demo-ink); vertical-align: middle; }
.status-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.status-list li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 18px; }
.status-list li:last-child { padding-bottom: 0; }
.status-list li::before { content: ""; position: absolute; left: 13px; top: 26px; bottom: 0; width: 2px; background: var(--line); }
.status-list li:last-child::before { display: none; }
.status-list .mark { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); display: grid; place-items: center; font-size: 14px; font-weight: 700; z-index: 1; }
.status-list li.done .mark { background: var(--teal); border-color: var(--teal); color: #fff; }
.status-list li.done::before { background: var(--teal); }
.status-list li.current .mark { border-color: var(--teal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--peach) 55%, transparent); }
.status-list .st { font-weight: 700; padding-top: 2px; }
.status-list li:not(.done):not(.current) .st { color: var(--ink-soft); font-weight: 500; }
.status-list .sd { font-size: 13px; color: var(--ink-soft); }
.countdown { font-family: var(--font-display); font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.countdown.low { color: var(--bad); }
.track-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .track-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.stack { display: grid; gap: 20px; min-width: 0; }
.stars { display: flex; gap: 4px; }
.stars button { width: 44px; height: 44px; border: 0; background: none; font-size: 30px; color: var(--line); padding: 0; }
.stars button[aria-pressed="true"] { color: var(--sun); }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-row code { font-size: 14px; background: var(--surface-2); padding: 6px 10px; border-radius: 8px; word-break: break-all; }
.club { background: var(--teal); color: #fff; border-color: var(--teal); }
.club .field .help, .club .fine { color: rgba(255, 255, 255, .78); }
.club .input { background: #fff; color: #15323A; border-color: transparent; }
.club .opt { border-color: rgba(255, 255, 255, .3); }
.club .opt input { accent-color: var(--peach); }
.club .link-btn { color: #fff; }
.club .ok-box { background: rgba(255, 255, 255, .12); color: #fff; }

/* ---------- Toast ---------- */
.toast-host { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bar-h) + 24px + env(safe-area-inset-bottom, 0px)); z-index: 100; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); pointer-events: none; }
.toast { background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Demo tools ---------- */
dialog.drawer { margin: 0 0 0 auto; height: 100%; max-height: 100%; max-width: 480px; border-radius: 0; }
.drawer .dlg { max-height: 100%; height: 100%; }
.dt-section { display: grid; gap: 10px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.dt-section h3 { font-size: 17px; }
.dt-order { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; display: grid; gap: 8px; font-size: 14px; }
.dt-order .top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.dt-status { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.dt-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dt-actions .btn { min-height: 40px; font-size: 14px; padding: 0 14px; }
.dt-actions .input { min-height: 40px; width: 120px; }
.audit { font-size: 12px; color: var(--ink-soft); display: grid; gap: 2px; margin: 0; padding-left: 16px; }
.table-btns { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.table-btns .btn { min-height: 40px; padding: 0; font-size: 14px; }
.dt-product { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.dt-product .thumb { width: 48px; height: 36px; border-radius: 6px; overflow: hidden; position: relative; background: var(--ph-a); }
.dt-product .thumb img { width: 100%; height: 100%; object-fit: cover; }
.dt-product .acts { display: flex; gap: 6px; align-items: center; }
.dt-product label.btn, .dt-product button.btn { min-height: 36px; padding: 0 10px; font-size: 13px; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
/* Barangay type-to-search (delivery) */
.brgy-field { position: relative; }
.brgy-sugg { display: grid; gap: 0; border-radius: var(--r-sm); overflow: hidden; }
.brgy-sugg:not(:empty) { border: 1.5px solid var(--line); margin-top: 6px; background: var(--surface, #fff); }
.brgy-opt { text-align: left; padding: 12px 14px; min-height: 46px; font: inherit; font-weight: 600; background: none; border: 0; border-bottom: 1px solid var(--line); color: inherit; cursor: pointer; }
.brgy-opt:last-child { border-bottom: 0; }
.brgy-opt:hover, .brgy-opt:focus-visible { background: var(--teal); color: #fff; outline: none; }
#dl-brgy-status:not(:empty) { margin-top: 8px; }
/* E-wallet QR + payment screenshot */
.pay-steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 4px; }
.qr-box { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; color: #15323A; margin-bottom: 12px; }
.qr-box img { width: min(260px, 100%); height: auto; aspect-ratio: auto; object-fit: contain; border-radius: 8px; }
.qr-name { font-weight: 700; margin: 0; }
.proof-thumb { display: block; max-width: 220px; max-height: 360px; width: auto; height: auto; border-radius: 10px; border: 1.5px solid var(--line); margin: 0 auto 10px; }

/* Install the app (PWA) */
.install-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.install-bar .inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.install-bar img { width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0; }
.install-bar .txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
.install-bar .txt strong { display: block; font-size: 15px; }
.install-bar .btn { min-height: 40px; padding: 0 16px; white-space: nowrap; }
.install-bar .x { border: 0; background: none; color: var(--ink-soft); font-size: 24px; width: 36px; height: 40px; cursor: pointer; flex-shrink: 0; }
.ios-steps { display: grid; gap: 12px; margin: 4px 0 8px; padding: 0; list-style: none; counter-reset: s; }
.ios-steps li { display: flex; gap: 12px; align-items: center; font-size: 16px; line-height: 1.4; }
.ios-steps li::before { counter-increment: s; content: counter(s); width: 30px; height: 30px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
#install-dialog svg { width: 20px; height: 20px; vertical-align: -4px; }
