/* ==========================================================================
   Arjeba — storefront styles
   Edit design tokens in :root to re-theme the whole site.
   ========================================================================== */

:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-2: #f2eee8;
  --ink: #161514;
  --ink-2: #57524c;
  --ink-3: #8d867e;
  --line: #e7e1d9;
  --accent: #d6492f;        /* sale / highlights */
  --accent-soft: #fbe6e0;
  --sage: #5f7a62;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(22,21,20,.04), 0 8px 24px -12px rgba(22,21,20,.18);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --container: 1320px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -.02em; }
h1 em, h2 em, strong em { font-family: var(--serif); font-weight: 400; font-style: italic; letter-spacing: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 28px; } }
.section { margin-top: 56px; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section__head h2, .flash__head h2 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; }
.eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.link { font-weight: 600; font-size: 14px; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; }
.link--muted { color: var(--ink-3); font-weight: 500; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 15px; transition: transform .15s, background .2s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 18px; height: 18px; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2d2a27; }
.btn--light { background: #fff; color: var(--ink); }
.btn--ghost { background: transparent; border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--block { width: 100%; }
.btn--grow { flex: 1; }
.btn--sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; position: relative; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn--outline { border: 1.5px solid var(--line); width: 50px; height: 50px; }

/* --- Announcement bar ---------------------------------------------------- */
.announce { background: var(--ink); color: #f3efe9; font-size: 12.5px; font-weight: 600; letter-spacing: .02em; overflow: hidden; }
.announce__track { display: flex; gap: 48px; justify-content: center; padding: 9px 16px; white-space: nowrap; }
@media (max-width: 900px) {
  .announce__track { justify-content: flex-start; animation: marquee 22s linear infinite; width: max-content; }
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* --- Header -------------------------------------------------------------- */
.header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.header.is-scrolled { border-color: var(--line); }
.header__inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.logo { font-family: var(--serif); font-size: 34px; letter-spacing: -.01em; line-height: 1; }
.logo span { color: var(--accent); }
.logo--light { color: #fff; }
.nav { display: flex; gap: 22px; font-weight: 600; font-size: 14px; }
.nav a { position: relative; padding: 6px 0; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor; transform: scaleX(0); transition: transform .2s; transform-origin: left; }
.nav a:hover::after { transform: scaleX(1); }
.nav__sale { color: var(--accent); }
.search { flex: 1; max-width: 360px; margin-left: auto; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(22,21,20,.06); }
.search svg { width: 18px; height: 18px; color: var(--ink-3); }
.search input { flex: 1; border: 0; background: none; outline: none; min-width: 0; }
.header__actions { display: flex; gap: 2px; }
.bag b, .tabbar__bag b { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.header__menu { display: none; }

@media (max-width: 1100px) { .nav { display: none; } .header__menu { display: inline-grid; } }
@media (max-width: 720px) {
  .header__inner { gap: 6px; }
  .header .search { display: none; }
  .logo { margin-right: auto; font-size: 30px; }
  .header__actions [data-wishlist-link] { display: none; }
}

/* --- Drawer (mobile menu) ----------------------------------------------- */
.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(22,21,20,.4); opacity: 0; transition: opacity .25s; }
.drawer__panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(360px, 88vw); background: var(--bg); z-index: 1; padding: 16px 20px; overflow-y: auto; transform: translateX(-100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.search--drawer { max-width: none; margin: 0 0 12px; }
.drawer__link { display: flex; align-items: center; gap: 12px; padding: 15px 4px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 17px; }
.drawer__link small { margin-left: auto; color: var(--ink-3); font-weight: 500; }
.drawer__link--sale { color: var(--accent); }
.drawer__dot { width: 28px; height: 28px; border-radius: 50%; background: var(--tone); }

/* --- Mobile tab bar ------------------------------------------------------ */
.tabbar { display: none; }
@media (max-width: 720px) {
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--ink-2); background: none; border: 0; position: relative; padding: 4px 0; }
  .tabbar svg { width: 22px; height: 22px; }
  .tabbar__bag b { top: 0; right: calc(50% - 22px); }
  body { padding-bottom: 72px; }
}

/* --- Toast --------------------------------------------------------------- */
.toast { position: fixed; left: 50%; top: 84px; z-index: 80; transform: translate(-50%, -20px); opacity: 0; pointer-events: none; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow); transition: all .3s cubic-bezier(.2,.8,.2,1); white-space: nowrap; }
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast--error { background: var(--accent); }

/* --- Hero (bento) -------------------------------------------------------- */
.hero { display: grid; gap: 14px; margin-top: 18px; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; min-height: 560px; }
.hero__main { grid-row: span 2; position: relative; overflow: hidden; border-radius: 28px; background: var(--tone); display: flex; align-items: center; isolation: isolate; }
.hero__copy { position: relative; z-index: 2; padding: clamp(28px, 5vw, 64px); max-width: 560px; }
.hero__copy h1 { font-size: clamp(42px, 6.2vw, 84px); font-weight: 800; margin: 14px 0 16px; letter-spacing: -.035em; line-height: .98; }
.hero__copy p { font-size: 17px; color: rgba(22,21,20,.72); max-width: 400px; margin: 0 0 28px; }
.hero__img { position: absolute; right: -40px; top: 0; height: 100%; width: 55%; object-fit: cover; z-index: 1; mask-image: linear-gradient(to left, #000 60%, transparent); transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.hero__main:hover .hero__img { transform: scale(1.04); }
.hero__side { position: relative; overflow: hidden; border-radius: 28px; padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; background: var(--tone, var(--surface-2)); transition: transform .3s; }
.hero__side:hover { transform: translateY(-3px); }
.hero__side strong { font-size: clamp(28px, 3vw, 40px); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.hero__side .link { align-self: flex-start; margin-top: 6px; }
.hero__side--sale { background: var(--accent); color: #fff; }
.hero__side--sale .eyebrow { color: rgba(255,255,255,.8); }
.hero__side--sale strong em { font-size: 1.3em; }
.hero__side::before { content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%; top: -70px; right: -60px; background: rgba(255,255,255,.18); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; min-height: 0; }
  .hero__main { grid-column: span 2; grid-row: auto; min-height: 460px; align-items: flex-start; }
  .hero__img { width: 100%; height: 55%; top: auto; bottom: 0; right: 0; mask-image: linear-gradient(to top, #000 55%, transparent); }
  .hero__side { min-height: 170px; padding: 20px; border-radius: 22px; }
}

/* --- Category rail ------------------------------------------------------- */
[data-scroller] { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px; }
[data-scroller]::-webkit-scrollbar { display: none; }
[data-scroller] > * { scroll-snap-align: start; }
.cat-rail { justify-content: space-between; }
.cat-chip { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 96px; font-size: 14px; }
.cat-chip__img { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--tone); display: grid; place-items: center; transition: transform .25s, box-shadow .25s; }
.cat-chip__img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.4) translateY(6%); }
.cat-chip:hover .cat-chip__img { transform: translateY(-4px); box-shadow: var(--shadow); }
.cat-chip__img--sale { background: var(--accent); color: #fff; font-family: var(--serif); font-size: 46px; }
@media (max-width: 720px) { .cat-chip { min-width: 76px; font-size: 12.5px; } .cat-chip__img { width: 72px; height: 72px; } }

/* --- Flash deals --------------------------------------------------------- */
.flash { background: var(--accent-soft); border-radius: 28px; padding: 28px clamp(16px, 3vw, 32px); }
.flash__head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; gap: 16px; }
.flash__head p { margin: 6px 0 0; color: var(--ink-2); font-weight: 600; }
.flash__head time { font-variant-numeric: tabular-nums; background: var(--ink); color: #fff; padding: 3px 10px; border-radius: 8px; margin-left: 4px; }
.flash .rail { margin: 0 calc(-1 * clamp(16px, 3vw, 32px)); padding: 4px clamp(16px, 3vw, 32px); }
.pulse { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); vertical-align: middle; margin-left: 6px; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(214,73,47,.5); } 100% { box-shadow: 0 0 0 12px rgba(214,73,47,0); } }

/* --- Product grid & cards ------------------------------------------------ */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 18px; }
.grid--shop { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .grid, .grid--shop { grid-template-columns: repeat(2, 1fr); gap: 22px 10px; } }
.rail > .card { flex: 0 0 clamp(170px, 22vw, 260px); }

.card { position: relative; display: flex; flex-direction: column; min-width: 0; }
.card__media { position: relative; display: block; aspect-ratio: 3 / 4; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.card:hover .card__media img { transform: scale(1.05); }
.card__badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.badge { font-style: normal; font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: #fff; letter-spacing: .02em; }
.badge--sale { background: var(--accent); color: #fff; }
.card__wish { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255,255,255,.88); display: grid; place-items: center; backdrop-filter: blur(6px); transition: transform .2s; }
.card__wish svg { width: 18px; height: 18px; }
.card__wish:hover { transform: scale(1.08); }
[data-wish].is-on svg { fill: var(--accent); stroke: var(--accent); }
.card__body { padding: 12px 2px 0; display: flex; flex-direction: column; gap: 4px; }
.card__name { font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card__price strong { font-size: 16px; font-weight: 800; }
.card__price strong.is-sale, .pdp__price strong.is-sale { color: var(--accent); }
.card__price s { color: var(--ink-3); font-size: 13px; }
.card__meta { display: flex; justify-content: space-between; align-items: center; margin-top: 2px; }
.dots { display: flex; gap: 4px; }
.dots i { width: 13px; height: 13px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.rating { font-size: 12.5px; font-weight: 700; }
.rating small { color: var(--ink-3); font-weight: 500; }


/* --- Promo --------------------------------------------------------------- */
.promo { display: grid; grid-template-columns: 1.2fr 1fr; background: var(--sage); color: #fff; border-radius: 28px; overflow: hidden; }
.promo__copy { padding: clamp(28px, 5vw, 56px); }
.promo__copy .eyebrow { color: rgba(255,255,255,.75); }
.promo__copy h2 { font-size: clamp(32px, 4.4vw, 54px); font-weight: 800; margin: 12px 0; }
.promo__copy p { color: rgba(255,255,255,.82); max-width: 380px; margin: 0 0 24px; }
.promo__art { position: relative; min-height: 220px; }
.promo__art span { position: absolute; border-radius: 50%; }
.promo__art span:nth-child(1) { width: 300px; height: 300px; background: #8ea38f; right: -60px; top: -40px; }
.promo__art span:nth-child(2) { width: 180px; height: 180px; background: #f2c3a7; right: 160px; bottom: -50px; }
.promo__art span:nth-child(3) { width: 90px; height: 90px; background: #faf8f5; right: 90px; top: 60%; }
@media (max-width: 760px) { .promo { grid-template-columns: 1fr; } .promo__art { min-height: 140px; } }

/* --- Perks + footer ------------------------------------------------------ */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 72px; margin-bottom: 40px; }
.perks div { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.perks svg { grid-row: span 2; width: 28px; height: 28px; color: var(--sage); }
.perks b { font-size: 14.5px; }
.perks span { font-size: 13px; color: var(--ink-3); }
@media (max-width: 900px) { .perks { grid-template-columns: 1fr 1fr; } }

.footer { background: var(--ink); color: #cfc8bf; padding: 56px 0 24px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer__brand p { max-width: 320px; margin: 14px 0 20px; }
.footer h4 { color: #fff; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 6px 0 14px; }
.footer a { display: block; padding: 4px 0; font-size: 14px; }
.footer a:hover { color: #fff; }
.newsletter { display: flex; max-width: 360px; background: rgba(255,255,255,.08); border-radius: 999px; padding: 4px; }
.newsletter input { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 0 16px; color: #fff; }
.newsletter button { border: 0; background: #fff; color: var(--ink); font-weight: 700; padding: 10px 20px; border-radius: 999px; }
.newsletter p { margin: 10px 16px; color: #fff; }
.footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 20px; font-size: 13px; }
.pay-icons { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-icons i { font-style: normal; font-size: 11px; font-weight: 700; padding: 4px 8px; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: span 2; } }

/* --- Shop listing -------------------------------------------------------- */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-3); margin-bottom: 12px; }
.crumbs a:hover { color: var(--ink); }
.shop-head { margin-top: 28px; }
.shop-head h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -.035em; }
.shop-head p { color: var(--ink-2); margin: 8px 0 0; }
.cat-pills { margin-top: 22px; gap: 8px; }
.cat-pills a { flex: none; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; transition: all .2s; }
.cat-pills a:hover { border-color: var(--ink); }
.cat-pills a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.shop { display: grid; grid-template-columns: 250px 1fr; gap: 36px; margin-top: 28px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); }
.filters__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.filters__head h3 { font-size: 18px; }
.filters__close { display: none; }
.filters fieldset { border: 0; border-top: 1px solid var(--line); padding: 18px 0; margin: 0; }
.filters legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 12px; float: left; width: 100%; }
.size-grid { clear: both; display: flex; flex-wrap: wrap; gap: 6px; }
.size-grid label, .sizes label { cursor: pointer; }
.size-grid input, .sizes input, .swatches input, .pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.size-grid span { display: inline-block; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; transition: all .15s; }
.size-grid input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.price-range { clear: both; display: flex; align-items: center; gap: 8px; }
.price-range input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.switch { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 40px; height: 24px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--ink); }
.switch input:checked + span::after { transform: translateX(16px); }
.filters .btn { margin-top: 8px; }
.filters__scrim { display: none; }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.toolbar__count { color: var(--ink-3); font-size: 14px; font-weight: 600; }
.toolbar__filter { display: none; }
.sort { margin-left: auto; }
.sort label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-3); font-weight: 600; }
.sort select { height: 40px; padding: 0 34px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23161514' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 14px; appearance: none; color: var(--ink); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chips a { padding: 6px 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 40px; }
.pager a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; font-weight: 700; border: 1px solid var(--line); }
.pager a.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.empty { text-align: center; padding: 64px 16px; background: var(--surface); border-radius: 28px; border: 1px dashed var(--line); }
.empty h3 { font-size: 24px; } .empty p { color: var(--ink-2); margin: 8px 0 22px; }
.empty--page { border: 0; background: none; padding: 96px 16px; }
.empty--page h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 800; margin: 10px 0; }

@media (max-width: 900px) {
  .shop { grid-template-columns: 1fr; }
  .toolbar__filter { display: inline-flex; }
  .filters { position: fixed; z-index: 70; left: 0; right: 0; bottom: 0; top: auto; max-height: 86vh; overflow-y: auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
  .filters__close { display: inline-grid; }
  .shop.filters-open .filters { transform: none; }
  .shop.filters-open .filters__scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(22,21,20,.4); }
}

/* --- Product detail ------------------------------------------------------ */
.pdp { margin-top: 24px; }
.pdp__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.gallery { display: grid; grid-template-columns: 76px 1fr; gap: 12px; position: sticky; top: calc(var(--header-h) + 16px); }
.gallery__thumbs { display: flex; flex-direction: column; gap: 10px; }
.gallery__thumbs button { padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden; aspect-ratio: 3/4; background: none; transition: border-color .2s; }
.gallery__thumbs button.is-active { border-color: var(--ink); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery__main { position: relative; aspect-ratio: 3/4; border-radius: 24px; overflow: hidden; background: var(--surface-2); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.gallery__main .badge { position: absolute; top: 16px; left: 16px; font-size: 13px; padding: 6px 12px; }

.pdp__info h1 { font-size: clamp(28px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.03em; margin: 8px 0 12px; }
.pdp__rating { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); }
.stars { --pct: calc(var(--r) / 5 * 100%); background: linear-gradient(90deg, #e0a526 var(--pct), var(--line) var(--pct)); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 2px; font-size: 16px; }
.pdp__price { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 6px; flex-wrap: wrap; }
.pdp__price strong { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.pdp__price s { color: var(--ink-3); font-size: 17px; }
.pdp__price em { font-style: normal; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 999px; }
.pdp__installment { font-size: 13.5px; color: var(--ink-2); margin: 0 0 24px; }

.buy fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.buy legend { display: flex; justify-content: space-between; width: 100%; font-weight: 600; font-size: 14px; margin-bottom: 12px; color: var(--ink-2); }
.buy legend b { color: var(--ink); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches label { cursor: pointer; }
.swatches span { display: block; width: 40px; height: 40px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 0 0 3px var(--bg), 0 0 0 4px transparent; transition: box-shadow .2s; }
.swatches input:checked + span { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 0 0 3px var(--bg), 0 0 0 4.5px var(--ink); }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.sizes span { display: grid; place-items: center; height: 48px; padding: 0 10px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; transition: all .15s; white-space: nowrap; }
.sizes label:hover span { border-color: var(--ink); }
.sizes input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.buy.needs-size .sizes span { border-color: var(--accent); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.stock-warn { color: var(--accent); font-weight: 700; font-size: 14px; margin: -8px 0 16px; }
.buy__row { display: flex; gap: 10px; }
.qty { display: inline-flex; align-items: center; height: 50px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty button { width: 40px; height: 100%; border: 0; background: none; font-size: 20px; }
.qty input { width: 34px; text-align: center; border: 0; background: none; font-weight: 700; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty--sm { height: 38px; }
.qty--sm button { width: 32px; font-size: 17px; }

.pdp__perks { list-style: none; padding: 20px; margin: 26px 0; display: grid; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; }
.pdp__perks li { display: flex; gap: 12px; align-items: center; }
.pdp__perks svg { color: var(--sage); width: 20px; height: 20px; }
.accordion details { border-top: 1px solid var(--line); }
.accordion details:last-child { border-bottom: 1px solid var(--line); }
.accordion summary { list-style: none; cursor: pointer; padding: 18px 0; font-weight: 700; display: flex; justify-content: space-between; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 22px; font-weight: 400; line-height: 1; transition: transform .2s; }
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion p { margin: 0 0 18px; color: var(--ink-2); }
.size-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 18px; }
.size-table th, .size-table td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.size-table th { color: var(--ink-3); font-weight: 600; }

.sticky-buy { display: none; }
@media (max-width: 860px) {
  .pdp__grid { grid-template-columns: 1fr; }
  .gallery { position: static; grid-template-columns: 1fr; margin: 0 -16px; }
  .gallery__main { border-radius: 0; order: 1; }
  .gallery__thumbs { order: 2; flex-direction: row; overflow-x: auto; padding: 0 16px; }
  .gallery__thumbs button { flex: 0 0 60px; }
  .sticky-buy { display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 64px; z-index: 44; padding: 10px 16px; background: var(--surface); border-top: 1px solid var(--line); transform: translateY(150%); transition: transform .3s; }
  .sticky-buy.is-show { transform: none; }
  .sticky-buy div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .sticky-buy b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sticky-buy span { font-weight: 800; }
  .sticky-buy .btn { height: 44px; }
}

/* --- Cart ---------------------------------------------------------------- */
.cart-page { margin-top: 32px; }
.cart-page h1, .checkout h2 { font-size: clamp(32px, 4vw, 46px); font-weight: 800; letter-spacing: -.035em; margin-bottom: 24px; }
.cart-page h1 small { font-size: 16px; color: var(--ink-3); font-weight: 600; letter-spacing: 0; margin-left: 8px; }
.cart { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.ship-meter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.ship-meter p { margin: 0 0 10px; font-size: 14px; }
.ship-meter__bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.ship-meter__bar span { display: block; height: 100%; background: var(--sage); border-radius: 99px; transition: width .4s; }
.line { display: grid; grid-template-columns: 104px 1fr auto; gap: 16px; padding: 16px; background: var(--surface); border-radius: var(--radius); margin-bottom: 10px; align-items: start; transition: opacity .3s; }
.line.is-removing { opacity: 0; }
.line__img { aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; }
.line__img img { width: 100%; height: 100%; object-fit: cover; }
.line__info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.line__name { font-weight: 700; }
.line__opts, .line__unit { font-size: 13.5px; color: var(--ink-3); }
.line__actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; }
.line__actions form { display: inline-flex; }
.line__total { font-size: 16px; }

.summary { background: var(--surface); border-radius: 24px; padding: 24px; border: 1px solid var(--line); }
.summary h3 { font-size: 20px; margin-bottom: 16px; }
.summary dl, .success__card dl { margin: 0 0 20px; }
.summary dl div, .success__card dl div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: 15px; }
.summary dt, .success__card dt { color: var(--ink-2); }
.summary dd, .success__card dd { margin: 0; font-weight: 700; text-align: right; }
.summary__total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 16px !important; font-size: 18px !important; }
.summary__total dt { color: var(--ink) !important; font-weight: 700; }
.summary__note { font-size: 12.5px; color: var(--ink-3); text-align: center; margin: 12px 0 0; }
.summary--sticky { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 900px) { .cart { grid-template-columns: 1fr; } .line { grid-template-columns: 84px 1fr; } .line__total { grid-column: 2; } }

/* --- Checkout ------------------------------------------------------------ */
.checkout { margin-top: 28px; }
.checkout__steps { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--ink-3); margin-bottom: 28px; }
.checkout__steps i { flex: 0 0 40px; height: 1.5px; background: var(--line); }
.checkout__steps .is-done { color: var(--sage); }
.checkout__steps .is-active { color: var(--ink); }
.checkout__grid { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: start; }
.checkout h2 { font-size: 22px; letter-spacing: -.02em; margin: 30px 0 14px; }
.checkout h2:first-of-type { margin-top: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: span 2; }
.field span { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.field input, .field select, .field textarea { height: 50px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { height: auto; padding: 12px 16px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(22,21,20,.06); }
.field.has-error input, .field.has-error select { border-color: var(--accent); }
.field__err { color: var(--accent); font-size: 12.5px; font-weight: 600; }
.alert { background: var(--accent-soft); color: var(--accent); font-weight: 700; padding: 14px 18px; border-radius: 14px; margin-bottom: 20px; }
.pay-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pay-option { cursor: pointer; }
.pay-option span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); transition: all .15s; }
.pay-option small { color: var(--ink-3); font-size: 12.5px; }
.pay-option input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.mini-lines { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 14px; }
.mini-lines li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; font-size: 14px; }
.success__card .mini-lines li { grid-template-columns: 1fr auto; }
.mini-lines li > span:not(.mini-lines__img) { display: flex; flex-direction: column; font-weight: 600; }
.mini-lines small { color: var(--ink-3); font-weight: 500; }
.mini-lines__img { position: relative; width: 52px; aspect-ratio: 3/4; border-radius: 10px; overflow: hidden; }
.mini-lines__img img { width: 100%; height: 100%; object-fit: cover; }
.mini-lines__img b { position: absolute; top: 3px; right: 3px; background: var(--ink); color: #fff; font-size: 10.5px; min-width: 18px; height: 18px; border-radius: 99px; display: grid; place-items: center; }
@media (max-width: 900px) {
  .checkout__grid { grid-template-columns: 1fr; }
  .summary--sticky { position: static; }
}
@media (max-width: 560px) { .fields, .pay-options { grid-template-columns: 1fr; } .field--full { grid-column: auto; } }

/* --- Success ------------------------------------------------------------- */
.success { max-width: 620px; text-align: center; padding-top: 56px; }
.success__icon { width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 50%; background: var(--sage); color: #fff; display: grid; place-items: center; animation: pop .5s cubic-bezier(.2,1.4,.4,1); }
.success__icon svg { width: 36px; height: 36px; stroke-width: 2.4; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.success h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 800; margin: 10px 0 12px; }
.success > p { color: var(--ink-2); }
.success__card { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; margin: 28px 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
