/* Top Bricks & Toys storefront
   Shape rule: cards and tiles 18px, inputs 12px, buttons and chips full pill.
   Action colour is brand red; the other brick colours only code categories. */

:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #eaeef7;
  --ink: #1b2130;
  --ink-2: #4a5468;
  --ink-3: #6b7489;
  --line: #dde2ee;
  --photo: #ffffff;

  --red: #e0312b;
  --red-ink: #ffffff;
  --red-soft: #fde8e7;
  --green: #2f9e44;
  --blue: #2f6fd6;
  --orange: #f08c1a;
  --yellow: #f5b915;
  --pink: #e04887;
  --teal: #13a39a;

  --star: #f5a70d;
  --shadow: 0 1px 2px rgb(27 33 48 / .06), 0 8px 24px rgb(47 111 214 / .08);
  --shadow-lg: 0 24px 60px rgb(27 33 48 / .18);

  --r-card: 18px;
  --r-input: 12px;
  --display: 'Fredoka', 'Plus Jakarta Sans', system-ui, sans-serif;
  --body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11141b; --surface: #1a1f2a; --surface-2: #232a38; --ink: #eef1f7; --ink-2: #b9c0cf; --ink-3: #8d96a8;
    --line: #2c3444; --photo: #ffffff; --red: #f0544e; --red-soft: #3a1d1f; --star: #ffbf3d;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25); --shadow-lg: 0 24px 60px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11141b; --surface: #1a1f2a; --surface-2: #232a38; --ink: #eef1f7; --ink-2: #b9c0cf; --ink-3: #8d96a8;
  --line: #2c3444; --photo: #ffffff; --red: #f0544e; --red-soft: #3a1d1f; --star: #ffbf3d;
  --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px rgb(0 0 0 / .25); --shadow-lg: 0 24px 60px rgb(0 0 0 / .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 999px; z-index: 100; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 28px; } }

/* ---------- Header ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); border-bottom: 1px solid var(--line); }
.topbar-in { display: flex; align-items: center; gap: 14px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 44px; height: 44px; border-radius: 12px; background: #fff; }
.brand-name { font: 700 17px/1.02 var(--display); color: var(--red); }
.brand-name span { color: var(--green); }
.search { flex: 1; position: relative; max-width: 520px; }
.search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { width: 100%; height: 44px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 16px 0 40px; font-size: 16px; outline: none; transition: border-color .2s; }
.search input::placeholder { color: var(--ink-3); }
.search input:focus { border-color: var(--blue); }
.actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav-link { text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; color: var(--ink-2); white-space: nowrap; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 999px; border: 0; background: transparent; font-size: 20px; color: var(--ink-2); transition: background .2s, transform .15s; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:active { transform: scale(.94); }
.cart-btn { position: relative; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 15px; transition: transform .15s var(--ease); }
.cart-btn i { font-size: 19px; }
.cart-btn:active { transform: scale(.96); }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.badge.bump { animation: bump .45s var(--ease); }
@keyframes bump { 30% { transform: scale(1.35); } }

.catbar { border-top: 1px solid var(--line); }
.catbar-in { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-top: 8px; padding-bottom: 8px; }
.catbar-in::-webkit-scrollbar { display: none; }
.catbar a { flex-shrink: 0; text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; display: flex; align-items: center; gap: 7px; }
.catbar a::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.catbar a:hover, .catbar a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

@media (max-width: 767px) {
  .topbar-in { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .nav-link, .cart-label { display: none; }
  .cart-btn { padding: 0 14px; }
}

.demo-note { background: var(--surface-2); color: var(--ink-2); font-size: 13px; text-align: center; padding: 7px 0; }

/* ---------- Buttons, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 24px; border-radius: 999px; font-weight: 700; font-size: 16px; text-decoration: none; border: 0; white-space: nowrap; transition: transform .15s var(--ease), background .2s, box-shadow .2s; }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--red); color: var(--red-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--red) 30%, transparent); }
.btn-primary:hover { background: color-mix(in srgb, var(--red) 88%, #000); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); text-decoration: none; font-weight: 600; font-size: 14px; color: var(--ink); border: 0; white-space: nowrap; transition: box-shadow .2s, background .2s; }
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 28px; overflow: hidden; }
.hero-in { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero { padding: 56px 0 40px; } .hero-in { grid-template-columns: 1.05fr 1fr; gap: 48px; } }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); padding: 6px 14px; border-radius: 999px; margin: 0 0 18px; }
.eyebrow i { color: var(--yellow); }
h1 { font: 700 clamp(36px, 5.4vw, 60px)/1.04 var(--display); letter-spacing: -.015em; margin: 0 0 18px; max-width: 16ch; text-wrap: balance; }
.lead { font-size: 18px; color: var(--ink-2); max-width: 46ch; margin: 0 0 28px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-art { position: relative; }
.stack { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(6, minmax(0, 1fr)); aspect-ratio: 1 / .92; max-width: 560px; margin: 0 auto; }
.tile { margin: 0; background: var(--c); border-radius: var(--r-card); padding: 12px; box-shadow: var(--shadow-lg), inset 0 -6px 0 rgb(0 0 0 / .14); position: relative; }
.tile img { width: 100%; height: 100%; object-fit: contain; background: var(--photo); border-radius: 10px; padding: 7%; }
/* studs on top, like a brick */
.tile::before { content: ''; position: absolute; top: -11px; left: 12%; right: 12%; height: 14px; background: radial-gradient(circle at 50% 50%, var(--c) 0 9px, transparent 9.5px) 0 0 / 25% 100% repeat-x; filter: brightness(1.06); }
.t1 { --c: var(--red); grid-area: 1 / 1 / 5 / 4; transform: rotate(-4deg); z-index: 2; }
.t2 { --c: var(--blue); grid-area: 1 / 4 / 4 / 7; transform: rotate(3deg) translateY(8%); }
.t3 { --c: var(--green); grid-area: 4 / 4 / 7 / 7; transform: rotate(-2deg) translate(-4%, 6%); z-index: 3; }
.t4 { --c: var(--yellow); grid-area: 5 / 1 / 7 / 4; transform: rotate(3deg) translate(8%, 10%); z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .tile { animation: drop .9s var(--ease) both; }
  .t2 { animation-delay: .12s; } .t3 { animation-delay: .24s; } .t4 { animation-delay: .36s; }
  .hero-copy > * { animation: rise .8s var(--ease) both; }
  .hero-copy > *:nth-child(2) { animation-delay: .06s; } .hero-copy > *:nth-child(3) { animation-delay: .12s; } .hero-copy > *:nth-child(4) { animation-delay: .18s; }
}
@keyframes drop { from { opacity: 0; translate: 0 -40px; } }
@keyframes rise { from { opacity: 0; translate: 0 16px; } }

