/* Corner shop — storefront stylesheet.
   Mobile first: base rules are for phones (360px+), then 600 / 768 / 1024 / 1280 px.
   Every colour, space, radius, shadow and type size comes from the tokens below. */

/* ============ 1. design tokens ============ */
:root {
  /* colour */
  --bg: #F3F6F2;
  --surface: #FFFFFF;
  --surface-2: #F6F8F5;
  --surface-3: #ECF1EA;
  --ink: #15201A;          /* text: 16.5:1 on white */
  --ink-2: #46534B;        /* secondary text: 8:1 */
  --ink-3: #5F6B64;        /* muted text: 5.6:1 (AA) */
  --line: #E1E7DF;
  --line-2: #CFD8CC;
  --brand: #0E7C42;        /* white on brand: 5.3:1 */
  --brand-strong: #0A6334;
  --brand-soft: #E5F3EA;
  --brand-ink: #0A5A2F;
  --sun: #FFC93C;
  --sun-soft: #FFF4D2;
  --sale: #D1291C;         /* white on sale: 5.1:1 */
  --sale-soft: #FDEBE9;
  --warn: #9A4A00;
  --warn-soft: #FFF1DE;
  --ok-soft: #E5F3EA;
  --focus: #1D5FD1;
  /* space (4px scale) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 48px; --s9: 64px;
  --gutter: 16px;
  --page: 1320px;
  /* radii */
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 24px; --r-pill: 999px;
  /* shadows */
  --sh-1: 0 1px 2px rgb(16 32 22 / .06), 0 1px 3px rgb(16 32 22 / .06);
  --sh-2: 0 6px 20px rgb(16 32 22 / .09);
  --sh-3: 0 18px 50px rgb(16 32 22 / .2);
  /* type */
  --font: "Bricolage Grotesque", "Noto Sans Armenian", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: .75rem; --fs-sm: .875rem; --fs-base: 1rem; --fs-lg: 1.125rem; --fs-xl: 1.375rem; --fs-2xl: 1.75rem; --fs-3xl: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem);
  /* motion */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 140ms; --t: 220ms;
  /* layout */
  --head-h: 64px;
  --bottom-h: 64px;
  /* aliases used by the admin block */
  --ink-soft: var(--ink-2); --rule: var(--line); --chip: var(--surface-3); --hint: var(--ink-3); --paper: var(--surface);
  --go: var(--brand); --radius: var(--r-lg); --shadow-sm: var(--sh-1); --error-ink: var(--sale); --error-bg: var(--sale-soft); --margin: var(--sale);
  color-scheme: light;
}
@media (min-width: 768px) { :root { --gutter: 24px; } }
@media (min-width: 1280px) { :root { --gutter: 32px; } }

/* ============ 2. base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 140px; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 var(--fs-base)/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body.has-shop { padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) { body.has-shop { padding-bottom: 0; } }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0 0 var(--s3); font-weight: 750; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
p { margin: 0 0 var(--s3); }
a { color: var(--brand-ink); text-underline-offset: 3px; }
a:hover { color: var(--brand-strong); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--sun); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.25em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--s3); top: -60px; z-index: 100; padding: var(--s2) var(--s4); border-radius: var(--r); background: var(--ink); color: #fff; font-weight: 700; }
.skip:focus { top: var(--s3); color: #fff; }
.wrap, .page { width: 100%; max-width: var(--page); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap.page, .page { padding-top: var(--s4); padding-bottom: var(--s8); }
.page .wrap, .wrap .wrap { padding-left: 0; padding-right: 0; }
.narrow { max-width: 720px; }
.content { min-height: 50vh; }

/* ============ 3. components: buttons, fields, badges, notices ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s5); border: 1.5px solid transparent; border-radius: var(--r-pill);
  background: var(--brand); color: #fff; font-weight: 700; font-size: var(--fs-base); line-height: 1.2; text-decoration: none; white-space: nowrap;
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast); }
.btn:hover { background: var(--brand-strong); color: #fff; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.btn.light { background: #fff; color: var(--ink); }
.btn.light:hover { background: var(--sun); color: var(--ink); }
.btn.small { min-height: 40px; padding: 0 var(--s4); font-size: var(--fs-sm); }
.btn.danger { background: var(--sale); }
.btn.danger:hover { background: #A51F15; }
.btn[disabled], .btn.is-disabled { background: var(--line-2); color: var(--ink-3); cursor: not-allowed; pointer-events: none; }
.btn .ico { width: 1.15em; height: 1.15em; }
.pay-btn { width: 100%; min-height: 52px; font-size: var(--fs-lg); }
.linkish { padding: 0; border: 0; background: none; color: var(--brand-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.linkish:hover { color: var(--brand-strong); }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink); transition: background var(--t-fast); }
.icon-btn:hover { background: var(--line-2); }
.head-link { color: var(--ink-2); font-weight: 600; text-decoration: none; }
.head-link:hover { color: var(--ink); text-decoration: underline; }
[aria-busy="true"] { position: relative; color: transparent !important; }
[aria-busy="true"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border: 2.5px solid currentColor; border-color: var(--brand) transparent var(--brand) transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* :where() keeps these defaults at zero specificity, so any component rule (.search input…) wins. */
:where(input:not([type="radio"], [type="checkbox"], [type="hidden"]), select, textarea) {
  width: 100%; min-height: 44px; padding: 10px var(--s3); border: 1.5px solid var(--line-2); border-radius: var(--r); background: var(--surface); font-weight: 400;
  transition: border-color var(--t-fast), box-shadow var(--t-fast); }
textarea { min-height: 80px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgb(14 124 66 / .2); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--sale); background: var(--sale-soft); }
input:disabled { background: var(--surface-2); color: var(--ink-3); }
select { appearance: none; padding-right: 36px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2346534B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center; }
input[type="radio"], input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brand); flex: none; margin: 0; }
.ferr { display: block; margin-top: var(--s1); color: var(--sale); font-size: var(--fs-sm); font-weight: 600; }
.opt { color: var(--ink-3); font-weight: 400; font-size: var(--fs-sm); }
.check { display: flex !important; align-items: center; gap: var(--s3); font-weight: 600; cursor: pointer; min-height: 44px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 750; line-height: 1.3; white-space: nowrap; background: var(--surface-3); color: var(--ink-2); }
.badge.sale { background: var(--sale); color: #fff; }
.badge.low { background: var(--warn-soft); color: var(--warn); }
.badge.out { background: var(--ink); color: #fff; }
.badge.on-list { background: var(--brand-soft); color: var(--brand-ink); }
.badge.big { font-size: var(--fs-base); padding: 6px 12px; }
.free { color: var(--brand); font-weight: 750; }

.notice { padding: var(--s3) var(--s4); border-radius: var(--r); font-weight: 600; margin: 0 0 var(--s4); }
.notice.error { background: var(--sale-soft); color: #8E1B12; }
.notice.ok { background: var(--ok-soft); color: var(--brand-ink); }
.hintline, .fine { color: var(--ink-3); font-size: var(--fs-sm); }
.fine { text-align: center; margin-top: var(--s3); }
.fine.left { text-align: left; }
.small-text { font-size: var(--fs-sm); }
.tagline { color: var(--ink-2); font-size: var(--fs-lg); max-width: 60ch; }

.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--bottom-h) + 72px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 32px);
  margin: 0; padding: var(--s3) var(--s5); border-radius: var(--r-pill); background: var(--ink); color: #fff; font-weight: 600; box-shadow: var(--sh-3);
  animation: toast 4.5s var(--ease) forwards; }
.toast.error { background: var(--sale); }
@media (min-width: 1024px) { .toast { bottom: var(--s7); } }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, 12px); } 6%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; visibility: hidden; transform: translate(-50%, 6px); } }

