/* «Полка» — демо-сайт магазина от студии Melvi.
   Референсы: Oura (светлая антиква + спокойный гротеск, скругления, таблетки), Daydream 1820 (магазин свечей:
   крупное имя аромата, ноты по слоям). Шрифты: Prata (заголовки, кириллица) + Golos Text (текст).
   Моушен: GSAP + ScrollTrigger + SplitText + Lenis; появления ease-out, только transform/opacity. */

:root {
  --white: #ffffff;
  --paper: #f4f3f1;
  --ink: #141210;
  --ink-2: #2a2622;
  --muted: #6e6964;
  --line: #e4e1dc;
  --espresso: #17110e;
  --ok: #2f7a4f;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --serif-w: 500;
  --sans: "Manrope", "Segoe UI", system-ui, sans-serif;

  --g: clamp(12px, 1.4vw, 20px);
  --pad: clamp(20px, 3.2vw, 56px);
  --section: clamp(96px, 11vw, 176px);
  --r-xl: 32px;
  --r-lg: 26px;
  --r-md: 20px;
  --r-sm: 14px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --bar: 36px;
  --head: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; font-variant-numeric: lining-nums; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 6px; }
h1[tabindex="-1"]:focus { outline: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; }
h1, h2, h3 { font-family: var(--serif); font-weight: var(--serif-w); letter-spacing: -0.01em; line-height: 1.04; }
h2 { font-size: clamp(38px, 4.6vw, 76px); }
.split-line { overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }

