/* ===== Base storefront (structure). Themes set tokens + personality. ===== */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:120px}
html.lock{overflow:hidden}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--f-text);font-size:15px;line-height:1.6;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
img{display:block;max-width:100%;height:auto}
a{color:inherit;text-decoration:none}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;-webkit-tap-highlight-color:transparent}
button:disabled{cursor:not-allowed;opacity:.5}
input,select,textarea{font:inherit;color:inherit}
h1,h2,h3{margin:0;font-family:var(--f-display);font-weight:var(--display-w,700);line-height:1.15}
p{margin:0}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.i{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:var(--ic-w,1.6);stroke-linecap:var(--ic-cap,round);stroke-linejoin:round}
main,.foot{max-width:1240px;margin:0 auto}

/* announcement + header */
.announce{background:var(--ann-bg,var(--ink));color:var(--ann-ink,var(--bg));font-size:12.5px;text-align:center;padding:7px 16px;letter-spacing:.01em}
.top{position:sticky;top:0;z-index:30;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 16px;height:60px;background:var(--hdr-bg,var(--bg));border-bottom:1px solid var(--line)}
.brand{display:flex;align-items:center;min-height:44px}
.cart-btn{position:relative;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--r-btn,12px)}
.cart-btn .i{width:24px;height:24px}
.cart-n{position:absolute;top:4px;inset-inline-start:2px;min-width:19px;height:19px;padding:0 5px;border-radius:10px;background:var(--accent);color:var(--accent-ink);font-size:11px;font-weight:700;display:grid;place-items:center;font-family:var(--f-num,var(--f-text))}
.cart-btn.bump{animation:bump .45s cubic-bezier(.3,1.6,.5,1)}
@keyframes bump{40%{transform:scale(1.18)}}

/* chips */
.chips{position:sticky;top:60px;z-index:20;background:var(--chips-bg,var(--bg));border-bottom:1px solid var(--line)}
.chips-in{display:flex;gap:8px;overflow-x:auto;padding:10px 16px;scrollbar-width:none;scroll-behavior:smooth}
.chips-in::-webkit-scrollbar{display:none}
.chip{flex:none;min-height:40px;display:inline-flex;align-items:center;padding:0 16px;white-space:nowrap;font-size:14px;transition:background .2s,color .2s,border-color .2s}

/* shelves: horizontal swipe, two stacked rows */
.shelf{padding:28px 0 8px}
.shelf-h{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:0 16px 14px}
.shelf-h h2{font-size:var(--h2,22px)}
.shelf-h .count{font-size:12.5px;color:var(--muted)}
.rail{overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scrollbar-width:none;padding:0 16px 6px;scroll-padding-inline:16px}
.rail::-webkit-scrollbar{display:none}
.grid2{display:grid;grid-auto-flow:column;grid-template-rows:repeat(2,auto);grid-auto-columns:calc((100% - var(--gap,12px)) / 2.18);gap:var(--gap-y,18px) var(--gap,12px)}
.grid2:has(> .card:only-child), .grid2:has(> .card:nth-child(2):last-child){grid-template-rows:auto}
@media (min-width:720px){.grid2{grid-auto-columns:calc((100% - 3 * var(--gap,12px)) / 4.3)}}
@media (min-width:1100px){.grid2{grid-auto-columns:calc((100% - 4 * var(--gap,16px)) / 5)}}