.skel { display: block; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skel.line { height: 14px; margin: 10px 0; }
.skel.tall { height: 30px; }
.skel.sq { width: 32px; height: 32px; flex: none; }
.w30 { width: 30%; } .w40 { width: 40%; } .w50 { width: 50%; } .w60 { width: 60%; } .w80 { width: 80%; } .w90 { width: 90%; } .w100 { width: 100%; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.empty-state { display: grid; justify-items: center; gap: var(--s2); padding: var(--s8) var(--s4); text-align: center; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--sh-1); }
.es-icon { display: grid; place-items: center; width: 88px; height: 88px; margin-bottom: var(--s2); border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 40px; }
.es-icon .ico { width: 40px; height: 40px; }
.empty-state h2 { margin: 0; }
.empty-state p { color: var(--ink-2); max-width: 48ch; margin: 0; }
.es-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); margin-top: var(--s4); }
.chip-row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); width: 100%; margin-top: var(--s2); }
.chip-link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink); font-weight: 600; text-decoration: none; }
.chip-link:hover { background: var(--brand-soft); color: var(--brand-ink); }

.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); margin: 0 0 var(--s4); padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin-right: var(--s2); color: var(--line-2); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--brand-ink); text-decoration: underline; }
.page-title { font-size: var(--fs-2xl); margin-bottom: var(--s5); }
.card-box { padding: var(--s5); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); }
.card-box h2 { font-size: var(--fs-lg); }
.tabs { display: flex; gap: var(--s1); margin-bottom: var(--s5); overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.tabs a { padding: var(--s3) var(--s4); color: var(--ink-2); font-weight: 650; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--brand-ink); border-color: var(--brand); }

/* language switch */
.lang-switch { display: inline-flex; flex: none; gap: 2px; margin: 0; padding: 2px; border-radius: var(--r-pill); background: var(--surface-3); }
.lang-switch button { min-width: 40px; min-height: 32px; padding: 0 var(--s2); border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2); font-weight: 700; font-size: var(--fs-sm); }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }

/* ============ 4. header ============ */
.site-head { position: sticky; top: 0; z-index: 40; background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.topbar { display: none; background: var(--brand-strong); color: #fff; font-size: var(--fs-sm); }
.topbar-in { display: flex; align-items: center; gap: var(--s5); min-height: 40px; }
.topbar-note { display: flex; align-items: center; gap: var(--s2); margin: 0; flex: 1; min-width: 0; }
.topbar-note span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-links { display: flex; align-items: center; gap: var(--s4); }
.topbar-links a, .topbar-links .linkish { color: #fff; font-weight: 600; text-decoration: none; font-size: var(--fs-sm); }
.topbar-links a:hover, .topbar-links .linkish:hover { color: var(--sun); text-decoration: underline; }
.topbar-links form { margin: 0; }
.topbar .lang-switch { background: rgb(255 255 255 / .14); }
.topbar .lang-switch button { color: #fff; min-height: 28px; }
.topbar .lang-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); }
@media (min-width: 1024px) { .topbar { display: block; } }

.bar { display: grid; align-items: center; gap: var(--s2) var(--s3); padding-top: var(--s2); padding-bottom: var(--s2);
  grid-template-columns: auto 1fr auto; grid-template-areas: "menu logo actions" "search search search" "deliver deliver deliver"; }
.bar.bar-min { display: flex; justify-content: space-between; min-height: var(--head-h); }
.logo { grid-area: logo; display: inline-flex; align-items: center; gap: var(--s2); color: var(--ink); text-decoration: none; font-weight: 800; font-size: var(--fs-lg); letter-spacing: -.02em; white-space: nowrap; }
.logo:hover { color: var(--ink); }
.logo-mark { width: 36px; height: 36px; color: var(--brand); flex: none; }
.menu-btn { grid-area: menu; display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); min-width: 44px; height: 44px; padding: 0 var(--s3); border-radius: var(--r); background: var(--surface-3); color: var(--ink); font-weight: 700; text-decoration: none; }
.menu-btn:hover { background: var(--brand-soft); color: var(--brand-ink); }
.menu-btn-text { display: none; }
.search { grid-area: search; position: relative; display: flex; align-items: stretch; min-width: 0; height: 48px; border: 2px solid var(--brand); border-radius: var(--r-pill); background: var(--surface); }
.search:focus-within { box-shadow: 0 0 0 4px rgb(14 124 66 / .18); }
.search-cat { display: none; }
.search-field { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.search-ico { position: absolute; left: 14px; color: var(--ink-3); pointer-events: none; }
.search input[type="search"] { height: 100%; min-height: 0; padding-left: 44px; border: 0; border-radius: var(--r-pill); background: transparent; box-shadow: none; }
.search input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.search-go { flex: none; display: inline-flex; align-items: center; gap: var(--s2); margin: 3px; padding: 0 var(--s4); border: 0; border-radius: var(--r-pill); background: var(--brand); color: #fff; font-weight: 700; }
.search-go:hover { background: var(--brand-strong); }
.search-go-text { display: none; }
.deliver { grid-area: deliver; display: flex; align-items: center; gap: var(--s2); margin: 0; min-width: 0; font-size: var(--fs-sm); }
.deliver-ico { color: var(--brand); }
.deliver-label { color: var(--ink-3); white-space: nowrap; }
.deliver select { width: auto; min-width: 0; min-height: 36px; padding: 4px 30px 4px 8px; border: 0; background-color: transparent; font-weight: 700; color: var(--ink); background-position: right 6px center; }
.deliver select:hover { background-color: var(--surface-3); }
.head-actions { grid-area: actions; display: flex; align-items: center; gap: var(--s1); }
.head-act, .list-link { position: relative; display: inline-flex; align-items: center; gap: var(--s2); min-width: 44px; height: 44px; padding: 0 var(--s2); border-radius: var(--r); color: var(--ink); text-decoration: none; font-weight: 650; }
.head-act:hover, .list-link:hover { background: var(--surface-3); color: var(--ink); }
.head-act .ico, .list-ico .ico { width: 24px; height: 24px; }
.act-text, .who-name { display: none; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fav-link { display: none; }
.list-ico { position: relative; display: inline-flex; }
.count-badge { position: absolute; top: -7px; right: -9px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill); background: var(--sale); color: #fff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; border: 2px solid var(--surface); }
.count-badge.bump { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: scale(1.35); } }
.list-text { display: none; flex-direction: column; line-height: 1.1; }
.list-total { font-size: var(--fs-xs); color: var(--ink-3); font-weight: 600; }
.catbar { display: none; border-top: 1px solid var(--line); }
.catnav { overflow-x: auto; scrollbar-width: none; }
.catnav::-webkit-scrollbar { display: none; }
.aisles { display: flex; gap: var(--s1); margin: 0; padding: var(--s2) 0; list-style: none; }
.aisles a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s3); border-radius: var(--r-pill); color: var(--ink-2); font-weight: 650; font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; }
.aisles a:hover { background: var(--surface-3); color: var(--ink); }
.aisles .active a { background: var(--brand-soft); color: var(--brand-ink); }
.aisles .is-deals a { color: var(--sale); }
.aisles .is-deals.active a { background: var(--sale-soft); }
.min-actions { display: flex; align-items: center; gap: var(--s3); }
.back-link { display: inline-flex; align-items: center; gap: var(--s1); }
@media (min-width: 600px) {
  .act-text { display: inline; }
  .list-text { display: flex; }
}
@media (min-width: 768px) {
  .bar { grid-template-columns: auto auto 1fr auto; grid-template-areas: "menu logo deliver actions" "search search search search"; }
  .deliver { justify-self: end; min-width: 0; }
  .deliver select { max-width: 170px; }
  .menu-btn-text { display: inline; }
  .search-go-text { display: inline; }
  .catbar { display: block; }
  .fav-link { display: inline-flex; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  /* the picker shares the first row with the logo: the pin icon stands for "Deliver to" (the label stays for screen readers) */
  .deliver-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}
@media (min-width: 1200px) {
  .bar { grid-template-columns: auto auto minmax(0, 1fr) auto auto; grid-template-areas: "menu logo search deliver actions"; gap: var(--s4); min-height: 76px; }
  .logo { font-size: var(--fs-xl); }
  .logo-mark { width: 40px; height: 40px; }
  .search-cat { display: block; flex: none; width: auto; max-width: 170px; min-height: 0; border: 0; border-right: 1.5px solid var(--line); border-radius: var(--r-pill) 0 0 var(--r-pill); background-color: var(--surface-2); font-size: var(--fs-sm); font-weight: 600; }
  .deliver { justify-self: start; flex-direction: column; align-items: flex-start; gap: 0; position: relative; padding-left: 28px; }
  .deliver-ico { position: absolute; left: 0; top: 10px; }
  .deliver-label { font-size: var(--fs-xs); }
  .deliver select { max-width: 170px; min-height: 26px; padding-left: 0; }
  .who-name { display: inline; }
}

/* search suggestions */
.suggest { position: absolute; z-index: 50; top: calc(100% + 8px); left: -2px; right: -60px; max-height: min(70vh, 460px); overflow-y: auto; padding: var(--s2); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-3); }
@media (max-width: 767px) { .suggest { right: -56px; } }
.sg-head { display: flex; justify-content: space-between; padding: var(--s1) var(--s2) var(--s2); color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; }
.sg-item { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: var(--s2); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.sg-item:hover, .sg-item[aria-selected="true"] { background: var(--surface-3); color: var(--ink); }
.sg-item.is-out { opacity: .6; }
.sg-emoji { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); background: var(--surface-2); font-size: 18px; flex: none; }
.sg-name { flex: 1; min-width: 0; font-weight: 600; }
.sg-name small { color: var(--ink-3); font-weight: 400; }
.sg-meta { color: var(--ink-2); font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; }
.sg-all { margin-top: var(--s1); border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); color: var(--brand-ink); }
.sg-empty { margin: 0; padding: var(--s3); color: var(--ink-2); }
.sg-skel { display: flex; align-items: center; gap: var(--s3); padding: var(--s2); }
.sg-skel .skel.line { flex: 1; margin: 0; }

