/* =========================================================
   ATLAS — milliy libos uyi
   Palette: anor qizil + zafar sariq, krem fon
   ========================================================= */
:root {
  --red: #C8102E;
  --red-700: #9E0B22;
  --red-900: #4A0610;
  --gold: #F4B400;
  --gold-300: #FFD45C;
  --gold-100: #FFF0C2;
  --cream: #FFF6E3;
  --cream-200: #FBE9C4;
  --ink: #3A0A10;
  --ink-soft: #6E3B40;

  --font-display: "Yeseva One", Georgia, "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --header-h: 72px;
  --pad: clamp(16px, 4vw, 48px);

  /* pointed Uzbek arch (ravoq) used as a mask for every dress frame */
  --arch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140' preserveAspectRatio='none'%3E%3Cpath d='M0 140V48C0 24 26 10 50 0C74 10 100 24 100 48V140Z'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--red-900);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 8px; }

.container { width: min(1440px, 100% - 2 * var(--pad)); margin-inline: auto; }
h1, h2, h3 { text-wrap: balance; }

/* =========================================================
   Header
   ========================================================= */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--pad);
  color: var(--cream);
  background: linear-gradient(to bottom, rgba(46, 3, 10, .55), rgba(46, 3, 10, 0));
  transition: background-color .35s, color .35s, box-shadow .35s;
}
.nav--solid {
  color: var(--ink);
  background: rgba(255, 246, 227, .9);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(58, 10, 16, .08);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 30px; height: 30px; fill: var(--gold); }
.brand__dot { fill: var(--red); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: .14em; }
.brand__sub { font-size: .62rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; opacity: .8; margin-top: 4px; }
.nav__links { display: flex; gap: clamp(16px, 3vw, 40px); }
.nav__links a { text-decoration: none; font-weight: 700; font-size: .92rem; opacity: .9; }
.nav__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }

.cart-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; cursor: pointer;
  padding: 9px 10px 9px 14px; border-radius: 999px;
  background: var(--gold); color: var(--ink);
  font-weight: 800; font-size: .92rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  transition: transform .2s, background-color .2s;
}
.cart-btn:hover { background: var(--gold-300); transform: translateY(-1px); }
.cart-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.cart-count {
  min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: var(--red); color: var(--cream); font-size: .78rem;
}
.cart-count.bump { animation: bump .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }

@media (max-width: 760px) {
  .nav__links { display: none; }
  .brand__sub { display: none; }
}
@media (max-width: 420px) {
  .cart-btn__label { display: none; }
}

/* =========================================================
   Arch frame (shared)
   ========================================================= */
.arch {
  position: relative; width: 100%; height: 100%;
  -webkit-mask: var(--arch) center / 100% 100% no-repeat;
          mask: var(--arch) center / 100% 100% no-repeat;
  background: radial-gradient(ellipse at 50% 42%, #D51A31 0%, #8E0B1E 100%);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
.arch video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.arch__rim { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.arch__rim path { fill: none; vector-effect: non-scaling-stroke; }
.arch__rim .rim-outer { stroke: var(--gold); stroke-width: 8; }
.arch__rim .rim-inner { stroke: rgba(201, 141, 0, .55); stroke-width: 1.5; }

/* =========================================================
   Stage (sticky scroll animation)
   ========================================================= */
.stage { position: relative; height: 520vh; background: var(--red-900); }
.stage__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden; isolation: isolate;
  transform-origin: 50% 0;
}
.stage__bg {
  position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse 90% 80% at 50% 48%, #D51A31 0%, #AE0E26 42%, #690819 78%, #4A0610 100%);
}
.stage__bg::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 55%, rgba(30, 0, 6, .45) 100%);
}
.stage__ikat {
  position: absolute; inset: -40% 0;
  background-size: 132px auto;
  opacity: .085;
  will-change: transform;
}
.medallion {
  position: absolute; left: 50%; top: 52%;
  width: min(118vh, 150vw); aspect-ratio: 1; height: auto;
  color: var(--gold); opacity: .17;
  transform: translate(-50%, -50%);
  will-change: transform;
}

/* --- Butun ekranli fon: uchib kelayotgan variantning o'zi, qizil tusda --- */
.backdrop { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.backdrop__item { position: absolute; inset: 0; opacity: 0; visibility: hidden; will-change: opacity, transform; }
.backdrop__item img,
.backdrop__item video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 50% 52%, rgba(150, 10, 32, .35) 0%, rgba(90, 6, 20, .72) 70%, rgba(46, 3, 10, .9) 100%);
}

