/* ShopYalu storefront. Colours come from the storefront's look as CSS variables on <body> (src/look.ts); the
   shapes follow the ShopYalu brand sheet: 44 px tap targets, 3 px focus ring in the accent, few shadows. */
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(/assets/fonts/figtree-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(/assets/fonts/figtree-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(/assets/fonts/figtree-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 700; font-display: swap; src: url(/assets/fonts/bricolage-grotesque-latin-700-normal.woff2) format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.5 var(--body); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.hd { font-family: var(--head); font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
main { padding-bottom: 110px; }

/* header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top .wrap { display: flex; flex-direction: column; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 48px; height: 48px; border-radius: var(--r-logo); background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font: 700 22px var(--head); overflow: hidden; flex: none; }
.logo img { width: 100%; height: 100%; object-fit: cover; }
.brand .nm { font-size: 20px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand .tag { font-size: 13px; color: var(--muted); line-height: 1.4; }
.brand .grow { flex: 1; min-width: 0; overflow: hidden; }
.ib { min-width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; font-weight: 600; font-size: 13px; cursor: pointer; position: relative; }
.ib .count { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.langs { position: relative; }
.langs details > summary { list-style: none; }
.langs details > summary::-webkit-details-marker { display: none; }
.langs .menu { position: absolute; right: 0; top: 50px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 20px rgb(0 0 0 / 0.12); z-index: 20; min-width: 140px; padding: 6px; }
.langs .menu a { display: flex; min-height: 44px; align-items: center; padding: 0 12px; border-radius: 8px; }
.langs .menu a[aria-current] { font-weight: 700; color: var(--accent-text); }
.wa { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border-radius: var(--r-btn); border: 1.5px solid var(--accent-text); color: var(--accent-text); font-weight: 700; }
.note { font-size: 13px; color: var(--muted); }

/* hero / banner */
.hero { margin: 16px 0 0; border-radius: var(--r-card); background: var(--hero); color: #fff; padding: 22px 20px; display: flex; flex-direction: column; gap: 4px; min-height: 120px; justify-content: center; overflow: hidden; position: relative; }
.hero.img { padding: 0; min-height: 0; background: var(--tint); }
.hero.img img { width: 100%; aspect-ratio: 16/7; object-fit: cover; }
.hero .k { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; }
.hero .t { font-size: 24px; }
.editorial .hero { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.editorial .hero .t em { color: var(--accent-text); font-style: italic; }

/* collections */
.cols { display: flex; gap: 8px; padding: 16px 0; overflow-x: auto; scrollbar-width: none; }
.cols::-webkit-scrollbar { display: none; }
.col { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-btn); border: 1px solid var(--line); font-size: 14px; font-weight: 600; white-space: nowrap; background: var(--card); }
.col[aria-current] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.search { display: flex; align-items: center; gap: 8px; min-height: 48px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--card); padding: 0 14px; margin-top: 16px; }
.search input { border: 0; background: none; flex: 1; min-width: 0; min-height: 44px; outline: none; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; margin: 4px 0 0; }
.sec-h h2 { margin: 0; font-size: 18px; }

/* product grid and cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; padding: 12px 0 24px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 20px; } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pc { display: flex; flex-direction: column; gap: 6px; }
.catalog .pc { background: var(--card); border-radius: var(--r-card); padding: 8px 8px 12px; }
.pc.out { opacity: 0.55; }
.pic { aspect-ratio: var(--ratio); border-radius: var(--r-inner); background: var(--tint); position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 6px; color: var(--muted); font-size: 12px; }
.bold .pic, .editorial .pic { border-radius: var(--r-card); }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; top: 8px; left: 8px; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); z-index: 1; }
.pc .n { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc .meta { font-size: 13px; color: var(--muted); }
.price { font-weight: 700; font-size: 15px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.price s { font-weight: 400; font-size: 13px; color: var(--muted); }
.stock { font-size: 13px; font-weight: 600; color: var(--amber); }
.stock.out { color: var(--muted); }

/* menu layout (food) */
.menu-list { display: flex; flex-direction: column; gap: 12px; padding: 12px 0 24px; }
.mrow { display: grid; grid-template-columns: 96px 1fr auto; gap: 12px; align-items: center; background: var(--card); border-radius: var(--r-card); padding: 10px; }
.mrow .pic { aspect-ratio: 1/1; }
.mrow .add { min-height: 44px; min-width: 64px; border-radius: var(--r-btn); border: 0; background: var(--accent); color: var(--on-accent); font-weight: 700; cursor: pointer; padding: 0 14px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: var(--r-btn); border: 0; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 16px; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--accent-text); border: 1.5px solid var(--accent-text); }
.btn.ink { background: var(--ink-btn); color: var(--on-ink); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--accent-text); font-weight: 700; min-height: 44px; cursor: pointer; padding: 0 4px; display: inline-flex; align-items: center; gap: 8px; }

/* sticky cart bar */
.cartbar { position: fixed; left: 16px; right: 16px; bottom: 12px; max-width: 560px; margin: 0 auto; background: var(--bar-bg); color: var(--bar-fg); border-radius: 999px; min-height: 56px; padding: 0 8px 0 20px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 6px 20px rgb(31 29 26 / 0.2); z-index: 10; transition: opacity 0.2s; }
.cartbar[hidden] { display: none; }
.cartbar .go { background: var(--bar-fg); color: var(--bar-bg); border-radius: 999px; padding: 10px 16px; font-weight: 700; }

/* product page */
.pp { display: grid; gap: 20px; padding-top: 12px; }
@media (min-width: 860px) { .pp { grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; } }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 8px; border-radius: var(--r-card); scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery .pic { flex: 0 0 100%; scroll-snap-align: start; border-radius: var(--r-card); }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--line); }
.dots span.on { width: 18px; background: var(--ink); }
.info { display: flex; flex-direction: column; gap: 20px; }
.info h1 { margin: 0; font-size: 24px; }
.big-price { font-size: 22px; font-weight: 700; display: flex; gap: 8px; align-items: baseline; }
.big-price s { font-size: 15px; font-weight: 400; color: var(--muted); }
.lab { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 52px; padding: 0 14px; border-radius: var(--r-inner); border: 1px solid var(--line); font-weight: 600; font-size: 15px; background: var(--card); cursor: pointer; }
.chip[aria-pressed='true'] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.chip.sw[aria-pressed='true'] { background: var(--card); color: var(--ink); border: 2px solid var(--accent-text); }
.chip.off { color: var(--muted); text-decoration: line-through; border-style: dashed; cursor: not-allowed; background: transparent; }
.chip .dot { width: 18px; height: 18px; border-radius: 999px; border: 1px solid var(--line); }
.warn { font-size: 14px; color: var(--amber); background: var(--amber-bg); border-radius: 10px; padding: 10px 12px; }
.warn:empty { display: none; }
.buyrow { display: flex; gap: 12px; align-items: center; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--card); }
.stepper button { width: 44px; height: 44px; border: 0; background: none; border-radius: 999px; cursor: pointer; font-size: 20px; }
.stepper output { min-width: 28px; text-align: center; font-weight: 700; }
.buyrow .btn { flex: 1; }
dl.specs { margin: 0; display: grid; grid-template-columns: 120px 1fr; gap: 10px 12px; border-top: 1px solid var(--line); padding-top: 16px; }
dl.specs dt { color: var(--muted); }
dl.specs dd { margin: 0; }
.box { border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--card); }
.desc { margin: 0; white-space: pre-line; line-height: 1.6; }