/* ============ 5. drawers (catalog menu, cart) and the quick view ============ */
dialog.drawer { position: fixed; margin: 0; padding: 0; border: 0; max-width: none; max-height: none; background: var(--surface); color: var(--ink); box-shadow: var(--sh-3); overscroll-behavior: contain; }
dialog.drawer::backdrop { background: rgb(12 22 16 / .45); }
.drawer-left { inset: 0 auto 0 0; width: 100%; height: 100%; }
.drawer-right { inset: 0 0 0 auto; width: min(440px, 100%); height: 100%; }
dialog.drawer[open] { display: flex; flex-direction: column; animation: slide-in var(--t) var(--ease); }
.drawer-left[open] { --from: -100%; }
.drawer-right[open] { --from: 100%; }
@keyframes slide-in { from { transform: translateX(var(--from)); } }
dialog.drawer.closing { animation: slide-out var(--t-fast) ease-in forwards; }
@keyframes slide-out { to { transform: translateX(var(--from)); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: var(--fs-xl); }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--s4); }
.menu-cats { display: grid; gap: var(--s1); margin: 0 0 var(--s5); padding: 0; list-style: none; }
.menu-cat { display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s2); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.menu-cat:hover { background: var(--surface-3); color: var(--ink); }
.menu-thumb { position: relative; width: 56px; height: 56px; flex: none; overflow: hidden; border-radius: var(--r); background: var(--surface-3); }
.menu-thumb::before { content: attr(data-emoji); position: absolute; inset: 0; display: grid; place-items: center; font-size: 26px; }
.menu-thumb img { position: relative; width: 100%; height: 100%; object-fit: cover; }
.menu-cat-text { flex: 1; display: grid; }
.menu-cat-text small { color: var(--ink-3); }
.menu-chev { color: var(--ink-3); }
.menu-side h3 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.menu-links { display: grid; gap: 2px; margin: 0 0 var(--s5); padding: 0; list-style: none; }
.menu-links a { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: 0 var(--s2); border-radius: var(--r); color: var(--ink); font-weight: 600; text-decoration: none; }
.menu-links a:hover { background: var(--surface-3); color: var(--ink); }
.menu-links .ico { color: var(--brand); }
.menu-foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding-top: var(--s4); border-top: 1px solid var(--line); }
@media (min-width: 768px) {
  .drawer-left { width: 420px; }
}
@media (min-width: 1024px) {
  /* a mega-menu under the header */
  .catalog-menu.drawer-left { inset: 120px auto auto 50%; transform: translateX(-50%); width: min(1100px, calc(100vw - 64px)); height: auto; max-height: calc(100vh - 150px); border-radius: var(--r-xl); }
  .catalog-menu[open] { animation: pop var(--t) var(--ease); }
  .catalog-menu.closing { animation: none; }
  .menu-body { display: grid; grid-template-columns: 1fr 280px; gap: var(--s6); padding: var(--s5) var(--s6); }
  .menu-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); margin: 0; }
  .menu-side { padding-left: var(--s6); border-left: 1px solid var(--line); }
  .menu-foot .lang-switch { display: none; }
}
@keyframes pop { from { opacity: 0; transform: translate(-50%, -8px) scale(.985); } }

dialog.quick { width: min(980px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: var(--r-xl); box-shadow: var(--sh-3); }
dialog.quick::backdrop { background: rgb(12 22 16 / .5); }
dialog.quick[open] { animation: fade-up var(--t) var(--ease); }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
.quick-close { position: absolute; z-index: 2; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); box-shadow: var(--sh-2); font-size: 26px; line-height: 1; }
.quick-body { padding: var(--s6); }
.quick-body .pdp { margin: 0; }
.full-link { margin: calc(-1 * var(--s2)) 0 var(--s3); font-size: var(--fs-sm); }
.pdp.skeleton .pdp-visual { aspect-ratio: 1; border-radius: var(--r-lg); }

/* ============ 6. cart panel (drawer + cart page) ============ */
.pad { display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.cart-drawer .pad { height: 100%; }
.pad-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
.pad-head h2 { margin: 0; font-size: var(--fs-xl); }
.pad-head .count { flex: 1; color: var(--ink-3); font-weight: 600; font-size: var(--fs-sm); }
.pad-head .back { font-weight: 600; font-size: var(--fs-sm); }
.pad-body { flex: 1; overflow-y: auto; padding: var(--s3) var(--s4); }
.pad-foot { padding: var(--s4); border-top: 1px solid var(--line); background: var(--surface-2); display: grid; gap: var(--s3); }
.lines { margin: 0; padding: 0; list-style: none; }
.line { position: relative; display: grid; grid-template-columns: 28px 56px minmax(0, 1fr) 36px; grid-template-areas: "tick img name rm" ". img meta meta" "note note note note"; gap: 2px var(--s3); align-items: center; padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.lthumb { grid-area: img; align-self: start; }
.lname-wrap { grid-area: name; min-width: 0; display: grid; }
.lname-link { color: var(--ink); text-decoration: none; }
.lname-link:hover { color: var(--brand-ink); text-decoration: underline; }
.lname { font-weight: 650; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lunit { color: var(--ink-3); font-size: var(--fs-sm); }
.tick-form { grid-area: tick; margin: 0; }
.tick { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 2px solid var(--line-2); border-radius: 8px; background: var(--surface); color: #fff; }
.tick:hover { border-color: var(--brand); }
.tick .ico { width: 16px; height: 16px; }
.line.bought .tick { background: var(--brand); border-color: var(--brand); }
.line.bought .lname { text-decoration: line-through; color: var(--ink-3); }
.line.bought .lthumb { opacity: .55; }
.remove-form { grid-area: rm; margin: 0; justify-self: end; }
.remove { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); }
.remove:hover { background: var(--sale-soft); color: var(--sale); }
.remove .ico { width: 18px; height: 18px; }
.lmeta { grid-area: meta; display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); }
.qty form { margin: 0; }
.qty button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); }
.qty button:hover:not([disabled]) { background: var(--surface-3); }
.qty button[disabled] { color: var(--line-2); cursor: not-allowed; }
.qty .ico { width: 16px; height: 16px; }
.qty output { min-width: 26px; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; }
.lprice { font-weight: 750; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lnote { grid-area: note; color: var(--warn); font-size: var(--fs-xs); font-weight: 600; padding-left: 96px; }
.line.flash { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--sun-soft); } to { background: transparent; } }
.lines .empty { display: grid; justify-items: center; gap: var(--s3); padding: var(--s7) var(--s4); color: var(--ink-2); text-align: center; }
.empty-ico { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.empty-ico .ico { width: 32px; height: 32px; }
.basket-title { display: flex; align-items: center; gap: var(--s2); margin: var(--s4) 0 0; color: var(--brand-ink); font-weight: 700; font-size: var(--fs-sm); }
.other { display: flex; gap: var(--s2); margin: var(--s4) 0 var(--s2); }
.other input { min-height: 40px !important; }
.totals { display: grid; gap: var(--s2); }
.totals > div { display: flex; justify-content: space-between; gap: var(--s3); }
.spent { color: var(--ink-2); }
.promo-row { color: var(--brand-ink); font-weight: 600; }
.to-buy { font-size: var(--fs-lg); font-weight: 800; }
.checkout-btn { width: 100%; min-height: 52px; font-size: var(--fs-lg); }
.cart-link { text-align: center; font-size: var(--fs-sm); font-weight: 600; }
.meter-box { padding: var(--s3); border-radius: var(--r); background: var(--sun-soft); margin-bottom: var(--s3); }
.meter-box p { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s2); font-size: var(--fs-sm); }
.meter-box.done { background: var(--brand-soft); color: var(--brand-ink); }
.meter-box.done p { margin: 0; font-weight: 600; }
.meter { height: 8px; border-radius: var(--r-pill); background: rgb(0 0 0 / .08); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sun), var(--brand)); transition: width .6s var(--ease); }