/* --- Asosiy ko'ylak: butun ekrandan ravoqqa --- */
.hero-dress { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hero-clip { position: absolute; inset: 0; will-change: clip-path; }
.hero-media {
  position: absolute; left: 0; top: 0;
  width: var(--media-w, 100vw); height: var(--media-h, 56.25vw);
  will-change: transform;
}
.hero-media img,
.hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(46, 3, 10, .62) 0%, rgba(46, 3, 10, 0) 34%, rgba(46, 3, 10, 0) 66%, rgba(46, 3, 10, .62) 100%),
    linear-gradient(0deg, rgba(46, 3, 10, .5) 0%, rgba(46, 3, 10, 0) 22%);
  opacity: var(--veil, 1);
}
/* Kadr chetlarini fonga singdirish (--veil: 1 → 0 ravoqqa aylanganda, shunda kartochka ichida xira chet qolmaydi) */
.hero-media.is-contained {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 calc(var(--veil, 1) * 12%), #000 calc(100% - var(--veil, 1) * 12%), transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 calc(var(--veil, 1) * 12%), #000 calc(100% - var(--veil, 1) * 12%), transparent 100%);
}
.hero-media.is-wide {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--veil, 1) * 7%), transparent 100%);
          mask-image: linear-gradient(to bottom, #000 calc(100% - var(--veil, 1) * 7%), transparent 100%);
}
.hero-media.is-pillar {
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 calc(var(--veil, 1) * 9%), #000 calc(100% - var(--veil, 1) * 9%), transparent 100%),
    linear-gradient(to bottom, #000 calc(100% - var(--veil, 1) * 7%), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 calc(var(--veil, 1) * 9%), #000 calc(100% - var(--veil, 1) * 9%), transparent 100%),
    linear-gradient(to bottom, #000 calc(100% - var(--veil, 1) * 7%), transparent 100%);
  mask-composite: intersect;
}
.hero-rim { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hero-rim path { fill: none; }
.hero-rim .rim-outer { stroke: var(--gold); stroke-width: 4; }
.hero-rim .rim-inner { stroke: rgba(255, 212, 92, .55); stroke-width: 1.2; }

/* video rasm ustida silliq paydo bo'ladi */
.media-video { opacity: 0; transition: opacity .8s ease; }
.media-video.is-ready { opacity: 1; }

.fly__item {
  position: absolute; left: 50%; top: 52%;
  width: var(--mw, 320px); height: var(--mh, 440px);
}
.fly { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.fly__item {
  border: 0; padding: 0; background: none; cursor: pointer;
  opacity: 0; pointer-events: none; visibility: hidden;
  will-change: transform, opacity, filter;
}
.fly__item.is-landed { pointer-events: auto; }
.fly__item:focus-visible { outline-offset: 8px; border-radius: 40% 40% 12px 12px; }

/* --- Hero matnlari (16:9 uchun: chapda sarlavha, o'ngda mahsulot) --- */
.hero-ui { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hero-ui > * { pointer-events: auto; }
.hero-copy { position: absolute; top: 50%; transform: translateY(-46%); will-change: transform, opacity; }
.hero-copy--left { left: var(--pad); width: min(30vw, 470px); }
.hero-copy--right { right: var(--pad); width: min(24vw, 320px); text-align: right; }
.hero-eyebrow {
  color: var(--gold-100);
  font-size: .78rem; font-weight: 800; letter-spacing: .3em; text-transform: uppercase;
}
.hero-eyebrow::before {
  content: ""; display: inline-block; width: 28px; height: 2px; margin-right: 12px;
  vertical-align: middle; background: var(--gold);
}
.hero-title {
  margin-top: 18px;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(3rem, 5.4vw, 6.8rem); line-height: .98; letter-spacing: -.005em;
  color: var(--gold);
  text-shadow: 0 .04em .2em rgba(30, 0, 6, .4);
}
.hero-title em { display: block; font-style: normal; color: var(--cream); }
.hero-lead { margin-top: 22px; max-width: 360px; color: rgba(255, 240, 215, .9); font-size: clamp(.95rem, 1.05vw, 1.08rem); line-height: 1.6; }
.hero-label { color: var(--gold-100); font-size: .72rem; font-weight: 800; letter-spacing: .28em; text-transform: uppercase; }
.hero-product { margin-top: 10px; font-family: var(--font-display); font-size: clamp(1.6rem, 2.3vw, 2.5rem); line-height: 1.05; color: var(--cream); }
.hero-price { margin-top: 8px; font-weight: 800; font-size: 1.15rem; color: var(--gold); }
.hero-facts { list-style: none; margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(244, 180, 0, .35); color: rgba(255, 240, 215, .86); font-size: .95rem; line-height: 1.9; }
.hero-facts strong { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: var(--gold); vertical-align: -2px; margin-right: 4px; }

.scroll-cta {
  position: absolute; left: 50%; bottom: max(18px, 3.4vh);
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 14px;
  padding: 8px 8px 8px 24px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--gold); color: var(--ink);
  font-weight: 800; font-size: 1rem; white-space: nowrap;
  box-shadow: 0 14px 34px rgba(30, 0, 6, .35), inset 0 -3px 0 rgba(150, 90, 0, .25);
  transition: background-color .2s, transform .2s;
}
.scroll-cta:hover { background: var(--gold-300); transform: translateX(-50%) translateY(-2px); }
.scroll-cta__icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--red); color: var(--cream);
}
.scroll-cta__icon svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round;
  animation: nudge 1.6s ease-in-out infinite;
}
@keyframes nudge { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(4px); } }