/* product card */
.card{scroll-snap-align:start;display:flex;flex-direction:column;min-width:0}
.card-media{position:relative;display:block;aspect-ratio:var(--card-ratio,1/1);overflow:hidden;background:var(--tile)}
.card-img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
@media (hover:hover){.card-media:hover .card-img{transform:scale(1.04)}}
.badge{position:absolute;top:8px;inset-inline-start:8px;z-index:1}
.oos .card-media::after{content:"";position:absolute;inset:0;background:rgba(255,255,255,.45)}
.oos-tag{position:absolute;bottom:8px;inset-inline-start:8px;z-index:2;font-size:11px;padding:3px 8px;background:var(--ink);color:var(--bg)}
.card-body{display:flex;flex-direction:column;gap:6px;padding:10px 2px 0;flex:1}
.card-name{font-family:var(--f-text);font-weight:var(--name-w,500);font-size:14px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.9em}
.card-name a{display:block}
.card-spec{font-size:12px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.price{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 8px;font-family:var(--f-num,var(--f-text))}
.price b{font-size:16px;font-weight:700;color:var(--price,var(--ink))}
.price s{font-size:12.5px;color:var(--muted)}
.price.big b{font-size:24px}.price.big s{font-size:15px}
.price .save{font-size:12px;padding:2px 8px;background:var(--save-bg,var(--tile));color:var(--save-ink,var(--ink))}
.opts{display:flex;flex-wrap:wrap;gap:2px;margin:0 -6px}
.opts .sw{width:36px;height:36px;display:grid;place-items:center;border-radius:50%}
.opts .sw i{width:20px;height:20px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.18);transition:box-shadow .15s}
.opts .sw[aria-checked=true] i{box-shadow:0 0 0 2px var(--bg),0 0 0 3.5px var(--ink)}
.opts .sz{min-width:36px;height:36px;padding:0 6px;font-size:12px;border-radius:8px;font-family:var(--f-num,var(--f-text))}
.opts .sz[aria-checked=true]{background:var(--ink);color:var(--bg)}
.add{margin-top:auto;min-height:44px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:14px;font-weight:600;transition:transform .12s,background .2s}
.add:active{transform:scale(.97)}
.add .i{width:19px;height:19px}

/* placeholder (until product photography lands) */
.ph{width:100%;height:100%;display:grid;place-items:center;background:var(--tile);color:var(--muted);text-align:center;padding:12px;font-family:var(--f-display);font-size:15px;aspect-ratio:1/1}

/* bundle + trust */
.bundle{margin:28px 16px 4px;padding:22px 18px;display:grid;gap:18px}
.bundle h2{font-size:22px;margin:4px 0 6px}
.bundle-copy>p{font-size:14px}
.bundle .kicker{font-size:12px;letter-spacing:.06em}
.bundle-rule{display:flex;gap:8px;align-items:flex-start;font-size:12.5px;margin-top:10px;opacity:.85}
.bundle-rule .i{width:18px;height:18px;margin-top:2px}
.bundle-pair{display:flex;align-items:center;gap:8px}
.bp{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;text-align:start;font-size:12.5px}
.bp img,.bp .ph{aspect-ratio:1/1;width:100%;object-fit:cover;background:var(--tile)}
.bp span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bp b{font-family:var(--f-num,var(--f-text))}
.bp-plus{font-size:22px;font-weight:300;opacity:.6}
@media (min-width:720px){.bundle{grid-template-columns:1.1fr 1fr;align-items:center;padding:32px}}
.trust{display:grid;gap:0;margin:28px 16px 0;border-top:1px solid var(--line)}
.tr{display:flex;gap:14px;align-items:flex-start;padding:16px 0;border-bottom:1px solid var(--line)}
.tr .i{width:28px;height:28px;color:var(--accent-2,var(--accent))}
.tr b{display:block;font-size:14.5px}
.tr span{font-size:13px;color:var(--muted)}
@media (min-width:720px){.trust{grid-template-columns:repeat(3,1fr);gap:24px;border:0}.tr{border:0}}
.foot{padding:36px 16px 120px;display:grid;gap:10px;color:var(--muted);font-size:13px}
.foot .wm{font-size:22px;color:var(--ink)}
.foot .fine{font-size:12px;opacity:.8}

/* cart bar */
.cartbar{position:fixed;inset-inline:0;bottom:0;z-index:40;padding:10px 12px calc(10px + env(safe-area-inset-bottom));background:linear-gradient(to top,var(--bg) 70%,transparent)}
.cartbar button{width:100%;min-height:54px;display:flex;align-items:center;gap:10px;padding:0 18px;background:var(--cta-bg,var(--ink));color:var(--cta-ink,var(--bg));font-weight:600;border-radius:var(--r-btn,12px);box-shadow:0 10px 30px -12px rgba(0,0,0,.45);animation:rise .35s ease}
.cb-n{font-size:13.5px;opacity:.9}.cb-t{font-family:var(--f-num,var(--f-text));font-size:15px}.cb-go{margin-inline-start:auto;display:flex;align-items:center;gap:4px;font-size:14px}
.cb-go .i{width:18px;height:18px}
@keyframes rise{from{transform:translateY(20px);opacity:0}}
body.has-bar .foot{padding-bottom:140px}