/* ---------- кнопки ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; padding: 0 28px; border-radius: 999px; font-weight: 500; font-size: 16px; white-space: nowrap;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 140ms var(--ease-out);
}
.pill:active, .round:active, .add:active, .chip:active { transform: scale(0.97); }
.pill.light { background: #fff; color: var(--ink); }
.pill.dark { background: var(--ink); color: #fff; }
.pill.ghost-light { color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45); }
.pill.line { box-shadow: inset 0 0 0 1px var(--line); }
.pill.wide { width: 100%; }
.pill[disabled] { background: var(--paper); color: var(--muted); cursor: not-allowed; }
.round { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); font-size: 18px; transition: background-color 200ms ease, color 200ms ease, transform 140ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .pill.light:hover { background: #f1ede7; }
  .pill.dark:hover { background: var(--ink-2); }
  .pill.ghost-light:hover { background: rgba(255, 255, 255, 0.12); }
  .pill.line:hover { box-shadow: inset 0 0 0 1px var(--ink); }
  .round:hover { background: var(--ink); color: #fff; }
}

/* ---------- верх ---------- */
.bar { height: var(--bar); display: grid; place-items: center; background: var(--espresso); color: rgba(255, 255, 255, 0.82); font-size: 13px; letter-spacing: 0.01em; padding: 0 16px; text-align: center; }
.top {
  position: sticky; top: 0; z-index: 40; height: var(--head);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 0 calc(var(--pad) + var(--g));
  background: rgba(255, 255, 255, 0); color: var(--ink);
  transition: background-color 250ms ease, color 250ms ease, box-shadow 250ms ease;
}
body.is-home .top:not(.solid) { color: #fff; }
.top.solid { background: rgba(255, 255, 255, 0.96); box-shadow: 0 1px 0 var(--line); }
/* страница поехала, а первый экран ещё виден: тёмное стекло, чтобы меню не наезжало на заголовок */
body.is-home .top.scrolled:not(.solid) { background: rgba(18, 13, 11, 0.6); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); }
.top-nav { display: flex; gap: 28px; font-size: 15px; }
.top-nav a, .top-link, .foot-links a { position: relative; }
.top-nav a::after, .top-link::after, .foot-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 300ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .top-nav a:hover::after, .top-link:hover::after, .foot-links a:hover::after { transform: scaleX(1); transform-origin: left; }
}
.logo { font-family: var(--serif); font-size: 26px; letter-spacing: 0.16em; text-transform: uppercase; padding-left: 0.16em; }
.top-right { justify-self: end; display: flex; align-items: center; gap: 26px; font-size: 15px; }
.cart-btn { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 7px 0 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; transition: transform 140ms var(--ease-out), background-color 250ms ease, color 250ms ease; }
body.is-home .top:not(.solid) .cart-btn { background: #fff; color: var(--ink); }
.cart-btn span { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; }
body.is-home .top:not(.solid) .cart-btn span { background: var(--ink); color: #fff; }
.cart-btn:active { transform: scale(0.97); }
.cart-btn span.bump { animation: bump 450ms var(--ease-out); }
@keyframes bump { 35% { transform: scale(1.3); } }

/* ---------- первый экран ---------- */
.hero {
  position: relative; margin: calc(var(--head) * -1) 0 0; height: calc(100svh - var(--bar)); min-height: 620px; max-height: 1000px;
  border-radius: 0 0 var(--r-xl) var(--r-xl); overflow: hidden; color: #fff; background: var(--espresso); isolation: isolate;
}
.hero-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; transform: scaleX(-1); }
.hero-media img { width: 100%; height: 116%; object-fit: cover; object-position: 30% 50%; }
.hero-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(12, 9, 7, 0.84) 0%, rgba(12, 9, 7, 0.52) 42%, rgba(12, 9, 7, 0.06) 72%), linear-gradient(0deg, rgba(12, 9, 7, 0.75) 0%, rgba(12, 9, 7, 0) 34%); }
.hero-in { position: absolute; left: calc(var(--pad) + var(--g)); top: 50%; transform: translateY(-48%); max-width: min(1100px, 92%); padding-right: var(--pad); }
.hero h1 { font-size: clamp(60px, 7.8vw, 138px); line-height: 0.94; }
.hero-sub { margin-top: 26px; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(26px, 2.2vw, 38px); line-height: 1.25; color: #fff; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }

/* ---------- общие секции ---------- */
.section { padding: var(--section) calc(var(--pad) + var(--g)) 0; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: 48px; }
.sec-head h2 { max-width: 14ch; }
.sec-side { display: flex; align-items: flex-end; gap: 32px; }
.sec-side p, .sec-note { max-width: 36ch; color: var(--muted); }
.arrows { display: flex; gap: 8px; }

/* карточка товара */
.card { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-media { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--r-md); overflow: hidden; background: var(--paper); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out), opacity 500ms ease; }
.card-media .alt { opacity: 0; }
@media (hover: hover) and (pointer: fine) {
  .card:hover .card-media img { transform: scale(1.04); }
  .card:hover .card-media .alt { opacity: 1; }
  .card:hover .add:not([disabled]) { background: var(--ink); color: #fff; box-shadow: none; }
}
.badge { position: absolute; left: 14px; top: 14px; z-index: 1; padding: 7px 12px; border-radius: 999px; background: #fff; font-size: 13px; font-weight: 500; }
.badge.low { background: var(--ink); color: #fff; }
.badge.out { background: var(--ink); color: #fff; }
.card-meta { display: grid; gap: 4px; }
.card-kind { font-size: 13px; color: var(--muted); }
.card-name { font-family: var(--serif); font-size: 26px; line-height: 1.1; }
.card-line { font-size: 15px; color: var(--muted); }
.card-buy { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.card-price { font-family: var(--serif); font-size: 22px; font-weight: 600; white-space: nowrap; }
.add { height: 40px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 140ms var(--ease-out); }
.add[disabled] { color: var(--muted); cursor: default; }

/* ряд сезона */
.row {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 24px) / 3.5); gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 8px;
  margin-right: calc((var(--pad) + var(--g)) * -1); padding-right: calc(var(--pad) + var(--g));
}
.row::-webkit-scrollbar { display: none; }
.row .card { scroll-snap-align: start; }

/* ---------- зажгите свечу: 3D-сцена ---------- */
.ignite { position: relative; height: 340svh; margin-top: var(--section); }
.ig-stage { position: sticky; top: calc(var(--head) + 6px); height: calc(100svh - var(--head) - 6px - var(--g)); margin: 0 var(--g); border-radius: var(--r-xl); overflow: hidden; background: #0e0b0a; isolation: isolate; }
.ig-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; }
.ig-canvas:active { cursor: grabbing; }
.ig-text { position: absolute; left: var(--pad); top: 0; bottom: 0; width: min(44%, 640px); display: grid; align-items: center; color: #fff; pointer-events: none; }
.ig-line { grid-area: 1 / 1; opacity: 0; will-change: transform, opacity; }
.ig-line[data-k="0"] { opacity: 1; }
.ig-actions { pointer-events: auto; display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.ig-text h2 { font-size: clamp(44px, 5.2vw, 92px); line-height: 0.98; }
.ig-word { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(96px, 12vw, 220px); line-height: 0.9; letter-spacing: -0.02em; }
.ig-end { font-family: var(--serif); font-weight: 500; font-size: clamp(44px, 5vw, 88px); line-height: 0.98; }
.ig-end em { font-style: italic; font-weight: 400; }

/* ---------- миры ароматов ---------- */
.worlds { margin-top: var(--section); background: #3d0f26; color: #fff; }
.world { min-height: 100svh; padding: clamp(80px, 10vw, 150px) calc(var(--pad) + var(--g)); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 120px); align-items: center; }
.world:nth-child(even) .w-visual { order: 2; }
.w-visual { position: relative; padding-bottom: 12%; }
.w-photo { aspect-ratio: 4 / 5; border-radius: var(--r-xl); overflow: hidden; }
.w-photo img { width: 100%; height: 118%; object-fit: cover; }
.w-candle { position: absolute; right: -6%; bottom: 0; width: 46%; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35); }
.world:nth-child(even) .w-candle { right: auto; left: -6%; }
.w-candle img { width: 100%; height: 100%; object-fit: cover; }
.w-text { display: grid; gap: 26px; align-content: center; }
.w-kind { font-size: 15px; color: var(--accent); }
.w-text h2 { font-size: clamp(72px, 10vw, 168px); line-height: 0.92; }
.w-line { font-size: 20px; max-width: 32ch; color: rgba(255, 255, 255, 0.84); }
.w-text .pyramid { max-width: 520px; }
.w-text .pyramid div { border-color: rgba(255, 255, 255, 0.16); }
.w-text .pyramid dt { color: var(--accent); }
.w-buy { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.w-buy a { color: rgba(255, 255, 255, 0.8); text-decoration: underline; text-underline-offset: 0.3em; text-decoration-color: rgba(255, 255, 255, 0.35); transition: text-decoration-color 200ms ease; }
@media (hover: hover) and (pointer: fine) { .w-buy a:hover { text-decoration-color: #fff; } }

/* ---------- категории ---------- */
.cat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--g); }
.cat-card { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-xl); overflow: hidden; color: #fff; isolation: isolate; }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 900ms var(--ease-out); }
.cat-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(12, 9, 7, 0.66) 0%, rgba(12, 9, 7, 0) 52%); }
.cat-card-in { position: absolute; left: 28px; right: 28px; bottom: 26px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.cat-card h3 { font-size: clamp(30px, 2.8vw, 44px); }
.cat-card span { font-size: 14px; color: rgba(255, 255, 255, 0.78); }
.cat-card .go { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 18px; transition: transform 400ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .cat-card:hover img { transform: scale(1.05); }
  .cat-card:hover .go { transform: translateX(-6px) rotate(-45deg); }
}

/* ---------- сетка ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 24px; }

/* ---------- мастерская ---------- */
.workshop { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 7vw, 128px); align-items: center; }
.ws-photo { aspect-ratio: 4 / 5; border-radius: var(--r-xl); overflow: hidden; }
.ws-photo img { width: 100%; height: 116%; object-fit: cover; }
.ws-text { display: grid; gap: 30px; }
.ws-text h2 { max-width: 17ch; }
.ws-lead { font-size: 20px; max-width: 46ch; color: var(--ink-2); }
.ws-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 12px; }
.ws-facts div { padding-top: 18px; border-top: 1px solid var(--line); }
.ws-facts dt { font-family: var(--serif); font-size: clamp(40px, 3.8vw, 60px); line-height: 1; }
.ws-facts dd { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* ---------- подарок ---------- */
.gift { margin: var(--section) var(--g) 0; border-radius: var(--r-xl); overflow: hidden; background: var(--espresso); color: #fff; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: min(86svh, 820px); }
.gift-text { display: grid; align-content: center; gap: 26px; padding: clamp(40px, 6vw, 96px); }
.gift-text h2 { max-width: 12ch; }
.gift-text p { max-width: 42ch; font-size: 18px; color: rgba(255, 255, 255, 0.78); }
.gift-text .pill { justify-self: start; }
.gift-media { position: relative; overflow: hidden; order: 2; }
.gift-media img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; }

/* ---------- вопросы ---------- */
.faq h2 { margin-bottom: 40px; }
.acc { max-width: 980px; }
.q { border-top: 1px solid var(--line); }
.q:last-child { border-bottom: 1px solid var(--line); }
.q button { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 28px 0; text-align: left; font-family: var(--serif); font-size: clamp(22px, 2vw, 30px); }
.q button i { flex: none; position: relative; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line); transition: transform 350ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.q button i::before, .q button i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.q button i::after { transform: translate(-50%, -50%) rotate(90deg); }
.q.open button i { transform: rotate(45deg); background: var(--ink); color: #fff; }
.q .a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 400ms var(--ease-out); }
.q.open .a { grid-template-rows: 1fr; }
.q .a > div { overflow: hidden; }
.q .a p { padding: 0 0 30px; max-width: 62ch; color: var(--ink-2); }

/* ---------- подвал ---------- */
.foot { margin: var(--section) var(--g) var(--g); border-radius: var(--r-xl); background: var(--espresso); color: #fff; padding: clamp(48px, 6vw, 96px) var(--pad) 28px; overflow: hidden; }
.foot-top { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; }
.foot-sub h2 { font-size: clamp(34px, 3.4vw, 52px); max-width: 12ch; }
.foot-sub > p { margin-top: 16px; color: rgba(255, 255, 255, 0.7); max-width: 40ch; }
.sub-form { display: flex; gap: 8px; margin-top: 28px; max-width: 480px; }
.sub-form input { flex: 1; min-width: 0; height: 54px; padding: 0 22px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, 0.1); color: #fff; }
.sub-form input::placeholder { color: rgba(255, 255, 255, 0.55); }
.sub-msg { margin-top: 12px; font-size: 14px; color: rgba(255, 255, 255, 0.85); min-height: 1.4em; }
.foot-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.foot-links h3 { font-family: var(--sans); font-size: 14px; color: rgba(255, 255, 255, 0.55); font-weight: 500; letter-spacing: 0; margin-bottom: 14px; }
.foot-links div { display: grid; gap: 8px; align-content: start; justify-items: start; font-size: 16px; }
.foot-links p { color: rgba(255, 255, 255, 0.8); font-size: 16px; }
.foot-word { font-family: var(--serif); font-size: clamp(96px, 25vw, 440px); line-height: 0.82; letter-spacing: 0.02em; text-transform: uppercase; text-align: center; margin: clamp(48px, 7vw, 110px) 0 18px; color: #fff; overflow: hidden; padding-bottom: 0.02em; white-space: nowrap; }
.foot-word .ch { display: inline-block; }
.foot-last { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: rgba(255, 255, 255, 0.58); }
.foot-last a { color: #fff; text-decoration: underline; text-underline-offset: 0.3em; }

/* ---------- корзина ---------- */
.cart { position: fixed; inset: 0; z-index: 80; }
.cart-scrim { position: absolute; inset: 0; background: rgba(12, 9, 7, 0.42); animation: fade 280ms var(--ease-out); }
.cart-panel { position: absolute; top: var(--g); right: var(--g); bottom: var(--g); width: min(460px, calc(100% - 2 * var(--g))); border-radius: var(--r-lg); background: #fff; display: flex; flex-direction: column; overflow: hidden; animation: panel-in 280ms var(--ease-out); box-shadow: 0 30px 80px rgba(12, 9, 7, 0.25); }
.cart.closing .cart-scrim { animation: fade-out 220ms var(--ease-out) forwards; }
.cart.closing .cart-panel { animation: panel-out 220ms var(--ease-out) forwards; }
@keyframes panel-in { from { transform: translateX(32px); opacity: 0; } }
@keyframes panel-out { to { transform: translateX(32px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px 10px; }
.cart-head h2 { font-size: 34px; }
.cart-body { flex: 1; overflow: auto; padding: 10px 24px 24px; display: flex; flex-direction: column; gap: 18px; }
.free { display: grid; gap: 10px; padding: 16px 18px; border-radius: var(--r-sm); background: var(--paper); font-size: 14px; }
.free .bar-track { height: 6px; border-radius: 999px; background: #e3e0da; overflow: hidden; }
.free .bar-track i { display: block; height: 100%; border-radius: inherit; background: var(--ink); transform-origin: left; transition: transform 500ms var(--ease-out); }
.line { display: grid; grid-template-columns: 76px 1fr auto; gap: 16px; align-items: center; }
.line-img { display: block; aspect-ratio: 4 / 5; border-radius: var(--r-sm); overflow: hidden; background: var(--paper); }
.line-img img { width: 100%; height: 100%; object-fit: cover; }
.line b { font-family: var(--serif); font-weight: 400; font-size: 20px; display: block; line-height: 1.15; }
.line small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.line .price { font-weight: 600; white-space: nowrap; }
.stepper { display: inline-flex; align-items: center; margin-top: 10px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }
.stepper button { width: 36px; height: 36px; border-radius: 50%; font-size: 17px; transition: background-color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .stepper button:hover { background: var(--paper); } }
.stepper span { min-width: 24px; text-align: center; font-weight: 500; font-size: 15px; }
.totals { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.totals div { display: flex; justify-content: space-between; gap: 16px; }
.totals .grand { font-family: var(--serif); font-size: 26px; }
.muted { color: var(--muted); }
.empty { display: grid; gap: 16px; justify-items: start; padding: 24px 0; }
.empty p:first-child { font-family: var(--serif); font-size: 26px; }

/* ---------- внутренние страницы ---------- */
.view { padding: 28px calc(var(--pad) + var(--g)) 0; min-height: 70svh; }
.view > * { animation: view-in 700ms var(--ease-out) both; }
.view > *:nth-child(2) { animation-delay: 60ms; }
.view > *:nth-child(3) { animation-delay: 120ms; }
.view > *:nth-child(4) { animation-delay: 180ms; }
@keyframes view-in { from { opacity: 0; transform: translateY(18px); } }
.crumbs { display: flex; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 26px; }
.crumbs a { color: var(--ink); }
.page-title { font-size: clamp(48px, 6vw, 96px); }
.cat-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 36px 0 40px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { height: 44px; padding: 0 20px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-size: 15px; font-weight: 500; transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 140ms var(--ease-out); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
@media (hover: hover) and (pointer: fine) { .chip[aria-pressed="false"]:hover { box-shadow: inset 0 0 0 1px var(--ink); } }
.select { height: 44px; padding: 0 40px 0 20px; border-radius: 999px; border: 0; box-shadow: inset 0 0 0 1px var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23141210' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 18px center; appearance: none; font-size: 15px; }
.count { color: var(--muted); font-size: 15px; margin-top: 10px; }

.product { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
.gallery { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: start; }
.gallery .main { aspect-ratio: 4 / 5; border-radius: var(--r-xl); overflow: hidden; background: var(--paper); grid-column: 2; grid-row: 1; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; transition: opacity 300ms ease; }
.thumbs { display: grid; gap: 12px; grid-column: 1; grid-row: 1; }
.thumbs button { aspect-ratio: 4 / 5; border-radius: var(--r-sm); overflow: hidden; opacity: 0.55; transition: opacity 200ms ease; }
.thumbs button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.buy { position: sticky; top: calc(var(--head) + 24px); display: grid; gap: 24px; }
.buy-kind { font-size: 15px; color: var(--muted); }
.buy h1 { font-size: clamp(48px, 5vw, 84px); line-height: 0.98; margin-top: 6px; }
.buy-line { font-size: 19px; color: var(--ink-2); }
.buy-price { font-family: var(--serif); font-size: 34px; }
.buy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.buy-row .stepper { margin: 0; height: 54px; padding: 0 8px; }
.buy-row .pill { flex: 1; }
.stock { font-size: 14px; color: var(--ok); }
.stock.low { color: #b25b12; }
.stock.out { color: var(--muted); }
.box { padding: 20px 22px; border-radius: var(--r-md); background: var(--paper); display: grid; gap: 12px; font-size: 15px; }
.box .select { background-color: #fff; width: 100%; }
.box ul { display: grid; gap: 6px; }
.box li { display: flex; justify-content: space-between; gap: 12px; }
details.d { border-top: 1px solid var(--line); }
details.d:last-of-type { border-bottom: 1px solid var(--line); }
details.d summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; padding: 18px 0; font-weight: 500; }
details.d summary::-webkit-details-marker { display: none; }
details.d summary::after { content: "+"; font-size: 20px; line-height: 1; transition: transform 300ms var(--ease-out); }
details.d[open] summary::after { transform: rotate(45deg); }
details.d p { padding-bottom: 18px; color: var(--ink-2); max-width: 56ch; }
.related { margin-top: var(--section); }
.related h2 { margin-bottom: 40px; }

.checkout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 96px); align-items: start; margin-top: 28px; }
.checkout form { display: grid; gap: 40px; }
.checkout fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 16px; }
.checkout legend { font-family: var(--serif); font-size: 32px; margin-bottom: 18px; padding: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; font-size: 14px; font-weight: 500; }
.field input, .field select { height: 56px; padding: 0 18px; border-radius: var(--r-sm); border: 0; box-shadow: inset 0 0 0 1px var(--line); background: #fff; font-size: 16px; font-weight: 400; transition: box-shadow 200ms ease; }
.field input:focus, .field select:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--ink); }
.field.bad input { box-shadow: inset 0 0 0 2px #c0392b; }
.err { color: #c0392b; font-size: 13px; font-weight: 400; min-height: 1em; }
.opts { display: grid; gap: 10px; }
.opt { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 18px 20px; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow 200ms ease; }
.opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--ink); }
.opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.opt b { font-weight: 500; display: block; }
.opt small { color: var(--muted); font-size: 14px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.summary { position: sticky; top: calc(var(--head) + 24px); padding: 28px; border-radius: var(--r-lg); background: var(--paper); display: grid; gap: 18px; }
.summary h2 { font-size: 32px; }
.summary .line { grid-template-columns: 60px 1fr auto; }
.note { font-size: 13px; color: var(--muted); }
.thanks { max-width: 760px; margin: 6vh auto 0; text-align: center; display: grid; gap: 22px; justify-items: center; }
.thanks h1 { font-size: clamp(56px, 8vw, 128px); }
.thanks p { font-size: 19px; color: var(--ink-2); max-width: 46ch; }
.thanks .flame { display: none; }
@keyframes flick { 50% { transform: scale(0.85); opacity: 0.8; } }
.thanks-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- всплывашка ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; display: flex; gap: 14px; align-items: center; padding: 10px 10px 10px 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 15px; transform: translate(-50%, calc(100% + 40px)); visibility: hidden; transition: transform 300ms var(--ease-out), visibility 0s linear 300ms; box-shadow: 0 16px 40px rgba(12, 9, 7, 0.3); }
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform 300ms var(--ease-out); }
.toast button { height: 38px; padding: 0 16px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 500; font-size: 14px; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .top-nav { display: none; }
  .top { grid-template-columns: auto 1fr; }
  .logo { justify-self: start; }
  .row { grid-auto-columns: calc((100% - 24px) / 2.3); }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .world { grid-template-columns: 1fr; min-height: 0; }
  .world:nth-child(even) .w-visual { order: 0; }
  .w-visual { max-width: 560px; }
  .cat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workshop, .gift, .foot-top, .product, .checkout { grid-template-columns: 1fr; }
  .gift-media { order: 0; min-height: 60vw; }
  .buy, .summary { position: static; }
}
@media (max-width: 720px) {
  :root { --head: 64px; --bar: 34px; }
  body { font-size: 16px; }
  .bar { font-size: 12px; }
  .top { padding: 0 calc(var(--g) + 12px); }
  .top-link { display: none; }
  .logo { font-size: 22px; }
  .hero { min-height: 640px; }
  .hero-media img { object-position: 16% 50%; }
  .hero-scrim { background: linear-gradient(0deg, rgba(12, 9, 7, 0.92) 0%, rgba(12, 9, 7, 0.6) 55%, rgba(12, 9, 7, 0.22) 100%); }
  .hero-in { top: auto; bottom: 48px; transform: none; left: calc(var(--g) + 12px); padding-right: 20px; }
  .hero h1 { font-size: 13vw; }
  .hero-sub { font-size: 21px; margin-top: 18px; }
  .hero-actions { margin-top: 24px; }
  .hero-actions .pill { height: 50px; padding: 0 22px; }
  .section { padding: 96px 20px 0; }
  .sec-head { margin-bottom: 32px; }
  .sec-side { width: 100%; justify-content: space-between; }
  .row { grid-auto-columns: 78%; gap: 14px; margin-right: -20px; padding-right: 20px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 12px; }
  .card-name { font-size: 21px; }
  .card-buy { margin-top: 8px; flex-wrap: wrap; gap: 8px; }
  .card-price { font-size: 20px; }
  .world { padding: 80px 20px; gap: 40px; }
  .w-candle { width: 44%; right: -2%; }
  .world:nth-child(even) .w-candle { left: -2%; }
  .w-text h2 { font-size: 22vw; }
  .w-line { font-size: 18px; }
  .pyramid div { grid-template-columns: 90px 1fr; }
  .pyramid dd { font-size: 19px; }
  .cat-cards { grid-template-columns: 1fr; }
  .cat-card { aspect-ratio: 4 / 3.4; }
  .ws-facts { grid-template-columns: 1fr; gap: 0; }
  .ws-facts div { display: grid; grid-template-columns: 120px 1fr; align-items: baseline; padding: 16px 0; }
  .ws-facts dd { margin: 0; }
  .ws-lead { font-size: 18px; }
  .gift-text { padding: 36px 24px 40px; }
  .foot { padding: 48px 24px 24px; }
  .foot-links { grid-template-columns: 1fr 1fr; }
  .sub-form { flex-direction: column; }
  .view { padding: 20px 20px 0; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .main { grid-column: 1; }
  .thumbs { grid-column: 1; grid-row: 2; grid-auto-flow: column; grid-auto-columns: 72px; }
  .two { grid-template-columns: 1fr; }
  .summary { padding: 20px; }
}

@media (max-width: 760px) {
  .ignite { height: 300svh; }
  .ig-text { left: 22px; right: 22px; width: auto; align-items: end; padding-bottom: 40px; }
  .ig-text h2 { font-size: 40px; }
  .ig-word { font-size: 26vw; }
  .ig-end { font-size: 40px; }
  .ig-actions { margin-top: 24px; }
  .ig-actions .pill { height: 50px; padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .ignite { height: auto; }
  .ig-stage { position: relative; top: auto; height: 86svh; }
  .ig-line { opacity: 0 !important; }
  .ig-line[data-k="2"] { opacity: 1 !important; }
}