.caption {
  position: absolute; left: 50%; bottom: 4.5vh; z-index: 4;
  width: min(600px, 44vw);
  transform: translateX(-50%);
  text-align: center; opacity: 0; pointer-events: none;
}
.caption__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.6rem, 2.8vw, 2.8rem); line-height: 1.08;
  color: var(--gold);
  text-shadow: 0 4px 24px rgba(30, 0, 6, .45);
}
.caption__text {
  margin: .7rem auto 0; max-width: 520px;
  font-size: clamp(.92rem, 1.15vw, 1.04rem); line-height: 1.55;
  color: rgba(255, 240, 215, .9);
}

.stage__progress {
  position: absolute; right: 20px; top: 50%; z-index: 4; opacity: 0;
  width: 2px; height: 120px; margin-top: -60px;
  background: rgba(255, 240, 215, .18); border-radius: 2px; overflow: hidden;
}
.stage__progress span { display: block; width: 100%; height: 100%; background: var(--gold); transform-origin: 50% 0; transform: scaleY(0); }

.stage__shade { position: absolute; inset: 0; z-index: 6; background: #22020A; opacity: 0; pointer-events: none; }

@media (max-width: 1000px) {
  .hero-copy--right { display: none; }
  .hero-copy--left { width: min(36vw, 420px); }
  .stage__progress { display: none; }
}
@media (orientation: portrait) {
  .hero-copy--left {
    top: calc(var(--header-h) + 1.5vh); left: var(--pad); right: var(--pad);
    width: auto; transform: none; text-align: center;
  }
  .hero-eyebrow::before { display: none; }
  .hero-title { margin-top: 10px; font-size: clamp(2.3rem, 10.5vw, 4.4rem); }
  .hero-title em { display: inline; }
  .hero-lead { display: none; }
  .medallion { width: 150vw; }
  .caption {
    width: min(600px, 92vw);
    bottom: 3vh; padding: 16px 18px; border-radius: 22px;
    background: rgba(58, 4, 14, .72);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
}

/* =========================================================
   Ikat band (generated in JS)
   ========================================================= */
.ikat-band { height: 20px; background-size: auto 100%; background-repeat: repeat-x; }
.ikat-band--thin { height: 12px; }

/* =========================================================
   Collection
   ========================================================= */
.collection {
  position: relative; z-index: 5;
  margin-top: -100vh;
  background: var(--cream);
  border-radius: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 0 0;
  overflow: hidden;
  padding-bottom: clamp(64px, 8vw, 120px);
  box-shadow: 0 -30px 70px rgba(20, 0, 4, .45);
}
.section-head { text-align: center; max-width: 680px; margin: 0 auto clamp(24px, 3.5vw, 40px); padding-top: clamp(56px, 7vw, 96px); }
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .26em; text-transform: uppercase; color: var(--red); }
.section-title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.04;
  color: var(--red-700); margin-top: .25em;
}
.section-title--light { color: var(--gold); text-align: center; }
.section-lead { margin-top: 1rem; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.65; }

.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: clamp(28px, 3.5vw, 44px); }
.chip {
  border: 1.5px solid rgba(158, 11, 34, .28); background: transparent; color: var(--red-700);
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
  font-weight: 700; font-size: .9rem;
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--red); }
.chip.is-active { background: var(--red); border-color: var(--red); color: var(--cream); }

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2.2vw, 28px); }
@media (max-width: 1120px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px)  { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 340px)  { .grid { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column;
  background: #FFFBF2; border-radius: 24px;
  padding: 12px 12px 16px;
  box-shadow: 0 1px 0 rgba(58, 10, 16, .05), 0 18px 36px -24px rgba(58, 10, 16, .45);
  opacity: 0; transform: translateY(28px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1), box-shadow .3s;
}
.card.is-in { opacity: 1; transform: none; }
.card.is-in:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(58, 10, 16, .05), 0 26px 44px -24px rgba(58, 10, 16, .55); }
.card[hidden] { display: none; }
.card.is-flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(244, 180, 0, 0); } 25% { box-shadow: 0 0 0 5px var(--gold); } }

