/* ============ Tokens ============ */
:root {
  color-scheme: light;
  --bg: #f4f5f0;
  --surface: #fff;
  --surface-2: #f7f8f5;
  --ink: #121714;
  --ink-2: #39413b;
  --muted: #69726b;
  --line: #e3e6df;
  --line-2: #d2d7ce;
  --brand: #1e6a46;
  --brand-600: #185a3b;
  --brand-900: #0d2a1d;
  --brand-50: #e8f3ec;
  --lime: #d4f56b;
  --sale: #dc3d39;
  --sale-50: #fdecea;
  --warn: #935700;
  --warn-50: #fdf3de;
  --info: #2b5dd1;
  --info-50: #e9effc;
  --shadow-sm: 0 1px 2px rgba(18, 23, 20, .05);
  --shadow: 0 1px 2px rgba(18, 23, 20, .04), 0 14px 34px -18px rgba(18, 23, 20, .2);
  --shadow-lg: 0 2px 4px rgba(18, 23, 20, .04), 0 26px 56px -24px rgba(18, 23, 20, .3);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --header-h: 68px;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #6aa886; outline-offset: 3px; border-radius: 6px; }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; z-index: 100; top: -4rem; left: 1rem;
  padding: .6rem 1rem; border-radius: 10px; background: var(--ink); color: #fff; text-decoration: none;
}
.skip-link:focus { top: .75rem; }
.container { width: min(1200px, calc(100% - 2.5rem)); margin-inline: auto; }

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(244, 245, 240, .82);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid rgba(18, 23, 20, .07);
}
.site-nav { height: var(--header-h); display: flex; align-items: center; gap: 1.75rem; }
.wordmark {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.055em; line-height: 1;
  color: var(--ink); text-decoration: none;
}
.wordmark-mark {
  display: grid; place-items: center; width: 32px; height: 32px; padding-bottom: 3px;
  border-radius: 10px; background: var(--brand); color: var(--lime);
  font-size: 1.2rem; letter-spacing: 0;
}
.wordmark-dot { color: var(--brand); }
.nav-links { display: flex; gap: .2rem; }
.nav-links a {
  padding: .45rem .8rem; border-radius: 999px;
  color: var(--ink-2); font-size: .95rem; font-weight: 560; text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: rgba(18, 23, 20, .06); color: var(--ink); }

.main { padding-block: clamp(1.25rem, 3vw, 2.5rem) clamp(3rem, 7vw, 6rem); }