/* ---------- Proof strip ---------- */
.proof { padding: 8px 0 12px; }
.proof-in { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .proof-in { grid-template-columns: repeat(4, 1fr); } }
.proof-item { background: var(--surface); border-radius: var(--r-card); padding: 16px 18px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.proof-item strong { font: 700 24px/1.2 var(--display); display: flex; align-items: center; gap: 6px; }
.proof-item strong i { color: var(--star); font-size: 20px; }
.proof-item span { color: var(--ink-3); font-size: 14px; }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
@media (min-width: 900px) { .section { padding: 64px 0; } }
.h2 { font: 700 clamp(26px, 3.2vw, 36px)/1.15 var(--display); margin: 0 0 24px; letter-spacing: -.01em; text-wrap: balance; }
.row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.link-more { font-weight: 700; color: var(--red); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }

/* Category bricks */
.bricks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 14px; padding-top: 10px; }
@media (min-width: 640px) { .bricks { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .bricks { grid-template-columns: repeat(7, 1fr); } }
.brick { --c: var(--red); position: relative; display: flex; flex-direction: column; justify-content: flex-start; gap: 4px; min-height: 160px; padding: 14px; border-radius: 14px; background: var(--c); color: #fff; text-decoration: none; overflow: hidden; box-shadow: inset 0 -6px 0 rgb(0 0 0 / .14); transition: transform .25s var(--ease); }
.brick-studs { position: absolute; top: -9px; left: 12%; right: 12%; height: 12px; background: radial-gradient(circle at 50% 60%, var(--c) 0 7px, transparent 7.5px) 0 0 / 33.33% 100% repeat-x; filter: brightness(1.08); }
.brick { overflow: visible; }
.brick:hover { transform: translateY(-4px); }
.brick:active { transform: translateY(0) scale(.98); }
.brick strong { font: 700 18px/1.15 var(--display); position: relative; z-index: 1; max-width: 9ch; }
.brick small { font-size: 13px; opacity: .92; position: relative; z-index: 1; font-weight: 600; }
.brick img { position: absolute; right: -8px; bottom: 10px; width: 52%; border-radius: 10px; background: #fff; padding: 4px; transform: rotate(6deg); box-shadow: 0 6px 16px rgb(0 0 0 / .2); transition: transform .3s var(--ease); }
.brick:hover img { transform: rotate(2deg) scale(1.04); }
.c-red { --c: var(--red); } .c-blue { --c: var(--blue); } .c-green { --c: var(--green); } .c-orange { --c: var(--orange); }
.c-pink { --c: var(--pink); } .c-yellow { --c: var(--yellow); } .c-teal { --c: var(--teal); }
.brick.c-yellow { color: #2b2207; }

/* Product cards */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; } }
.card { position: relative; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow), 0 16px 40px rgb(27 33 48 / .12); }
.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; }
.card-img { background: var(--photo); aspect-ratio: 1; padding: 8%; }
.card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s var(--ease); }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-line { font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.card-name { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.price { font: 700 18px/1.2 var(--body); margin-top: 4px; }
.was { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.was s { text-decoration-thickness: 1px; }
.off { color: var(--red); font-weight: 700; background: var(--red-soft); padding: 1px 6px; border-radius: 6px; }
.meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); margin-top: auto; padding-top: 6px; }
.meta i { color: var(--star); }
.add { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border-radius: 999px; border: 0; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 18px; box-shadow: var(--shadow); transition: transform .15s var(--ease), background .2s; }
.add:hover { background: var(--red); color: #fff; }
.add:active { transform: scale(.9); }

/* Best seller rail */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; scrollbar-width: thin; }
.rail > * { scroll-snap-align: start; }
@media (min-width: 1024px) { .rail { grid-auto-columns: calc((100% - 4 * 16px) / 5); } }
.rank { position: absolute; left: 10px; top: 10px; z-index: 1; font: 700 13px/1 var(--display); background: var(--yellow); color: #2b2207; padding: 6px 10px; border-radius: 999px; }

/* Bento */
.bento { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .bento { grid-template-columns: 1.3fr 1fr 1fr; grid-template-rows: auto auto; }
  .b-adult { grid-row: span 2; }
  .b-speed { grid-column: span 2; }
}
.bento-cell { position: relative; border-radius: var(--r-card); overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; min-height: 240px; transition: transform .3s var(--ease); }
.bento-cell:hover { transform: translateY(-3px); }
.bento-cell img { mix-blend-mode: multiply; object-fit: contain; }
.bento-copy { padding: 22px 22px 0; position: relative; z-index: 1; }
.bento-copy h3 { font: 700 24px/1.15 var(--display); margin: 0 0 6px; }
.bento-copy p { margin: 0 0 10px; color: color-mix(in srgb, var(--ink) 75%, transparent); max-width: 34ch; font-size: 15px; }
.bento-price { font-weight: 700; }
.b-adult { background: #ffe3e1; }
.b-adult img { width: 86%; margin: auto auto 0; padding-bottom: 12px; }
.b-toddler { background: #e2f3e5; }
.b-free { background: #e1ebfb; }
.b-toddler img, .b-free img { width: 48%; align-self: flex-end; margin-top: auto; margin-right: 12px; margin-bottom: 12px; }
.b-speed { background: #fff3cf; flex-direction: row; align-items: center; }
.b-speed .bento-copy { padding-bottom: 22px; flex: 1; }
.b-speed img { width: 42%; max-width: 280px; padding: 12px; }
:root[data-theme="dark"] .bento-cell, :root[data-theme="dark"] .bento-cell p { color: #1b2130; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bento-cell, :root:not([data-theme="light"]) .bento-cell p { color: #1b2130; } }
@media (max-width: 767px) { .b-speed { flex-direction: column; align-items: stretch; } .b-speed img { width: 60%; align-self: flex-end; } .b-adult img { width: 58%; margin: 0 16px 16px auto; } }

/* Collector */
.collector { background: color-mix(in srgb, var(--blue) 9%, var(--bg)); }
.collector-in { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .collector-in { grid-template-columns: .8fr 1.2fr; gap: 48px; } }
.collector-copy p { color: var(--ink-2); font-size: 17px; max-width: 42ch; margin: -8px 0 20px; }
.collector-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 640px) { .collector-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 640px) {
  .collector-grid .card:nth-child(3n+2) { transform: translateY(18px); }
  .collector-grid .card:nth-child(3n+2):hover { transform: translateY(15px); }
}

/* Gift */
.gift { display: grid; gap: 24px; align-items: center; background: var(--surface); border-radius: 24px; padding: 20px; box-shadow: var(--shadow); }
@media (min-width: 768px) { .gift { grid-template-columns: 300px 1fr; padding: 28px 40px 28px 28px; gap: 40px; } }
.gift img { border-radius: var(--r-card); background: var(--photo); aspect-ratio: 1; object-fit: cover; width: 100%; max-width: 300px; }
.gift-copy p { color: var(--ink-2); max-width: 48ch; margin: -8px 0 22px; font-size: 17px; }

/* FAQ */
.faq-wrap { max-width: 820px; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); }
.faq summary { list-style: none; cursor: pointer; padding: 18px 20px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font: 600 24px/1 var(--display); color: var(--ink-3); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0; padding: 0 20px 18px; color: var(--ink-2); }

/* Footer */
.footer { margin-top: 40px; background: var(--surface); border-top: 1px solid var(--line); padding: 44px 0 20px; }
.footer-in { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .footer-in { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 768px) { .footer-brand { grid-column: auto; } }
.footer-brand img { border-radius: 16px; background: #fff; margin-bottom: 10px; }
.footer-brand p { color: var(--ink-3); max-width: 32ch; margin: 0; }
.footer h3 { font: 700 16px/1.2 var(--display); margin: 0 0 12px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer li a { text-decoration: none; color: var(--ink-2); font-size: 15px; }
.footer li a:hover { color: var(--red); }
.footer-base { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }

/* ---------- Shop view ---------- */
.page { padding: 28px 0 56px; }
.crumbs { font-size: 14px; color: var(--ink-3); margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.shop { display: grid; gap: 24px; }
@media (min-width: 1024px) { .shop { grid-template-columns: 240px 1fr; gap: 32px; align-items: start; } }
.filters { display: grid; gap: 20px; }
@media (min-width: 1024px) { .filters { position: sticky; top: 140px; } }
.filter-group h3 { font: 700 15px/1.2 var(--display); margin: 0 0 10px; }
.filter-list { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 1023px) {
  .filter-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
  .filter-list::-webkit-scrollbar { display: none; }
  .filter-group.hide-sm { display: none; }
}
.shop-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.shop-head h1 { font-size: clamp(28px, 3.4vw, 40px); margin: 0; max-width: none; }
.shop-head p { margin: 2px 0 0; color: var(--ink-3); font-size: 14px; }
.select { height: 42px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); padding: 0 36px 0 16px; font-weight: 600; font-size: 14px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: right 18px top 18px, right 13px top 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.empty { text-align: center; padding: 56px 20px; background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow); }
.empty i { font-size: 44px; color: var(--ink-3); }
.empty h2 { font: 700 22px/1.2 var(--display); margin: 10px 0 6px; }
.empty p { color: var(--ink-3); margin: 0 0 18px; }

/* ---------- Product view ---------- */
.pdp { display: grid; gap: 28px; }
@media (min-width: 900px) { .pdp { grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; } }
.pdp-img { background: var(--photo); border-radius: 24px; padding: 6%; box-shadow: var(--shadow); aspect-ratio: 1; position: relative; }
@media (min-width: 900px) { .pdp-img { position: sticky; top: 140px; } }
.pdp-img img { width: 100%; height: 100%; object-fit: contain; }
.pdp-line { font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; font-size: 13px; text-decoration: none; }
.pdp h1 { font-size: clamp(28px, 3.4vw, 40px); max-width: 22ch; margin: 6px 0 12px; }
.pdp-meta { display: flex; flex-wrap: wrap; gap: 14px; color: var(--ink-2); font-size: 15px; margin-bottom: 20px; }
.pdp-meta i { color: var(--star); }
.pdp-price { background: var(--surface); border-radius: var(--r-card); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.pdp-price .price { font-size: 32px; margin: 0; }
.pdp-price .was { font-size: 14px; }
.buy { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin-bottom: 12px; }
.qty { display: flex; align-items: center; height: 50px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.qty button { width: 44px; height: 100%; border: 0; background: none; font-size: 18px; border-radius: 999px; color: var(--ink-2); }
.qty button:hover { color: var(--ink); }
.qty output { min-width: 28px; text-align: center; font-weight: 700; }
.qty.sm { height: 36px; } .qty.sm button { width: 34px; font-size: 15px; }
.perks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.perks li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-2); font-size: 15px; }
.perks i { font-size: 22px; color: var(--green); flex-shrink: 0; }
.perks strong { color: var(--ink); display: block; }
.related { margin-top: 56px; }

/* ---------- Drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgb(17 20 27 / .45); z-index: 40; opacity: 0; transition: opacity .3s; }
.scrim.on { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--bg); z-index: 50; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .4s var(--ease), visibility .4s; box-shadow: var(--shadow-lg); visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 12px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font: 700 22px/1 var(--display); margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 16px; display: grid; gap: 10px; align-content: start; overscroll-behavior: contain; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); display: grid; gap: 12px; background: var(--surface); }
.line-item { display: grid; grid-template-columns: 72px 1fr; gap: 12px; background: var(--surface); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); }
.line-item img { width: 72px; height: 72px; object-fit: contain; background: var(--photo); border-radius: 10px; padding: 4px; }
.line-item h3 { font-size: 14px; font-weight: 600; line-height: 1.35; margin: 0 0 4px; }
.line-item h3 a { text-decoration: none; }
.line-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.line-row .price { font-size: 15px; margin: 0; }
.remove { border: 0; background: none; color: var(--ink-3); font-size: 13px; text-decoration: underline; padding: 4px 0; }
.remove:hover { color: var(--red); }
.toggle { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); cursor: pointer; font-size: 14px; }
.toggle input { width: 20px; height: 20px; accent-color: var(--red); flex-shrink: 0; }
.toggle span { flex: 1; } .toggle strong { display: block; font-size: 15px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--ink-2); }
.sum-row.total { font-size: 18px; color: var(--ink); font-weight: 700; }

/* ---------- Checkout ---------- */
.checkout { display: grid; gap: 28px; }
@media (min-width: 960px) { .checkout { grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; } }
.panel { background: var(--surface); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
@media (min-width: 768px) { .panel { padding: 28px; } }
.panel + .panel { margin-top: 16px; }
.panel h2 { font: 700 21px/1.2 var(--display); margin: 0 0 18px; }
.fields { display: grid; gap: 16px; }
@media (min-width: 640px) { .fields.two { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field textarea { width: 100%; border: 1.5px solid var(--line); background: var(--bg); border-radius: var(--r-input); padding: 12px 14px; font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 92px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
.field .help { font-size: 13px; color: var(--ink-3); }
.field .err { font-size: 13px; color: var(--red); font-weight: 600; display: none; }
.field.invalid input, .field.invalid textarea { border-color: var(--red); }
.field.invalid .err { display: block; }
.options { display: grid; gap: 10px; }
.option { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 14px; box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; transition: box-shadow .2s, background .2s; }
.option:has(input:checked) { box-shadow: inset 0 0 0 2px var(--red); background: var(--red-soft); }
.option input { width: 20px; height: 20px; accent-color: var(--red); flex-shrink: 0; }
.option span { flex: 1; } .option strong { display: block; } .option small { color: var(--ink-3); font-size: 13px; }
.option b { white-space: nowrap; }
.summary-list { display: grid; gap: 12px; margin-bottom: 16px; }
.summary-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.summary-item img { width: 56px; height: 56px; object-fit: contain; background: var(--photo); border-radius: 10px; padding: 3px; }
.summary-item small { color: var(--ink-3); display: block; }
.summary-totals { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 8px; }
.note { font-size: 13px; color: var(--ink-3); margin: 12px 0 0; display: flex; gap: 8px; }
@media (min-width: 960px) { .checkout aside { position: sticky; top: 140px; } }

/* Order confirmation */
.done { max-width: 640px; margin: 0 auto; text-align: center; }
.done-icon { width: 76px; height: 76px; border-radius: 999px; margin: 0 auto 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); font-size: 40px; }
.done h1 { margin: 0 auto 10px; max-width: none; font-size: clamp(28px, 4vw, 40px); }
.done > p { color: var(--ink-2); margin: 0 auto 24px; max-width: 46ch; }
.done .panel { text-align: left; margin-bottom: 20px; }
.order-id { font: 700 15px/1 var(--body); letter-spacing: .04em; background: var(--surface-2); padding: 8px 12px; border-radius: 999px; display: inline-block; margin-bottom: 20px; }
.done-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.orders { display: grid; gap: 12px; }
.order-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-decoration: none; }
.order-row small { display: block; color: var(--ink-3); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translate(-50%, calc(100% + 48px)); visibility: hidden; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 15px; z-index: 60; display: flex; align-items: center; gap: 10px; transition: transform .4s var(--ease), visibility .4s; max-width: calc(100% - 32px); box-shadow: var(--shadow-lg); }
.toast.show { transform: translate(-50%, 0); visibility: visible; }
.toast i { color: #5ad07a; font-size: 20px; }
.toast button { background: none; border: 0; color: inherit; text-decoration: underline; font-weight: 700; padding: 0 0 0 4px; }

/* Reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; translate: 0 24px; transition: opacity .7s var(--ease), translate .7s var(--ease); }
  .reveal.in { opacity: 1; translate: 0 0; }
  .view-enter { animation: rise .45s var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