.card__media { position: relative; aspect-ratio: .74; }
.card__media .arch img { transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.card:hover .card__media .arch img { transform: scale(1.04); }
.badge {
  position: absolute; left: 12px; bottom: 12px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--red); color: var(--cream);
  font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.badge--gold { background: var(--gold); color: var(--ink); }

.card__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px 4px 0; }
.card__title { font-family: var(--font-display); font-weight: 400; font-size: 1.32rem; line-height: 1.15; color: var(--red-700); }
.card__meta { font-size: .84rem; color: var(--ink-soft); margin-top: -4px; }
.sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.size {
  min-width: 38px; height: 34px; padding: 0 8px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid rgba(58, 10, 16, .18); background: transparent;
  font-weight: 700; font-size: .82rem; color: var(--ink);
  transition: background-color .15s, color .15s, border-color .15s;
}
.size:hover { border-color: var(--red); }
.size[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--cream); }

.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.price { font-weight: 800; font-size: 1.06rem; color: var(--ink); white-space: nowrap; }
.price s { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-soft); }
.btn-add {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 10px 16px; background: var(--gold); color: var(--ink);
  font-weight: 800; font-size: .9rem; white-space: nowrap;
  transition: background-color .2s, color .2s, transform .15s;
}
.btn-add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn-add:hover { background: var(--red); color: var(--cream); }
.btn-add:active { transform: scale(.96); }
.btn-add.is-added { background: #2E7A4E; color: #fff; }

@media (max-width: 560px) {
  .card { padding: 8px 8px 12px; border-radius: 20px; }
  .card__title { font-size: 1.08rem; }
  .card__foot { flex-direction: column; align-items: stretch; }
  .btn-add { width: 100%; }
  .size { min-width: 0; flex: 1; padding: 0 4px; height: 32px; }
}

/* =========================================================
   Features
   ========================================================= */
.features {
  position: relative; z-index: 5;
  padding: clamp(64px, 8vw, 112px) 0;
  color: var(--cream);
  background: radial-gradient(ellipse at 50% 0%, #B8102A 0%, #7E0A1C 60%, #5A0714 100%);
}
.features__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); margin-top: clamp(28px, 4vw, 48px); }
@media (max-width: 820px) { .features__grid { grid-template-columns: 1fr; } }
.feature { padding: 28px; border-radius: 24px; background: rgba(255, 240, 200, .06); border: 1px solid rgba(244, 180, 0, .28); }
.feature__icon { width: 44px; height: 44px; fill: none; stroke: var(--gold); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; color: var(--gold-100); margin: 18px 0 8px; }
.feature p { color: rgba(255, 240, 215, .82); line-height: 1.6; }

/* =========================================================
   Footer
   ========================================================= */
.footer { position: relative; z-index: 5; background: #33040C; color: rgba(255, 240, 215, .82); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; padding: 52px 0 28px; }
.footer__brand { font-family: var(--font-display); font-size: 2.3rem; letter-spacing: .12em; color: var(--gold); }
.footer__note { margin-top: 6px; max-width: 280px; line-height: 1.55; }
.footer__cols { display: flex; flex-wrap: wrap; gap: 56px; }
.footer__cols a, .footer__cols p { display: block; margin-top: 8px; text-decoration: none; }
.footer__cols a:hover { color: var(--gold-300); }
.footer__label { font-size: .74rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--gold) !important; margin-top: 0 !important; }
.footer__copy { text-align: center; padding: 18px var(--pad); font-size: .8rem; opacity: .6; border-top: 1px solid rgba(255, 255, 255, .08); }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; cursor: pointer;
  padding: 14px 24px; font-weight: 800; font-size: 1rem;
  transition: background-color .2s, color .2s;
}
.btn--primary { background: var(--red); color: var(--cream); }
.btn--primary:hover { background: var(--red-700); }
.btn--ghost { background: transparent; color: var(--red); box-shadow: inset 0 0 0 1.5px var(--red); }
.btn--ghost:hover { background: var(--red); color: var(--cream); }
.btn--block { width: 100%; }