/* ============ 7. phones: bottom bar + sticky cart ============ */
.bottom-nav { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--bottom-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); box-shadow: 0 -1px 0 var(--line), 0 -6px 20px rgb(16 32 22 / .06); }
.bottom-nav a { position: relative; display: grid; place-content: center; justify-items: center; gap: 2px; min-height: 44px; color: var(--ink-3); font-size: 11px; font-weight: 650; text-decoration: none; }
.bottom-nav a .ico { width: 24px; height: 24px; }
.bottom-nav a[aria-current="page"] { color: var(--brand); }
.bottom-nav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
.nav-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--r-pill); background: var(--sale); color: #fff; font-size: 10px; line-height: 18px; text-align: center; }
.jump { position: fixed; z-index: 44; left: var(--s3); right: var(--s3); bottom: calc(var(--bottom-h) + var(--s2) + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: 0 var(--s4);
  border-radius: var(--r-pill); background: var(--brand); color: #fff; font-weight: 700; text-decoration: none; box-shadow: var(--sh-3); }
.jump:hover { color: #fff; background: var(--brand-strong); }
.jump-sum { margin-left: auto; font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) { .bottom-nav, .jump { display: none; } }
body.has-shop .site-foot { padding-bottom: calc(var(--s8) + 60px); }
@media (min-width: 1024px) { body.has-shop .site-foot { padding-bottom: var(--s7); } }

/* ============ 8. home ============ */
.home { padding-top: var(--s4); padding-bottom: var(--s8); }
.back-banner { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin-bottom: var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--sun-soft); color: #5E4300; }
.back-banner p { flex: 1; margin: 0; font-weight: 600; }
.back-banner a { color: inherit; }
.hero { position: relative; margin-bottom: var(--s4); }
.slides { display: flex; gap: var(--s3); margin: 0; padding: 0; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-xl); }
.slides::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: start; display: grid; overflow: hidden; border-radius: var(--r-xl); min-height: 340px; }
.slide-img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; }
.slide-text { grid-area: 1 / 1; z-index: 1; align-self: end; display: grid; justify-items: start; gap: var(--s2); padding: var(--s6) var(--s5); color: #fff;
  background: linear-gradient(180deg, transparent, rgb(8 30 18 / .55) 30%, rgb(8 30 18 / .85)); }
