/* ==========================================================================
   Storefront — mobile first. Brand colour is injected as --brand by the layout.
   ========================================================================== */
:root {
    --brand-on-dark: var(--brand);
    --brand-on-dark-ink: var(--brand-ink);
    --ink: #14161A;
    --ink-2: #23262C;
    --ink-3: #3A3E46;
    --paper: #F7F5F0;
    --card: #FFFFFF;
    --line: #E7E3DA;
    --muted: #6E717A;
    --wa: #25D366;
    --wa-deep: #128C4A;
    --danger: #D64545;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 8px 24px -12px rgba(20, 22, 26, .18);
    --shadow-lg: 0 24px 60px -20px rgba(20, 22, 26, .45);
    --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
    --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --brand: #F5A524;
    --brand-ink: #14161A;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--body);
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.icon { flex-shrink: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.link { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 14px; }
.link:hover { text-decoration: underline; }
[hidden] { display: none !important; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
    color: var(--muted);
}
.eyebrow--light { color: rgba(255, 255, 255, .7); }
.hero .hero__logo { display: flex; width: fit-content; margin-bottom: 22px; }
.hero__logo:not(.logo--clear) { box-shadow: 0 0 0 6px rgba(255, 255, 255, .1), 0 22px 50px -14px rgba(0, 0, 0, .6); animation: logo-in .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.hero-light .hero__logo:not(.logo--clear) { box-shadow: 0 0 0 6px rgba(20, 22, 26, .05), 0 18px 40px -16px rgba(20, 22, 26, .35); }
.hero__logo.logo--clear img { filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); }
@keyframes logo-in { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@media (prefers-reduced-motion: reduce) { .hero__logo { animation: none !important; } }
/* Font personalities */
.font-classic h1, .font-classic h2, .font-classic h3, .font-classic .price { letter-spacing: -.01em; }
.font-classic .hero__title { letter-spacing: -.025em; font-weight: 700; }
.font-clean .hero__title { letter-spacing: -.035em; }
.eyebrow .icon { color: var(--brand); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 4px rgba(37, 211, 102, .2); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 20px; border: 0; border-radius: 999px;
    font-weight: 600; font-size: 15px; white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active { transform: scale(.97); }
.btn--sm { height: 38px; padding: 0 14px; font-size: 14px; }
.btn--lg { height: 56px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--brand { background: var(--brand); color: var(--brand-ink); }
.btn--brand:hover { filter: brightness(1.05); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #1fbe5b; box-shadow: 0 8px 20px -8px rgba(37, 211, 102, .7); }
.btn--ghost { background: transparent; border: 1.5px solid var(--line); }

.icon-btn {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--line); background: var(--card);
    transition: background .15s;
}
.icon-btn:hover { background: var(--paper); }

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    height: 36px; padding: 0 14px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--line);
    font-size: 13px; font-weight: 600;
    transition: border-color .15s, background .15s;
}
.pill:hover { border-color: var(--ink); }

/* ---------- Top bar ---------- */
.topbar {
    position: sticky; top: 0; z-index: 40;
    background: rgba(247, 245, 240, .86);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}
.topbar.is-scrolled { border-bottom-color: var(--line); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 12px; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand__logo { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; background: #fff; }

/* Shop logo frame: keeps the logo's own shape (wide or square), on a white card or without background */
.logo {
    --h: 56px; --pad: 7px; --r: 15px; --max: 200px;
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    height: var(--h); max-width: var(--max); min-width: var(--h); padding: var(--pad);
    border-radius: var(--r); background: #fff;
    box-shadow: 0 0 0 1px rgba(20, 22, 26, .06), 0 2px 6px -2px rgba(20, 22, 26, .18);
}
.logo img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.logo--sm { --h: 42px; --pad: 5px; --r: 12px; --max: 150px; }
.logo--md { --h: 56px; --pad: 7px; --r: 15px; --max: 200px; }
.logo--lg { --h: 96px; --pad: 12px; --r: 24px; --max: min(320px, 78vw); }
@media (min-width: 720px) { .logo--lg { --h: 116px; --pad: 14px; --r: 28px; --max: 380px; } }
.logo--clear { background: transparent; box-shadow: none; padding: 0; min-width: 0; }
.mark--lg { width: 96px; height: 96px; border-radius: 26px; font-size: 44px; }
.mark--md { width: 56px; height: 56px; border-radius: 16px; font-size: 26px; }
.brand__mark {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px;
    background: var(--ink); color: var(--brand);
    font-family: var(--display); font-weight: 800; font-size: 20px;
    box-shadow: inset 0 -3px 0 var(--brand);
}
.brand__name { font-family: var(--display); font-weight: 700; font-size: 18px; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The catalog's own logo: white frame, logo keeps its shape and never touches the edges */
.pmark { --h: 38px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; height: var(--h); min-width: var(--h); max-width: calc(var(--h) * 4); padding: calc(var(--h) * .13); border-radius: calc(var(--h) * .28); background: #fff; box-shadow: 0 0 0 1px rgba(20, 22, 26, .08), 0 2px 6px rgba(20, 22, 26, .12); overflow: hidden; }
.pmark img { display: block; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.pmark--md { --h: 48px; }
.pmark--lg { --h: 72px; }
.footer__by { display: inline-flex; align-items: center; gap: 6px; }
.footer__by .pmark, .footer__by .brand__mark { --h: 22px; width: auto; height: 22px; min-width: 22px; font-size: 12px; border-radius: 6px; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    --hero-fg: #fff; --hero-muted: rgba(255, 255, 255, .72); --hero-line: rgba(255, 255, 255, .045);
    background:
        radial-gradient(600px 300px at 85% 0%, color-mix(in srgb, var(--brand) 35%, transparent), transparent 70%),
        linear-gradient(var(--hero-line) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, var(--hero-line) 1px, transparent 1px) 0 0 / 28px 28px,
        var(--ink);
    color: var(--hero-fg);
    margin-top: -64px; padding-top: 64px; /* slide under the translucent top bar */
}
/* Hero styles chosen per shop */
.hero-light .hero {
    --hero-fg: var(--ink); --hero-muted: var(--muted); --hero-line: rgba(20, 22, 26, .05);
    background:
        radial-gradient(700px 320px at 90% 0%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 70%),
        linear-gradient(var(--hero-line) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, var(--hero-line) 1px, transparent 1px) 0 0 / 28px 28px,
        var(--paper);
    border-bottom: 1px solid var(--line);
}
.hero-brand .hero {
    --hero-fg: var(--brand-ink); --hero-muted: color-mix(in srgb, var(--brand-ink) 75%, transparent); --hero-line: rgba(0, 0, 0, .06);
    background:
        radial-gradient(600px 300px at 85% 0%, rgba(255, 255, 255, .25), transparent 70%),
        linear-gradient(var(--hero-line) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, var(--hero-line) 1px, transparent 1px) 0 0 / 28px 28px,
        var(--brand);
}
/* Shop photo: the picture is its own layer (so blurring it never blurs the text),
   with a colour wash that is strongest behind the name and lighter where the photo shows. */
.hero-photo .hero { background: var(--ink); isolation: isolate; }
.hero-photo .hero::before {
    content: ""; position: absolute; z-index: -2;
    inset: calc(var(--hero-blur, 0px) * -3); /* bleed past the edges so blur has no pale border */
    background: var(--hero-photo, none) center / cover no-repeat;
    filter: blur(var(--hero-blur, 0px)) saturate(1.08);
}
.hero-photo .hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background:
        linear-gradient(90deg,
            color-mix(in srgb, var(--hero-tint, #0C0D10) min(100%, calc(var(--hero-tint-alpha, 60%) + 18%)), transparent) 0%,
            color-mix(in srgb, var(--hero-tint, #0C0D10) var(--hero-tint-alpha, 60%), transparent) 50%,
            color-mix(in srgb, var(--hero-tint, #0C0D10) max(0%, calc(var(--hero-tint-alpha, 60%) - 30%)), transparent) 100%),
        linear-gradient(180deg, rgba(12, 13, 16, .4) 0%, transparent 28%, transparent 68%, rgba(12, 13, 16, .5) 100%);
}
@media (max-width: 719px) {
    /* On phones the text spans the whole width, so wash evenly */
    .hero-photo .hero::after {
        background:
            linear-gradient(180deg,
                color-mix(in srgb, var(--hero-tint, #0C0D10) min(100%, calc(var(--hero-tint-alpha, 60%) + 10%)), transparent) 0%,
                color-mix(in srgb, var(--hero-tint, #0C0D10) var(--hero-tint-alpha, 60%), transparent) 55%,
                color-mix(in srgb, var(--hero-tint, #0C0D10) min(100%, calc(var(--hero-tint-alpha, 60%) + 20%)), transparent) 100%);
    }
}
.hero-photo .hero__title { text-shadow: 0 2px 30px rgba(0, 0, 0, .35); }
.hero-photo .hero__tagline, .hero-photo .hero__meta { color: rgba(255, 255, 255, .88); text-shadow: 0 1px 12px rgba(0, 0, 0, .4); }
.hero-photo .hero__logo:not(.logo--clear) { box-shadow: 0 0 0 6px rgba(255, 255, 255, .14), 0 22px 50px -10px rgba(0, 0, 0, .7); }
.hero-photo .hero__inner { padding-top: 90px; padding-bottom: 56px; }

/* Top bar sits transparent on the hero, coloured to match it. The hero already shows the logo
   and name, so the bar's brand only fades in once the visitor scrolls past it (no duplicate). */
.topbar .brand { transition: opacity .25s ease, transform .25s ease; }
body:has(.hero) .topbar:not(.is-scrolled) .brand { opacity: 0; visibility: hidden; transform: translateY(-4px); }
body:has(.hero) .topbar:not(.is-scrolled) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
body:is(.hero-midnight, .hero-photo):has(.hero) .topbar:not(.is-scrolled) .brand__name { color: #fff; }
body:is(.hero-midnight, .hero-photo):has(.hero) .topbar:not(.is-scrolled) .icon-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); color: #fff; }
body.hero-brand:has(.hero) .topbar:not(.is-scrolled) .brand__name { color: var(--brand-ink); }
body.hero-brand:has(.hero) .topbar:not(.is-scrolled) .icon-btn { background: rgba(255,255,255,.18); border-color: rgba(0,0,0,.08); color: var(--brand-ink); }
.hero-brand .hero .btn--brand { background: var(--ink); color: #fff; }
.hero-brand .eyebrow--light, .hero-light .eyebrow--light { color: var(--hero-muted); }
.hero-brand .brand__mark { background: var(--ink); }

.hero__inner { padding-top: 40px; padding-bottom: 44px; }
.hero__copy { max-width: 720px; }
.hero__title {
    margin: 14px 0 10px;
    font-size: clamp(40px, 11vw, 84px); font-weight: 800; letter-spacing: -.045em; line-height: .95;
}
.hero__tagline { margin: 0; font-size: clamp(16px, 4.2vw, 20px); color: var(--hero-muted); max-width: 560px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 13px; color: var(--hero-muted); }
.hero__meta span { display: inline-flex; align-items: center; gap: 6px; }

.search {
    display: flex; align-items: center; gap: 10px;
    margin-top: 26px; padding: 6px 6px 6px 16px;
    background: #fff; color: var(--ink); border-radius: 999px;
    box-shadow: var(--shadow-lg); max-width: 560px;
}
.search .icon { color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 15px; background: transparent; height: 38px; }
.search input::-webkit-search-cancel-button { cursor: pointer; }

/* Hazard-tape marquee: the signature element */
.tape {
    position: relative; overflow: hidden;
    background: var(--brand); color: var(--brand-ink);
    font-family: var(--display); font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .02em;
    padding: 12px 0;
}
.tape::before, .tape::after {
    content: ""; position: absolute; left: 0; right: 0; height: 5px;
    background: repeating-linear-gradient(-45deg, var(--brand-ink) 0 10px, transparent 10px 20px);
}
.tape::before { top: 0; } .tape::after { bottom: 0; }
.tape__track { display: flex; width: max-content; animation: tape 40s linear infinite; }
.tape__group { display: flex; gap: 22px; padding-right: 22px; white-space: nowrap; }
.tape__group > span, .tape__group > a { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.tape__group > a { cursor: pointer; border-radius: 6px; }
.tape__group > a:hover, .tape__group > a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
.tape:hover .tape__track, .tape:focus-within .tape__track { animation-play-state: paused; }   /* stop to let people tap */
#products { scroll-margin-top: 130px; }   /* land below the sticky bar and category chips */
.tape__group i { display: inline-flex; align-items: center; font-style: normal; opacity: .55; }
@keyframes tape { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tape__track { animation: none; } }

/* ---------- Category chips ---------- */
.chips-bar { position: sticky; top: 64px; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--line); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; padding-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
    height: 36px; padding: 0 14px; border-radius: 999px;
    background: var(--card); border: 1px solid var(--line);
    font-size: 14px; font-weight: 500; white-space: nowrap;
    transition: all .15s;
}
.chip em { font-style: normal; font-size: 12px; color: var(--muted); }
.chip__icon { color: var(--muted); transition: color .15s; }
.chip:hover .chip__icon { color: var(--ink); }
.chip.is-active .chip__icon { color: var(--brand-on-dark); }
.cat-ico { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 18%, #fff); color: var(--ink); }
.chip:hover { border-color: var(--ink-3); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.is-active em { color: var(--brand-on-dark); }

/* ---------- Sections ---------- */
.section { padding: 28px 0 8px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section__title { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 700; }
.section__title .icon { color: var(--brand); fill: var(--brand); }

/* Featured rail */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; scrollbar-width: thin; }
.feature {
    scroll-snap-align: start;
    display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center;
    padding: 10px; border-radius: var(--radius);
    background: var(--ink); color: #fff;
    transition: transform .2s;
}
.feature:hover { transform: translateY(-2px); }
.feature__media { width: 96px; height: 96px; border-radius: 12px; overflow: hidden; background: #fff; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.feature__body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.feature__body strong { font-family: var(--display); font-size: 16px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.feature__price { color: var(--brand-on-dark); font-weight: 700; font-family: var(--display); }
.feature__price small { font-size: 11px; opacity: .8; }

/* ---------- Product grid & card ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }

.pcard {
    position: relative; display: flex; flex-direction: column;
    background: var(--card); border-radius: var(--radius);
    border: 1px solid var(--line); overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.pcard__media { position: relative; aspect-ratio: 1; background: #F1EEE7; overflow: hidden; }
.pcard__media img, .pcard__media video { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.pcard:hover .pcard__media img { transform: scale(1.04); }
.pcard__placeholder { display: grid; place-items: center; height: 100%; color: #C9C3B6; }
.pcard__flags { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pcard__out {
    position: absolute; inset: auto 0 0 0; padding: 6px;
    background: rgba(20, 22, 26, .78); color: #fff;
    text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.pcard.is-out .pcard__media img { filter: grayscale(.7); opacity: .85; }
.pcard__share {
    position: absolute; top: 8px; right: 8px;
    display: grid; place-items: center; width: 36px; height: 36px;
    border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    transition: transform .15s, background .15s;
}
.pcard__share:hover { transform: scale(1.08); background: var(--brand); color: var(--brand-ink); }
.pcard__body { display: flex; flex-direction: column; gap: 6px; padding: 12px; flex: 1; }
.pcard__cat { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.pcard__name { font-family: var(--body); font-size: 14px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.pcard__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-top: auto; padding-bottom: 6px; }
@media (min-width: 720px) { .pcard__body { padding: 16px; } .pcard__name { font-size: 15px; } }

.price { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.price small { font-size: .6em; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.price--ask { font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--wa-deep); }
.price--xl { font-size: clamp(32px, 8vw, 44px); }
.price--xl.price--ask { font-size: 24px; font-family: var(--display); }
.unit { font-size: 13px; color: var(--muted); }
.old { font-size: 12px; color: var(--muted); }

.flag {
    display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 6px;
    font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.flag--brand { background: var(--brand); color: var(--brand-ink); }
.feature .flag--brand, .flag--dark { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.feature .flag--brand { background: var(--brand-on-dark); color: var(--brand-on-dark-ink); }
.flag--dark { background: var(--ink); color: #fff; }

.empty { text-align: center; padding: 56px 16px; color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty h3 { color: var(--ink); margin: 12px 0 6px; font-size: 22px; }
.empty p { margin: 0 0 18px; }

.pager { display: flex; justify-content: center; gap: 6px; margin: 28px 0 8px; flex-wrap: wrap; }
.pager__btn { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); font-weight: 600; }
.pager__btn.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager__btn.is-disabled { opacity: .4; }

/* ---------- Product page ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; padding-top: 14px; padding-bottom: 14px; font-size: 14px; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; gap: 6px; }
.crumbs a:hover { color: var(--ink); }

.pdp { display: grid; gap: 22px; padding-bottom: 12px; }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; } .pdp__gallery { position: sticky; top: 84px; } }

.pdp__gallery { position: relative; }
.gallery {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    border-radius: 24px; background: #fff; border: 1px solid var(--line);
}
.gallery::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; margin: 0; aspect-ratio: 1; scroll-snap-align: center; }
.gallery__slide img { width: 100%; height: 100%; object-fit: contain; }
.gallery__slide--empty { display: grid; place-items: center; color: #C9C3B6; }
.gallery__slide--video { background: #000; }
.gallery__slide--video video { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumbs__btn--video { position: relative; background: #000; }
.thumbs__btn--video svg { position: absolute; inset: 0; margin: auto; color: #fff; filter: drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs__btn { width: 64px; height: 64px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: #fff; flex-shrink: 0; opacity: .6; }
.thumbs__btn img { width: 100%; height: 100%; object-fit: cover; }
.thumbs__btn.is-active { border-color: var(--ink); opacity: 1; }
.pdp__flags { position: absolute; top: 14px; left: 14px; display: flex; gap: 6px; }

.pdp__info { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.pdp__title { font-size: clamp(28px, 7vw, 44px); font-weight: 800; letter-spacing: -.035em; }
.pricebox {
    width: 100%; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px;
    padding: 18px 20px; border-radius: var(--radius);
    background: var(--card); border: 1px solid var(--line);
    position: relative; overflow: hidden;
}
.pricebox::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--brand); }
.pricebox__save { flex-basis: 100%; font-size: 13px; color: var(--muted); }
.pricebox__save s { margin-right: 6px; }

.stock { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.stock .dot { width: 9px; height: 9px; border-radius: 50%; }
.stock--in { color: var(--wa-deep); } .stock--in .dot { background: var(--wa); box-shadow: 0 0 0 4px rgba(37, 211, 102, .18); }
.stock--out { color: var(--danger); } .stock--out .dot { background: var(--danger); }

.share-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pdp__desc { width: 100%; padding-top: 6px; border-top: 1px solid var(--line); color: var(--ink-3); }
.pdp__desc h2 { font-size: 18px; margin: 12px 0 8px; color: var(--ink); }
.assure { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14px; color: var(--ink-3); width: 100%; }
.assure li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(20,22,26,.035); }
.assure .icon { color: var(--wa-deep); }

.buybar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform .25s ease;
}
.buybar.is-visible { transform: none; }
.buybar__price { display: flex; flex-direction: column; min-width: 0; }
.buybar__price small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar__price strong { font-family: var(--display); font-size: 18px; }
.buybar__price strong small { display: inline; font-size: 11px; }
@media (min-width: 900px) { .buybar { display: none; } }

/* ---------- Footer ---------- */
.footer { margin-top: 48px; background: var(--ink); color: rgba(255, 255, 255, .72); padding: 40px 0 calc(24px + env(safe-area-inset-bottom)); }
.has-buybar .footer { padding-bottom: 96px; }
.footer__grid { display: grid; gap: 28px; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.4fr 1fr; } }
.brand--footer .brand__name { color: #fff; }
.brand--footer .logo:not(.logo--clear) { box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }
.footer__about { max-width: 420px; margin: 14px 0 18px; font-size: 14px; }
.footer__contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 14px; }
.footer__contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer__contact .icon { color: var(--brand); margin-top: 1px; }
.socials { display: flex; gap: 8px; }
.socials a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #fff; transition: background .15s; }
.socials a:hover { background: var(--brand); color: var(--brand-ink); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12px; color: rgba(255, 255, 255, .45); }

.wa-float {
    position: fixed; right: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 44;
    display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
    background: var(--wa); color: #fff;
    box-shadow: 0 10px 30px -6px rgba(37, 211, 102, .7);
    transition: transform .2s, bottom .25s;
}
.wa-float::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); animation: ping 2.4s ease-out infinite; }
.wa-float:hover { transform: scale(1.06); }
@keyframes ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
@media (max-width: 899px) { .wa-float--raised { display: none; } }

.only-xs { display: none; }
@media (max-width: 479px) { .hide-xs { display: none; } .only-xs { display: inline; } }

/* ---------- Product video ---------- */
.flag--video { background: rgba(20, 22, 26, .78); color: #fff; display: inline-flex; align-items: center; gap: 3px; }
.pvideo { margin-top: 12px; border-radius: var(--radius, 18px); overflow: hidden; background: #000; }
.pvideo video { display: block; width: 100%; max-height: 70vh; background: #000; }
.pvideo--embed { position: relative; aspect-ratio: 16 / 9; }
.pvideo--embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pvideo-link { margin-top: 12px; }

/* ---------- Home page marketplace ---------- */
body.market { background: var(--paper); }
.mhead { position: sticky; top: 0; z-index: 40; background: #14161A; color: #fff; }
.mhead__row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 10px; padding-bottom: 10px; }
.mhead__brand .brand__name { color: #fff; font-size: 17px; }
.mhead__brand .brand__name small { font-family: Inter, sans-serif; font-weight: 600; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); margin-left: 4px; }
.mhead__search { flex: 1 1 320px; order: 0; margin: 0; max-width: 620px; height: 44px; }
.mhead__search input { font-size: 15px; }
.mhead__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.mhead__signin { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.mhead__signin:hover { background: #fff; color: var(--ink); }
.footer__signin { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.mhead__cart { position: relative; background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); color: #fff; }
.mhead__cart b { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--wa); color: #fff; font-size: 11px; display: grid; place-items: center; }
@media (max-width: 719px) {
    .mhead__search { order: 3; flex-basis: 100%; max-width: none; }
}
@media (max-width: 479px) {
    .mhead__brand .brand__name small { display: none; }   /* keeps name + cart + Sell on one line */
    .mhead__row { gap: 8px 10px; }
}
.mfilters { background: var(--card); border-bottom: 1px solid var(--line); padding: 6px 0; }
.mfilter { display: flex; align-items: center; gap: 10px; min-width: 0; padding-top: 4px; padding-bottom: 4px; }
.mfilter__label { flex: 0 0 auto; width: 84px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mfilter__chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; min-width: 0; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.mfilter__chips::-webkit-scrollbar { display: none; }
.mfilter__chips .chip { flex: 0 0 auto; }
.chip--shop { padding-left: 4px; }
.chip--shop .logo--sm { --h: 24px; --pad: 2px; --r: 999px; --max: 56px; }
.chip--shop .brand__mark { width: 24px; height: 24px; font-size: 12px; border-radius: 999px; }
@media (max-width: 479px) {
    .mfilter { flex-direction: column; align-items: stretch; gap: 4px; }
    .mfilter__label { width: auto; }
}
.mresults { padding-top: 18px; padding-bottom: 32px; }
.mresults__bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 14px; }
.mresults__title { font-size: clamp(20px, 4vw, 26px); margin: 0; }
.mresults__visit { align-self: center; }
.mcard__shop { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; min-width: 0; }
.mcard__shop span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard__shop .logo--sm { --h: 22px; --pad: 2px; --r: 6px; --max: 60px; }
.mcard__shop .brand__mark { width: 22px; height: 22px; font-size: 12px; border-radius: 6px; }
.mcard .pcard__price small { font-size: .7em; font-weight: 600; }
.market-sell { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; margin-top: 32px; padding: 22px; border-radius: 22px; background: var(--ink); color: #fff; }
.market-sell h2 { margin: 0 0 4px; font-size: 20px; }
.market-sell p { margin: 0; color: rgba(255, 255, 255, .7); }
.footer--market { padding: 18px 0; }

/* Filters: sector row + two pickers (scale to any number of categories and shops) */
.mfilter--sectors .mfilter__chips { padding: 2px 0; }
.mpick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 6px; padding-bottom: 6px; max-width: 640px; margin-left: 0; }
.mpick--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 900px; }
@media (max-width: 520px) { .mpick--3 { gap: 6px; } .mpick--3 .mpick__btn { padding: 7px 10px; gap: 6px; } .mpick--3 .mpick__ico, .mpick--3 .mpick__caret { display: none; } }
.mpick__btn { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 7px 12px 7px 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.mpick__btn:hover { border-color: var(--ink); }
.mpick__btn.is-set { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mpick__ico { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--paper); }
.mpick__ico .logo--sm { --h: 30px; --pad: 2px; --r: 8px; --max: 34px; }
.mpick__text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.mpick__text small { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.mpick__text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpick__caret { flex: 0 0 auto; transform: rotate(90deg); color: var(--muted); }
.mtags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -6px 0 14px; }
.mtag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; }
.mtag span { opacity: .7; font-size: 11px; }
.mtag:hover span { opacity: 1; }
.mpicker__panel { max-width: 520px; }
.mpicker__search { position: sticky; top: -18px; z-index: 1; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; margin: 0 0 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--muted); }
@media (min-width: 720px) { .mpicker__search { top: -24px; } }
.mpicker__search input { flex: 1; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); min-width: 0; }
.mpicker__popular { display: grid; gap: 8px; margin-bottom: 6px; }
.mpicker__label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.mpicker__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mpicker__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mpicker__item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; color: var(--ink); }
.mpicker__item:hover { background: var(--paper); }
.mpicker__item.is-active { background: var(--ink); color: #fff; }
.mpicker__item.is-active .mpicker__ico { background: rgba(255, 255, 255, .14); }
.mpicker__item.is-active em, .mpicker__item.is-active small { color: rgba(255, 255, 255, .7); }
.mpicker__item .mpicker__ico { width: 36px; height: 36px; }
.mpicker__logo { flex: 0 0 auto; display: grid; place-items: center; width: 36px; }
.mpicker__logo .logo--sm { --h: 36px; --pad: 3px; --r: 10px; --max: 44px; }
.mpicker__name { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; display: flex; flex-direction: column; line-height: 1.25; }
.mpicker__name small { font-weight: 500; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mpicker__item em { font-style: normal; font-size: 13px; color: var(--muted); font-weight: 600; }
.mpicker__none { color: var(--muted); text-align: center; padding: 16px 0; margin: 0; }

/* Multi-shop cart */
.mcart__note { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: #FFF4DC; color: #7A4B00; font-size: 13.5px; }
.mgroup { border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; margin-bottom: 10px; }
.mgroup__head { display: flex; align-items: center; gap: 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--line); }
.mgroup__logo img, .mgroup__logo .brand__mark { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; font-size: 15px; }
.mgroup__name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.mgroup__name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mgroup__name a { font-size: 12px; color: var(--muted); text-decoration: underline; }
.mgroup__total { font-weight: 700; white-space: nowrap; }
.mgroup--sent { background: #E9F8EF; border-color: #BFE8CF; font-size: 14px; }
.mgroup--sent p { margin: 0; }
.mgroup--sent a { color: var(--wa-deep, #128C4A); font-weight: 600; text-decoration: underline; }
.mgroup__tick { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--wa); color: #fff; font-size: 12px; margin-right: 4px; }
.mcart__h { margin: 4px 0 8px; font-size: 15px; }
.mcart__h small { font-weight: 500; color: var(--muted); }
.mcart__sends { display: grid; gap: 8px; }

/* Shop catalogs: the way to the marketplace, top-left */
.topbar__start { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mkt-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 600; color: var(--ink); }
.mkt-chip:hover { border-color: var(--ink); }
.mkt-chip__back { display: none; }
.mkt-chip.is-back .mkt-chip__back { display: inline; }
.mkt-chip.is-back .mkt-chip__grid { display: none; }
body:is(.hero-midnight, .hero-photo):has(.hero) .topbar:not(.is-scrolled) .mkt-chip { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }
body.hero-brand:has(.hero) .topbar:not(.is-scrolled) .mkt-chip { background: rgba(255, 255, 255, .2); border-color: rgba(0, 0, 0, .08); color: var(--brand-ink); }
@media (max-width: 479px) {
    .topbar.is-scrolled .mkt-chip span { display: none; }
    .topbar.is-scrolled .mkt-chip { width: 36px; padding: 0; justify-content: center; }
}

/* ---------- Share sheet (also used in admin) ---------- */
.sheet { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 720px) { .sheet { align-items: center; } }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(12, 13, 16, .6); backdrop-filter: blur(4px); animation: fade .2s ease; }
.sheet__panel {
    position: relative; width: 100%; max-width: 760px; max-height: 92vh; overflow: auto;
    background: var(--card); color: var(--ink);
    border-radius: 24px 24px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
    animation: rise .28s cubic-bezier(.2, .9, .3, 1.1);
}
@media (min-width: 720px) { .sheet__panel { border-radius: 24px; padding: 24px; } }
.sheet__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.sheet__title { font-size: 20px; margin-top: 4px; }
.sheet__body { display: grid; gap: 18px; }
@media (min-width: 720px) { .sheet__body { grid-template-columns: 240px 1fr; align-items: start; } }
.sheet__preview { position: relative; width: 160px; margin: 0 auto; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: var(--ink); box-shadow: var(--shadow-lg); }
@media (min-width: 720px) { .sheet__preview { width: 100%; } }
.sheet__preview img { width: 100%; height: 100%; object-fit: cover; }
.sheet__preview.is-post { aspect-ratio: 4 / 5; width: 200px; }
@media (min-width: 720px) { .sheet__preview.is-post { width: 100%; } }
.post-opts { display: grid; gap: 8px; margin-bottom: 4px; }
.post-seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); }
.post-seg button { padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-weight: 600; font-size: 14px; color: var(--muted); cursor: pointer; }
.post-seg button small { font-weight: 500; opacity: .7; margin-left: 2px; }
.post-seg button.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 22, 26, .12); }
.post-styles { display: flex; flex-wrap: wrap; gap: 6px; }
/* Share sheet: which photo / the video */
.post-media { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; }
.post-media button { flex: 0 0 auto; position: relative; width: 58px; height: 58px; padding: 0; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--ink); cursor: pointer; }
.post-media button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-media button.is-on { border-color: var(--ink); box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.post-media__video { display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; gap: 2px; align-content: center; }
.sheet__preview video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
#shareSheet.is-video .post-opts, #shareSheet.is-plain .post-seg { display: none; }
.post-styles button { font: inherit; cursor: pointer; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 600; color: var(--ink); }
.post-styles button:hover { border-color: var(--ink); }
.post-styles button.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.sheet__loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: rgba(255,255,255,.75); font-size: 12px; text-align: center; padding: 12px; }
.sheet.is-ready .sheet__loading { display: none; }
.sheet__actions { display: grid; gap: 8px; }
.share-opt {
    display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
    padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card);
    transition: border-color .15s, background .15s;
}
.share-opt:hover { border-color: var(--ink); }
.share-opt strong { display: block; font-size: 15px; }
.share-opt small { display: block; color: var(--muted); font-size: 12.5px; }
.share-opt__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--paper); flex-shrink: 0; }
.share-opt__icon--wa { background: rgba(37, 211, 102, .14); color: var(--wa-deep); }
.share-opt--primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.share-opt--primary small { color: rgba(255, 255, 255, .6); }
.share-opt--primary .share-opt__icon { background: var(--brand); color: var(--brand-ink); }
.share-opt--primary:hover { border-color: var(--brand); }
.share-opt:disabled { opacity: .5; cursor: progress; }
/* Post on the shop's own Instagram / TikTok / Facebook */
.share-nets { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.share-net { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 0; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.share-net strong { display: block; font-size: 14.5px; }
.share-net small { display: block; font-size: 11.5px; opacity: .85; }
.share-net--instagram { background: linear-gradient(45deg, #F58529, #DD2A7B 45%, #8134AF 75%, #515BD4); }
.share-net--tiktok { background: #111; box-shadow: inset 3px 0 0 #25F4EE, inset -3px 0 0 #FE2C55; }
.share-net--facebook { background: #1877F2; }
.share-net:disabled { opacity: .5; cursor: progress; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.25); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }

.toast {
    position: fixed; left: 50%; bottom: 90px; z-index: 120;
    transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff;
    font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg);
    transition: all .25s ease; max-width: calc(100% - 32px); text-align: center;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ==========================================================================
   Basket
   ========================================================================== */
.btn--add { background: var(--ink); color: #fff; }
.btn--add:hover { background: var(--ink-2); }
.btn--add.is-in { background: color-mix(in srgb, var(--wa) 16%, #fff); color: var(--wa-deep); box-shadow: inset 0 0 0 1.5px var(--wa); }

.qty { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.qty button { width: 34px; height: 34px; border: 0; background: transparent; font-size: 18px; font-weight: 700; color: var(--ink); }
.qty button:hover { background: var(--paper); }
.qty input { width: 44px; height: 34px; border: 0; text-align: center; font: inherit; font-weight: 700; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--lg button { width: 46px; height: 56px; font-size: 22px; }
.qty--lg input { width: 54px; height: 56px; font-size: 17px; }
.addrow { display: flex; gap: 10px; width: 100%; }
.addrow .btn { flex: 1; }

/* Floating bar */
.basketbar {
    position: fixed; z-index: 46; left: 50%; transform: translateX(-50%);
    bottom: calc(16px + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: 12px; width: min(520px, calc(100% - 24px));
    padding: 8px 8px 8px 10px; border: 0; border-radius: 18px; text-align: left;
    background: var(--ink); color: #fff; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .55);
    animation: rise .3s cubic-bezier(.2, .9, .3, 1.1);
}
.basketbar__icon { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .1); }
.basketbar__icon b { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--wa); color: #fff; font-size: 12px; display: grid; place-items: center; }
.basketbar__text { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.basketbar__text small { font-size: 12px; color: rgba(255, 255, 255, .6); }
.basketbar__text strong { font-family: var(--display); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.basketbar__cta { display: inline-flex; align-items: center; gap: 4px; padding: 11px 14px; border-radius: 12px; background: var(--wa); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }
.has-basket .wa-float { bottom: calc(92px + env(safe-area-inset-bottom)); }
.has-basket .footer { padding-bottom: 110px; }
/* Product page: the bar sits above the sticky buy bar */
.has-buybar.has-basket .basketbar { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .has-buybar.has-basket .basketbar { bottom: calc(16px + env(safe-area-inset-bottom)); } }

/* Sheet */
.basket .basket__panel { max-width: 560px; display: flex; flex-direction: column; }
.blist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.bitem { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bitem__img { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: #F1EEE7; }
.bitem__img img { width: 100%; height: 100%; object-fit: cover; }
.bitem__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.bitem__name { font-weight: 600; font-size: 14.5px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bitem__main small { color: var(--muted); font-size: 12.5px; }
.bitem .qty { align-self: flex-start; }
.bitem .qty button { width: 30px; height: 30px; font-size: 16px; }
.bitem .qty input { width: 40px; height: 30px; font-size: 14px; }
.bitem__end { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.bitem__end strong { font-family: var(--display); font-size: 15px; white-space: nowrap; }
.bitem__rm { border: 0; background: none; padding: 0; color: var(--muted); font-size: 12.5px; text-decoration: underline; }
.bitem__rm:hover { color: var(--danger); }
.basket__empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.basket__empty p { margin: 10px 0 0; }
.bsum { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding: 14px 0; }
.bsum span { font-weight: 600; }
.bsum strong { font-family: var(--display); font-size: 24px; }
.bsum small { flex-basis: 100%; text-align: right; color: var(--muted); font-size: 12.5px; }
.bform { display: grid; gap: 12px; padding-top: 4px; }
.bfield { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-3); min-width: 0; }
.bfield em { font-style: normal; font-weight: 400; color: var(--muted); }
.bfield input { height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: #FCFBF9; font: inherit; font-size: 15px; color: var(--ink); }
.bfield input:focus { outline: 0; border-color: var(--ink); background: #fff; }
.bfield-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .bfield-row { grid-template-columns: 1fr; } }
.bform__error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #FDECEC; color: #9B2C2C; font-size: 14px; }
.bform .hint { font-size: 12.5px; color: var(--muted); margin: 0; }
.center { text-align: center; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: #EFECE6; gap: 2px; }
.seg label { position: relative; flex: 1; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg input:checked + span { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.seg--full { display: flex; }
.bdone { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 10px 0; }
.bdone__tick { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: var(--wa); color: #fff; box-shadow: 0 0 0 10px rgba(37, 211, 102, .15); }
.bdone h4 { margin: 6px 0 0; font-family: var(--display); font-size: 22px; }
.bdone p { margin: 0; color: var(--muted); }
