/* Advance Commerce — online store base. Layouts add one small file (assets/css/layouts/<key>.css) that changes tokens and a few parts. */
:root {
  --primary: #f97316; --primary-hover: #ea580c; --primary-soft: #ffedd5; --on-primary: #fff; --primary-ink: #c2410c;
  --cta: var(--primary); --cta-hover: var(--primary-hover); --on-cta: var(--on-primary);
  --ink: #111; --bg: #f4f5f7; --surface: #fff; --surface-2: #f6f7f9; --surface-3: #eceef2; --line: #e3e6ec; --line-strong: #cfd4dd;
  --text: #0f172a; --muted: #5b6474; --sale: #dc2626; --sale-soft: #fee2e2; --best: #92400e; --best-soft: #fef3c7; --new: #1d4ed8; --new-soft: #dbeafe;
  --success: #15803d; --success-soft: #dcfce7; --warning: #a16207; --warning-soft: #fef3c7;
  --danger: #b91c1c; --danger-soft: #fee2e2; --info: #1d4ed8; --info-soft: #dbeafe;
  --radius: 14px; --radius-sm: 10px; --radius-lg: 22px; --btn-radius: 10px; --bw: 1px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06); --shadow: 0 1px 2px rgba(15,23,42,.05), 0 6px 20px rgba(15,23,42,.07); --shadow-lg: 0 12px 40px rgba(15,23,42,.14);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif; --font-head: var(--font);
  --head-weight: 750; --head-track: -.018em; --head-case: none;
  --top-h: 64px; --top-bg: color-mix(in srgb, var(--surface) 88%, transparent); --top-text: var(--text);
  --hero-bg: #141416; --hero-text: #fff; --img-bg: var(--surface-2); --img-ratio: 1 / 1;
  --bn-h: 62px; --safe-b: env(safe-area-inset-bottom, 0px); --ease: cubic-bezier(.2,.7,.2,1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --ink: #f4f4f5; --bg: #0e0f12; --surface: #17181c; --surface-2: #1e2025; --surface-3: #272a30; --line: #2c2f36; --line-strong: #3b3f48;
  --text: #f1f3f7; --muted: #a3a9b6; --sale: #f87171; --sale-soft: #3b1616; --best: #fcd34d; --best-soft: #3a2c0a; --new: #93c5fd; --new-soft: #172a4a;
  --success: #4ade80; --success-soft: #14321f; --warning: #fbbf24; --warning-soft: #3a2a0c;
  --danger: #f87171; --danger-soft: #3b1414; --info: #93c5fd; --info-soft: #172a4a;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3); --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
  --hero-bg: #1b1c21; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --ink: #f4f4f5; --bg: #0e0f12; --surface: #17181c; --surface-2: #1e2025; --surface-3: #272a30; --line: #2c2f36; --line-strong: #3b3f48;
    --text: #f1f3f7; --muted: #a3a9b6; --sale: #f87171; --sale-soft: #3b1616; --best: #fcd34d; --best-soft: #3a2c0a; --new: #93c5fd; --new-soft: #172a4a;
    --success: #4ade80; --success-soft: #14321f; --warning: #fbbf24; --warning-soft: #3a2a0c; --danger: #f87171; --danger-soft: #3b1414; --info: #93c5fd; --info-soft: #172a4a;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3); color-scheme: dark;
  }
}