.tone-sun .slide-text { background: linear-gradient(180deg, transparent, rgb(60 38 0 / .55) 30%, rgb(60 38 0 / .85)); }
.tone-dark .slide-text { background: linear-gradient(180deg, transparent, rgb(20 16 12 / .6) 30%, rgb(20 16 12 / .9)); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 4px 10px; border-radius: var(--r-pill); background: rgb(255 255 255 / .18); backdrop-filter: blur(6px); font-size: var(--fs-sm); font-weight: 700; }
.slide-title { margin: 0; font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; max-width: 16ch; }
.slide-title .hl { color: var(--sun); }
.slide-sub { margin: 0 0 var(--s2); max-width: 40ch; opacity: .95; }
.car-controls { position: absolute; z-index: 2; right: var(--s4); top: var(--s4); display: none; align-items: center; gap: var(--s2); }
@media (min-width: 768px) { .car-controls { display: flex; } }
.car-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(255 255 255 / .92); color: var(--ink); box-shadow: var(--sh-2); }
.car-btn:hover { background: #fff; }
.car-dots { position: absolute; z-index: 2; left: 0; right: 0; bottom: var(--s2); display: flex; justify-content: center; gap: 0; }
.car-dots button { width: 28px; height: 28px; padding: 0; border: 0; background: none; display: grid; place-items: center; }
.car-dots button::before { content: ""; width: 8px; height: 8px; border-radius: var(--r-pill); background: rgb(255 255 255 / .55); transition: width var(--t); }
.car-dots button[aria-current="true"]::before { width: 22px; background: #fff; }
@media (min-width: 768px) {
  .slide { grid-template-columns: 1fr 1fr; min-height: 380px; }
  .tone-green { background: var(--brand-strong); }
  .tone-sun { background: var(--sun); }
  .tone-dark { background: #2A2118; }
  .slide-img { grid-area: 1 / 2; }
  .slide-text { grid-area: 1 / 1; align-self: center; padding: var(--s8) var(--s7); background: none !important; }
  .tone-sun .slide-text { color: var(--ink); }
  .tone-sun .eyebrow { background: rgb(255 255 255 / .55); }
  .tone-sun .slide-title .hl { color: var(--brand-ink); }
  .car-controls { top: auto; bottom: var(--s4); right: var(--s4); }
}
.perks { display: flex; gap: var(--s2); margin: 0 calc(-1 * var(--gutter)) var(--s4); padding: 2px var(--gutter) 4px; list-style: none; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.perks::-webkit-scrollbar { display: none; }
.perks li { flex: none; scroll-snap-align: start; display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); font-size: var(--fs-sm); white-space: nowrap; }
.perks .ico { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); box-sizing: content-box; }
@media (min-width: 768px) { .perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s3); margin: 0 0 var(--s4); padding: 0; overflow: visible; } }
.intro { color: var(--ink-2); font-size: var(--fs-sm); margin-bottom: var(--s6); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.section-head h2 { display: flex; align-items: center; gap: var(--s2); margin: 0; font-size: var(--fs-xl); }
.sh-ico { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 18px; }
.sh-ico .ico { width: 18px; height: 18px; }
.deals .sh-ico { background: var(--sale-soft); color: var(--sale); }
.see-all { display: inline-flex; align-items: center; gap: 2px; flex: none; min-height: 44px; font-weight: 700; font-size: var(--fs-sm); text-decoration: none; color: var(--brand-ink); }
.see-all:hover { text-decoration: underline; }
.see-all .ico { width: 18px; height: 18px; }
.shelf-section { margin-bottom: var(--s7); }
.cat-section { margin-bottom: var(--s7); }
.cat-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.cat-tile { position: relative; display: grid; grid-template-rows: auto 1fr; height: 100%; min-height: 150px; overflow: hidden; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); color: var(--ink); text-decoration: none;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); color: var(--ink); }
.cat-tile-text { display: grid; padding: var(--s3) var(--s3) var(--s2); z-index: 1; }
.cat-tile-text b { font-size: var(--fs-base); line-height: 1.2; }
.cat-tile-text small { color: var(--ink-3); }
.cat-tile-img { position: relative; align-self: end; aspect-ratio: 4 / 3; margin: 0 var(--s2) var(--s2); overflow: hidden; border-radius: var(--r); background: var(--surface-3); }
.cat-tile-img::before { content: attr(data-emoji); position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; }
.cat-tile-img img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.cat-tile:hover .cat-tile-img img { transform: scale(1.05); }
.cat-tile.is-deals { background: var(--sale); color: #fff; }
.cat-tile.is-deals small { color: rgb(255 255 255 / .85); }
.cat-tile-ico { align-self: end; justify-self: end; margin: var(--s3); }
.cat-tile-ico .ico { width: 56px; height: 56px; opacity: .9; }
/* phones: the categories scroll sideways (a full grid would push the products far down) */
@media (max-width: 599px) {
  .cat-tiles { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 40%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scroll-padding-left: var(--gutter); }
  .cat-tiles::-webkit-scrollbar { display: none; }
  .cat-tiles > li { scroll-snap-align: start; }
  .cat-tile { min-height: 0; }
}
@media (min-width: 600px) { .cat-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cat-tiles { grid-template-columns: repeat(7, minmax(0, 1fr)); } }

.collections { display: grid; gap: var(--s3); margin: 0 0 var(--s7); padding: 0; list-style: none; }
.collection { position: relative; display: grid; min-height: 220px; overflow: hidden; border-radius: var(--r-xl); color: #fff; text-decoration: none; }
.collection img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.collection:hover img { transform: scale(1.04); }
.collection-text { grid-area: 1 / 1; z-index: 1; align-self: end; display: grid; gap: var(--s1); padding: var(--s5); background: linear-gradient(180deg, transparent, rgb(8 24 14 / .82) 45%); }
.collection-text b { font-size: var(--fs-xl); line-height: 1.15; }
.collection-text > span:not(.collection-cta) { font-size: var(--fs-sm); opacity: .9; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.collection-cta { display: inline-flex; align-items: center; gap: var(--s1); margin-top: var(--s1); font-weight: 700; color: var(--sun); }
.collection:hover { color: #fff; }
@media (min-width: 768px) { .collections { grid-template-columns: 1fr 1fr; } }

/* ============ 9. product grid, rail and card ============ */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin: 0; padding: 0; list-style: none; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); } }
@media (min-width: 1280px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.results .grid { }
@media (min-width: 1024px) { .catalog .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .catalog .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.grid > li.is-hidden { display: none; }
.more-wrap { display: flex; justify-content: center; margin-top: var(--s5); }

/* the rail: a row of cards that scrolls sideways, snapping to each card */
.rail { position: relative; }
.grid.row { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - var(--s3)) / 2.2); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 4px var(--gutter) var(--s3); margin: -4px calc(-1 * var(--gutter)) 0; scroll-padding-left: var(--gutter); overscroll-behavior-x: contain; }
.grid.row::-webkit-scrollbar { display: none; }
.grid.row > li { scroll-snap-align: start; }
@media (min-width: 600px) { .grid.row { grid-auto-columns: calc((100% - 2 * var(--s3)) / 3.3); } }
@media (min-width: 1024px) { .grid.row { grid-auto-columns: calc((100% - 3 * var(--s4)) / 4); padding-left: 0; padding-right: 0; margin-left: 0; margin-right: 0; scroll-padding-left: 0; } }
@media (min-width: 1280px) { .grid.row { grid-auto-columns: calc((100% - 4 * var(--s4)) / 5); } }
.rail-btn { position: absolute; z-index: 3; top: 30%; display: none; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--sh-2); transition: opacity var(--t-fast); }
.rail-btn:hover { background: var(--brand); color: #fff; }
.rail-btn[disabled] { opacity: 0; pointer-events: none; }
.rail-btn.prev { left: -18px; }
.rail-btn.next { right: -18px; }
@media (min-width: 1024px) and (hover: hover) { .rail-btn { display: grid; } }

.card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: var(--s2); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1);
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease); }
.card:hover { box-shadow: var(--sh-2); transform: translateY(-2px); }
.card-link { display: flex; flex-direction: column; gap: 2px; flex: 1; color: var(--ink); text-decoration: none; border-radius: var(--r); }
.card-link:hover { color: var(--ink); }
.card-link:hover .pname { color: var(--brand-ink); }
.media { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--r); margin-bottom: var(--s2);
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.media::before { content: attr(data-emoji); position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(36px, 9vw, 64px); opacity: .9; }
.media img { position: relative; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.media.is-loaded, .media.no-img { animation: none; background: var(--surface-2); }
.card:hover .media img { transform: scale(1.04); }
.pname { font-weight: 650; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; transition: color var(--t-fast); }
.meta { color: var(--ink-3); font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badges { position: absolute; z-index: 2; top: calc(var(--s2) + 8px); left: calc(var(--s2) + 8px); right: 56px; display: flex; flex-wrap: wrap; gap: 4px; pointer-events: none; }
.card .badge.on-list { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); padding: 0; }
.fav-form { margin: 0; }
.fav { position: absolute; z-index: 2; top: calc(var(--s2) + 6px); right: calc(var(--s2) + 6px); display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
  background: rgb(255 255 255 / .92); color: var(--ink-2); box-shadow: var(--sh-1); text-decoration: none; transition: transform var(--t-fast), color var(--t-fast); }
.fav:hover { color: var(--sale); transform: scale(1.08); }
.fav .ico { width: 20px; height: 20px; }
.fav.on { color: var(--sale); }
.fav.on .ico { fill: currentColor; }
.fav.big { position: static; width: 48px; height: 48px; background: var(--surface-3); box-shadow: none; }
.card-foot { display: grid; gap: var(--s2); margin-top: auto; padding-top: var(--s2); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--s2); font-variant-numeric: tabular-nums; }
.price b { order: 1; font-size: var(--fs-lg); font-weight: 800; letter-spacing: -.01em; }
.price s { order: 2; color: var(--ink-3); font-size: var(--fs-sm); }
.price.is-sale b { color: var(--sale); }
.price.big b { font-size: var(--fs-2xl); }
.price.big s { font-size: var(--fs-base); }
.card-ctl { min-height: 44px; }
.add-form { margin: 0; }
.add { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; border: 0; border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-ink); font-weight: 750;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast); }
.add:hover:not([disabled]) { background: var(--brand); color: #fff; }
.add:active:not([disabled]) { transform: scale(.97); }
.add[disabled] { background: var(--surface-3); color: var(--ink-3); cursor: not-allowed; }
.add .ico { width: 18px; height: 18px; }
.qty-step { display: flex; align-items: center; justify-content: space-between; min-height: 44px; border-radius: var(--r-pill); background: var(--brand); color: #fff; animation: pop-in var(--t) var(--ease); }
@keyframes pop-in { from { transform: scale(.94); opacity: .4; } }
.qty-step form { margin: 0; }
.step-btn { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #fff; }
.step-btn:hover:not([disabled]) { background: rgb(255 255 255 / .18); }
.step-btn[disabled] { opacity: .4; cursor: not-allowed; }
.step-btn .ico { width: 18px; height: 18px; }
.qty-step output { font-weight: 800; font-variant-numeric: tabular-nums; }
.card.is-out .media img { filter: grayscale(.7); opacity: .7; }
.card.is-out .price b { color: var(--ink-3); }

/* small thumbnails (lines in the cart, checkout, orders, recipes) */
.media.thumb { width: 56px; height: 56px; margin: 0; border-radius: var(--r-sm); }
.media.thumb::before { font-size: 26px; }
.lemoji { display: inline-flex; flex: none; }
.lemoji .media.thumb { width: 44px; height: 44px; }
.visual .media.thumb { width: 72px; height: 72px; }

/* ============ 10. catalog page ============ */
.results-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.results-head h1 { margin: 0; font-size: var(--fs-2xl); }
.results-head .count { margin: 2px 0 0; color: var(--ink-3); font-size: var(--fs-sm); }
.sort { display: flex; align-items: center; gap: var(--s2); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); }
.sort select { width: auto; min-height: 44px; font-weight: 650; }
@media (max-width: 599px) { .sort-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } }
.pills ul { display: flex; gap: var(--s2); margin: 0 calc(-1 * var(--gutter)) var(--s4); padding: 2px var(--gutter); list-style: none; overflow-x: auto; scrollbar-width: none; }
.pills ul::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4); border: 1.5px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-weight: 650; font-size: var(--fs-sm); text-decoration: none; white-space: nowrap; }
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.catalog { display: grid; gap: var(--s4); align-items: start; }
@media (min-width: 1024px) { .catalog { grid-template-columns: 260px minmax(0, 1fr); gap: var(--s6); } }
.filters { border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); }
.filters > summary { display: flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s4); font-weight: 700; cursor: pointer; list-style: none; }
.filters > summary::-webkit-details-marker { display: none; }
.filters .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sale); }
.filters form { display: grid; gap: var(--s4); padding: 0 var(--s4) var(--s4); }
.filters-head { display: none; }
.filters fieldset { margin: 0; padding: var(--s3) 0 0; border: 0; border-top: 1px solid var(--line); }
.filters legend { float: left; width: 100%; padding: 0; margin-bottom: var(--s2); font-weight: 750; }
.filters legend + * { clear: both; }
.opt-row { display: flex; align-items: center; gap: var(--s3); min-height: 40px; cursor: pointer; border-radius: var(--r-sm); }
.opt-row span { flex: 1; }
.opt-row small { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.opt-row:hover span { color: var(--brand-ink); }
.price-range { display: flex; align-items: center; gap: var(--s2); }
.price-range label { flex: 1; }
.filter-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.filter-actions .btn { flex: 1; }
@media (min-width: 1024px) {
  .filters { position: sticky; top: 150px; max-height: calc(100vh - 170px); overflow-y: auto; }
  .filters > summary { pointer-events: none; }
}
/* phones and tablets: the open filters become a sheet from the bottom */
@media (max-width: 1023px) {
  .filters[open] > summary { position: relative; z-index: 0; }
  .filters[open]::before { content: ""; position: fixed; inset: 0; z-index: 60; background: rgb(12 22 16 / .45); }
  .filters[open] form { position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto; padding: 0 var(--s4) calc(var(--s4) + env(safe-area-inset-bottom));
    border-radius: var(--r-xl) var(--r-xl) 0 0; background: var(--surface); box-shadow: var(--sh-3); animation: sheet-up var(--t) var(--ease); }
  .filters-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: var(--s3) 0; background: var(--surface); }
  .filters-head h2 { margin: 0; }
  .filter-actions { position: sticky; bottom: calc(-1 * var(--s4)); padding: var(--s3) 0; background: var(--surface); }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.fchips { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s4); padding: 0; list-style: none; }
