/* Layout: sun-lit retail floor — sticky header, motto marquee, split hero scene, shade rail, product grid, drawers. */
:root {
  --paper: #FFFAE8;
  --surface: #FFFFFF;
  --ink: #241D0C;
  --muted: #6E6345;
  --line: #EEDFAE;
  --sun: #FFD23F;
  --sun-deep: #F2A900;
  --rain: #4E6D8C;
  --rain-soft: #DCE6EF;
  --on-sun: #241D0C;
  --art-bg: #FFF6D2;
  --danger: #B3261E;
  --ok: #2F7A4A;
  --shadow: 0 1px 0 rgba(36, 29, 12, .06), 0 14px 30px -18px rgba(120, 84, 0, .35);
  --font-display: "Bagel Fat One", "Cooper Black", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15120A; --surface: #211C10; --ink: #FFF3CC; --muted: #BDAF86; --line: #3B331F;
    --sun: #FFD23F; --sun-deep: #FFC21A; --rain: #93B4D3; --rain-soft: #1E2733;
    --art-bg: #FFF1C2; --danger: #FF8A80; --ok: #7FD39B;
    --shadow: 0 1px 0 rgba(0,0,0,.4), 0 16px 34px -18px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #15120A; --surface: #211C10; --ink: #FFF3CC; --muted: #BDAF86; --line: #3B331F;
  --sun: #FFD23F; --sun-deep: #FFC21A; --rain: #93B4D3; --rain-soft: #1E2733;
  --art-bg: #FFF1C2; --danger: #FF8A80; --ok: #7FD39B;
  --shadow: 0 1px 0 rgba(0,0,0,.4), 0 16px 34px -18px rgba(0,0,0,.8);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--sun-deep); outline-offset: 3px; border-radius: 8px; }
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .wrap { padding-inline: 32px; } }
.muted { color: var(--muted); }
.price, .hex, .stat-num, .chip-count, .totals dd { font-variant-numeric: tabular-nums; }
.hex { font-family: var(--font-mono); font-size: .72em; color: var(--muted); letter-spacing: .02em; }
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--sun-deep); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--sun); color: var(--on-sun); padding: 8px 14px; border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn-sun, .btn-ghost, .btn-bag {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 46px; padding: 0 1.3rem; border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-sun { background: var(--sun); color: var(--on-sun); box-shadow: 0 4px 0 var(--sun-deep); }
.btn-sun:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--sun-deep); }
.btn-sun:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sun-deep); }
.btn-ghost { border: 2px solid var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-danger { border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--paper); }
.link-btn { font-size: .85rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--muted); }
.link-btn:hover { color: var(--ink); }

/* ---------- Header & brand ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; flex-shrink: 0; }
.brand-sun { width: 46px; height: 46px; overflow: visible; }
.brand-rays { transform-origin: 32px 32px; animation: spin 18s linear infinite; }
.brand-rays path, .scene-rays path { stroke: var(--sun-deep); stroke-width: 4; stroke-linecap: round; fill: none; }
.brand-core { fill: var(--sun); stroke: var(--on-sun); stroke-width: 2.5; }
.brand-face { stroke: var(--on-sun); stroke-width: 2.5; stroke-linecap: round; }
.brand-eye { fill: var(--on-sun); stroke: none; transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.brand:hover .brand-sun { animation: wobble .6s ease; }
.brand-word { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: .01em; }
.brand-name .amp { color: var(--sun-deep); }
.brand-tag { font-size: .68rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.header-nav { display: none; gap: .25rem; margin-left: 1.25rem; }
@media (min-width: 1024px) { .header-nav { display: flex; } }
.nav-link { padding: .45rem .75rem; border-radius: 999px; font-weight: 600; font-size: .92rem; transition: background .15s; }
.nav-link:hover { background: color-mix(in srgb, var(--sun) 35%, transparent); }
.icon-btn, .bag-btn { display: inline-flex; align-items: center; gap: .45rem; height: 44px; border-radius: 999px; font-weight: 700; }
.icon-btn { width: 44px; justify-content: center; border: 2px solid var(--line); }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn svg, .bag-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bag-btn { padding: 0 .65rem 0 1rem; background: var(--ink); color: var(--paper); }
.bag-count {
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: var(--sun); color: var(--on-sun); font-size: .82rem; font-variant-numeric: tabular-nums;
}
.bag-count.is-bumping { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; background: var(--sun); color: var(--on-sun); border-bottom: 2px solid var(--on-sun); }
.marquee-track { display: flex; width: max-content; align-items: center; gap: 1.5rem; padding: .6rem 0; animation: marquee 38s linear infinite; }
.marquee-track span { font-family: var(--font-display); font-size: 1.05rem; white-space: nowrap; letter-spacing: .02em; }
.marquee-track i { width: 14px; height: 14px; border-radius: 50%; background: var(--on-sun); box-shadow: 0 0 0 4px var(--sun), 0 0 0 6px var(--on-sun); flex-shrink: 0; }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---------- Hero ---------- */
.hero { display: grid; gap: 2rem; align-items: center; padding-block: 2.5rem 3rem; }
@media (min-width: 900px) { .hero { grid-template-columns: 1.1fr .9fr; padding-block: 4rem 4.5rem; } }
.hero-copy { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.hero-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.8rem, 7.5vw, 5.6rem); line-height: .95; letter-spacing: -.01em; }
.hl { position: relative; display: inline-block; z-index: 0; }
.hl::after {
  content: ""; position: absolute; left: -4%; right: -4%; bottom: .08em; height: .42em; z-index: -1;
  background: var(--sun); border-radius: .2em; transform-origin: left; animation: swipe 1s .3s cubic-bezier(.6, 0, .2, 1) both;
}
.hl-2::after { animation-delay: .6s; background: var(--sun-deep); opacity: .75; }
.hero-lede { font-size: 1.15rem; max-width: 34rem; }
.hero-rain { display: flex; gap: .6rem; align-items: flex-start; max-width: 32rem; font-weight: 600; color: var(--rain); }
.hero-rain svg { width: 22px; height: 22px; flex-shrink: 0; fill: var(--rain); margin-top: 2px; }