/* =========================================================
   Cart drawer
   ========================================================= */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(30, 2, 8, .5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .35s;
}
.overlay.is-open { opacity: 1; }
.cart {
  position: fixed; top: 0; right: 0; z-index: 100;
  width: min(440px, 100%); height: 100%; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--cream);
  box-shadow: -24px 0 60px rgba(20, 0, 4, .35);
  transform: translateX(105%);
  transition: transform .45s cubic-bezier(.2, .8, .2, 1);
  visibility: hidden;
}
.cart.is-open { transform: none; visibility: visible; }
.cart__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid rgba(58, 10, 16, .1); }
.cart__head h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.9rem; color: var(--red-700); }
.icon-btn { width: 42px; height: 42px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; background: rgba(58, 10, 16, .06); }
.icon-btn:hover { background: rgba(58, 10, 16, .12); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }

.cart__view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cart__view[hidden] { display: none; }
.cart__list { list-style: none; flex: 1; overflow: auto; padding: 6px 24px; }
.cart__list:empty { display: none; }
.cart-item { display: grid; grid-template-columns: 66px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px dashed rgba(58, 10, 16, .16); }
.cart-item__thumb { width: 66px; height: 88px; }
.cart-item__thumb .arch__rim .rim-outer { stroke-width: 4; }
.cart-item__name { font-weight: 800; line-height: 1.25; }
.cart-item__meta { font-size: .82rem; color: var(--ink-soft); margin-top: 2px; }
.qty { display: inline-flex; align-items: center; margin-top: 8px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(58, 10, 16, .18); }
.qty button { width: 32px; height: 32px; border: 0; background: none; cursor: pointer; font-size: 1.1rem; font-weight: 700; border-radius: 50%; }
.qty button:hover { background: rgba(58, 10, 16, .07); }
.qty span { min-width: 22px; text-align: center; font-weight: 800; font-size: .92rem; }
.cart-item__side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-item__price { font-weight: 800; white-space: nowrap; }
.cart-item__remove { border: 0; background: none; cursor: pointer; font-size: .8rem; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
.cart-item__remove:hover { color: var(--red); }

.cart__empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; color: var(--ink-soft); }
.cart__empty[hidden] { display: none; }
.cart__empty-title { font-family: var(--font-display); font-size: 1.5rem; color: var(--red-700); }
.cart__empty .btn { margin-top: 10px; }
.cart__foot { padding: 16px 24px 24px; border-top: 1px solid rgba(58, 10, 16, .1); background: #FFF0CF; }
.cart__foot[hidden] { display: none; }
.cart__row { display: flex; justify-content: space-between; padding: 5px 0; color: var(--ink-soft); }
.cart__row--total { font-weight: 800; font-size: 1.18rem; color: var(--ink); margin-bottom: 12px; }

.checkout { gap: 14px; padding: 16px 24px 24px; overflow: auto; }
.link-back { align-self: flex-start; border: 0; background: none; cursor: pointer; color: var(--red); font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; }
.field > span, .field legend { font-weight: 700; font-size: .88rem; }
.field input[type="text"], .field input[type="tel"], .field textarea {
  font: 500 1rem var(--font-body); color: var(--ink);
  padding: 12px 14px; border-radius: 14px; resize: vertical;
  border: 1.5px solid rgba(58, 10, 16, .2); background: #FFFCF4;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--red); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red); background: #FFF1F1; }
.field--radios legend { margin-bottom: 4px; }
.field--radios label { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.field--radios input { accent-color: var(--red); width: 18px; height: 18px; }
.form-error { min-height: 1.2em; color: var(--red); font-weight: 700; font-size: .9rem; }

.success { align-items: center; justify-content: center; gap: 12px; padding: 32px; text-align: center; }
.success h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; color: var(--red-700); line-height: 1.2; }
.success p { color: var(--ink-soft); }
.success .btn { margin-top: 12px; }
.success__mark { width: 88px; height: 88px; fill: var(--gold); }
.success__tick { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* fly-to-cart ghost */
.ghost { position: fixed; z-index: 140; pointer-events: none; }

/* =========================================================
   Toast
   ========================================================= */
.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 120;
  max-width: calc(100% - 32px);
  padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--cream);
  font-weight: 700; font-size: .92rem;
  box-shadow: 0 14px 34px rgba(20, 0, 4, .35);
  transform: translate(-50%, calc(100% + 40px));
  visibility: hidden;
  transition: transform .4s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .4s;
}
.toast.is-show { transform: translate(-50%, 0); visibility: visible; transition-delay: 0s; }

@media (prefers-reduced-motion: reduce) {
  .scroll-cta__icon svg { animation: none; }
  .card { transition: opacity .3s; transform: none; }
  .cart, .toast, .overlay { transition-duration: .01s; }
}