.fchip { display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 var(--s2) 0 var(--s3); border-radius: var(--r-pill); background: var(--brand-soft); color: var(--brand-ink); font-weight: 650; font-size: var(--fs-sm); text-decoration: none; }
.fchip:hover { background: var(--brand); color: #fff; }
.fchip .ico { width: 16px; height: 16px; }
.clear-all { font-size: var(--fs-sm); font-weight: 650; }

/* ============ 11. product page ============ */
.pdp { display: grid; gap: var(--s5); margin-bottom: var(--s8); }
@media (min-width: 768px) { .pdp { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); align-items: start; } }
@media (min-width: 1024px) { .pdp { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.pdp-gallery { position: relative; }
@media (min-width: 768px) { .pdp-gallery { position: sticky; top: 140px; } }
.media.pdp-photo { margin: 0; border-radius: var(--r-xl); background-color: var(--surface); box-shadow: var(--sh-1); }
.media.pdp-photo::before { font-size: 120px; }
.pdp-gallery > .badge.big { position: absolute; top: var(--s4); left: var(--s4); z-index: 2; }
.gallery-thumbs { display: flex; gap: var(--s2); margin: var(--s3) 0 0; padding: 0; list-style: none; }
.gthumb { width: 64px; height: 64px; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: var(--r); background: var(--surface); }
.gthumb[aria-current="true"] { border-color: var(--brand); }
.gthumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info h1 { font-size: var(--fs-3xl); margin: var(--s1) 0 var(--s1); }
.pdp-top { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); }
.brand-line { margin: 0; color: var(--brand-ink); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: var(--fs-sm); }
.unit-line { color: var(--ink-3); }
.buy-box { display: grid; gap: var(--s3); margin: var(--s4) 0 var(--s6); padding: var(--s5); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--sh-1); }
.pdp-price { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.save { padding: 4px 10px; border-radius: var(--r-pill); background: var(--sale-soft); color: var(--sale); font-weight: 700; font-size: var(--fs-sm); }
.stock { display: flex; align-items: center; gap: var(--s2); margin: 0; font-weight: 650; font-size: var(--fs-sm); }
.sdot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.stock.ok { color: var(--brand); }
.stock.low { color: var(--warn); }
.stock.out { color: var(--sale); }
.buy .add-form { display: flex; flex-wrap: wrap; gap: var(--s3); }
.stepper { display: inline-flex; align-items: center; height: 52px; border: 1.5px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); }
.stepper button { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: transparent; }
.stepper button:hover:not([disabled]) { background: var(--surface-3); }
.stepper button[disabled] { color: var(--line-2); }
.stepper input { width: 52px !important; min-height: 0 !important; height: 44px; padding: 0 !important; border: 0 !important; box-shadow: none !important; text-align: center; font-weight: 800; font-size: var(--fs-lg); -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.add-big { flex: 1; min-height: 52px; font-size: var(--fs-lg); min-width: 0; padding: 0 var(--s4); }
.add-big span { overflow: hidden; text-overflow: ellipsis; }
.add-big.added { animation: added .6s var(--ease); }
@keyframes added { 30% { transform: scale(1.03); background: var(--brand-strong); } }
.alert-form { margin: 0; }
.alert-btn { width: 100%; margin-top: var(--s2); white-space: normal; text-align: center; }
.assure { display: grid; gap: var(--s2); margin: 0; padding: var(--s3) 0 0; list-style: none; border-top: 1px solid var(--line); color: var(--ink-2); font-size: var(--fs-sm); }
.assure li { display: flex; align-items: center; gap: var(--s2); }
.assure .ico { color: var(--brand); }
.pdp-sub { font-size: var(--fs-lg); margin-top: var(--s5); }
.desc { color: var(--ink-2); max-width: 65ch; }
.specs { display: grid; margin: 0; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); overflow: hidden; }
.specs div { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: var(--s3); padding: var(--s3) var(--s4); }
.specs div:nth-child(even) { background: var(--surface-2); }
.specs dt { color: var(--ink-3); }
.specs dd { margin: 0; font-weight: 600; }

/* ============ 12. cart page, checkout, orders, account ============ */
.cart-layout, .layout, .order-layout, .account-grid, .idea-layout { display: grid; gap: var(--s4); align-items: start; }
.cart-layout > .pad { border-radius: var(--r-xl); box-shadow: var(--sh-1); overflow: hidden; }
.cart-layout > .pad .pad-body { overflow: visible; }
.cart-summary { display: grid; gap: var(--s4); }
.cart-summary h2 { margin: 0; }
@media (min-width: 1024px) {
  .cart-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s6); }
  .cart-summary { position: sticky; top: 150px; }
  .layout, .checkout-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s6); }
  .auth-layout { grid-template-columns: minmax(0, 520px); justify-content: center; }
  .order-layout { grid-template-columns: minmax(0, 1fr) 400px; gap: var(--s6); }
  .account-grid { grid-template-columns: 1fr 1fr; gap: var(--s5); }
  .idea-layout { grid-template-columns: 300px minmax(0, 1fr); gap: var(--s5); }
}
.district-form, .promo-form { display: grid; gap: var(--s2); margin: 0; }
.district-form > label, .promo-form > label { display: flex; align-items: center; gap: var(--s1); font-weight: 700; }
.district-form .ico { color: var(--brand); }
.district-form .hintline { margin: 0; display: flex; align-items: center; gap: var(--s1); }
.promo-row-input { display: flex; gap: var(--s2); }
.promo-row-input input { text-transform: uppercase; }
.promo-row-input input::placeholder { text-transform: none; }
[data-live="cart"] { margin-bottom: var(--s7); }
.promo-wait { color: var(--warn); font-size: var(--fs-sm); font-weight: 600; margin: 0; }
.promo.applied { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3); border-radius: var(--r); background: var(--brand-soft); }
.promo.applied p { display: flex; align-items: center; gap: var(--s2); margin: 0; flex-wrap: wrap; }
.promo.applied form { margin: 0; }
.promo-code { display: inline-block; padding: 2px 10px; border: 1.5px dashed var(--brand); border-radius: var(--r-sm); background: var(--surface); color: var(--brand-ink); font-weight: 800; letter-spacing: .06em; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; }
button.promo-code { cursor: pointer; }
.promo-code.big { padding: var(--s2) var(--s4); font-size: var(--fs-xl); }
.promo-code.big:hover { background: var(--brand-soft); }