/* sheets */
.scrim{position:fixed;inset:0;z-index:50;background:rgba(10,10,12,.45);opacity:0;transition:opacity .25s}
.scrim.open{opacity:1}
.sheet{position:fixed;z-index:60;inset-inline:0;bottom:0;max-height:92vh;max-height:92dvh;display:flex;flex-direction:column;background:var(--sheet-bg,var(--bg));color:var(--ink);border-radius:var(--r-sheet,18px) var(--r-sheet,18px) 0 0;transform:translateY(102%);transition:transform .32s cubic-bezier(.2,.8,.2,1);box-shadow:0 -10px 40px rgba(0,0,0,.18)}
.sheet.open{transform:none}
@media (min-width:720px){.sheet{inset-inline:auto 24px;bottom:24px;width:440px;max-height:calc(100vh - 48px);border-radius:var(--r-sheet,18px)}}
.grab{width:42px;height:4px;border-radius:4px;background:var(--line-strong,var(--line));margin:8px auto 0;flex:none}
.sh-head{display:flex;align-items:center;justify-content:space-between;padding:8px 8px 8px 16px;padding-inline-start:16px;border-bottom:1px solid var(--line);flex:none}
.sh-head h2{font-size:20px}.sh-head small{font-family:var(--f-text);font-size:13px;color:var(--muted);font-weight:400;margin-inline-start:6px}
.x{width:44px;height:44px;display:grid;place-items:center;border-radius:50%}
#pdp .x{position:absolute;top:10px;inset-inline-end:10px;z-index:3;background:var(--bg);box-shadow:0 2px 10px rgba(0,0,0,.12)}
.sh-scroll{overflow-y:auto;overscroll-behavior:contain;flex:1;-webkit-overflow-scrolling:touch}
.sh-foot{flex:none;padding:12px 16px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--sheet-bg,var(--bg))}
.foot-note{text-align:center;font-size:12px;color:var(--muted);margin-top:8px}
.gal{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;background:var(--tile)}
.gal::-webkit-scrollbar{display:none}
.gal img,.gal .ph{flex:none;width:100%;aspect-ratio:1/1;object-fit:cover;scroll-snap-align:center}
.dots{display:flex;justify-content:center;gap:6px;padding:10px 0 0}
.dots i{width:6px;height:6px;border-radius:3px;background:var(--line-strong,var(--line));transition:width .2s}
.dots i.on{width:18px;background:var(--ink)}
.pd{padding:16px;display:grid;gap:14px}
.pd h2{font-size:22px}
.pd-short{color:var(--muted);font-size:13.5px;margin-top:-8px}
.og{border:0;margin:0;padding:0;min-width:0}
.og legend{font-size:13.5px;margin-bottom:8px;padding:0}
.og legend em{font-style:normal;font-weight:600}
.og-v{display:flex;flex-wrap:wrap;gap:8px}
.og .sz,.og .sw{min-height:44px;min-width:56px;padding:0 14px;border:1px solid var(--line-strong,var(--line));border-radius:var(--r-btn,10px);display:inline-flex;align-items:center;gap:8px;font-size:14px;transition:border-color .15s,background .15s}
.og .sw i{width:18px;height:18px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(0,0,0,.2)}
.og [aria-checked=true]{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}
.og.need .og-v{animation:shake .35s}.og.need legend{color:var(--danger,#c0392b)}
@keyframes shake{25%{transform:translateX(-4px)}75%{transform:translateX(4px)}}
.hint{font-size:13px;color:var(--danger,#c0392b)}
.qty-row{display:flex;align-items:center;justify-content:space-between;font-size:14px}
.qty{display:inline-flex;align-items:center;border:1px solid var(--line-strong,var(--line));border-radius:var(--r-btn,10px)}
.qty button{width:44px;height:44px;display:grid;place-items:center}
.qty b{min-width:28px;text-align:center;font-family:var(--f-num,var(--f-text))}
.qty.sm button{width:40px;height:40px}.qty.sm .i{width:18px;height:18px}
.pd-desc{font-size:14px;line-height:1.8}
.pd-trust{list-style:none;margin:0;padding:12px 0 4px;border-top:1px solid var(--line);display:grid;gap:10px;font-size:13px;color:var(--muted)}
.pd-trust li{display:flex;gap:10px;align-items:flex-start}.pd-trust .i{width:20px;height:20px;color:var(--ink)}
.btn-primary,.btn-wa,.btn-ghost{min-height:52px;display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:0 22px;font-weight:700;font-size:15.5px;border-radius:var(--r-btn,12px);transition:transform .12s,filter .2s}
.btn-primary{background:var(--cta-bg,var(--ink));color:var(--cta-ink,var(--bg))}
.btn-primary:active,.btn-wa:active{transform:scale(.98)}
.btn-primary .i{width:18px;height:18px}
.btn-wa{background:#1f8f4e;color:#fff}
.btn-ghost{border:1px solid var(--line-strong,var(--line))}
.wide{width:100%}
.busy{filter:saturate(.6);pointer-events:none}
.bundle-meter{margin:12px 16px 0;padding:10px 12px;display:flex;gap:10px;align-items:center;font-size:13px;background:var(--tile);border-radius:10px}
.bundle-meter .i{width:20px;height:20px}
.bundle-meter.ok{background:var(--ok-bg,#e5f3ea);color:var(--ok-ink,#1d6b3d)}
.lines{list-style:none;margin:0;padding:4px 16px}
.line{display:flex;gap:12px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.line img,.line .ph{width:64px;height:64px;object-fit:cover;flex:none;background:var(--tile);border-radius:var(--r-thumb,8px)}
.ln-b{flex:1;min-width:0;display:grid;gap:2px;font-size:13.5px}
.ln-b b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ln-b span{font-size:12px;color:var(--muted)}
.ln-b em{font-style:normal;font-family:var(--f-num,var(--f-text));font-weight:600}
.co{padding:16px;display:grid;gap:12px}
.co h3{font-size:17px}
.co label{display:grid;gap:6px;font-size:13px}
.co label small{color:var(--muted)}
.co input,.co select,.co textarea{width:100%;min-height:48px;padding:10px 12px;border:1px solid var(--line-strong,var(--line));border-radius:var(--r-input,10px);background:var(--input-bg,transparent);font-size:16px;outline:0;transition:border-color .15s}
.co textarea{resize:vertical;min-height:64px}
.co input:focus,.co select:focus,.co textarea:focus{border-color:var(--ink)}
.co .bad input,.co .bad select,.co .bad textarea{border-color:var(--danger,#c0392b)}
.sum{margin:6px 0 0;display:grid;gap:6px;font-size:14px}
.sum div{display:flex;justify-content:space-between}.sum dt{color:var(--muted)}.sum dd{margin:0;font-family:var(--f-num,var(--f-text))}
.sum .disc dd{color:var(--ok-ink,#1d6b3d)}
.sum .tot{padding-top:8px;border-top:1px solid var(--line);font-size:16px;font-weight:700}.sum .tot dt{color:var(--ink)}
.err{font-size:13px;color:var(--danger,#c0392b)}
.empty,.done{padding:40px 16px 48px;display:grid;justify-items:center;gap:14px;text-align:center}
.empty .i,.done .i{width:44px;height:44px;color:var(--muted)}
.done .i{color:#1f8f4e}.done b{font-family:var(--f-num,var(--f-text));font-size:20px}.muted{color:var(--muted);font-size:14px}
.toast{position:fixed;z-index:55;left:50%;top:72px;transform:translate(-50%,-12px);opacity:0;pointer-events:none;background:var(--ink);color:var(--bg);font-size:13.5px;padding:10px 16px;border-radius:24px;max-width:calc(100% - 32px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:all .25s}
.toast.show{opacity:1;transform:translate(-50%,0)}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
[hidden]{display:none!important}