/* cart, checkout, order */
.page { max-width: 640px; margin: 0 auto; padding: 0 16px; }
.page h1 { font-size: 24px; margin: 16px 0; }
.line { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line .pic { aspect-ratio: 1/1; }
.line .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.sum { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; }
.sum .r { display: flex; justify-content: space-between; gap: 12px; }
.sum .r.t { font-weight: 700; font-size: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.sum .r.off { color: var(--accent-text); }
.fs { border: 0; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 14px; }
.fs legend { font: 700 18px var(--head); margin-bottom: 12px; padding: 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.field input, .field select, .field textarea { min-height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); padding: 10px 12px; font-weight: 400; font-size: 16px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 13px; }
.field .err { font-weight: 600; color: #b3261e; font-size: 13px; }
.field.bad input, .field.bad select { border-color: #b3261e; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.two > *, .field select, .field input { min-width: 0; max-width: 100%; }
.opt { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: var(--r-card); padding: 14px; cursor: pointer; background: var(--card); }
.opt:has(input:checked) { border-color: var(--accent-text); }
.opt input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.opt b { display: block; }
.bankbox { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--r-card); background: var(--tint); }
.bankbox dl { margin: 0; display: grid; grid-template-columns: 90px 1fr; gap: 6px 10px; }
.bankbox dt { color: var(--muted); }
.bankbox dd { margin: 0; font-weight: 600; }
.receipt { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--card); }
.receipt .thumb { width: 56px; height: 56px; border-radius: 8px; background: var(--tint); overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.receipt .thumb img { width: 100%; height: 100%; object-fit: cover; }
.progress { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.2s; }
.sendrow { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 480px) { .sendrow.both { grid-template-columns: 1fr 1fr; } }
.formerr { color: #b3261e; font-weight: 600; }
.formerr:empty { display: none; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.steps li { display: flex; gap: 12px; align-items: center; min-height: 40px; }
.steps .dot { width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--line); flex: none; display: flex; align-items: center; justify-content: center; }
.steps .done .dot { background: #07553f; border-color: #07553f; color: #fff; }
.steps .now .dot { border: 3px solid var(--amber); background: var(--amber-bg); }
.steps .now b { font-weight: 700; }
.steps .later { color: var(--muted); }
.steps small { color: var(--muted); font-size: 13px; }
.side { border-radius: var(--r-card); padding: 14px; background: var(--amber-bg); color: var(--amber); font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.card h2 { margin: 0; font-size: 17px; }

/* sheet (WhatsApp hand-off) */
.sheet { position: fixed; inset: 0; background: rgb(0 0 0 / 0.4); display: flex; align-items: flex-end; justify-content: center; z-index: 30; }
.sheet[hidden] { display: none; }
.sheet .in { background: var(--bg); width: 100%; max-width: 560px; border-radius: 20px 20px 0 0; padding: 20px 16px 24px; display: flex; flex-direction: column; gap: 12px; max-height: 90vh; overflow: auto; box-shadow: 0 -6px 20px rgb(0 0 0 / 0.15); }
.msg { background: #dff3d4; color: #1b1b1b; border-radius: 12px; padding: 12px; white-space: pre-wrap; font-size: 14px; line-height: 1.45; max-height: 40vh; overflow: auto; }

/* small pages and footer */
.center { text-align: center; padding: 48px 16px; display: flex; flex-direction: column; gap: 14px; align-items: center; max-width: 480px; margin: 0 auto; }
.center h1 { margin: 0; font-size: 24px; }
footer.pw { margin: 24px 16px 0; border-top: 1px solid var(--line); padding: 16px 0; text-align: center; font-size: 13px; color: var(--muted); }
footer.pw b { color: var(--ink); }
footer.pw a { text-decoration: underline; }
.toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); background: var(--ink-btn); color: var(--on-ink); padding: 10px 16px; border-radius: 999px; font-weight: 600; z-index: 40; }
.toast[hidden] { display: none; }
.skel { background: var(--line); border-radius: 6px; height: 14px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