.page-head { padding-top: var(--s5); padding-bottom: var(--s2); }
.brand.small { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s1); font-size: var(--fs-2xl); }
.brand-mark { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-lg); background: var(--brand-soft); font-size: 26px; }
.page-head .tagline { font-size: var(--fs-base); }
.layout > main { min-width: 0; }
.checkout { display: grid; gap: var(--s4); }
.checkout fieldset { margin: 0; border: 0; display: grid; gap: var(--s4); }
.checkout legend { float: left; width: 100%; margin-bottom: var(--s1); padding: 0; font-weight: 800; font-size: var(--fs-lg); }
.checkout legend + * { clear: both; }
.checkout label:not(.check):not(.chip):not(.method):not(.addr-pick) { display: grid; gap: 6px; font-weight: 650; font-size: var(--fs-sm); }
.grid2, .grid3 { display: grid; gap: var(--s4); }
@media (min-width: 600px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 2fr 1fr 2fr; } }
.new-addr { display: grid; gap: var(--s4); }
.checkout:has(input[name="address_id"]:checked:not([value="new"])) .new-addr { display: none; }
.saved-addrs, .methods { display: grid; gap: var(--s2); }
@media (min-width: 600px) { .saved-addrs, .methods { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.addr-pick, .method { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border: 1.5px solid var(--line-2); border-radius: var(--r); cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.addr-pick:hover, .method:hover { border-color: var(--ink-3); }
.addr-pick:has(input:checked), .method:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.addr-pick input, .method input { margin-top: 2px; }
.addr-pick span, .method span { display: grid; gap: 2px; }
.addr-pick small, .method small { color: var(--ink-2); font-size: var(--fs-sm); }
.slots { display: flex; flex-wrap: wrap; gap: var(--s2); }
.chip { position: relative; display: inline-flex; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s4); border: 1.5px solid var(--line-2); border-radius: var(--r-pill); background: var(--surface); font-weight: 650; font-size: var(--fs-sm); }
.chip input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.card-fields { display: grid; gap: var(--s4); padding-top: var(--s4); border-top: 1.5px dashed var(--line-2); }
.card-fields .sub { margin: 0; font-weight: 700; }
.pay:has(.methods input:checked):not(:has(input[value="card"]:checked)) .card-fields { display: none; }
.test-mode { margin: 0; padding: var(--s3); border-radius: var(--r); background: var(--sun-soft); font-size: var(--fs-sm); }
.pad.summary, .pad.receipt { border-radius: var(--r-xl); box-shadow: var(--sh-1); padding-bottom: var(--s4); }
@media (min-width: 1024px) { .pad.summary { position: sticky; top: 100px; } }
.pad.summary .lines, .pad.receipt .lines { padding: var(--s2) var(--s4); }
.pad.summary .totals, .pad.receipt .totals, .pad.summary .meter-box, .pad.summary .hintline, .order-actions { margin: 0 var(--s4) var(--s3); }
.sline { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.sline:last-child { border-bottom: 0; }
.sname { flex: 1; min-width: 0; font-weight: 600; }
.sname small { color: var(--ink-3); font-weight: 400; }
.sname a { color: var(--ink); }

.order-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-bottom: var(--s5); }
.order-head .page-title { margin: 0; }
.status-pill { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2); font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; }
.s-received, .s-confirmed { background: #E7EEFB; color: #1E4FA3; }
.s-preparing, .s-out_for_delivery { background: var(--sun-soft); color: #6A4B00; }
.s-delivered { background: var(--brand-soft); color: var(--brand-ink); }
.s-cancelled { background: var(--sale-soft); color: #8E1B12; }
.placed { display: flex; align-items: center; gap: var(--s4); margin-bottom: var(--s5); padding: var(--s5); border-radius: var(--r-xl); background: var(--brand); color: #fff; }
.placed h1 { margin: 0 0 var(--s1); font-size: var(--fs-xl); }
.placed p { margin: 0; opacity: .92; }
.placed-icon { display: grid; place-items: center; width: 64px; height: 64px; flex: none; border-radius: 50%; background: rgb(255 255 255 / .18); font-size: 32px; }
.track { display: grid; gap: 0; margin: 0 0 var(--s4); padding: 0; list-style: none; }
.step { position: relative; display: flex; gap: var(--s3); padding-bottom: var(--s4); }
.step:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--line); }
.step.done:not(:last-child)::before { background: var(--brand); }
.step .dot { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--line-2); font-size: 16px; }
.step.done .dot { background: var(--brand-soft); border-color: var(--brand); }
.step.current .dot { background: var(--brand); border-color: var(--brand); box-shadow: 0 0 0 5px rgb(14 124 66 / .15); }
.step-text { display: grid; padding-top: 6px; }
.step-text small, .step-text time { color: var(--ink-3); font-size: var(--fs-sm); }
.step.todo .step-text b { color: var(--ink-3); font-weight: 600; }
.track.cancelled { padding: var(--s3) var(--s4); border-radius: var(--r); background: var(--sale-soft); color: #8E1B12; font-weight: 600; }
.track.cancelled p { margin: 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s4); margin: var(--s4) 0 0; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; font-weight: 600; }
.order-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.order-actions form { margin: 0; }
.guest-hint { margin-top: var(--s5); }
.order-list { display: grid; gap: var(--s2); margin: 0; padding: 0; list-style: none; }
.order-row { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "emo main total" "emo pill pill"; align-items: center; gap: var(--s1) var(--s3); padding: var(--s4); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); color: var(--ink); text-decoration: none; transition: box-shadow var(--t-fast); }
.order-row:hover { box-shadow: var(--sh-2); color: var(--ink); }
.o-emojis { grid-area: emo; max-width: 5.5em; overflow: hidden; white-space: nowrap; text-overflow: clip; font-size: 22px; }
.o-main { grid-area: main; display: grid; min-width: 0; }
.o-main small { color: var(--ink-3); }
.order-row .status-pill { grid-area: pill; justify-self: start; }
.o-total { grid-area: total; font-weight: 800; }
@media (min-width: 768px) { .order-row { grid-template-columns: auto 1fr auto auto; grid-template-areas: "emo main pill total"; } }

.alerts-box { margin-bottom: var(--s5); }
.alert-list { display: grid; margin: 0; padding: 0; list-style: none; }
.alert-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.alert-list li > a { flex: 1; min-width: 140px; font-weight: 650; text-decoration: none; color: var(--ink); }
.alert-list form { margin: 0; }
.alert-list li.is-back > a { color: var(--brand-ink); }
.mini-orders { display: grid; margin: 0 0 var(--s3); padding: 0; list-style: none; }
.mini-orders li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
.mini-orders li a { flex: 1; color: var(--ink); text-decoration: none; }
.mini-orders small { color: var(--ink-3); }
.signout { margin-top: var(--s4); }
.addr-list { display: grid; gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.addr { padding: var(--s4); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); }
.addr p { margin: 0 0 var(--s1); }
.addr form { margin-top: var(--s2); }
.addr-label { font-weight: 800; }

/* promotions, planner, recipes */
.promo-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.promo-card { display: grid; gap: var(--s2); justify-items: start; padding: var(--s5); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); border-left: 6px solid var(--sun); }
.promo-card p { margin: 0; }
.promo-card form { margin: var(--s1) 0 0; }
.promo-card small { color: var(--ink-3); }
.promo-gives { font-size: var(--fs-xl); font-weight: 800; }
.promo-terms { color: var(--ink-2); font-size: var(--fs-sm); }
.bundles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s3); margin: 0; padding: 0; list-style: none; }
.bundle { display: grid; gap: var(--s3); padding: var(--s4); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); }
.bundle-pair { display: flex; align-items: center; justify-content: space-around; gap: var(--s2); }
.bundle-pair a { display: grid; justify-items: center; gap: var(--s1); text-align: center; color: var(--ink); text-decoration: none; font-weight: 650; font-size: var(--fs-sm); }
.plus-sign { font-size: var(--fs-2xl); color: var(--ink-3); }
.add-all { margin: var(--s4) 0 0; }
.add-all .btn { width: 100%; }
.planner-form { display: grid; gap: var(--s4); }
.planner-form label:not(.check) { display: grid; gap: 6px; font-weight: 650; }
.idea-group { margin: var(--s5) 0 var(--s2); font-size: var(--fs-base); color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.idea-lines { display: grid; margin: 0; padding: 0; list-style: none; }
.idea-lines li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
.idea-lines li > span:nth-child(2) { flex: 1; min-width: 0; }
.idea-lines small { color: var(--ink-3); }
.idea-lines .missing { opacity: .6; }
.idea-lines .lemoji:not(:has(.media)) { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-sm); background: var(--surface-3); font-size: 22px; }
.idea-search { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin-bottom: var(--s5); }
.idea-search input { flex: 1; min-width: 200px; }
.recipe-list ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.recipe-list a { display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0 var(--s3); border-radius: var(--r); color: var(--ink); text-decoration: none; font-weight: 600; }
.recipe-list a:hover { background: var(--surface-3); }
.recipe-list a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.recipe-list small { color: var(--ink-3); font-weight: 400; }
.inline-form { margin: 0 0 var(--s3); }
.inline-form label { display: inline-flex; align-items: center; gap: var(--s2); font-weight: 600; }
.inline-form select { width: auto; }

