:root {
  --bg: #fbf7f1;
  --surface: #ffffff;
  --tint: #f3ece1;
  --ink: #1d1b22;
  --muted: #6e6875;
  --line: #e7dfd3;
  --accent: #0f9d7a;        /* изумрудный «драконий» */
  --accent-ink: #ffffff;
  --accent-soft: #d8f3ea;
  --accent-hover: #0c8466;
  --accent-glow: rgba(15,157,122,.6);
  --accent-2: #0a6e8f;
  --topbar-bg: rgba(251,247,241,.86);
  --hot: #ff6a3d;           /* коралловый */
  --gold: #e8b33a;
  --dark: #17151c;
  --dark-2: #24212b;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(29,27,34,.06), 0 10px 30px -12px rgba(29,27,34,.18);
  --font-head: "Unbounded", system-ui, sans-serif;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 18px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
main, .footer { overflow-x: clip; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(32px, 5.2vw, 58px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.lead { font-size: 20px; color: var(--muted); max-width: 60ch; }
.lead b { color: var(--ink); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 700; color: var(--accent); margin: 0 0 16px; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 999px; border: 2px solid transparent;
  font: 700 17px var(--font); text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -8px var(--accent-glow); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn--wide { width: 100%; }
.btn--sm { padding: 9px 14px; font-size: 16px; }
.btn--light { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn--light:hover { border-color: var(--ink); }

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--topbar-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__in { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  font: 800 20px var(--font-head); color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 60%, var(--hot));
}
.logo__text { font: 700 21px var(--font-head); }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 600; font-size: 17px; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.cart-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  display: grid; place-items: center; color: var(--ink);
}
.cart-btn__count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--hot); color: #fff; font-size: 12px; font-weight: 800;
  display: grid; place-items: center;
}
.cart-btn__count:empty, .cart-btn__count[data-n="0"] { display: none; }
.cart-btn.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.18); } }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 12px 10px; }
.burger span { display: block; height: 2px; background: var(--ink); margin: 6px 0; border-radius: 2px; }

/* ---------- hero ---------- */
.hero { padding: 48px 0 40px; }
.hero__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.4vw, 58px); line-height: 1.08; margin-bottom: 20px; }
.hero .lead { margin: 0; max-width: 40ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 28px; }