.hero-scene {
  position: relative; width: 100%; max-width: 480px; aspect-ratio: 1 / 1; justify-self: center;
  border-radius: 40% 40% 28px 28px; overflow: hidden;
  background: radial-gradient(circle at 70% 25%, color-mix(in srgb, var(--sun) 55%, var(--paper)) 0%, color-mix(in srgb, var(--sun) 18%, var(--paper)) 45%, var(--rain-soft) 100%);
  border: 2px solid var(--line);
}
.scene-sun { position: absolute; width: 58%; right: 4%; top: 4%; overflow: visible; }
.scene-rays { transform-origin: 100px 100px; animation: spin 30s linear infinite; }
.scene-rays path { stroke-width: 9; }
.scene-rays .ray-short { stroke-width: 6; stroke: var(--sun); }
.scene-core { fill: var(--sun); stroke: var(--on-sun); stroke-width: 4; }
.scene-face { stroke: var(--on-sun); stroke-width: 5; stroke-linecap: round; }
.cheek { fill: #FF9E7A; stroke: none; opacity: .55; }
.scene-cloud { position: absolute; left: 2%; top: 30%; width: 50%; animation: drift 9s ease-in-out infinite alternate; }
.scene-cloud svg path { fill: var(--surface); stroke: var(--rain); stroke-width: 3; }
.drops { position: absolute; left: 12%; right: 12%; top: 78%; height: 150px; }
.drops span {
  position: absolute; left: var(--x); top: 0; width: 6px; height: 14px; border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
  background: var(--rain); opacity: 0; animation: rain 1.6s var(--d) linear infinite;
}
.scene-plant { position: absolute; bottom: 12%; left: 24%; width: 30%; overflow: visible; }
.plant-sway { transform-origin: 60px 140px; animation: sway 4s ease-in-out infinite; }
.stem { stroke: #4F8A3A; stroke-width: 6; stroke-linecap: round; fill: none; }
.leaf { fill: #6FAE4F; stroke: #3E6E2D; stroke-width: 2.5; }
.petal-ring { fill: var(--sun); stroke: var(--on-sun); stroke-width: 3; stroke-dasharray: 10 6; }
.bloom { transform-origin: 60px 40px; animation: bloom 4s ease-in-out infinite; }
.bloom-center { fill: #7A4B1A; }
.scene-ground { position: absolute; left: -10%; right: -10%; bottom: -30%; height: 46%; border-radius: 50%; background: #8DBF5F; border-top: 3px solid #4F8A3A; }
.scene-caption { position: absolute; right: 6%; bottom: 5%; font-family: var(--font-display); font-size: 1rem; color: #23380F; }

/* ---------- Section heads ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1.5rem; margin-bottom: 1.25rem; }
.section-head p { max-width: 36rem; }
.section-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.05; }

/* ---------- Shade rail ---------- */
.shades { padding-block: 1rem 2.5rem; }
.shade-scroller { overflow-x: auto; margin-inline: -16px; padding: 4px 16px 10px; scrollbar-width: thin; }
.shade-list { display: flex; gap: .75rem; width: max-content; }
.shade-chip {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .65rem; align-items: center; text-align: left;
  padding: .55rem 1rem .55rem .55rem; border-radius: 16px; background: var(--surface); border: 2px solid var(--line);
  transition: transform .2s, border-color .2s;
}
.shade-chip:hover { transform: translateY(-3px) rotate(-1deg); border-color: var(--shade); }
.shade-chip.is-active { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); }
.shade-dot { grid-row: span 2; width: 38px; height: 38px; border-radius: 12px; background: var(--shade); border: 2px solid rgba(36, 29, 12, .25); }
.shade-name { font-weight: 700; font-size: .92rem; white-space: nowrap; }

/* ---------- Toolbar ---------- */
.shop { padding-block: 1rem 3rem; }
.toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; min-width: 0; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .55rem .45rem .95rem; border-radius: 999px;
  border: 2px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; transition: border-color .15s, background .15s;
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip-count { font-size: .72rem; min-width: 22px; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--sun) 45%, transparent); }
.chip.is-active .chip-count { background: var(--sun); color: var(--on-sun); }
.toolbar-right { display: flex; flex-wrap: wrap; gap: .5rem; flex: 1 1 280px; justify-content: flex-end; }
.search, .sort { display: flex; align-items: center; height: 44px; border-radius: 999px; border: 2px solid var(--line); background: var(--surface); }
.search { flex: 1 1 180px; max-width: 300px; padding-left: .85rem; gap: .4rem; }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; flex-shrink: 0; }
.search input { border: 0; background: transparent; outline: none; width: 100%; min-width: 0; height: 100%; padding-right: 1rem; }
.search:focus-within, .sort:focus-within { border-color: var(--ink); }
.sort select { border: 0; background: transparent; height: 100%; padding: 0 1rem; outline: none; font-weight: 600; cursor: pointer; }
.active-shade { margin-bottom: 1rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.active-shade[hidden] { display: none; }

/* ---------- Product grid & cards ---------- */
.product-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.product-card {
  display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s;
  animation: rise .55s both;
}
.product-card:hover { transform: translateY(-6px); }
.product-card:nth-child(4n+2) { animation-delay: .05s; }
.product-card:nth-child(4n+3) { animation-delay: .1s; }
.product-card:nth-child(4n+4) { animation-delay: .15s; }
.product-art {
  --shade: #FFD23F; position: relative; aspect-ratio: 5 / 4; max-width: 100%; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--shade) 65%, #FFFFFF) 0 34%, transparent 35%),
    repeating-conic-gradient(from 0deg at 50% 60%, color-mix(in srgb, var(--shade) 28%, var(--art-bg)) 0 8deg, var(--art-bg) 8deg 16deg);
  color: #241D0C;
}
.product-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.product-card:hover .product-art img { transform: scale(1.06) rotate(-1.5deg); }
.product-svg { width: 52%; height: auto; fill: var(--shade); stroke: #241D0C; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; overflow: visible; transition: transform .4s cubic-bezier(.3, 1.5, .5, 1); filter: drop-shadow(0 6px 0 rgba(36, 29, 12, .12)); }
.product-card:hover .product-svg { transform: translateY(-6px) rotate(-4deg) scale(1.06); }
.product-card:hover .fan-blades { transform-box: fill-box; transform-origin: center; animation: spin .6s linear infinite; }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 1; padding: .2rem .65rem; border-radius: 999px;
  background: #241D0C; color: #FFF3CC; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.badge-sale { background: #C2410C; color: #FFFFFF; }
.product-body { display: flex; flex-direction: column; gap: .45rem; padding: 1rem 1.1rem 1.15rem; flex: 1; min-width: 0; }
.shade-tag { display: flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; color: var(--muted); }
.swatch { width: 12px; height: 12px; border-radius: 4px; background: var(--shade); border: 1px solid rgba(36, 29, 12, .3); flex-shrink: 0; }
.product-name { font-size: 1.12rem; font-weight: 800; line-height: 1.25; }
.product-desc { font-size: .9rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-meta { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: auto; padding-top: .35rem; }
.price { font-weight: 800; font-size: 1.12rem; }
.price s { font-weight: 500; font-size: .85rem; color: var(--muted); margin-left: .2rem; }
.rating { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.stars { --pct: 100%; position: relative; display: inline-block; font-size: .85rem; letter-spacing: 1px; line-height: 1; }
.stars::before { content: "★★★★★"; color: var(--line); }
.stars::after { content: "★★★★★"; position: absolute; left: 0; top: 0; width: var(--pct); overflow: hidden; color: var(--sun-deep); }
.low-stock { font-size: .8rem; font-weight: 700; color: #C2410C; }
.product-actions { display: grid; grid-template-columns: auto 1fr; gap: .5rem; padding-top: .5rem; }
.btn-bag { min-height: 44px; padding: 0 1rem; border: 2px solid var(--ink); font-size: .9rem; }
.btn-bag:hover { background: var(--ink); color: var(--paper); }

/* ---------- Smile button (click smile to buy) ---------- */
.smile-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 44px; padding: 0 1rem 0 .4rem;
  border-radius: 999px; background: var(--sun); color: var(--on-sun); font-weight: 800; font-size: .92rem;
  box-shadow: 0 3px 0 var(--sun-deep); transition: transform .15s, box-shadow .15s; position: relative;
}
.smile-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--sun-deep); }
.smile-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--sun-deep); }
.smile-btn-wide { width: 100%; min-height: 54px; font-size: 1.02rem; }
.smile-face { width: 34px; height: 34px; flex-shrink: 0; }
.smile-bg { fill: #FFF6C9; stroke: var(--on-sun); stroke-width: 2.5; }
.smile-eye { fill: var(--on-sun); transform-box: fill-box; transform-origin: center; transition: transform .2s; }
.smile-mouth { fill: none; stroke: var(--on-sun); stroke-width: 2.8; stroke-linecap: round; transform-box: fill-box; transform-origin: top center; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), fill .2s; }
.smile-btn:hover .smile-mouth, .smile-btn:focus-visible .smile-mouth { transform: scale(1.25, 1.7); }
.smile-btn:hover .smile-eye { transform: scaleY(.6); }
.smile-btn.is-beaming .smile-face { animation: beam .42s cubic-bezier(.3, 1.6, .5, 1); }
.smile-btn.is-beaming .smile-mouth { transform: scale(1.4, 2.2); fill: #C2410C; }
.joy-dot {
  position: fixed; z-index: 90; width: var(--size); height: var(--size); margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  border-radius: 50%; background: var(--sun); border: 2px solid var(--on-sun); pointer-events: none;
  animation: burst .75s cubic-bezier(.2, .8, .3, 1) forwards;
}

/* ---------- Coming soon (inStock: false) ---------- */
.product-card { cursor: pointer; }
.name-btn { text-align: left; font-weight: inherit; line-height: inherit; }
.name-btn:hover { text-decoration: underline; text-decoration-color: var(--sun-deep); text-decoration-thickness: 3px; text-underline-offset: 4px; }
.badge-soon { background: #2F4A66; color: #FFE45C; }
.product-card.is-soon .product-art img, .product-card.is-soon .product-art .product-svg { filter: saturate(.85); }
.product-actions.is-single { grid-template-columns: 1fr; }
.smile-btn-soon { background: transparent; color: var(--ink); box-shadow: none; border: 2px dashed var(--sun-deep); }
.smile-btn-soon:hover { box-shadow: none; background: color-mix(in srgb, var(--sun) 25%, transparent); }
.smile-btn-soon .smile-bg { fill: var(--sun); }

.item-card { position: relative; width: min(860px, 100%); }
.item-close { position: absolute; right: 14px; top: 14px; z-index: 2; background: var(--paper); }
.item-grid { display: grid; gap: 1.5rem; align-items: center; }
@media (min-width: 720px) { .item-grid { grid-template-columns: 1fr 1fr; } }
.item-art { border-radius: 20px; border: 2px solid var(--line); }
.item-art .product-svg { width: 58%; }
.item-info { display: flex; flex-direction: column; gap: .75rem; min-width: 0; }
.item-name { font-size: 1.35rem; font-weight: 800; line-height: 1.2; }
.soon-label {
  font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 3.4rem); line-height: .95; color: var(--sun-deep);
  animation: soon-pulse 2.4s ease-in-out infinite;
}
.soon-note { padding: .75rem .9rem; border-radius: 12px; background: color-mix(in srgb, var(--rain) 14%, transparent); color: var(--ink); font-weight: 600; }
.item-actions { display: flex; flex-wrap: wrap; gap: .6rem; padding-top: .25rem; }
.soon-stamp {
  position: absolute; right: 8%; top: 10%; padding: .5rem .9rem; border: 4px solid #2F4A66; border-radius: 12px;
  color: #2F4A66; background: rgba(255, 251, 234, .85); font-family: var(--font-display); font-size: 1.25rem; line-height: 1; text-align: center;
  transform: rotate(12deg); animation: stamp .55s .15s cubic-bezier(.2, 1.5, .4, 1) both;
}
@keyframes soon-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes stamp { from { transform: rotate(12deg) scale(2.2); opacity: 0; } to { transform: rotate(12deg) scale(1); opacity: 1; } }

/* ---------- Rainy banner ---------- */
.rain-banner {
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  margin-block: 1rem 3rem; padding: 2rem clamp(1.25rem, 4vw, 3rem); border-radius: 28px;
  background: #2F4A66; color: #F4F8FC; border: 2px solid #1D3148;
}
.rain-streaks {
  position: absolute; inset: -50% 0 0 0; opacity: .35; pointer-events: none;
  background: repeating-linear-gradient(105deg, transparent 0 22px, rgba(255, 255, 255, .55) 22px 24px, transparent 24px 60px);
  animation: streak 1.2s linear infinite;
}
.rain-banner-copy { position: relative; display: flex; flex-direction: column; gap: .5rem; max-width: 40rem; min-width: 0; }
.rain-banner .eyebrow { color: #FFD23F; }
.rain-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.05; color: #FFD23F; }
.rain-banner .btn-sun { position: relative; --on-sun: #241D0C; }

/* ---------- Promises ---------- */
.promises { display: grid; gap: 1.5rem; padding-block: 0 3.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.promises > div { padding-top: 1rem; border-top: 3px solid var(--sun); display: flex; flex-direction: column; gap: .3rem; }
.promises h3 { font-size: 1.1rem; font-weight: 800; }
.promises p { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); padding-block: 3rem; }
.footer-inner { display: flex; flex-direction: column; gap: .75rem; }
.footer-inner p { max-width: 40rem; }
.footer-motto { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1; color: var(--sun); }
.site-footer .muted { color: color-mix(in srgb, var(--paper) 65%, var(--ink)); }

/* ---------- Empty / errors ---------- */
.empty-state { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; padding: 2.5rem 0; }
.empty-state[hidden] { display: none; }
.empty-title { font-family: var(--font-display); font-size: 1.6rem; }
.load-error { grid-column: 1 / -1; padding: 1.5rem; border-radius: var(--radius); border: 2px dashed var(--danger); }

/* ---------- Overlays ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(20, 15, 4, .55); animation: fade .25s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 70; width: min(440px, 100%);
  display: flex; flex-direction: column; background: var(--paper); border-left: 2px solid var(--ink);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  animation: slide-in .35s cubic-bezier(.2, .8, .2, 1);
}
.drawer[hidden], .modal[hidden], .scrim[hidden] { display: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1.25rem 1.25rem 1rem; border-bottom: 1px solid var(--line); }
.drawer-title { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; line-height: 1.1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.drawer-foot { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 1rem; }
.drawer-foot:empty { display: none; }
.close-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--line); font-size: 1.5rem; line-height: 1; flex-shrink: 0; display: grid; place-items: center; }
.close-btn:hover { border-color: var(--ink); }

.ship-meter { display: flex; flex-direction: column; gap: .4rem; font-size: .88rem; font-weight: 600; margin-bottom: 1rem; }
.ship-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ship-bar span { display: block; height: 100%; background: var(--sun-deep); border-radius: inherit; transition: width .4s ease; }
.cart-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.cart-line { display: grid; grid-template-columns: 76px 1fr auto; gap: .85rem; align-items: start; }
.cart-thumb { width: 76px; aspect-ratio: 1; border-radius: 14px; }
.cart-thumb .product-svg { width: 62%; }
.cart-info { min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.cart-name { font-weight: 700; line-height: 1.25; }
.cart-right { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.cart-right .price { font-size: 1rem; }
.qty { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; width: max-content; margin-top: .2rem; }
.qty button { width: 32px; height: 30px; font-weight: 800; font-size: 1.05rem; }
.qty button:hover { color: var(--sun-deep); }
.qty span { min-width: 22px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .6rem; padding: 2.5rem 1rem; }
.cart-empty .product-svg, .toast .product-svg, .spinner-sun .product-svg { fill: var(--sun); stroke: var(--on-sun); }
.cart-empty .product-svg { width: 90px; animation: spin 14s linear infinite; }
.cart-empty-title { font-family: var(--font-display); font-size: 1.35rem; }

.totals { margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.totals div { display: flex; justify-content: space-between; gap: 1rem; font-size: .94rem; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; font-weight: 600; }
.totals-grand { padding-top: .5rem; margin-top: .25rem; border-top: 2px dashed var(--line); }
.totals-grand dt, .totals-grand dd { color: var(--ink); font-weight: 800; font-size: 1.12rem; }

/* Modal / checkout */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.modal-card {
  pointer-events: auto; width: min(920px, 100%); max-height: calc(100% - 8px); overflow-y: auto;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 26px; padding: clamp(1.1rem, 3vw, 2rem);
  box-shadow: 0 8px 0 var(--sun-deep); animation: pop-in .4s cubic-bezier(.2, 1.3, .4, 1);
}
.co-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .25rem 1rem; margin-bottom: 1.25rem; position: relative; padding-right: 3rem; }
.co-head .eyebrow { width: 100%; }
.co-head .close-btn { position: absolute; right: 0; top: 0; }
.co-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.05; }
.co-grid { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .co-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.co-form { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.co-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.co-form legend { font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .55rem; padding: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.field { display: flex; flex-direction: column; gap: .25rem; font-size: .85rem; font-weight: 600; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field input { height: 46px; padding: 0 .9rem; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); width: 100%; font-weight: 500; font-size: 1rem; }
.field input:focus { outline: none; border-color: var(--ink); }
.field.has-error input { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .8rem; font-weight: 600; }
.demo-note { margin-top: .6rem; font-size: .8rem; color: var(--muted); padding: .6rem .8rem; border-radius: 10px; background: color-mix(in srgb, var(--sun) 18%, transparent); }
.form-error { color: var(--danger); font-weight: 700; padding: .7rem .9rem; border: 2px solid var(--danger); border-radius: 12px; }
.co-summary { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem; display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.co-summary ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.co-summary li { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; font-variant-numeric: tabular-nums; }
.co-summary li span:first-child { min-width: 0; }
.co-processing, .co-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .75rem; padding: 2rem 1rem; }
.spinner-sun .product-svg { width: 110px; animation: spin 1.6s linear infinite; }
.co-big { font-family: var(--font-display); font-size: 1.6rem; }
.grin .smile-face { width: 120px; height: 120px; animation: beam .7s cubic-bezier(.3, 1.6, .5, 1); }
.grin .smile-bg { fill: var(--sun); }
.grin .smile-mouth { transform: scale(1.35, 2); fill: #C2410C; }
.co-done .muted { max-width: 30rem; }
.co-motto { font-weight: 700; color: var(--rain); }
.co-done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: .5rem; }

/* Ledger */
.ledger-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-bottom: 1.25rem; }
.ledger-stats > div { background: var(--sun); color: var(--on-sun); border-radius: 14px; padding: .75rem; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.stat-num { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.1; overflow-wrap: anywhere; }
.stat-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.ledger-list { list-style: none; margin: 0 0 1.25rem; padding: 0; display: flex; flex-direction: column; }
.ledger-list li { padding: .85rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .2rem; }
.ledger-row { display: flex; justify-content: space-between; gap: 1rem; font-family: var(--font-mono); font-size: .92rem; }
.ledger-list .muted { font-size: .82rem; }
.ledger-items { font-size: .88rem; }
.ledger-empty { padding: 1rem 0; }

/* Toasts */
.toasts { position: fixed; z-index: 95; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; align-items: center; width: max-content; max-width: calc(100% - 32px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: .6rem; padding: .65rem 1.1rem .65rem .7rem; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 600; font-size: .92rem; box-shadow: var(--shadow); animation: toast-in .35s cubic-bezier(.2, 1.3, .4, 1); transition: opacity .35s, transform .35s; }
.toast .product-svg { width: 26px; flex-shrink: 0; animation: spin 3s linear infinite; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }

/* ---------- Keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-14deg) scale(1.08); } 65% { transform: rotate(10deg); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes swipe { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes drift { from { transform: translateX(-4%); } to { transform: translateX(10%); } }
@keyframes rain { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 85% { opacity: .9; } 100% { transform: translateY(130px); opacity: 0; } }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@keyframes bloom { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(20deg) scale(1.06); } }
@keyframes rise { from { transform: translateY(14px); } to { transform: translateY(0); } }
@keyframes beam { 0% { transform: scale(1) rotate(0); } 50% { transform: scale(1.35) rotate(-12deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes burst { 0% { transform: translate(0, 0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
@keyframes streak { from { transform: translateY(0); } to { transform: translateY(60px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes slide-in { from { transform: translateX(100%); } }
@keyframes pop-in { from { transform: translateY(20px) scale(.96); opacity: 0; } }
@keyframes toast-in { from { transform: translateY(14px) scale(.9); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .drops span { display: none; }
}

/* =====================================================================
   Header layout (no Tailwind dependency) + mobile menu
   ===================================================================== */
.header-row { display: flex; align-items: center; gap: .75rem; padding-block: .6rem; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: .75rem; padding-top: .5rem; }
.text-sm { font-size: .875rem; }
@media (min-width: 768px) { .header-row { gap: 1rem; padding-block: .75rem; } }

.menu-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 14px; border: 2px solid var(--line); background: var(--surface);
}
.menu-btn:hover { border-color: var(--ink); }
.menu-bars { display: flex; flex-direction: column; gap: 4px; width: 20px; }
.menu-bars i { display: block; height: 2.5px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s, width .25s; }
.menu-bars i:nth-child(2) { width: 70%; }
.menu-btn:hover .menu-bars i:nth-child(2) { width: 100%; }
.menu-btn[aria-expanded="true"] .menu-bars i:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-bars i:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] .menu-bars i:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
@media (min-width: 1024px) { .menu-btn { display: none; } }

.drawer-left { left: 0; right: auto; border-left: 0; border-right: 2px solid var(--ink); animation-name: slide-in-left; }
@keyframes slide-in-left { from { transform: translateX(-100%); } }

.menu-body { display: flex; flex-direction: column; gap: .5rem; padding-bottom: 2rem; }
.menu-search {
  display: flex; align-items: center; gap: .6rem; height: 48px; padding: 0 1rem; border-radius: 999px;
  border: 2px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 600; text-align: left;
}
.menu-search svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.menu-search:hover { border-color: var(--ink); color: var(--ink); }
.menu-label { margin-top: 1rem; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.menu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.menu-link {
  width: 100%; min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 .25rem; border-bottom: 1px solid var(--line); font-size: 1.08rem; font-weight: 700; text-align: left;
}
.menu-link:hover, .menu-link.is-active { color: var(--sun-deep); }
.menu-link.is-active span:first-child::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--sun-deep); margin-right: .55rem; vertical-align: middle; }
.menu-pill { font-size: .72rem; font-weight: 800; padding: .2rem .55rem; border-radius: 999px; background: #2F4A66; color: #FFE45C; }
.menu-shades { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.menu-shade {
  display: flex; align-items: center; gap: .55rem; min-height: 46px; padding: .35rem .6rem .35rem .35rem; border-radius: 12px;
  border: 2px solid var(--line); background: var(--surface); font-weight: 600; font-size: .88rem; text-align: left; min-width: 0;
}
.menu-shade span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-shade .shade-dot { width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; }
.menu-shade.is-active { border-color: var(--ink); }
.menu-motto { margin-top: 1.5rem; padding: 1rem; border-radius: 16px; background: var(--sun); color: var(--on-sun); font-family: var(--font-display); font-size: 1.25rem; line-height: 1.1; }
.menu-motto span { display: block; margin-top: .4rem; font-family: var(--font-body); font-size: .88rem; font-weight: 600; line-height: 1.4; }

/* =====================================================================
   Phones and small tablets
   ===================================================================== */
@media (max-width: 767px) {
  html { scroll-padding-top: 76px; }
  .hide-mobile { display: none; }
  .brand-sun { width: 38px; height: 38px; }
  .brand-name { font-size: 1.22rem; }
  .brand-tag { font-size: .6rem; letter-spacing: .12em; }
  .bag-btn { padding: 0 .5rem 0 .8rem; }

  .marquee-track { padding: .45rem 0; }
  .marquee-track span { font-size: .92rem; }

  .hero { padding-block: 1.75rem 2.25rem; gap: 1.5rem; }
  .hero-lede { font-size: 1.05rem; }
  .hero-scene { max-width: 300px; }
  .hero-ctas > * { flex: 1 1 auto; }

  .section-head { flex-direction: column; align-items: flex-start; }

  /* Department chips: one swipeable row instead of many wrapped rows */
  .toolbar { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: .75rem; }
  .chips {
    flex-wrap: nowrap; overflow-x: auto; margin-inline: -16px; padding: 2px 16px 6px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex-shrink: 0; scroll-snap-align: start; min-height: 42px; }
  .toolbar-right { flex: none; justify-content: stretch; flex-wrap: nowrap; }
  .search { max-width: none; flex: 1 1 auto; height: 46px; }
  .search input { font-size: 16px; }                 /* prevents iOS zoom on focus */
  .sort { flex: 0 0 auto; height: 46px; }
  .sort select { max-width: 130px; padding: 0 .6rem; font-size: .9rem; }

  /* Two-column product grid */
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .product-card { border-radius: 14px; }
  .product-art { aspect-ratio: 1 / 1; }
  .badge { top: 8px; left: 8px; font-size: .6rem; padding: .18rem .5rem; letter-spacing: .04em; }
  .product-body { padding: .7rem .7rem .8rem; gap: .3rem; }
  .shade-tag { font-size: .72rem; }
  .shade-tag .hex { display: none; }
  .product-name { font-size: .95rem; }
  .product-desc { display: none; }
  .product-meta { flex-direction: column; align-items: flex-start; gap: .1rem; padding-top: .15rem; }
  .price { font-size: 1rem; }
  .price s { font-size: .78rem; }
  .rating { font-size: .7rem; }
  .stars { font-size: .72rem; }
  .product-actions { grid-template-columns: 1fr; gap: .4rem; padding-top: .35rem; }
  .btn-bag { min-height: 40px; font-size: .85rem; }
  .smile-btn { font-size: .84rem; padding: 0 .7rem 0 .3rem; gap: .35rem; }
  .smile-face { width: 30px; height: 30px; }
  .smile-btn-wide { font-size: 1rem; padding: 0 1rem 0 .4rem; }
  .smile-btn-wide .smile-face { width: 36px; height: 36px; }

  .rain-banner { padding: 1.5rem 1.25rem; border-radius: 22px; }
  .rain-banner .btn-sun { width: 100%; }
  .promises { gap: 1rem; }
  .site-footer { padding-block: 2.25rem calc(2.25rem + env(safe-area-inset-bottom, 0px)); }

  /* Popups become bottom sheets */
  .modal { align-items: end; padding: 0; }
  .modal-card {
    width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0; border-bottom: 0; box-shadow: none;
    padding: 1.1rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
    animation: sheet-up .38s cubic-bezier(.2, .9, .3, 1);
  }
  .modal-card::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: -.35rem auto .8rem; }
  .item-close { top: 18px; right: 12px; }
  .item-art { aspect-ratio: 4 / 3; }
  .soon-label { font-size: 2.3rem; }
  .item-actions > * { flex: 1 1 auto; }
  .fields { grid-template-columns: 1fr 1fr; }
  .field input { font-size: 16px; }
  .co-head { padding-right: 3rem; }

  /* Drawers */
  .drawer { width: min(400px, 92%); }
  #cart-drawer, #ledger-drawer { width: 100%; }
  .drawer-head { padding: 1rem 1rem .85rem; }
  .drawer-body { padding: .9rem 1rem; }
  .drawer-foot { padding: .9rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); }
  .cart-line { grid-template-columns: 64px 1fr auto; gap: .7rem; }
  .cart-thumb { width: 64px; }
  .qty button { width: 40px; height: 36px; }
  .ledger-stats { gap: .45rem; }
  .ledger-stats > div { padding: .6rem; }
  .stat-num { font-size: 1.05rem; }

  .toasts { bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .toast { font-size: .86rem; }
}
@media (max-width: 479px) {
  .bag-label { display: none; }
}
@media (max-width: 379px) {
  .brand-tag { display: none; }
  .brand-name { font-size: 1.1rem; }
  .header-row { gap: .5rem; }
}
@media (max-width: 339px) {
  .product-grid { grid-template-columns: 1fr; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }

/* Touch screens: no sticky hover lifts */
@media (hover: none) {
  .product-card:hover, .shade-chip:hover, .btn-sun:hover, .smile-btn:hover { transform: none; }
  .product-card:hover .product-svg, .product-card:hover .product-art img { transform: none; }
  .product-card:active { transform: scale(.98); }
}