/* ============ 13. footer ============ */
.site-foot { margin-top: var(--s8); padding: var(--s8) 0 var(--s7); background: #12291C; color: #D6E4DA; font-size: var(--fs-sm); }
.site-foot a { color: #fff; }
.site-foot a:hover { color: var(--sun); }
.foot-grid { display: grid; gap: var(--s6); margin-bottom: var(--s6); }
@media (min-width: 768px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.site-foot .logo { color: #fff; margin-bottom: var(--s3); }
.site-foot .logo-mark { color: var(--brand); }
.site-foot h2 { margin: 0 0 var(--s3); color: #fff; font-size: var(--fs-base); }
.site-foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s2); }
.site-foot nav a { text-decoration: none; }
.site-foot nav a:hover { text-decoration: underline; }
.foot-perks li { display: flex; align-items: center; gap: var(--s2); }
.foot-perks .ico { color: var(--sun); }
.site-foot .lang-switch { margin-top: var(--s3); background: rgb(255 255 255 / .1); }
.site-foot .lang-switch button { color: #fff; }
.site-foot .lang-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.fine-print { margin: 0; padding-top: var(--s5); border-top: 1px solid rgb(255 255 255 / .12); color: #A9BFB0; }

/* ============ 14. admin (internal, English) ============ */
.admin-bar .bar { gap: var(--s4); flex-wrap: wrap; }
.admin-tag { margin-left: var(--s1); padding: 2px 8px; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: var(--fs-xs); letter-spacing: 0; }
.admin-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.admin-nav a { padding: 8px 14px; border-radius: var(--r-pill); font-weight: 700; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.admin-nav a:hover { color: var(--ink); background: var(--chip); }
.admin-nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.admin-who { display: flex; align-items: center; gap: var(--s3); color: var(--ink-soft); font-size: var(--fs-sm); white-space: nowrap; }
.admin-who .who-name { display: inline; }
.admin .card-box h2 { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.admin-head .page-title { margin: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--paper); box-shadow: var(--shadow-sm); }
.seg a { padding: 6px 12px; border-radius: var(--r-pill); font-weight: 700; font-size: var(--fs-sm); color: var(--ink-soft); text-decoration: none; }
.seg a[aria-current] { background: var(--ink); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s4); }
@media (min-width: 1024px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { padding: var(--s4) var(--s5); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-sm); }
.kpi p { margin: 0; }
.kpi-label { color: var(--ink-soft); font-weight: 700; font-size: var(--fs-sm); }
.kpi-value { font-size: clamp(1.4rem, 2.6vw, 1.9rem); font-weight: 800; letter-spacing: -.03em; }
.kpi-note { color: var(--hint); font-size: var(--fs-xs); }
.admin-grid { display: grid; gap: var(--s4); margin-top: var(--s4); align-items: start; }
@media (min-width: 1024px) { .admin-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .admin-grid.two { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.stack { display: grid; gap: var(--s4); }
.chart { margin: 0; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .grid { display: initial; stroke: #E6ECE8; stroke-width: 1; }
.chart .base { stroke: #C9D6CE; stroke-width: 1; }
.chart .tick { fill: var(--ink-soft); font-size: 11px; font-family: inherit; width: auto; height: auto; border: 0; background: none; }
.chart .bar { display: initial; padding: 0; }
.chart .bar path { fill: var(--go); }
.chart .bar .hit { fill: transparent; }
.chart .bar:hover path { fill: var(--brand-strong); }
.chart .bar:hover .hit { fill: rgb(14 124 66 / .06); }
.as-table { margin-top: var(--s2); font-size: var(--fs-sm); }
.as-table summary { cursor: pointer; color: var(--ink-soft); font-weight: 600; }
.as-table table { margin-top: var(--s2); }
.status-counts, .low-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.status-counts a { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px; text-decoration: none; border-bottom: 1px solid var(--rule); }
.inline-bar { display: block; height: 4px; margin-top: 4px; border-radius: 0 4px 4px 0; background: var(--go); opacity: .55; }
.low-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: 6px 0; border-bottom: 1px solid var(--rule); }
.low-list a { text-decoration: none; font-weight: 600; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-sm); }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.admin-table th { padding: 10px 12px; text-align: left; color: var(--ink-soft); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td small { display: block; color: var(--ink-soft); font-size: var(--fs-xs); }
.admin-table td a { text-decoration: none; }
.admin-table td a:hover { text-decoration: underline; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table tr.off td { color: var(--hint); }
.card-box .admin-table th, .card-box .admin-table td { padding-left: 0; }
.filter-tabs { display: flex; gap: 6px; margin-bottom: var(--s3); overflow-x: auto; scrollbar-width: none; }
.filter-tabs a { padding: 8px 14px; border-radius: var(--r-pill); background: var(--paper); box-shadow: var(--shadow-sm); font-weight: 700; font-size: var(--fs-sm); text-decoration: none; color: var(--ink-soft); white-space: nowrap; }
.filter-tabs a small { margin-left: 3px; color: var(--hint); }
.filter-tabs a[aria-current="page"] { background: var(--ink); color: #fff; }
.filter-tabs a[aria-current="page"] small { color: #C9D2E6; }
.admin-search { display: flex; gap: var(--s2); }
.admin-search.wide { margin-bottom: var(--s2); }
.admin-search input, .admin-search select { min-height: 40px; }
.qedit { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; margin: 0; }
.qedit.wide { justify-content: flex-start; }
.qedit input { width: 90px !important; min-height: 36px !important; padding: 4px 8px !important; text-align: right; font-variant-numeric: tabular-nums; }
.qedit.wide input { width: auto !important; text-align: left; }
.qedit input.zero { border-color: var(--margin); background: var(--error-bg); }
.products-table td:first-child { min-width: 200px; }
.status-form { display: grid; gap: var(--s3); }
.status-form label { display: grid; gap: 4px; font-weight: 600; font-size: var(--fs-sm); }
.status-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.history li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); font-size: var(--fs-sm); }
.history time { color: var(--ink-soft); }
.narrow-form { max-width: 720px; margin-top: var(--s4); }
.grid3.even { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin .lines .lemoji { font-size: 20px; }

/* ============ 15. motion preferences ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .media, .skel { animation: none !important; }
  .card:hover, .cat-tile:hover { transform: none; }
  .card:hover .media img, .cat-tile:hover .cat-tile-img img, .collection:hover img { transform: none; }
  .toast { animation: none; }
}

/* ============ 16. print ============ */
@media print {
  .site-head, .bottom-nav, .jump, .site-foot, dialog, .toast, .fav, .card-ctl { display: none !important; }
  body { background: #fff; padding: 0; }
}