/* маркетплейсы — две одинаковые карточки в ряд */
.mp-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; max-width: 460px; }
.mp-row:empty { display: none; }
.mp {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 10px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  text-decoration: none; transition: border-color .15s, transform .15s;
}
.mp:hover { border-color: var(--mp); transform: translateY(-2px); }
.mp__rate { background: var(--mp); color: #fff; font: 800 15px var(--font-head); padding: 8px 10px; border-radius: 10px; white-space: nowrap; }
.mp__txt { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.mp__txt b { font-size: 16px; }
.mp__txt small { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* bento-сетка фото */
.bento {
  display: grid; gap: 12px; aspect-ratio: 1 / 1;
  grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
  grid-template-areas: "a a b" "a a c" "d e e";
}
.bento__tile {
  position: relative; overflow: hidden; border-radius: 22px; border: 0; padding: 0; cursor: pointer;
  background: var(--tint); min-height: 0; text-align: left; font: inherit; color: inherit;
}
.bento__tile--1 { grid-area: a; }
.bento__tile--2 { grid-area: b; }
.bento__tile--3 { grid-area: c; }
.bento__tile--4 { grid-area: d; }
.bento__tile--5 { grid-area: e; }
.bento__tile img, .bento__tile .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.bento__tile:hover img { transform: scale(1.05); }
.bento__label {
  position: absolute; left: 10px; bottom: 10px; right: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: rgba(255,255,255,.95); border-radius: 12px; padding: 7px 10px; font-size: 14px;
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s;
}
.bento__label b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bento__label span { white-space: nowrap; color: var(--muted); font-weight: 600; }
.bento__tile:hover .bento__label, .bento__tile:focus-visible .bento__label, .bento__tile--1 .bento__label { opacity: 1; transform: none; }
.bento__tile--1 .bento__label { left: 16px; right: auto; bottom: 16px; font-size: 16px; padding: 10px 14px; gap: 14px; }
.bento__sticker {
  position: absolute; top: 16px; left: 16px; background: var(--gold); color: var(--ink);
  font: 700 13px var(--font-head); padding: 7px 12px; border-radius: 999px;
}

/* категории — круглые фото-кнопки */
.cats { padding: 8px 0 24px; }
.cats__in { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.cat {
  display: flex; align-items: center; gap: 14px; padding: 10px 18px 10px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); cursor: pointer; font: inherit; color: inherit; text-align: left;
  transition: border-color .15s, transform .15s;
}
.cat:hover { border-color: var(--ink); transform: translateY(-2px); }
.cat__img { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: none; background: var(--tint); display: grid; place-items: center; }
.cat__img img { width: 100%; height: 100%; object-fit: cover; }
.cat__ic { font-size: 26px; }
.cat__name { font: 700 16px var(--font-head); flex: 1; }
.cat__n { font-size: 14px; color: var(--muted); font-weight: 700; background: var(--tint); border-radius: 999px; padding: 2px 9px; }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--dark); color: #f4f1ec; }
.section__head { margin-bottom: 36px; max-width: 760px; }
.section__head p { color: var(--muted); font-size: 19px; margin: 0; }

/* ---------- filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.seg { display: inline-flex; background: var(--tint); padding: 4px; border-radius: 999px; }
.seg button {
  border: 0; background: none; padding: 10px 18px; border-radius: 999px; cursor: pointer;
  font: 700 16px var(--font); color: var(--muted);
}
.seg button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; max-width: 100%; }
.chip {
  border: 1px solid var(--line); background: var(--surface); padding: 9px 15px; border-radius: 999px;
  font: 600 16px var(--font); cursor: pointer; color: var(--ink);
}
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* ---------- product grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.pcard {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.pcard:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(29,27,34,.06), 0 20px 40px -16px rgba(29,27,34,.28); }
.pcard__img { position: relative; aspect-ratio: 1; background: var(--tint); overflow: hidden; }
.pcard__img img, .pcard__img .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.pcard:hover .pcard__img img { transform: scale(1.05); }
.pcard__tags { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font: 700 13px var(--font); padding: 5px 10px; border-radius: 999px; background: var(--surface); color: var(--ink); }
.tag--stock { background: var(--accent); color: #fff; }
.tag--order { background: var(--surface); color: var(--ink); }
.tag--hit { background: var(--hot); color: #fff; }
.pcard__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.pcard__designer { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.pcard__title { font: 700 18px/1.3 var(--font-head); margin: 6px 0 4px; }
.pcard__meta { font-size: 16px; color: var(--muted); margin: 0 0 14px; }
.pcard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.price { font: 800 21px var(--font-head); white-space: nowrap; }
.add {
  border: 0; border-radius: 999px; padding: 10px 14px; cursor: pointer;
  font: 700 16px var(--font); background: var(--accent-soft); color: #08694f;
}
.add:hover { background: var(--accent); color: #fff; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* placeholder (если фото ещё не загружено) */
.ph {
  display: grid; place-items: center; font-size: 64px;
  background: radial-gradient(circle at 30% 25%, #fff6 0 20%, transparent 21%), var(--ph, linear-gradient(135deg, #bfe9da, #f6d2c2));
}

/* ---------- custom order ---------- */
.custom { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.ticks { list-style: none; padding: 0; margin: 24px 0 32px; }
.ticks li { padding-left: 32px; position: relative; margin-bottom: 12px; }
.ticks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: #08694f; font-weight: 800; font-size: 15px; display: grid; place-items: center; }
.materials dl { margin: 0; display: grid; gap: 10px; }
.materials dl div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.materials dt { font-weight: 800; }
.materials dd { margin: 0; color: var(--muted); }

.card { background: var(--surface); border-radius: 24px; padding: 32px; box-shadow: var(--shadow); }
.form h3 { font-size: 25px; margin-bottom: 20px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > label { font-size: 15px; font-weight: 700; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
input, select, textarea {
  font: 500 17px var(--font); color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.invalid { border-color: var(--hot) !important; box-shadow: 0 0 0 4px #ffe1d6 !important; }
textarea { resize: vertical; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-row label { cursor: pointer; }
.radio-row label { position: relative; }
.radio-row input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; padding: 0; }
.radio-row span { display: inline-block; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; font-size: 16px; }
.radio-row input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: #08694f; }
.radio-row input:focus-visible + span { box-shadow: 0 0 0 4px var(--accent-soft); }
.drop {
  display: block; border: 2px dashed var(--line); border-radius: 14px; padding: 22px; text-align: center;
  cursor: pointer; color: var(--muted); background: var(--bg); transition: border-color .15s, background .15s;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop__text small { font-size: 13px; }
.drop__files { color: var(--ink); font-weight: 600; font-size: 16px; }
.form__note { font-size: 15px; color: var(--muted); margin: 12px 0 0; text-align: center; }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.steps li { background: var(--dark-2); border-radius: var(--radius); padding: 26px; }
.steps span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; font: 800 20px var(--font-head); margin-bottom: 18px; }
.steps li:nth-child(2) span { background: #3c8ad6; }
.steps li:nth-child(3) span { background: var(--gold); color: var(--ink); }
.steps li:nth-child(4) span { background: var(--hot); }
.steps p { color: #b7b1bd; margin: 0; }

/* ---------- faq ---------- */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 40px 18px 0; font-weight: 700; font-size: 19px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 29px; font-weight: 400; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* ---------- contacts ---------- */
.contacts { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.contact-links { display: grid; gap: 12px; }
.clink {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 16px;
  background: var(--surface); text-decoration: none; box-shadow: var(--shadow); font-weight: 700;
  transition: transform .15s;
}
.clink:hover { transform: translateX(4px); }
.clink__ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 20px; flex: none; }
.clink small { display: block; font-weight: 500; color: var(--muted); }

.footer { background: var(--dark); color: #b7b1bd; padding: 28px 0; font-size: 16px; }
.footer__in { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .muted { color: #8a8490; max-width: 560px; }

/* ---------- modal / drawer ---------- */
.modal, .drawer { position: fixed; inset: 0; z-index: 100; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(23,21,28,.55); backdrop-filter: blur(3px); animation: fade .2s; }
.modal__box {
  position: relative; margin: 6vh auto; width: min(560px, calc(100% - 32px)); max-height: 88vh; overflow: auto;
  background: var(--surface); border-radius: 24px; padding: 32px; animation: pop .25s;
}
.modal__box--product { width: min(980px, calc(100% - 32px)); padding: 0; }
.modal__x {
  position: absolute; right: 14px; top: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--tint); font-size: 27px; line-height: 1; cursor: pointer; color: var(--ink);
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }

.pm { display: grid; grid-template-columns: 1.1fr 1fr; }
.pm__gallery { background: var(--tint); }
.pm__main { aspect-ratio: 3/4; overflow: hidden; }
.pm__main img, .pm__main .ph { width: 100%; height: 100%; object-fit: cover; }
.pm__thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; }
.pm__thumbs button { flex: none; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: none; }
.pm__thumbs button.is-active { border-color: var(--accent); }
.pm__thumbs img, .pm__thumbs .ph { width: 100%; height: 100%; object-fit: cover; font-size: 27px; }
.pm__info { padding: 36px 32px 32px; display: flex; flex-direction: column; }
.pm__info h2 { font-size: 29px; margin: 8px 0 12px; }
.pm__info .pcard__tags { position: static; margin-bottom: 4px; }
.pm__info .tag { border: 1px solid var(--line); }
.pm__info .tag--stock, .pm__info .tag--hit { border-color: transparent; }
.pm__facts { margin: 18px 0; display: grid; gap: 0; }
.pm__facts div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 17px; }
.pm__facts span { color: var(--muted); }
.pm__facts b { text-align: right; }
.pm__colors { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.pm__colors label span { padding: 8px 12px; font-size: 15px; }
.pm__buy { margin-top: auto; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.pm__buy .price { font-size: 29px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; }
.qty button { width: 36px; height: 40px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--ink); }
.qty span { min-width: 22px; text-align: center; font-weight: 800; }

.drawer__box {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(440px, 100%);
  background: var(--surface); display: flex; flex-direction: column; animation: slide .25s; overflow-y: auto;
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer__head { padding: 22px 24px; border-bottom: 1px solid var(--line); position: relative; }
.drawer__head h3 { margin: 0; font-size: 22px; }
.drawer__head .modal__x { top: 14px; }
.drawer__items { padding: 8px 24px; flex: 1 0 auto; }
.citem { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.citem__img { width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--tint); }
.citem__img img, .citem__img .ph { width: 100%; height: 100%; object-fit: cover; font-size: 31px; }
.citem__t { font-weight: 700; font-size: 17px; line-height: 1.3; }
.citem__s { font-size: 15px; color: var(--muted); }
.citem__r { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.citem .qty button { width: 28px; height: 30px; font-size: 17px; }
.citem__del { border: 0; background: none; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; padding: 0; }
.drawer__empty { text-align: center; color: var(--muted); padding: 48px 0; }
.drawer__empty div { font-size: 48px; margin-bottom: 8px; }
.drawer__form { padding: 18px 24px 24px; border-top: 1px solid var(--line); background: var(--bg); }
.drawer__form .field { margin-bottom: 10px; }
.drawer__form input, .drawer__form select, .drawer__form textarea { background: var(--surface); padding: 10px 12px; }
.drawer__total { display: flex; justify-content: space-between; align-items: baseline; font-size: 19px; }
.drawer__total b { font: 800 25px var(--font-head); }
.drawer__form .form__note { text-align: left; margin: 2px 0 12px; }

.send h3 { font-size: 25px; padding-right: 40px; }
.send pre {
  white-space: pre-wrap; background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; font: 500 16px/1.5 var(--font); max-height: 260px; overflow: auto; margin: 14px 0 18px;
}
.send__btns { display: grid; gap: 10px; }
.send__ok { text-align: center; }
.send__ok div { font-size: 56px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200;
  background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 700;
  box-shadow: var(--shadow); animation: pop .2s; max-width: calc(100% - 32px); text-align: center;
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero__in, .custom, .contacts { grid-template-columns: 1fr; }
  .hero__in { gap: 32px; }
  .hero .lead { max-width: 52ch; }
  .bento { max-width: 620px; }
  .cats__in { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr 1fr; }
  .pm { grid-template-columns: 1fr; }
  .modal__box--product { margin: 3vh auto; max-height: 94vh; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav {
    position: fixed; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    transform: translateY(-120%); transition: transform .25s, visibility .25s; z-index: -1; visibility: hidden;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav a { padding: 12px 0; font-size: 19px; color: var(--ink); }
  .cart-btn { margin-left: auto; }
  .burger { display: block; }
  .hero { padding: 28px 0 28px; }
  .hero__cta .btn { flex: 1 1 auto; }
  .mp-row { grid-template-columns: 1fr 1fr; max-width: none; }
  .mp { padding: 8px; gap: 8px; }
  .mp__rate { font-size: 13px; padding: 6px 8px; }
  .mp__txt b { font-size: 14px; }
  .mp__txt small { font-size: 12px; white-space: normal; }
  .bento { gap: 8px; }
  .bento__tile { border-radius: 16px; }
  .bento__tile--1 .bento__label { left: 10px; bottom: 10px; font-size: 14px; padding: 7px 10px; }
  .bento__sticker { top: 10px; left: 10px; font-size: 11px; padding: 5px 9px; }
  .cats__in { gap: 10px; }
  .cat { padding: 6px 10px 6px 6px; gap: 8px; border-radius: 16px; }
  .cat__img { width: 40px; height: 40px; }
  .cat__name { font-size: 13px; line-height: 1.2; }
  .cat__n { display: none; }
  .section { padding: 64px 0; }
  .filters { flex-direction: column; align-items: stretch; }
  .seg { align-self: flex-start; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; max-width: none; scrollbar-width: none; }
  .chip { white-space: nowrap; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pcard__body { padding: 12px; }
  .pcard__title { font-size: 16px; }
  .pcard__meta { font-size: 13px; margin-bottom: 10px; }
  .pcard__foot { flex-direction: column; align-items: stretch; }
  .price { font-size: 18px; }
  .card { padding: 22px 18px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .steps { grid-template-columns: 1fr; }
  .materials dl div { grid-template-columns: 1fr; gap: 2px; }
  .pm__info { padding: 24px 20px; }
  .modal__box { padding: 24px 20px; }
}
#catalog { padding-top: 56px; }

/* ============================================================
   РАЗДЕЛЫ: 3D и ВЯЗАНИЕ
   ============================================================ */
.theme-knit {
  --bg: #fbf3ea;
  --tint: #f5e6d6;
  --line: #ecdac7;
  --ink: #2b1f1c;
  --muted: #7a6a64;
  --accent: #c0583f;          /* терракота */
  --accent-soft: #f8ddd3;
  --accent-hover: #a5472f;
  --accent-glow: rgba(192,88,63,.55);
  --accent-2: #d98a4e;
  --hot: #e2a03f;
  --dark: #2e2220;
  --topbar-bg: rgba(251,243,234,.88);
  --stitch: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='24' viewBox='0 0 28 24'%3E%3Cg fill='none' stroke='%23c0583f' stroke-opacity='.09' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M3 4l11 16M25 4L14 20'/%3E%3C/g%3E%3C/svg%3E");
}
.theme-knit .hero { background: var(--stitch); }
.theme-knit .section--dark { background: var(--dark) var(--stitch); }

/* переключатель разделов в шапке */
.switch {
  position: relative; display: flex; padding: 4px; border-radius: 999px;
  background: var(--tint); border: 1px solid var(--line);
}
.switch__btn {
  position: relative; z-index: 1; padding: 7px 16px; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none; color: var(--muted);
  transition: color .25s, background .25s;
}
.switch__btn:hover { color: var(--ink); }
.switch__btn.is-active { background: var(--accent); color: #fff; }

/* старая цена / скидка */
.price s, .old { color: var(--muted); font-weight: 600; font-size: .8em; margin-left: 6px; }
.tag--sale { background: var(--hot); color: #fff; }

/* ---------- страница товара ---------- */
.ppage-wrap { padding: 28px 0 72px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 15px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--accent); }
.ppage { padding: 0; overflow: hidden; }
.ppage__fallback { padding: 32px; }
.ppage .pm__main { aspect-ratio: 4/5; }
.ppage .pm__info { padding: 40px; }
.ppage .pm__info h1 { font-size: clamp(28px, 3.4vw, 40px); }
.pm__more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  font-weight: 700; color: var(--accent); text-decoration: none;
}
.pm__more:hover { text-decoration: underline; }
.citem__t a { text-decoration: none; }
.citem__t a:hover { color: var(--accent); }
.citem__sec { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 96px 0; }
.notfound .lead { margin: 0 auto; }
.notfound .hero__cta { justify-content: center; }
.notfound__big { font: 800 clamp(90px, 16vw, 180px)/1 var(--font-head); color: var(--accent); opacity: .18; }

/* ============================================================
   ГЛАВНАЯ: СПЛИТ
   ============================================================ */
.page-home main { overflow: hidden; }
.split { position: relative; display: flex; height: 100vh; height: 100svh; min-height: 560px; }
.split__logo {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%); z-index: 5;
  background: rgba(255,255,255,.92); padding: 8px 16px 8px 8px; border-radius: 999px;
  box-shadow: var(--shadow); transition: opacity .3s;
}
.split__cart { position: absolute; top: 22px; right: 22px; z-index: 5; }
.split__half {
  --c-bg: #0d3a33; --c-ink: #effaf6; --c-acc: #3fe0b0;
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden;
  display: flex; align-items: flex-end; text-decoration: none;
  background: var(--c-bg); color: var(--c-ink);
  transition: flex-grow .7s cubic-bezier(.7,0,.2,1);
}
.split__half--3d {
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 2px, transparent 2px 7px),
    radial-gradient(120% 90% at 30% 20%, #146b5a 0%, #0d3a33 55%, #0a2622 100%);
}
.split__half--knit {
  --c-bg: #f6e3d0; --c-ink: #3a2420; --c-acc: #c0583f;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='30' viewBox='0 0 36 30'%3E%3Cg fill='none' stroke='%23c0583f' stroke-opacity='.13' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M4 5l14 20M32 5L18 25'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(120% 90% at 70% 20%, #fbeee1 0%, #f3dcc6 60%, #ecc9ab 100%);
}
.split__half:hover { flex-grow: 1.25; }

.split__text { position: relative; z-index: 2; padding: 0 clamp(24px, 5vw, 72px) clamp(40px, 8vh, 88px); max-width: 620px; transition: opacity .3s, transform .5s; }
.split__half--knit .split__text { margin-left: auto; text-align: right; }
.split__eyebrow { display: inline-block; font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--c-acc); margin-bottom: 14px; }
.split__text h2 { font-size: clamp(36px, 5vw, 76px); font-weight: 800; line-height: 1; margin: 0 0 16px; }
.split__text p { font-size: clamp(17px, 1.4vw, 20px); opacity: .82; margin: 0 0 26px; }
.split__half--knit .split__text p { margin-left: auto; }
.split__go {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px;
  background: var(--c-acc); color: var(--c-bg); font-weight: 800; font-size: 17px;
  transition: gap .25s;
}
.split__half:hover .split__go { gap: 16px; }

/* фото и клубки */
.split__deco { position: absolute; inset: 0; pointer-events: none; }
.split__pic {
  position: absolute; width: clamp(130px, 15vw, 230px); aspect-ratio: 3/4; object-fit: cover;
  border-radius: 22px; box-shadow: 0 24px 50px -18px rgba(0,0,0,.55);
  transition: transform .7s cubic-bezier(.2,.8,.2,1);
}
.split__pic--1 { top: 12%; left: 12%; transform: rotate(-8deg); }
.split__pic--2 { top: 8%; left: 48%; width: clamp(150px, 18vw, 270px); transform: rotate(5deg); }
.split__pic--3 { top: 34%; left: 72%; transform: rotate(-3deg); }
.split__half:hover .split__pic--1 { transform: rotate(-12deg) translate(-8px, -6px); }
.split__half:hover .split__pic--2 { transform: rotate(8deg) translateY(-10px); }
.split__half:hover .split__pic--3 { transform: rotate(2deg) translate(8px, -4px); }
.split__half--knit .split__pic--1 { left: auto; right: 12%; }
.split__half--knit .split__pic--2 { left: auto; right: 48%; }
.split__half--knit .split__pic--3 { left: auto; right: 72%; }

.split__yarn { position: absolute; color: var(--c-acc); filter: drop-shadow(0 18px 24px rgba(120,50,30,.25)); transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.split__yarn svg { width: 100%; height: 100%; display: block; }
.split__yarn--1 { width: clamp(120px, 14vw, 210px); top: 14%; right: 14%; }
.split__yarn--2 { width: clamp(80px, 9vw, 140px); top: 40%; right: 52%; color: #d9a441; }
.split__yarn--3 { width: clamp(60px, 7vw, 100px); top: 9%; right: 58%; color: #8f9e7a; }
.split__half:hover .split__yarn--1 { transform: rotate(40deg) translateY(-8px); }
.split__half:hover .split__yarn--2 { transform: rotate(-30deg) translateX(-10px); }
.split__half:hover .split__yarn--3 { transform: rotate(25deg) translateY(-6px); }


@media (max-width: 760px) {
  .switch__btn { padding: 6px 11px; font-size: 14px; }
  .topbar__in { gap: 12px; }
  .logo__text { display: none; }
  .ppage .pm__info { padding: 24px 20px; }
  .split { flex-direction: column; }
  .split__half { align-items: flex-end; }
  .split__half--knit .split__text { text-align: left; margin-left: 0; }
  .split__text { padding: 0 20px 26px; }
  .split__text h2 { font-size: 34px; margin-bottom: 8px; }
  .split__text p { font-size: 15px; margin-bottom: 14px; }
  .split__go { padding: 10px 18px; font-size: 15px; }
  .split__eyebrow { font-size: 12px; margin-bottom: 8px; }
  .split__pic { width: 96px; border-radius: 14px; }
  .split__pic--2 { width: 110px; }
  .split__pic--1 { top: 18%; left: 6%; }
  .split__pic--2 { top: 10%; left: 38%; }
  .split__pic--3 { top: 20%; left: 70%; }
  .split__half--knit .split__pic--1 { right: 6%; } .split__half--knit .split__pic--2 { right: 38%; } .split__half--knit .split__pic--3 { right: 70%; }
  .split__half--knit .split__deco { top: 0; }
  .split__yarn--1 { width: 110px; top: 10%; right: 8%; }
  .split__yarn--2 { width: 64px; top: 14%; right: 44%; }
  .split__yarn--3 { width: 54px; top: 8%; right: 70%; }
  .split__logo { top: 14px; }
  .split__logo .logo__text { display: inline; }
  .split__cart { top: 14px; right: 14px; }
  .split__half--3d { padding-top: 70px; }
}
/* переход с главной: выбранная половина раскрывается на весь экран */
.split.is-going .split__half { flex-grow: 0; }
.split.is-going .split__half.is-chosen { flex-grow: 1; }
.split.is-going .split__text, .split.is-going .split__logo, .split.is-going .split__cart { opacity: 0; }
.split.is-going .split__half.is-chosen .split__pic,
.split.is-going .split__half.is-chosen .split__yarn { transform: scale(1.15); }

@media (prefers-reduced-motion: reduce) {
  .split__half, .split__pic, .split__yarn { transition: none; }
}

/* теги товара */
.pm__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: -6px 0 16px; }
.pm__tags span { font-size: 14px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 3px 10px; border-radius: 999px; }

/* «Или купите на маркетплейсе» */
.pm__mp {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 15px; color: var(--muted);
}
.pm__mp a {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  color: var(--mp); background: color-mix(in srgb, var(--mp) 10%, transparent);
  transition: background .15s, color .15s;
}
.pm__mp a::after { content: "↗"; font-size: 13px; }
.pm__mp a:hover { background: var(--mp); color: #fff; }

/* блок покупки: цена — строкой выше, количество и широкая кнопка — в одну строку */
.pm__buy { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; }
.pm__buy .price { grid-column: 1 / -1; line-height: 1.1; }
.pm__buy .btn { width: 100%; }
.pm__mp-t { flex-basis: 100%; }