/* ---------- Base + type ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 64px); }
body { margin: 0; font: 15px/1.55 var(--font); color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-track); line-height: 1.18; margin: 0 0 .5em; text-transform: var(--head-case); }
h1 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem); } h2 { font-size: clamp(1.18rem, 1.02rem + .7vw, 1.55rem); } h3 { font-size: 1.05rem; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
.icon { width: 20px; height: 20px; flex: none; vertical-align: middle; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .center { text-align: center; } .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; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--cta); color: var(--on-cta); padding: 8px 14px; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 70%, var(--text)); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 24px; } }
.main { flex: 1; padding-top: 18px; padding-bottom: calc(var(--bn-h) + var(--safe-b) + 28px); }
.kicker { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary-ink); }
.lead { font-size: 1.08rem; color: var(--muted); }
.leader { flex: 1; min-width: 16px; border-bottom: 2px dotted var(--line-strong); margin: 0 8px; transform: translateY(-4px); }

/* ---------- Announcement + header ---------- */
.announce { background: var(--ink); color: var(--bg); text-align: center; font-size: .83rem; font-weight: 500; padding: 7px 0; }
.announce-warn { background: var(--warning-soft); color: var(--warning); }
.topbar { position: sticky; top: 0; z-index: 40; background: var(--top-bg); color: var(--top-text); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid var(--line); transition: box-shadow .25s; }
.is-scrolled .topbar { box-shadow: 0 6px 24px rgba(15,23,42,.08); }
.topbar-in { display: flex; align-items: center; gap: 14px; height: var(--top-h); transition: height .25s var(--ease); }
.is-compact .topbar-in { height: 54px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; font-weight: 750; min-width: 0; flex: none; max-width: 46%; }
.brand:hover { text-decoration: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.08rem; font-family: var(--font-head); letter-spacing: -.01em; }
.brand-tag { font-size: .72rem; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-compact .brand-tag { display: none; }
.brand-mark, .logo-img { flex: none; border-radius: 10px; }
.logo-img { object-fit: contain; background: #fff; }
.brand-logo { display: inline-flex; background: #fff; border-radius: 10px; } .brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.search { position: relative; flex: 1; display: flex; align-items: center; max-width: 620px; margin: 0 auto; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 4px 0 12px; transition: border-color .15s, box-shadow .15s, background .15s; }
.search:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-soft); }
.search-ic { color: var(--muted); display: grid; }
.search input[type=search] { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; height: 42px; outline: none; padding: 0 8px; min-height: 0; box-shadow: none; }
.search-go { border: 0; background: var(--cta); color: var(--on-cta); font: 600 .86rem var(--font); height: 34px; padding: 0 16px; border-radius: 999px; cursor: pointer; }
.search-go:hover { background: var(--cta-hover); }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 6px; max-height: 70vh; overflow: auto; }
.sg-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: var(--text); }
.sg-item:hover, .sg-item[aria-selected="true"] { background: var(--surface-2); text-decoration: none; }
.sg-img { width: 40px; height: 40px; border-radius: 8px; background: var(--img-bg); overflow: hidden; flex: none; display: grid; place-items: center; }
.sg-img img { width: 100%; height: 100%; object-fit: cover; }
.sg-name { flex: 1; min-width: 0; font-weight: 600; font-size: .92rem; } .sg-name small { display: block; color: var(--muted); font-weight: 400; }
.sg-name mark { background: var(--primary-soft); color: inherit; border-radius: 3px; }
.sg-price { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.sg-head { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 8px 4px; }
.sg-all { display: block; text-align: center; padding: 9px; font-weight: 600; border-top: 1px solid var(--line); margin-top: 4px; }
.sg-empty { padding: 14px; text-align: center; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 2px; margin-left: auto; flex: none; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 42px; height: 42px; padding: 0 9px; border-radius: 999px; border: 0; background: transparent; color: inherit; cursor: pointer; font: 600 .88rem var(--font); }
.icon-btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); text-decoration: none; }
.act-label { display: none; }
@media (min-width: 1100px) { .act-label { display: inline; } .cart-btn { background: var(--cta); color: var(--on-cta); padding: 0 16px 0 13px; } .cart-btn:hover { background: var(--cta-hover); } .cart-btn .count { position: static; background: var(--on-cta); color: var(--cta); } }
.count { position: absolute; top: 1px; right: -1px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--cta); color: var(--on-cta); font: 700 11px/19px var(--font); text-align: center; }
.count.bump { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: scale(1.45); } 60% { transform: scale(.9); } }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; } :root[data-theme="dark"] .i-moon { display: inline; }
.only-phone { display: none; }
.navbar { border-top: 1px solid var(--line); overflow: hidden; max-height: 60px; transition: max-height .25s var(--ease), opacity .2s; }
.is-compact .navbar { max-height: 0; opacity: 0; border-top-color: transparent; }
.navbar-in { display: flex; align-items: center; gap: 10px; height: 52px; }
.navlinks { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; padding: 2px; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.navlinks::-webkit-scrollbar { display: none; }
.navlinks .chip { padding: 6px 13px; font-size: .86rem; }
.navextra { display: none; gap: 16px; flex: none; }
.navextra a { display: inline-flex; align-items: center; gap: 5px; color: inherit; font-size: .88rem; font-weight: 600; }
.navextra .icon { width: 16px; height: 16px; color: var(--primary-ink); }
@media (min-width: 1100px) { .navextra { display: flex; } }
.mega { position: static; flex: none; }
.mega-btn { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 650; font-size: .88rem; cursor: pointer; list-style: none; user-select: none; }
.mega-btn::-webkit-details-marker { display: none; }
.mega-btn .icon { width: 17px; height: 17px; } .mega-btn .icon:last-child { transition: transform .2s; }
.mega[open] .mega-btn .icon:last-child { transform: rotate(180deg); }
.mega-panel { position: absolute; left: 0; right: 0; top: 100%; z-index: 55; background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 18px max(16px, calc((100vw - 1232px) / 2)); animation: drop .2s var(--ease); max-height: calc(100vh - 140px); overflow: auto; }
.navbar:has(.mega[open]) { overflow: visible; }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }
.mega-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
.mega-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; color: var(--text); }
.mega-item:hover { background: var(--surface-2); text-decoration: none; }
.mega-item b { display: block; font-size: .93rem; } .mega-item small { color: var(--muted); }
.mega-item .cat-ic { width: 44px; height: 44px; font-size: 1.35rem; border-radius: 12px; }
.mega-foot { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }

/* ---------- Buttons, chips, forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 18px; border-radius: var(--btn-radius); border: max(1px, var(--bw)) solid var(--line-strong); background: var(--surface); color: var(--text); font: 650 .94rem var(--font); cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, transform .12s var(--ease), box-shadow .15s; }
.btn:hover { background: var(--surface-2); border-color: var(--text); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }
.btn-primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--danger); } .btn-danger:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .86rem; border-radius: calc(var(--btn-radius) - 2px); }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1.02rem; }
.btn-block { display: flex; width: 100%; }
.btn.disabled, .btn:disabled { opacity: .5; pointer-events: none; }
.btn.loading { opacity: .7; pointer-events: none; }
.link { display: inline-flex; align-items: center; gap: 2px; font-weight: 650; white-space: nowrap; }
.link .icon { width: 16px; height: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: .88rem; font-weight: 550; white-space: nowrap; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--text); text-decoration: none; }
.chip.active, .chip[aria-current] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-n { font-size: .74rem; opacity: .65; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > span { font-weight: 650; font-size: .88rem; }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=datetime-local], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: max(1px, var(--bw)) solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 13px; min-height: 44px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 76px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: 1 / -1; } }
.check { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--primary); }

/* ---------- Cards, alerts, badges ---------- */
.card { background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.card.mid { max-width: 780px; margin-left: auto; margin-right: auto; }
.alert { padding: 12px 15px; border-radius: var(--radius-sm); margin-bottom: 14px; border: 1px solid transparent; font-size: .93rem; }
.alert-success { background: var(--success-soft); color: var(--success); } .alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); } .alert-info { background: var(--info-soft); color: var(--info); }
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.empty { text-align: center; padding: 40px 16px; }
.empty-icon { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 22px; background: var(--primary-soft); color: var(--primary-ink); margin-bottom: 14px; }
.empty-icon .icon { width: 30px; height: 30px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-title h1 { margin: 0; display: flex; align-items: center; gap: 10px; }
.count-pill { font: 600 .8rem var(--font); background: var(--surface-3); color: var(--muted); padding: 3px 10px; border-radius: 999px; letter-spacing: 0; }
.crumbs { font-size: .84rem; color: var(--muted); margin-bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }

/* ---------- Sections, grids, free-delivery bar ---------- */
.freebar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--success-soft); color: var(--text); margin-bottom: 14px; }
.freebar-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--surface); color: var(--success); flex: none; }
.freebar-body { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; }
.freebar-track { height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--success) 18%, var(--surface)); overflow: hidden; }
.freebar-track i { display: block; height: 100%; background: var(--success); border-radius: inherit; transition: width .5s var(--ease); }
.section { margin: 34px 0; }
.section-tight { margin: 0 0 14px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-sub { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.initial { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; font-size: 1.4rem; font-weight: 800; color: hsl(var(--h) 70% 32%); background: hsl(var(--h) 85% 90%); }
:root[data-theme="dark"] .initial { color: hsl(var(--h) 80% 75%); background: hsl(var(--h) 40% 20%); }
.img-ph { display: grid; place-items: center; background: var(--img-bg); color: var(--muted); width: 100%; aspect-ratio: 1; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .section .grid-grocery, .section .grid-market { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
[data-cards="compact"] .grid { gap: 8px; } @media (min-width: 1024px) { [data-cards="compact"] .grid { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; } }
[data-cards="compact"] .pcard-body { padding: 8px; } [data-cards="compact"] .pcard-name { font-size: .84rem; }
@media (min-width: 1024px) { [data-cards="large"] .grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 22px; } }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; padding: 2px 2px 10px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.row-scroll > * { scroll-snap-align: start; }
@media (min-width: 600px) { .row-scroll { grid-auto-columns: calc(33.33% - 11px); gap: 16px; } }
@media (min-width: 1024px) { .row-scroll { grid-auto-columns: calc(20% - 13px); } .row-food { grid-auto-columns: calc(25% - 12px); } [data-cards="compact"] .row-scroll { grid-auto-columns: calc(16.66% - 13px); } [data-cards="large"] .row-scroll { grid-auto-columns: calc(33.33% - 11px); } }

/* ---------- Product card ---------- */
.pcard { position: relative; display: flex; flex-direction: column; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .25s var(--ease), transform .25s var(--ease), border-color .2s; min-width: 0; }
.pcard:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--line-strong); }
.pcard-img { position: relative; display: block; aspect-ratio: var(--img-ratio); background: var(--img-bg); overflow: hidden; }
.pcard-img img, .pcard-img .img-ph { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .35s; }
.pcard:hover .pcard-img .img-main { transform: scale(1.05); }
.pcard-img .img-alt { position: absolute; inset: 0; opacity: 0; }
@media (hover: hover) { .has-alt:hover .img-alt { opacity: 1; } .has-alt:hover .img-main { opacity: 0; } }
.badges { position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; z-index: 1; }
.badge-tag { font-size: .7rem; font-weight: 800; letter-spacing: .01em; padding: 3px 8px; border-radius: 6px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); line-height: 1.3; }
.tag-sale { background: var(--sale); color: #fff; } .tag-best { background: var(--best-soft); color: var(--best); } .tag-new { background: var(--new-soft); color: var(--new); }
.tag-low { background: var(--warning-soft); color: var(--warning); } .tag-ws { background: var(--info-soft); color: var(--info); } .tag-dark { background: var(--ink); color: var(--bg); } .tag-soft { color: var(--primary-ink); }
:root[data-theme="dark"] .tag-sale { background: #dc2626; }
.pcard-body { display: flex; flex-direction: column; gap: 4px; padding: 11px 12px 12px; flex: 1; }
.pcard-kicker { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 550; }
.pcard-name { font-size: .92rem; font-weight: 600; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; line-height: 1.25; letter-spacing: -.005em; font-family: var(--font); text-transform: none; }
.pcard-name a { color: var(--text); }
.pcard-name a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.pcard-unit { font-size: .76rem; color: var(--muted); }
.pcard-desc { font-size: .82rem; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-rating { display: flex; align-items: center; gap: 8px; font-size: .8rem; min-height: 18px; }
.pcard-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: auto; padding-top: 6px; }
.pcard-foot .add-form .btn { width: 38px; height: 38px; min-height: 38px; padding: 0; border-radius: 50%; flex: none; }
.price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; min-width: 0; }
.price strong { font-size: 1.02rem; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.price s { font-size: .78rem; color: var(--muted); }
.off { color: var(--sale); font-size: .76rem; font-weight: 750; }
.stars { position: relative; display: inline-block; width: 80px; height: 15px; vertical-align: -2px; background: var(--line-strong); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 15'%3E%3Cpath d='M8 0l2.4 4.9 5.4.8-3.9 3.8.9 5.4L8 12.4 3.2 14.9l.9-5.4L.2 5.7l5.4-.8z'/%3E%3C/svg%3E") repeat-x left / 16px 15px; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 15'%3E%3Cpath d='M8 0l2.4 4.9 5.4.8-3.9 3.8.9 5.4L8 12.4 3.2 14.9l.9-5.4L.2 5.7l5.4-.8z'/%3E%3C/svg%3E") repeat-x left / 16px 15px; }
.pcard .stars { width: 64px; height: 12px; -webkit-mask-size: 12.8px 12px; mask-size: 12.8px 12px; }
.stars-fill { position: absolute; inset: 0 auto 0 0; background: #f59e0b; }
.add-form { margin: 0; }
.soldout { font-size: .76rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.btn.added { background: var(--success) !important; border-color: var(--success) !important; color: #fff !important; }
.qa { position: relative; z-index: 1; flex: none; }
.qa-step { display: none; align-items: center; height: 38px; border-radius: 999px; background: var(--cta); color: var(--on-cta); overflow: hidden; }
.qa[data-in] .add-form { display: none; } .qa[data-in] .qa-step { display: inline-flex; animation: pop .25s var(--ease); }
.qa-step button { width: 34px; height: 38px; border: 0; background: transparent; color: inherit; display: grid; place-items: center; cursor: pointer; }
.qa-step button:hover { background: rgba(0,0,0,.12); }
.qa-step .icon { width: 16px; height: 16px; }
.qa-step output { min-width: 22px; text-align: center; font-weight: 800; font-size: .9rem; }
.qa .qa-add { width: auto !important; border-radius: 999px !important; padding: 0 12px 0 9px !important; gap: 3px; }
.qa .qa-add:not(:has(span)) { width: 38px !important; padding: 0 !important; }
@keyframes pop { from { transform: scale(.8); opacity: .4; } }
.pcard-food .pcard-img { aspect-ratio: 4 / 3; }
.pcard-food .pcard-name { min-height: 0; font-size: 1rem; }
.pcard-grocery .pcard-name { min-height: 2.5em; }

/* ---------- Shared bits: stepper, prose, category icon, food grid, payment logos ---------- */
.stepper { display: inline-flex; align-items: center; border: max(1px, var(--bw)) solid var(--line-strong); border-radius: var(--btn-radius); background: var(--surface); overflow: hidden; }
.stepper button { width: 42px; height: 42px; border: 0; background: transparent; color: var(--text); cursor: pointer; display: grid; place-items: center; }
.stepper button:hover { background: var(--surface-2); }
.stepper input { width: 56px; min-height: 42px; border: 0; border-radius: 0; text-align: center; padding: 0; -moz-appearance: textfield; background: transparent; font-weight: 700; }
.stepper input:focus { box-shadow: none; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper.sm button { width: 32px; height: 34px; } .stepper.sm input { width: 42px; min-height: 34px; }
.prose { overflow-wrap: anywhere; } .prose p:last-child { margin-bottom: 0; }
.cat-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; font-size: 1.9rem; line-height: 1; background: hsl(var(--h, 24) 90% 93%); overflow: hidden; flex: none; }
.cat-ic img { width: 100%; height: 100%; object-fit: cover; }
:root[data-theme="dark"] .cat-ic { background: hsl(var(--h, 24) 30% 20%); }
.grid-food { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)) !important; }
@media (max-width: 599px) { .grid-food { grid-template-columns: 1fr 1fr !important; } }
.paylogos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.paylogo { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: 6px; font: 800 .72rem/1 var(--font); letter-spacing: .02em; background: #fff; color: #334155; border: 1px solid #dbe1ea; white-space: nowrap; }
.pl-gcash { background: #0a5bd8; color: #fff; border-color: #0a5bd8; } .pl-maya { background: #0e1d14; color: #6ef2a6; border-color: #0e1d14; }
.pl-card { color: #1a1f71; font-style: italic; } .pl-qr { background: #fff; color: #c8102e; } .pl-cod { background: #14532d; color: #fff; border-color: #14532d; }
.pl-gotyme { background: #00d1c1; color: #062b2a; border-color: #00d1c1; } .pl-bank { background: #1e3a8a; color: #fff; border-color: #1e3a8a; }
/* ---------- Shop page ---------- */
.shop-layout { display: grid; gap: 20px; }
@media (max-width: 1023px) { .filters { display: none; } }
@media (min-width: 1024px) { .shop-layout { grid-template-columns: 250px minmax(0, 1fr); align-items: start; } .filters { position: sticky; top: calc(var(--top-h) + 70px); } }
.filters .card { padding: 14px; }
.filters h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 4px 8px 8px; }
.filter-list { list-style: none; margin: 0; padding: 0; }
.filter-list a { display: flex; justify-content: space-between; padding: 7px 9px; border-radius: 9px; color: var(--text); font-size: .92rem; }
.filter-list a:hover { background: var(--surface-2); text-decoration: none; }
.filter-list a[aria-current] { background: var(--primary-soft); color: var(--primary-ink); font-weight: 700; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; padding: 10px; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--radius); }
.toolbar select { width: auto; min-height: 40px; padding: 6px 10px; }
.toolbar .grow { flex: 1; min-width: 160px; }
.toolbar .check { margin: 0 6px; }
.pager { margin-top: 22px; display: grid; gap: 10px; }
.pager-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.js .pager-nav { display: none; }
.no-js-only { display: initial; } .js .no-js-only { display: none; }

/* ---------- Account, vendors, info ---------- */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; scrollbar-width: none; }
.tab { padding: 11px 14px; color: var(--muted); font-weight: 650; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { text-decoration: none; color: var(--text); }
.tab[aria-current] { color: var(--primary-ink); border-color: var(--primary); }
.list-rows { list-style: none; margin: 0; padding: 0; }
.list-rows li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.list-rows li:first-child { border-top: 0; }
.vendor-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.vcard { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--surface); border: var(--bw) solid var(--line); border-radius: var(--radius); color: var(--text); transition: box-shadow .2s, transform .2s var(--ease); }
.vcard:hover { box-shadow: var(--shadow); text-decoration: none; transform: translateY(-2px); }
.vlogo { display: block; width: 56px; height: 56px; border-radius: 14px; overflow: hidden; flex: none; background: var(--surface-2); }
.vlogo img, .vlogo .img-ph, .vlogo .initial { width: 100%; height: 100%; object-fit: cover; }
.vbanner { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 1; min-height: 120px; background: linear-gradient(135deg, var(--ink), var(--primary)); margin-bottom: 14px; }
.vbanner img { width: 100%; height: 100%; object-fit: cover; }
.vhead { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.faq details { border: var(--bw) solid var(--line); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 15px 16px; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--primary-ink); }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 16px 14px; color: var(--muted); }
.info h2 { margin-top: 1.2em; }
.guide { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.guide .card { margin: 0; }
.step-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--cta); color: var(--on-cta); font-weight: 800; font-size: .9rem; flex: none; font-family: var(--font); letter-spacing: 0; }
.powered { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.powered img { height: 48px; width: auto; }

/* ---------- Footer, bottom nav, cart bar, toast ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--line); padding: 0 0 calc(var(--bn-h) + var(--safe-b) + 16px); margin-top: 24px; }
.footer-promise { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding-top: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.fp { display: flex; gap: 10px; align-items: center; min-width: 0; font-size: .86rem; } .fp b { display: block; line-height: 1.25; } .fp small { color: var(--muted); }
.fp-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-ink); flex: none; }
.fp-ic .icon { width: 18px; height: 18px; }
@media (min-width: 900px) { .footer-promise { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.footer-grid { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; padding-top: 28px; }
.footer-about { grid-column: 1 / -1; }
.footer-about p { max-width: 380px; margin-top: 10px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } .footer-about { grid-column: auto; } }
.footer h3 { font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-family: var(--font); font-weight: 700; }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .92rem; }
.links a, .links span { color: var(--text); display: inline-flex; gap: 6px; align-items: flex-start; }
.links .icon { width: 16px; height: 16px; margin-top: 3px; flex: none; }
.socials { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.footer-base { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 16px; }
.footer-base .paylogos { margin: 0; }
.bottomnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--bn-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.bottomnav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); font-size: .7rem; font-weight: 650; }
.bottomnav a:hover { text-decoration: none; color: var(--text); }
.bottomnav a[aria-current] { color: var(--primary-ink); }
.bottomnav a[aria-current]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
.bottomnav .count { top: 5px; right: calc(50% - 22px); }
.cartbar { position: fixed; left: 12px; right: 12px; bottom: calc(var(--bn-h) + var(--safe-b) + 10px); z-index: 44; display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 54px; border-radius: 16px; background: var(--cta); color: var(--on-cta); font-weight: 700; box-shadow: 0 10px 30px color-mix(in srgb, var(--cta) 40%, transparent); animation: rise .3s var(--ease); }
.cartbar:hover { text-decoration: none; background: var(--cta-hover); }
.cartbar span:nth-child(2) { flex: 1; }
.cartbar-n { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 9px; background: color-mix(in srgb, var(--on-cta) 22%, transparent); }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--bn-h) + var(--safe-b) + 16px); transform: translate(-50%, 20px); display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); padding: 11px 18px; border-radius: 14px; font-weight: 600; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s, transform .3s var(--ease); z-index: 70; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast.err { background: var(--danger); color: #fff; }
.toast a { color: inherit; text-decoration: underline; white-space: nowrap; }
.fly { position: fixed; z-index: 80; width: 54px; height: 54px; border-radius: 50%; overflow: hidden; pointer-events: none; box-shadow: var(--shadow-lg); border: 2px solid var(--surface); transition: transform .65s cubic-bezier(.5,-.3,.7,1), opacity .65s; }
.fly img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .bottomnav, .cartbar { display: none; }
  .main { padding-bottom: 48px; }
  .footer { padding-bottom: 28px; }
  .toast { bottom: 24px; }
  .place-bar { bottom: 0; }
}
@media (max-width: 899px) { .hide-phone { display: none !important; } }
@media (max-width: 760px) {
  :root { --top-h: 58px; }
  .only-phone { display: inline-flex; }
  .search { display: none; position: absolute; left: 12px; right: 12px; top: calc(var(--top-h) - 4px); z-index: 50; background: var(--surface); box-shadow: var(--shadow-lg); }
  .search.open { display: flex; }
  .topbar-in { position: relative; gap: 8px; }
  .brand { max-width: 62%; } .brand-tag { display: none; }
  .navbar-in { height: 48px; } .mega-btn span { display: none; } .mega-btn { padding: 0 11px; }
  .card { padding: 16px; }
  .hero-carousel:not(.no-text) .slide { aspect-ratio: 16 / 9; }
  .no-text .slide { min-height: 0; }
  .buy-actions { grid-template-columns: 1fr; }
  .section { margin: 26px 0; }
  .deals { padding: 14px; margin-left: -4px; margin-right: -4px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .topbar, .bottomnav, .footer, .announce, .btn, .cartbar { display: none !important; } body { background: #fff; } .card { box-shadow: none; } }
.pcard-grocery .pcard-foot, .pcard-food .pcard-foot { flex-wrap: wrap; row-gap: 6px; }