/* ============ Buttons ============ */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 44px; padding: .65rem 1.1rem;
  border: 1px solid transparent; border-radius: 12px;
  background: var(--brand); color: #fff;
  font: inherit; font-size: .98rem; font-weight: 640; line-height: 1.2; text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 18px -10px rgba(30, 106, 70, .7);
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.button:hover { background: var(--brand-600); }
.button:active { transform: translateY(1px); }
.button[disabled] { opacity: .65; cursor: progress; }
.button-lg { min-height: 52px; padding: .8rem 1.35rem; border-radius: 14px; font-size: 1.02rem; }
.button-block { width: 100%; }
.button-ghost {
  background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm);
}
.button-ghost:hover { background: var(--surface-2); border-color: #bcc3b8; }

/* ============ Badges ============ */
.badge, .status-pill {
  display: inline-flex; align-items: center; gap: .38rem;
  padding: .32rem .65rem; border-radius: 999px;
  font-size: .78rem; font-weight: 680; line-height: 1.2; white-space: nowrap;
}
.badge .icon { width: 1.05em; height: 1.05em; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-sale { background: var(--sale); color: #fff; }
.badge-dark { background: rgba(18, 23, 20, .82); color: #fff; backdrop-filter: blur(6px); }
.badge-ok { background: var(--brand-50); color: var(--brand); }
.badge-muted { background: #eceee9; color: var(--muted); }
.badge-soft { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.badge-warn { background: var(--warn-50); color: var(--warn); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  color: var(--brand); font-size: .78rem; font-weight: 720; letter-spacing: .08em; text-transform: uppercase;
}

/* ============ Hero ============ */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: center;
  padding: clamp(1.75rem, 5vw, 4rem);
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(90% 120% at 100% 0%, #2b8458 0%, transparent 55%),
    radial-gradient(70% 90% at 0% 100%, #155a3a 0%, transparent 60%),
    var(--brand-900);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 75% 40%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 75% 40%, #000 0%, transparent 70%);
}
.hero .eyebrow {
  padding: .4rem .8rem; border-radius: 999px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .86);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--lime);
  box-shadow: 0 0 0 0 rgba(212, 245, 107, .6); animation: pulse 2.2s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 9px rgba(212, 245, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 245, 107, 0); }
}
.hero h1 {
  margin-top: 1.25rem;
  font-size: clamp(2.3rem, 5.2vw, 4.1rem); font-weight: 790; line-height: 1.02; letter-spacing: -.048em;
  text-wrap: balance;
}
.hl { color: var(--lime); }
.lead {
  max-width: 34rem; margin-top: 1.25rem;
  color: rgba(255, 255, 255, .74); font-size: clamp(1rem, 1.4vw, 1.14rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero .button { background: var(--lime); color: var(--brand-900); box-shadow: 0 10px 30px -12px rgba(212, 245, 107, .6); }
.hero .button:hover { background: #c7ec52; }
.hero .button-ghost {
  background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .2); box-shadow: none;
}
.hero .button-ghost:hover { background: rgba(255, 255, 255, .12); }
.hero-points {
  display: flex; flex-wrap: wrap; gap: .6rem 1.4rem;
  margin: 2.25rem 0 0; padding: 0; list-style: none;
  color: rgba(255, 255, 255, .72); font-size: .92rem;
}
.hero-points li { display: inline-flex; align-items: center; gap: .5rem; }
.hero-points .icon { color: var(--lime); }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 360px; }
.hero-ticket {
  width: min(100%, 340px); padding: 1.4rem;
  border-radius: 24px; background: #fff; color: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .5);
  transform: rotate(-3deg);
  animation: bob 7s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-2deg) translateY(-8px); }
}
.ticket-top { display: flex; align-items: center; gap: .8rem; }
.ticket-ok {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--brand); color: #fff;
}
.ticket-title { font-weight: 720; }
.ticket-sub { color: var(--muted); font-size: .84rem; }
.ticket-label {
  margin-top: 1.35rem; color: var(--muted);
  font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
.ticket-key {
  margin-top: .45rem; padding: .8rem .9rem;
  border: 1px dashed var(--line-2); border-radius: 12px; background: var(--surface-2);
  font-family: var(--mono); font-size: .98rem; font-weight: 600; letter-spacing: .03em;
}
.ticket-rows { margin-top: 1rem; }
.ticket-rows p {
  display: flex; justify-content: space-between; align-items: center;
  padding: .65rem 0; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .9rem;
}
.ticket-rows strong { color: var(--ink); font-size: 1.05rem; }
.ticket-rows .icon { color: var(--brand); }
.hero-float {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: .5rem;
  padding: .55rem .85rem; border-radius: 14px; font-weight: 750;
}
.float-sale {
  top: 9%; right: 6%; background: var(--sale); color: #fff; font-size: 1.1rem;
  transform: rotate(8deg); box-shadow: 0 16px 30px -12px rgba(220, 61, 57, .7);
}
.float-file {
  bottom: 4%; left: 0; color: #fff; font-size: .86rem;
  background: rgba(13, 42, 29, .72); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transform: rotate(-5deg);
}
.float-file .icon { color: var(--lime); }

/* ============ Sections ============ */
.catalog-section, .how { margin-top: clamp(2.5rem, 6vw, 4.5rem); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 770; line-height: 1.1; letter-spacing: -.038em; }
.section-sub { margin-top: .3rem; color: var(--muted); }

/* ============ Toolbar ============ */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  margin-bottom: 1.25rem; padding: .55rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm);
}
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: .6rem;
  height: 44px; padding: 0 .9rem;
  border: 1px solid transparent; border-radius: 12px; background: var(--surface-2);
  color: var(--muted); transition: border-color .15s, box-shadow .15s, background .15s;
}
.search:focus-within { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--brand-50); }
.search input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; background: none; outline: none; color: var(--ink); font: inherit;
}
.search input:focus-visible { outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip {
  display: inline-flex; align-items: center; gap: .4rem;
  height: 40px; padding: 0 .95rem;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--ink-2); font: inherit; font-size: .92rem; font-weight: 600;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { border-color: var(--line-2); }
.chip span { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-pressed="true"] span { color: rgba(255, 255, 255, .6); }
.sort select {
  height: 44px; padding: 0 2.5rem 0 .95rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2369726b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .8rem center / 16px;
  -webkit-appearance: none; appearance: none;
  color: var(--ink); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer;
}

/* ============ Product cards ============ */
.catalog { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.product-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.product-card:has(.card-title a:focus-visible) { outline: 3px solid #6aa886; outline-offset: 3px; }
.card-media {
  position: relative; overflow: hidden; container-type: inline-size;
  aspect-ratio: 4 / 3; margin: 8px 8px 0; border-radius: 18px; background: var(--surface-2);
}
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.product-card:hover .card-media img,
.product-card:hover .cover-letter { transform: scale(1.06); }
.card-badges { position: absolute; z-index: 2; top: .7rem; left: .7rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.card-body { display: flex; flex: 1; flex-direction: column; gap: .45rem; padding: 1rem 1.15rem 1.15rem; }
.card-kind { display: inline-flex; align-items: center; gap: .4rem; color: var(--brand); font-size: .8rem; font-weight: 650; }
.card-kind .icon { width: 1em; height: 1em; }
.card-title { font-size: 1.14rem; font-weight: 700; line-height: 1.3; letter-spacing: -.018em; overflow-wrap: anywhere; }
.card-title a { text-decoration: none; }
.card-title a::after { content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.card-title a:focus-visible { outline: none; }
.card-desc {
  color: var(--muted); font-size: .92rem;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  margin-top: auto; padding-top: .85rem; border-top: 1px dashed var(--line);
}
.card-go {
  display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); color: #fff; transition: transform .22s ease, background .22s ease;
}
.product-card:hover .card-go { background: var(--brand); transform: rotate(-45deg); }
.product-card.is-out .cover,
.product-card.is-out .card-media img { filter: grayscale(1); opacity: .55; }
.product-card.is-out .card-go { background: var(--line-2); }
.product-card.is-out .price strong { color: var(--muted); }

/* ============ Price ============ */
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .55rem; }
.price strong { font-size: 1.35rem; font-weight: 780; letter-spacing: -.025em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-from { font-size: .72em; font-weight: 600; }
.price.has-discount strong { color: var(--sale); }
.price del { color: var(--muted); font-size: .92rem; white-space: nowrap; }

/* ============ Generated covers ============ */
.cover {
  position: relative; display: grid; place-items: center;
  width: 100%; height: 100%; overflow: hidden;
  color: #fff; background: var(--g);
}
.cover::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .25) 1px, transparent 1.3px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(135deg, #000 5%, transparent 65%);
  mask-image: linear-gradient(135deg, #000 5%, transparent 65%);
}
.cover::after {
  content: ""; position: absolute; top: -25%; left: -15%;
  width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: rgba(255, 255, 255, .2); filter: blur(40px);
}
.cover-letter {
  position: absolute; right: .04em; bottom: -.16em;
  font-size: 46cqi; font-weight: 850; line-height: 1; letter-spacing: -.06em;
  color: rgba(255, 255, 255, .15);
  transition: transform .45s ease; transform-origin: bottom right;
}
.cover-chip {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: clamp(56px, 24cqi, 104px); aspect-ratio: 1; border-radius: 26%;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .32);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 22px 40px -18px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.cover-chip .icon { width: 44%; height: 44%; }
.tone-0 { --g: linear-gradient(140deg, #34915f 0%, #16573a 58%, #0d2e1f 100%); }
.tone-1 { --g: linear-gradient(140deg, #7472fa 0%, #4136cf 55%, #251c7d 100%); }
.tone-2 { --g: linear-gradient(140deg, #ffb64a 0%, #f2752b 55%, #c2410c 100%); }
.tone-3 { --g: linear-gradient(140deg, #30c9c2 0%, #0f8b98 55%, #0d5468 100%); }
.tone-4 { --g: linear-gradient(140deg, #ff7090 0%, #e1355f 55%, #9b174c 100%); }
.tone-5 { --g: linear-gradient(140deg, #66778d 0%, #323f52 55%, #141b26 100%); }

/* ============ Empty states ============ */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: .45rem;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem; text-align: center;
  background: var(--surface); border: 1px dashed var(--line-2); border-radius: 24px; color: var(--muted);
}
.empty-icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: .5rem;
  border-radius: 16px; background: var(--brand-50); color: var(--brand);
}
.empty-icon .icon { width: 26px; height: 26px; }
.empty-title { color: var(--ink); font-size: 1.15rem; font-weight: 720; }
.empty .button { margin-top: .85rem; }

/* ============ How it works ============ */
.steps {
  display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  margin: 0; padding: 0; list-style: none; counter-reset: step;
}
.step {
  position: relative; padding: 1.6rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  counter-increment: step;
}
.step::after {
  content: "0" counter(step); position: absolute; top: 1.3rem; right: 1.5rem;
  color: var(--line); font-size: 2.6rem; font-weight: 850; line-height: 1; letter-spacing: -.05em;
}
.step-icon {
  display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1.15rem;
  border-radius: 14px; background: var(--brand-50); color: var(--brand);
}
.step-icon .icon { width: 22px; height: 22px; }
.step h3 { margin-bottom: .4rem; font-size: 1.1rem; font-weight: 720; letter-spacing: -.018em; }
.step p { color: var(--muted); font-size: .95rem; }

/* ============ Breadcrumbs ============ */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin-bottom: 1.5rem; color: var(--muted); font-size: .92rem; }
.crumbs a {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .38rem .8rem .38rem .6rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-2); font-weight: 600; text-decoration: none; transition: border-color .15s;
}
.crumbs a:hover { border-color: var(--line-2); color: var(--ink); }
.crumbs [aria-current] {
  max-width: min(60vw, 40rem); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--ink); font-weight: 560;
}

/* ============ Product page ============ */
.product-layout {
  display: grid; align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  grid-template-areas: "media buy" "info buy";
  gap: 1.25rem clamp(1.5rem, 4vw, 3rem);
}
.pp-media {
  grid-area: media; overflow: hidden; container-type: inline-size;
  aspect-ratio: 4 / 3; border-radius: 28px;
  background: var(--surface); border: 1px solid var(--line);
}
.detail-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.pp-media.is-out .cover, .pp-media.is-out .detail-image { filter: grayscale(1); opacity: .6; }
.pp-media .cover-chip { width: clamp(72px, 20cqi, 132px); }
.pp-media .cover-letter { font-size: 38cqi; }
.pp-buy { grid-area: buy; position: sticky; top: calc(var(--header-h) + 1.25rem); }
.pp-info { grid-area: info; display: grid; gap: 1.25rem; }

.buy-panel {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow);
}
.buy-panel .badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.buy-panel h1 {
  font-size: clamp(1.4rem, 2.2vw, 1.7rem); font-weight: 770; line-height: 1.12; letter-spacing: -.036em;
  overflow-wrap: anywhere; text-wrap: balance;
}
.buy-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; margin-top: .85rem; }
.buy-top .badge { padding: .25rem .55rem; font-size: .75rem; }
.buy-price .price strong { font-size: clamp(1.7rem, 2.4vw, 2rem); }
.buy-price .price del { font-size: 1.05rem; }
.savings {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: .55rem;
  padding: .3rem .7rem; border-radius: 999px;
  background: var(--sale-50); color: var(--sale); font-size: .85rem; font-weight: 680;
}
.buy-form { margin-top: 1.1rem; }
.buy-submit { padding: .9rem 0 .6rem; }
.variants:has(+ .buy-submit) { margin-bottom: .1rem; }
.buy-submit .button { margin-top: 0; }
.announcement { margin: 0; padding: .55rem 1rem; background: var(--brand); color: #fff; font-size: .9rem; font-weight: 600; text-align: center; }
.categories { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.categories .chip { text-decoration: none; }
.categories .chip[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.catalog-title { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 780; letter-spacing: -.035em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: .6rem; }
.gallery img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); border-radius: 14px; }
.secret + .secret { margin-top: .75rem; }
.secret .code-value { font-size: 1.6rem; letter-spacing: .18em; font-variant-numeric: tabular-nums; }
[data-code] .field-help { margin: 0; padding: 0 1.1rem; }
[data-code] form { padding: .75rem 1.1rem 1.1rem; }
.purchase .info-lead { margin-top: .75rem; }
.purchase > form, .purchase > .notice { margin-top: 1rem; }
.success-mark.is-muted { background: var(--surface-2); color: var(--muted); }
.page-purchase .info-block { margin-top: 1.25rem; text-align: left; }
.variants { margin: 0 0 1rem; padding: 0; border: 0; min-width: 0; }
div.variants { margin-top: 1.25rem; }
.variants legend { padding: 0; }
.variant-group { margin: .6rem 0 .35rem; color: var(--muted); font-size: .85rem; font-weight: 640; }
.variant-list { display: grid; gap: .5rem; }
.variant {
  display: flex; align-items: center; gap: .75rem; min-height: 46px; padding: .5rem 1rem;
  border: 1px solid var(--line-2); border-radius: 14px; background: #fff;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.variant:has(input:enabled) { cursor: pointer; }
.variant:has(input:enabled):hover { border-color: var(--brand); }
.variant:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.variant:has(input:focus-visible) { box-shadow: 0 0 0 4px var(--brand-50); border-color: var(--brand); }
.variant input { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--brand); }
.variant-name { flex: 1; min-width: 0; font-weight: 640; overflow-wrap: anywhere; }
.variant-price { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: .1rem .5rem; text-align: right; }
.variant-price strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.variant-price del { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.variant-out { order: -1; color: var(--muted); font-size: .8rem; }
.variant.is-out { background: none; color: var(--muted); }
.field-label { display: block; margin-bottom: .45rem; font-size: .92rem; font-weight: 640; }
.field {
  display: flex; align-items: center; gap: .65rem;
  height: 52px; padding: 0 1rem;
  border: 1px solid var(--line-2); border-radius: 14px; background: #fff;
  color: var(--muted); transition: border-color .15s, box-shadow .15s, color .15s;
}
.field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); color: var(--brand); }
.field.has-error { border-color: var(--sale); }
.field input {
  flex: 1; min-width: 0; height: 100%;
  border: 0; background: none; outline: none; color: var(--ink); font: inherit;
}
.field input:focus-visible { outline: none; }
.field-help { margin-top: .45rem; color: var(--muted); font-size: .85rem; }
.buy-form .button { margin-top: 1.1rem; }
.errorlist { margin: .45rem 0 0; padding: 0; list-style: none; color: var(--sale); font-size: .88rem; font-weight: 600; }
.soldout {
  margin-top: 1.25rem; padding: 1.1rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px;
  color: var(--muted); font-size: .93rem;
}
.soldout-title { margin-bottom: .25rem; color: var(--ink); font-weight: 720; }
.soldout .button { margin-top: 1rem; }
.assurances {
  display: grid; gap: .65rem;
  margin: .6rem 0 0; padding: 1rem 0 0; list-style: none;
  border-top: 1px solid var(--line);
}
.assurances li { display: flex; align-items: flex-start; gap: .7rem; color: var(--ink-2); font-size: .9rem; }
.assurances .icon { margin-top: .12rem; color: var(--brand); }

.info-block {
  padding: clamp(1.25rem, 3vw, 1.75rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
}
.info-block h2 { margin-bottom: .8rem; font-size: 1.2rem; font-weight: 740; letter-spacing: -.022em; }
.prose { color: var(--ink-2); overflow-wrap: anywhere; }
.prose p + p { margin-top: .9rem; }
.page-terms .crumbs, .terms { max-width: 720px; margin-inline: auto; }
.terms h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); font-weight: 770; letter-spacing: -.036em; }
.terms-sub { margin-top: .4rem; color: var(--muted); }
.terms-body { margin-top: 1.5rem; }
.terms-body h2 { margin: 1.6rem 0 .5rem; color: var(--ink); font-size: 1.1rem; font-weight: 720; letter-spacing: -.02em; }
.terms-body h2:first-child { margin-top: 0; }
.info-lead { color: var(--ink-2); }
.mini-steps { display: grid; gap: .65rem; margin: 1.15rem 0 0; padding: 0; list-style: none; }
.mini-steps li { display: flex; align-items: center; gap: .8rem; color: var(--ink-2); font-size: .95rem; }
.mini-steps span {
  display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-50); color: var(--brand); font-size: .85rem; font-weight: 750;
}

/* ============ Notices ============ */
.notice {
  display: flex; align-items: flex-start; gap: .65rem;
  margin-top: 1rem; padding: .85rem 1rem; border-radius: 14px;
  background: var(--brand-50); color: var(--brand-900); font-size: .93rem;
}
.notice .icon { margin-top: .15rem; color: var(--brand); }
.notice-warn { background: var(--warn-50); color: #5a3800; }
.notice-warn .icon { color: var(--warn); }
.notice-muted { background: #eef0eb; color: var(--ink-2); }
.notice-muted .icon { color: var(--muted); }
.countdown { font-weight: 720; font-variant-numeric: tabular-nums; }

/* ============ Panels / order ============ */
.panel {
  padding: clamp(1.25rem, 4vw, 2rem);
  background: var(--surface); border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow);
}
.order-layout {
  display: grid; align-items: start; gap: 1.25rem;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  max-width: 1040px;
}
.order-main h1 {
  margin-top: 1rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 780; line-height: 1.08; letter-spacing: -.042em;
}
.order-product { margin-top: .4rem; color: var(--muted); font-size: 1.05rem; overflow-wrap: anywhere; }
.status-draft { background: var(--info-50); color: var(--info); }
.status-pending { background: var(--warn-50); color: var(--warn); }
.status-paid { background: var(--brand-50); color: var(--brand); }
.status-expired, .status-canceled { background: #eceee9; color: var(--muted); }
.status-refunded { background: var(--sale-50); color: var(--sale); }

.stepper { display: grid; grid-template-columns: repeat(3, 1fr); margin: 1.85rem 0 .75rem; padding: 0; list-style: none; }
.stepper li {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: var(--muted); font-size: .86rem; font-weight: 620; text-align: center;
}
.stepper li::before {
  content: ""; position: absolute; top: 17px; right: 50%; width: 100%; height: 2px; background: var(--line);
}
.stepper li:first-child::before { display: none; }
.stepper li.is-done::before, .stepper li.is-current::before { background: var(--brand); }
.step-dot {
  position: relative; z-index: 1; display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-2);
  color: var(--muted); font-size: .9rem; font-weight: 720;
}
.step-dot .icon { width: 18px; height: 18px; }
.is-done .step-dot { background: var(--brand); border-color: var(--brand); color: #fff; }
.is-current .step-dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 5px var(--brand-50); }
.is-failed .step-dot { background: #eceee9; border-color: #d6d9d2; }
.is-done .step-label, .is-current .step-label { color: var(--ink); }

.order-actions { display: grid; gap: .6rem; margin-top: 1.5rem; }
.order-actions form { margin: 0; }

.order-summary h2 { margin-bottom: .5rem; font-size: 1.1rem; font-weight: 740; letter-spacing: -.02em; }
.summary { margin: 0; }
.summary div { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem 0; border-top: 1px solid var(--line); font-size: .93rem; }
.summary div:first-child { border-top: 0; }
.summary dt { flex: none; color: var(--muted); }
.summary dd { margin: 0; min-width: 0; text-align: right; font-weight: 580; overflow-wrap: anywhere; }
.summary .order-id { font-family: var(--mono); font-size: .78rem; font-weight: 500; color: var(--ink-2); }
.summary .is-discount dd { color: var(--sale); }
.summary .summary-total { align-items: baseline; margin-top: .25rem; padding-top: 1rem; border-top: 1px dashed var(--line-2); }
.summary-total dt { color: var(--ink); font-weight: 680; }
.summary-total strong { font-size: 1.55rem; font-weight: 790; letter-spacing: -.025em; white-space: nowrap; }

/* ============ Test payment ============ */
.page-pay .crumbs, .page-purchase .crumbs { max-width: 480px; margin-inline: auto; }
.pay-card { max-width: 480px; margin-inline: auto; }
.pay-head { display: flex; align-items: center; justify-content: space-between; }
.pay-lock {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 12px; background: var(--surface-2); color: var(--muted);
}
.pay-card h1 { margin-top: 1.1rem; font-size: 1.9rem; font-weight: 770; letter-spacing: -.036em; }
.pay-product { margin-top: .25rem; color: var(--muted); overflow-wrap: anywhere; }
.pay-amount {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-top: 1.5rem; padding: 1.1rem 1.2rem;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px;
}
.pay-amount span { color: var(--muted); }
.pay-amount strong { font-size: 1.8rem; font-weight: 790; letter-spacing: -.03em; white-space: nowrap; }
.pay-actions { display: grid; gap: .6rem; margin-top: 1.5rem; }
.pay-note { margin-top: 1.1rem; color: var(--muted); font-size: .85rem; text-align: center; }
.kaspi-qr {
  width: min(100%, 280px); margin: 1.25rem auto 0; padding: .9rem;
  background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-sm);
}
.kaspi-qr svg { display: block; width: 100%; height: auto; shape-rendering: crispEdges; }
.kaspi-invoice { margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.kaspi-invoice summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  color: var(--ink-2); font-weight: 640; cursor: pointer; list-style: none;
}
.kaspi-invoice summary::-webkit-details-marker { display: none; }
.kaspi-invoice summary::after { content: "+"; color: var(--muted); font-size: 1.3rem; line-height: 1; }
.kaspi-invoice[open] summary::after { content: "−"; }
.kaspi-invoice .buy-form { margin-top: 1rem; }
@media (hover: hover) and (pointer: fine) {
  .kaspi-open { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
  .kaspi-open:hover { background: var(--surface-2); border-color: #bcc3b8; }
}

/* ============ Purchase ============ */
.purchase { max-width: 640px; margin-inline: auto; }
.purchase-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
.success-mark {
  display: grid; place-items: center; width: 64px; height: 64px; margin: .5rem 0 1.5rem;
  border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 0 0 10px var(--brand-50);
}
.success-mark .icon { width: 30px; height: 30px; stroke-width: 2.6; }
.purchase h1 {
  margin-top: .5rem;
  font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 780; line-height: 1.1; letter-spacing: -.04em;
  overflow-wrap: anywhere; text-wrap: balance;
}
.purchase-sub { margin-top: .6rem; color: var(--muted); }
.secret { margin-top: 1.75rem; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); border-radius: 18px; }
.secret-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 50px; padding: .45rem .5rem .45rem 1rem; border-bottom: 1px solid var(--line);
  color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
}
.copy-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  height: 36px; padding: 0 .8rem;
  border: 1px solid var(--line-2); border-radius: 10px; background: #fff;
  color: var(--ink); font: inherit; font-size: .85rem; font-weight: 640; letter-spacing: 0; text-transform: none;
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.copy-btn:hover { border-color: #bcc3b8; }
.copy-btn.is-copied { background: var(--brand); border-color: var(--brand); color: #fff; }
.purchase-text {
  margin: 0; padding: 1.1rem 1.15rem 1.25rem;
  color: var(--ink); font-family: var(--mono); font-size: .98rem; line-height: 1.6;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.purchase > .button { margin-top: 1.25rem; }
.caution {
  display: flex; align-items: flex-start; gap: .6rem;
  margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .88rem;
}
.caution .icon { margin-top: .1rem; }
.purchase-back { margin-top: 1.25rem; text-align: center; }
.purchase-back a { color: var(--brand); font-weight: 620; text-underline-offset: .2em; }

/* ============ Footer ============ */
.site-footer { margin-top: auto; background: var(--brand-900); color: rgba(255, 255, 255, .7); }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; padding-block: 3rem 2rem; }
.footer-brand { max-width: 26rem; }
.footer-brand p { margin-top: .9rem; font-size: .95rem; }
.site-footer .wordmark { color: #fff; }
.site-footer .wordmark-mark { background: var(--lime); color: var(--brand-900); }
.site-footer .wordmark-dot { color: var(--lime); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: #fff; font-weight: 580; text-decoration: none; text-underline-offset: .2em; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem;
  padding-block: 1.25rem 2rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem;
}

/* ============ Responsive ============ */
@media (min-width: 961px) {
  /* Кнопка видна без прокрутки и когда вариантов много: прижимается к низу окна, пока не дойдёт до своего места. */
  .buy-submit { position: sticky; bottom: 0; z-index: 2; background: linear-gradient(to top, var(--surface) 80%, transparent); }
  .buy-form input { scroll-margin-block: calc(var(--header-h) + 1rem) 6rem; }
  .page-product .main { padding-top: 1.25rem; }
  .page-product .crumbs { margin-bottom: 1rem; }
  .pp-buy { top: calc(var(--header-h) + 1rem); }
  .buy-panel { padding: 1.35rem 1.5rem; }
  .buy-panel .field { height: 46px; }
  .buy-panel .field-label { margin-bottom: .35rem; }
  .buy-panel .field-help { margin-top: .35rem; }
  .variant-list:has(> .variant:nth-child(4)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .variant-list:has(> .variant:nth-child(4)) .variant { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 .6rem; padding: .4rem .8rem; font-size: .95rem; line-height: 1.35; }
  .variant-list:has(> .variant:nth-child(4)) .variant-price { grid-column: 2; justify-content: flex-start; text-align: left; }
  .variant-list:has(> .variant:nth-child(4)) .variant-out { order: 0; }
  .buy-panel legend + .variant-group { margin-top: 0; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { min-height: 300px; }
  .product-layout { grid-template-columns: 1fr; grid-template-areas: "media" "buy" "info"; }
  .pp-buy { position: static; }
  .pp-media { aspect-ratio: 16 / 9; }
  .order-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .container { width: calc(100% - 1.5rem); }
  .site-nav { gap: 1rem; }
  .wordmark { font-size: 1.3rem; }
  .wordmark-mark { width: 28px; height: 28px; font-size: 1.05rem; }
  .nav-links { margin-left: auto; }
  .nav-links a { padding: .4rem .6rem; font-size: .9rem; }
  .hero { border-radius: 24px; }
  .hero-actions .button { flex: 1 1 auto; }
  .hero-visual { display: none; }
  .toolbar { padding: .5rem; }
  .search { flex-basis: 100%; }
  .sort { flex: 1 1 100%; }
  .sort select { width: 100%; }
  .card-media { margin: 6px 6px 0; }
  .pp-media { aspect-ratio: 4 / 3; border-radius: 22px; }
  .buy-panel, .panel { border-radius: 22px; }
  .stepper li { font-size: .8rem; }
}

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