/* «Саха Ковры» — стили витрины. Палитра взята с логотипа и узора бренда. */
:root {
  --cream: #f3ebde; --paper: #faf6ee; --brown: #734e21; --brown-d: #5b3a1b; --brown-dd: #3a2612;
  --brown-l: #a07a4f; --green: #365c33; --green-d: #24412a; --ink: #2b1d10; --muted: #6f5b45; --line: #e4d8c4;
  --danger: #a23a2a;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --tri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='22'%3E%3Crect width='24' height='22' fill='%23734e21'/%3E%3Crect y='2' width='24' height='1.5' fill='%23f3ebde'/%3E%3Crect y='18.5' width='24' height='1.5' fill='%23f3ebde'/%3E%3Cpolygon points='1,16 6,6 11,16' fill='%23f3ebde'/%3E%3Cpolygon points='13,6 18,16 23,6' fill='%23f3ebde'/%3E%3C/svg%3E");
  --linen: repeating-linear-gradient(0deg, rgba(115,78,33,.05) 0 1px, transparent 1px 4px), repeating-linear-gradient(90deg, rgba(115,78,33,.04) 0 1px, transparent 1px 5px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background-color: var(--paper); background-image: var(--linen); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0; color: var(--brown-dd); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--brown); font-weight: 600; }
.rating { color: var(--brown-dd); letter-spacing: .08em; }
.rating .star { color: #c8962e; font-size: 16px; letter-spacing: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 26px; border-radius: 40px; font-weight: 600; font-size: 15px; border: 1.5px solid var(--brown); color: var(--brown); background: transparent; cursor: pointer; transition: background .2s, color .2s, transform .2s, opacity .2s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn-green { background: var(--green); border-color: var(--green); color: #f3ebde; }
.btn-green:hover { background: var(--green-d); }
.btn-light { background: #f3ebde; border-color: #f3ebde; color: var(--brown-dd); }
.btn-small { padding: 9px 16px; font-size: 14px; }
.link { color: var(--green); font-weight: 600; border-bottom: 1.5px solid currentColor; }

/* Элементы узора бренда */
.tri-band { height: 22px; background: var(--tri) repeat-x; }
.dots-line { height: 10px; background: radial-gradient(circle, var(--brown-l) 2.2px, transparent 2.8px) 0 50% / 16px 10px repeat-x; }
.emblem { flex: none; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; position: relative; box-shadow: 0 0 0 1.5px var(--brown); }
.emblem img { position: absolute; width: 104px; max-width: none; left: calc(15px - 104px * .4992); top: calc(15px - 104px * .49375); }

/* ---------- Шапка ---------- */
/* Шапка прилипает к верху. На главной прячется, пока идёт параллакс, и возвращается с каталога. */
.site-header { position: sticky; top: 0; z-index: 30; background-color: var(--paper); background-image: var(--linen); transition: transform .35s ease, box-shadow .35s; }
.site-header.stuck { box-shadow: 0 8px 24px -18px rgba(58,38,18,.6); }
.site-header.stuck::after { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px; background: var(--tri) repeat-x 0 0 / auto 8px; }
.site-header.away { transform: translateY(calc(-100% - 10px)); }
.site-header .wrap { display: flex; align-items: center; gap: 32px; height: 80px; transition: height .3s; }
.site-header.stuck .wrap { height: 64px; }
.logo { display: flex; align-items: center; gap: 12px; flex: none; }
.logo-img { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; display: block; }
.logo-img img { width: 116%; height: 116%; margin: -8% 0 0 -8%; display: block; max-width: none; }
.wordmark { font-weight: 800; letter-spacing: .08em; color: var(--green); font-size: 19px; line-height: 1; }
.wordmark small { display: block; font-weight: 500; letter-spacing: .14em; font-size: 10.5px; color: var(--brown-l); margin-top: 5px; }
.site-nav { display: flex; gap: 22px; font-weight: 500; font-size: 15px; flex: 1; flex-wrap: wrap; }
.site-nav a:hover, .site-nav a.on { color: var(--green); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--brown); color: var(--brown); display: grid; place-items: center; background: transparent; cursor: pointer; }
.icon-btn .count { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--green); color: #f3ebde; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.icon-btn .count:empty { display: none; }
.burger { display: none; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--brown-dd); color: #d9c7a8; font-size: 14.5px; }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 56px 0 34px; }
.site-footer h4 { font-family: var(--serif); font-size: 22px; color: #f3ebde; margin: 0 0 14px; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(217,199,168,.2); padding: 20px 0 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: #b39c7c; }

/* ---------- Заставка ---------- */
.intro { position: fixed; inset: 0; z-index: 100; background: var(--cream); display: grid; place-items: center; }
.intro-logo { width: min(62vh, 70vw); aspect-ratio: 1; will-change: transform; }
.intro-logo img { width: 100%; height: 100%; display: block; }
.intro-hint { position: absolute; bottom: 7vh; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--brown-l); }

/* ---------- Главная: медальон ---------- */
.hero { position: relative; height: calc(100vh - 102px); min-height: 600px; overflow: hidden; }
.hero-block { position: absolute; z-index: 0; top: 0; bottom: 0; right: 0; width: 47%; background: var(--brown-d); border-left: 7px double #d9c7a8; }
/* центрируем без transform: его использует анимация прокрутки */
.hero-text { position: absolute; z-index: 3; left: max(24px, calc((100vw - 1240px) / 2 + 24px)); top: 0; bottom: 0; width: min(500px, 40vw); display: flex; flex-direction: column; justify-content: center; }
.hero-text h1 { font-size: clamp(46px, 5vw, 78px); margin: 18px 0; }
.hero-text h1 em { color: var(--green); }
.hero-text p { font-size: 17.5px; color: var(--muted); margin: 0 0 30px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.stage { position: absolute; z-index: 2; top: 50%; left: 70%; --w: min(76vh, 46vw); width: var(--w); height: var(--w); margin: calc(var(--w) / -2) 0 0 calc(var(--w) / -2); perspective: 1600px; }
.tilt, .medal { position: absolute; inset: 0; transform-style: preserve-3d; }
.ring { position: absolute; inset: 0; transform-style: preserve-3d; }
.spin { position: absolute; inset: 0; transform-origin: 49.92% 49.375%; animation: spin var(--dur) linear infinite; filter: drop-shadow(0 10px 14px rgba(43,29,16,.32)); transition: opacity .35s; }
.spin.rev { animation-direction: reverse; }
.spin img { width: 100%; height: 100%; display: block; max-width: none; -webkit-mask-image: var(--ann); mask-image: var(--ann); }
.ring.dim .spin { opacity: .5; }
@keyframes spin { to { transform: rotate(360deg); } }
.orbits { position: absolute; left: -45%; top: -45%; width: 190%; height: 190%; color: #d9c7a8; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent 29%, #000 34%); mask-image: linear-gradient(90deg, transparent 29%, #000 34%); }
.orbits svg { width: 100%; height: 100%; overflow: visible; }
.orbits .o { transform-origin: 0 0; animation: spin 260s linear infinite; }
.orbits .o.rev { animation-direction: reverse; animation-duration: 200s; }
.floor { position: absolute; left: 5%; right: 5%; bottom: -2%; height: 18%; border-radius: 50%; background: radial-gradient(closest-side, rgba(20,12,4,.45), rgba(20,12,4,0)); opacity: 0; }
.hero-caption { position: absolute; z-index: 3; left: max(24px, calc((100vw - 1240px) / 2 + 24px)); top: 50%; transform: translateY(-50%); width: min(440px, 34vw); font-family: var(--serif); font-style: italic; font-size: clamp(30px, 3vw, 46px); line-height: 1.15; color: var(--brown-dd); opacity: 0; pointer-events: none; }
.hero-caption small { display: block; font-family: var(--sans); font-style: normal; font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--brown); margin-bottom: 14px; }
.legend { position: absolute; z-index: 4; left: max(24px, calc((100vw - 1240px) / 2 + 24px)); top: 50%; transform: translateY(-50%); width: min(400px, 32vw); opacity: 0; pointer-events: none; }
.legend h3 { font-size: 36px; margin-bottom: 18px; }
.legend ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.legend li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: center; padding: 9px 14px; border-radius: 14px; opacity: .5; transition: background .35s, opacity .35s; }
.legend li.on { opacity: 1; background: rgba(115,78,33,.09); }
.legend .n { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--brown); display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--brown); transition: background .35s, color .35s, border-color .35s; }
.legend li.on .n { background: var(--green); border-color: var(--green); color: #f3ebde; }
.legend b { display: block; font-family: var(--serif); font-size: 23px; font-weight: 600; color: var(--brown-dd); line-height: 1.1; }
.legend span { font-size: 13.5px; color: var(--muted); }
.links { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; opacity: 0; overflow: visible; }
.links path { fill: none; stroke: var(--brown-l); stroke-width: 1.3; stroke-dasharray: 4 5; }
.links path.on { stroke: var(--green); stroke-width: 2; stroke-dasharray: none; }
.links circle { fill: var(--brown-l); }
.links circle.on { fill: var(--green); }

/* ---------- Ткачество по кругу ---------- */
.weave { position: relative; height: 100vh; background: var(--cream); overflow: hidden; }
.weave-inner { height: 100%; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; }
.weave h2 { font-size: clamp(40px, 4.4vw, 64px); margin: 14px 0 24px; }
.weave-caption { font-family: var(--serif); font-style: italic; font-size: 27px; line-height: 1.35; color: var(--brown); min-height: 4.2em; }
.weave-cta { margin-top: 22px; opacity: 0; transform: translateY(10px); transition: opacity .5s, transform .5s; }
.weave-cta.on { opacity: 1; transform: none; }
.loom { position: relative; justify-self: center; width: min(78vh, 44vw); aspect-ratio: 1; }
.loom img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.loom .ghost { opacity: .13; filter: grayscale(.3); -webkit-mask-image: var(--ann); mask-image: var(--ann); }
.loom .part { -webkit-mask-image: var(--ann), conic-gradient(from 0deg at 49.92% 49.375%, #000 var(--a, 0deg), transparent var(--a, 0deg)); mask-image: var(--ann), conic-gradient(from 0deg at 49.92% 49.375%, #000 var(--a, 0deg), transparent var(--a, 0deg)); -webkit-mask-composite: source-in; mask-composite: intersect; }
.loom .whole { opacity: 0; -webkit-mask-image: var(--ann); mask-image: var(--ann); filter: drop-shadow(0 26px 40px rgba(58,38,18,.35)); }
.shuttle { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(54,92,51,.25), 0 0 18px rgba(54,92,51,.6); opacity: 0; }

/* ---------- Секции и карточки ---------- */
.section { padding: 84px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(38px, 4vw, 54px); margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { border: 1px solid var(--line); padding: 8px 18px; border-radius: 40px; font-size: 14px; font-weight: 500; background: #fff; transition: border-color .2s; }
.chip:hover { border-color: var(--brown-l); }
.chip.on { background: var(--green); color: #f3ebde; border-color: var(--green); }
.chip small { font-size: 11px; color: var(--brown-l); margin-left: 4px; }
.chip.on small { color: #cfe0cc; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: transform .3s, box-shadow .3s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -26px rgba(58,38,18,.55); }
.card-img { height: 280px; background: var(--cream); display: grid; place-items: center; position: relative; padding: 26px; }
.card-img { overflow: hidden; }
.card-img img { width: 100%; height: 100%; min-height: 0; object-fit: contain; filter: drop-shadow(0 14px 16px rgba(58,38,18,.28)); transition: transform .4s; }
.card:hover .card-img img { transform: scale(1.04); }
.badge { position: absolute; left: 14px; top: 14px; background: var(--green); color: #f3ebde; font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 20px; z-index: 1; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .dots-line { margin: 4px 0 6px; opacity: .6; }
.card h3 { font-size: 25px; }
.card .sub { font-family: var(--serif); font-style: italic; color: var(--brown); font-size: 17px; line-height: 1.2; }
.meta { font-size: 13px; color: var(--muted); }
.swatches { display: flex; gap: 6px; margin-top: 4px; }
.swatches i { width: 14px; height: 14px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: end; justify-content: space-between; gap: 10px; }
.price { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.price-uds { font-size: 13px; color: var(--green); font-weight: 600; }
.add-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: #f3ebde; border: 0; display: grid; place-items: center; cursor: pointer; flex: none; transition: transform .2s, background .2s; }
.add-btn:hover { background: var(--green-d); transform: scale(1.06); }
.add-btn.done { background: var(--brown); }

.motif-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.motif-chip { display: inline-flex; flex-direction: column; padding: 12px 18px; border-radius: 16px; background: #fff; border: 1px solid var(--line); transition: border-color .2s, transform .2s; }
.motif-chip:hover { border-color: var(--green); transform: translateY(-2px); }
.motif-chip b { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--brown-dd); line-height: 1.15; }
.motif-chip span { font-size: 13px; color: var(--muted); }

.info { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.info-box { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 30px; }
.info-box h3 { font-size: 30px; margin-bottom: 18px; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--paper); }
.opt-ic { width: 38px; height: 38px; border-radius: 50%; background: rgba(54,92,51,.12); color: var(--green); display: grid; place-items: center; flex: none; font-weight: 800; font-size: 12px; }
.opt b { display: block; font-size: 14.5px; }
.opt span { font-size: 12.5px; color: var(--muted); }
.note { font-size: 12.5px; color: var(--muted); margin-top: 14px; }

/* ---------- Каталог ---------- */
.page-head { padding: 54px 0 26px; }
.page-head h1 { font-size: clamp(42px, 5vw, 64px); margin-top: 12px; }
.page-head p { color: var(--muted); max-width: 640px; margin: 12px 0 0; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.toolbar select, .toolbar input { border: 1px solid var(--line); background: #fff; border-radius: 40px; padding: 9px 16px; font-size: 14px; }
.soon { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 50px 30px; text-align: center; }
.soon h2 { font-size: 40px; margin: 14px 0 10px; }
.soon p { color: var(--muted); max-width: 520px; margin: 0 auto 24px; }
.empty { padding: 40px 0; color: var(--muted); }

/* ---------- Карточка товара ---------- */
.crumbs { font-size: 13px; color: var(--muted); padding: 22px 0 0; }
.crumbs a:hover { color: var(--green); }
.viewer { display: grid; grid-template-columns: 1.1fr .9fr; min-height: calc(100vh - 102px); }
.viewer-left { background: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 34px 24px; gap: 22px; }
.stage-wrap { display: grid; place-items: center; width: 100%; height: min(66vh, 640px); }
.pstage { position: relative; overflow: hidden; max-width: 100%; max-height: 100%; height: 100%; }
.pstage.wide { width: 100%; height: auto; }
.zoomer { position: absolute; inset: 0; transform-origin: 0 0; transition: transform 1.1s cubic-bezier(.65,0,.25,1); }
.zoomer img { display: block; width: 100%; height: 100%; max-width: none; object-fit: contain; filter: drop-shadow(0 26px 30px rgba(58,38,18,.32)); }
.spot { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .8s; }
.spot.on { opacity: 1; }
.spot circle { transition: cx 1.1s cubic-bezier(.65,0,.25,1), cy 1.1s cubic-bezier(.65,0,.25,1), r 1.1s cubic-bezier(.65,0,.25,1); }
.spot .ring-line { fill: none; stroke: #f3d58f; stroke-width: 3; stroke-dasharray: 8 8; vector-effect: non-scaling-stroke; }
.thumbs { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.thumb { width: 66px; height: 82px; border: 1.5px solid var(--line); border-radius: 12px; padding: 5px; background: var(--paper); cursor: pointer; display: grid; place-items: center; }
.thumb.on { border-color: var(--green); }
.thumb img { max-height: 100%; max-width: 100%; object-fit: contain; }
.thumb.story-thumb { background: var(--green); border-color: var(--green); color: #f3ebde; font-size: 11px; font-weight: 700; line-height: 1.2; text-align: center; }
.thumb.story-thumb span { display: block; font-size: 20px; }

.viewer-right { position: relative; overflow: hidden; color: #f3ebde; display: flex; background: var(--brown-dd); }
.photos { position: absolute; inset: 0; }
.photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.8s ease; filter: saturate(.75) brightness(.72) sepia(.25); transform: scale(1.04); }
.photos img.show { opacity: 1; animation: kenburns 9s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.14) translate(-1%, -1%); } }
.photos::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(42,26,10,.9) 0%, rgba(42,26,10,.62) 55%, rgba(42,26,10,.3) 100%); }
.info-panel { position: relative; z-index: 1; padding: 46px 48px 34px; display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: 580px; }
.info-panel .eyebrow { color: #d9c7a8; }
.info-panel h1 { font-size: clamp(46px, 4.6vw, 66px); color: #fff; }
.translation { font-family: var(--serif); font-style: italic; font-size: 24px; color: #e2cfa9; margin-top: -10px; }
.prices { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.prices .main { font-size: 32px; font-weight: 800; color: #fff; }
.prices .uds { display: inline-flex; align-items: center; gap: 8px; background: rgba(54,92,51,.9); color: #eaf2e6; border-radius: 30px; padding: 7px 14px; font-size: 14px; font-weight: 600; }
.prices .uds b { font-size: 17px; }
.variant-pick { display: flex; flex-direction: column; gap: 10px; }
.variant-pick > span { font-size: 13px; color: #cdb998; }
.variant-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.variant-opt { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(243,235,222,.35); padding: 8px 14px; border-radius: 30px; cursor: pointer; background: transparent; color: inherit; font-size: 14px; }
.variant-opt i { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255,255,255,.6); }
.variant-opt.on { border-color: #f3ebde; background: rgba(243,235,222,.14); }
.specs { display: grid; grid-template-columns: auto 1fr; gap: 8px 22px; font-size: 14.5px; padding: 16px 0; margin: 0; border-top: 1px solid rgba(217,199,168,.25); border-bottom: 1px solid rgba(217,199,168,.25); }
.specs dt { color: #cdb998; }
.specs dd { margin: 0; }
.buy { display: flex; gap: 12px; align-items: center; }
.qty { display: inline-flex; align-items: center; border: 1px solid rgba(243,235,222,.4); border-radius: 30px; overflow: hidden; }
.qty button { width: 40px; height: 46px; background: transparent; border: 0; cursor: pointer; font-size: 18px; color: inherit; }
.qty input { width: 38px; text-align: center; background: transparent; border: 0; color: inherit; font-weight: 700; }
.buy .btn { flex: 1; }
.stock-note { font-size: 13px; color: #cdb998; }
.story-cta { padding: 18px 20px; border: 1px solid rgba(217,199,168,.4); border-radius: 18px; background: rgba(30,18,6,.4); display: flex; gap: 16px; align-items: center; }
.story-cta p { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.25; font-style: italic; color: #fff; }
.story-cta p small { display: block; font-family: var(--sans); font-style: normal; font-size: 12px; color: #cdb998; margin-top: 4px; }
.story-cta .btn { white-space: nowrap; }
.photo-caption { margin-top: auto; display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: #cdb998; }
.photo-dots { display: flex; gap: 6px; }
.photo-dots i { width: 22px; height: 2px; background: rgba(243,235,222,.3); }
.photo-dots i.on { background: #f3ebde; }

.p-desc { padding: 60px 0 10px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 50px; }
.p-desc .lead { font-family: var(--serif); font-size: 28px; line-height: 1.35; color: var(--brown-dd); }
.p-desc h2 { font-size: 34px; margin-bottom: 16px; }

/* История при прокрутке */
.story { background: var(--brown-dd); color: #e9dcc4; padding: 100px 0 60px; margin-top: 60px; }
.story-head { text-align: center; max-width: 720px; margin: 0 auto 60px; }
.story-head .eyebrow { justify-content: center; color: #d9c7a8; }
.story-head h2 { font-size: clamp(40px, 4.6vw, 58px); color: #fff; margin: 12px 0 16px; }
.story-head p { color: #cdb998; margin: 0; font-size: 17px; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; }
.story-sticky { position: sticky; top: 9vh; height: 82vh; display: grid; place-items: center; }
.story-sticky .stage-wrap { height: 76vh; }
.chapter { min-height: 76vh; display: flex; flex-direction: column; justify-content: center; opacity: .25; transition: opacity .6s; }
.chapter.on { opacity: 1; }
.chapter .num { font-family: var(--serif); font-size: 18px; color: #d9c7a8; letter-spacing: .1em; }
.chapter h3 { font-size: clamp(34px, 3.4vw, 46px); color: #fff; margin: 10px 0 18px; }
.chapter p { font-size: 18px; line-height: 1.75; margin: 0; max-width: 460px; }
.chapter .tag { display: inline-block; margin-top: 22px; font-size: 12.5px; color: #e2cfa9; border: 1px solid rgba(217,199,168,.45); padding: 5px 12px; border-radius: 20px; align-self: flex-start; }
.story-note { text-align: center; color: #9c8768; font-size: 13px; margin-top: 40px; }

/* Кинорежим */
.cinema { position: fixed; inset: 0; z-index: 90; background: #1c1208; color: #e9dcc4; display: grid; grid-template-columns: 1fr 1fr; align-items: center; opacity: 0; visibility: hidden; transition: opacity .7s, visibility .7s; }
.cinema.open { opacity: 1; visibility: visible; }
.cinema-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: blur(18px) brightness(.22) saturate(.6); transform: scale(1.1); }
.cinema .stage-wrap { position: relative; height: 80vh; justify-self: end; margin-right: 60px; transform: translateY(30px) scale(.96); transition: transform 1s cubic-bezier(.2,.8,.2,1); }
.cinema.open .stage-wrap { transform: none; }
.cinema-text { position: relative; max-width: 520px; padding-right: 40px; }
.cinema-text .num { font-family: var(--serif); color: #d9c7a8; letter-spacing: .14em; font-size: 18px; }
.cinema-text h3 { font-size: clamp(36px, 4vw, 54px); color: #fff; margin: 12px 0 20px; }
.cinema-text p { font-size: 20px; line-height: 1.75; margin: 0; min-height: 6em; }
.cinema-text .line { opacity: 0; transition: opacity .7s; }
.cinema-text .line.in { opacity: 1; }
.cinema-nav { display: flex; align-items: center; gap: 14px; margin-top: 34px; }
.cinema-nav button { width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(217,199,168,.5); background: transparent; color: #f3ebde; font-size: 17px; cursor: pointer; }
.cinema-nav button:hover { background: rgba(217,199,168,.15); }
.progress { flex: 1; display: flex; gap: 6px; }
.progress i { flex: 1; height: 3px; background: rgba(217,199,168,.2); position: relative; overflow: hidden; }
.progress i b { position: absolute; inset: 0; background: #f3ebde; transform: scaleX(0); transform-origin: left; }
.progress i.done b { transform: scaleX(1); }
.progress i.cur b { animation: fill var(--dur, 9s) linear forwards; }
.cinema.paused .progress i.cur b { animation-play-state: paused; }
@keyframes fill { to { transform: scaleX(1); } }
/* Название и «Закрыть» — одной строкой, по центру по высоте */
.cinema-close, .cinema-title { position: absolute; top: 20px; height: 40px; display: flex; align-items: center; line-height: 1; z-index: 2; }
.cinema-close { right: 28px; background: none; border: none; color: #e9dcc4; font-weight: 600; font-size: 14px; cursor: pointer; letter-spacing: .08em; padding: 0; }
.cinema-title { left: 32px; font-family: var(--serif); font-size: 21px; color: #e2cfa9; }

/* ---------- Словарь узоров ---------- */
.motif-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.motif-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px 28px; scroll-margin-top: 30px; }
.motif-card:target { border-color: var(--green); box-shadow: 0 0 0 3px rgba(54,92,51,.15); }
.motif-card h2 { font-size: 30px; }
.motif-card .meaning { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--green); margin: 6px 0 16px; }
.motif-products { display: flex; gap: 10px; flex-wrap: wrap; }
.motif-products a { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 40px; background: var(--paper); border: 1px solid var(--line); font-size: 14px; font-weight: 500; }
.motif-products a:hover { border-color: var(--green); }
.motif-products img { width: 34px; height: 34px; object-fit: contain; }

/* ---------- Корзина и оформление ---------- */
.cart-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 34px; align-items: start; padding-bottom: 80px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px; }
.panel h2 { font-size: 30px; margin-bottom: 18px; }
.cart-line { display: grid; grid-template-columns: 90px 1fr auto; gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .thumb-img { width: 90px; height: 90px; background: var(--cream); border-radius: 14px; display: grid; place-items: center; padding: 8px; }
.cart-line .thumb-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.cart-line h3 { font-size: 22px; }
.cart-line .meta { margin-top: 2px; }
.cart-line .right { text-align: right; display: grid; gap: 8px; justify-items: end; }
.cart-line .qty { border-color: var(--line); }
.cart-line .qty button { height: 36px; width: 34px; }
.remove { background: none; border: 0; color: var(--muted); font-size: 13px; cursor: pointer; text-decoration: underline; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 15px; }
.summary-row.total { font-size: 22px; font-weight: 800; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; }
.summary-row .saving { color: var(--green); font-weight: 600; }
.uds-toggle { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: rgba(54,92,51,.08); margin: 14px 0; cursor: pointer; font-size: 14px; }
.uds-toggle input { margin-top: 3px; accent-color: var(--green); width: 18px; height: 18px; }
.uds-toggle b { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--brown-dd); }
.field input, .field textarea { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--paper); font-size: 15px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green); background: #fff; }
.field .err { font-size: 12.5px; color: var(--danger); min-height: 0; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; border: 1.5px solid var(--line); cursor: pointer; background: var(--paper); transition: border-color .2s; }
.choice:has(input:checked) { border-color: var(--green); background: #fff; }
.choice input { margin-top: 3px; accent-color: var(--green); }
.choice b { display: block; font-size: 14.5px; }
.choice span { font-size: 12.5px; color: var(--muted); }
.choice .test { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--brown); background: var(--cream); border-radius: 10px; padding: 1px 7px; margin-left: 4px; }
.checkout-section { margin-bottom: 26px; }
.checkout-section h3 { font-size: 24px; margin-bottom: 12px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--muted); margin: 6px 0 18px; }
.consent input { margin-top: 3px; accent-color: var(--green); }
.form-error { background: rgba(162,58,42,.08); color: var(--danger); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; display: none; }
.form-error.on { display: block; }
.mini-line { display: flex; gap: 12px; align-items: center; padding: 8px 0; font-size: 14px; }
.mini-line img { width: 44px; height: 44px; object-fit: contain; background: var(--cream); border-radius: 10px; padding: 4px; }
.mini-line div { flex: 1; }
.mini-line b { font-weight: 700; }

.result { max-width: 760px; margin: 0 auto; padding: 60px 0 90px; text-align: center; }
.result .check { width: 84px; height: 84px; border-radius: 50%; background: var(--green); color: #f3ebde; display: grid; place-items: center; margin: 0 auto 22px; font-size: 40px; }
.result h1 { font-size: clamp(40px, 5vw, 58px); }
.result .lead { color: var(--muted); font-size: 17px; margin: 14px auto 30px; max-width: 540px; }
.result .panel { text-align: left; }
.status-pill { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 700; background: var(--cream); color: var(--brown-dd); }
.status-pill.paid { background: rgba(54,92,51,.15); color: var(--green); }
.qr { width: 220px; height: 220px; margin: 0 auto 20px; padding: 14px; background: #fff; border-radius: 18px; border: 1px solid var(--line); }
.test-banner { background: var(--cream); border: 1px dashed var(--brown-l); color: var(--brown-dd); border-radius: 14px; padding: 12px 16px; font-size: 14px; margin: 20px 0; }

/* ---------- Текстовые страницы ---------- */
.prose { max-width: 760px; font-size: 17px; }
.prose p { margin: 0 0 16px; }
.prose h2 { font-size: 32px; margin: 30px 0 12px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 80px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px; }
.contact-card h3 { font-size: 24px; margin-bottom: 8px; }
.contact-card p { margin: 0 0 6px; color: var(--muted); }
.contact-card a { color: var(--green); font-weight: 600; }

.toast { position: fixed; z-index: 95; left: 50%; bottom: 26px; transform: translate(-50%, calc(100% + 40px)); visibility: hidden; background: var(--brown-dd); color: #f3ebde; padding: 14px 20px; border-radius: 40px; font-size: 14.5px; display: flex; gap: 14px; align-items: center; box-shadow: 0 14px 40px -12px rgba(0,0,0,.5); transition: transform .4s cubic-bezier(.2,.8,.2,1), visibility .4s; }
.toast.on { transform: translate(-50%, 0); visibility: visible; }
.toast a { color: #cfe0cc; font-weight: 700; }

/* ---------- Элементы только для телефона (включаются в адаптиве) ---------- */
.ring-now { display: none; position: absolute; z-index: 4; left: 16px; right: 16px; top: 22px; opacity: 0; pointer-events: none; }
.ring-now h3 { font-size: 30px; margin-bottom: 14px; }
.ring-now .now { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: rgba(115,78,33,.09); min-height: 72px; }
.ring-now .n { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--green); color: #f3ebde; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.ring-now b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--brown-dd); line-height: 1.1; }
.ring-now span { font-size: 13.5px; color: var(--muted); }
.ring-now .dots { display: flex; gap: 6px; margin-top: 10px; }
.ring-now .dots i { width: 22px; height: 3px; border-radius: 2px; background: rgba(115,78,33,.2); }
.ring-now .dots i.on { background: var(--green); }

.weave-m { display: none; flex-direction: column; height: 100%; padding: 26px 16px 18px; gap: 14px; }
.wm-head { text-align: center; }
.wm-head .eyebrow { justify-content: center; }
.wm-head h2 { font-size: 30px; margin-top: 8px; }
.wm-loom { flex: 1; min-height: 0; display: grid; place-items: center; }
.wm-loom svg { width: min(84vw, 100%); max-height: 100%; aspect-ratio: 1; overflow: visible; }
.wm-bottom { position: relative; min-height: 104px; }
.wm-card { position: absolute; left: 0; right: 0; bottom: 0; display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; box-shadow: 0 18px 40px -24px rgba(58,38,18,.45); opacity: 0; }
.wm-card .n { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--green); color: #f3ebde; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.wm-card b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--brown-dd); line-height: 1.1; }
.wm-card span:not(.n) { display: block; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--green); line-height: 1.25; margin-top: 2px; }
.wm-final { pointer-events: none; }
.wm-final .wm-final-text { color: var(--brown-dd) !important; font-size: 20px !important; margin: 0 0 10px !important; }
.wm-steps { display: flex; gap: 8px; justify-content: center; }
.wm-steps i { width: 30px; height: 4px; border-radius: 2px; background: rgba(115,78,33,.2); }
.wm-steps i.on { background: var(--green); }

.buy-bar { display: none; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(58,38,18,.45); transition: transform .3s; }
.buy-bar.hide { transform: translateY(110%); }
.buy-bar .bb-price { flex: 1; line-height: 1.15; }
.buy-bar .bb-price b { display: block; font-size: 19px; }
.buy-bar .bb-price span { font-size: 12.5px; color: var(--green); font-weight: 600; }
.buy-bar .btn { padding: 12px 20px; }

.interiors-strip { display: none; padding: 40px 0 0; }
.interiors-strip h2 { font-size: 30px; margin-bottom: 14px; }
.interiors-scroll { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 8px; scrollbar-width: none; }
.interiors-scroll::-webkit-scrollbar { display: none; }
.interiors-scroll figure { flex: none; width: 78%; margin: 0; scroll-snap-align: start; }
.interiors-scroll img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 16px; filter: sepia(.15) saturate(.9); }
.interiors-scroll figcaption { font-size: 13px; color: var(--muted); margin-top: 6px; }

.order-aside .peek { display: none; width: 100%; justify-content: space-between; align-items: center; gap: 12px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.order-aside .peek b { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--brown-dd); }
.order-aside .peek span { font-weight: 800; }
.order-aside .peek i { font-style: normal; color: var(--brown); transition: transform .2s; }
.order-aside.open .peek i { transform: rotate(180deg); }
.order-aside.open .order-details { margin-top: 14px; }
.submit-bar .submit-total { display: none; font-size: 13.5px; color: var(--muted); margin-bottom: 8px; }
.submit-bar .submit-total b { color: var(--ink); font-size: 16px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .site-nav { gap: 16px; font-size: 14px; }
}
@media (max-width: 900px) {
  .burger { display: grid; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); padding: 16px 24px 24px; flex-direction: column; gap: 14px; font-size: 17px; border-bottom: 1px solid var(--line); }
  .site-nav.open { display: flex; }
  .site-header .wrap { justify-content: space-between; }
  .grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .card-img { height: 200px; padding: 16px; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  /* Главная: текст сверху, медальон на коричневом блоке снизу */
  .hero-block { width: 100%; height: 50%; top: auto; border-left: 0; border-top: 7px double #d9c7a8; }
  .hero-text { width: auto; left: 16px; right: 16px; top: 22px; bottom: auto; display: block; }
  .hero-text h1 { font-size: clamp(34px, 10vw, 44px); margin: 12px 0 18px; }
  .hero-text p { display: none; }
  .hero-text .cta { flex-wrap: nowrap; gap: 8px; }
  .hero-text .cta .btn { padding: 12px 16px; font-size: 14px; white-space: nowrap; }
  .stage { left: 50%; top: 74%; --w: min(76vw, 42vh); }
  .orbits { -webkit-mask-image: none; mask-image: none; }
  .legend, .links { display: none; }
  .ring-now { display: block; }
  .hero-caption { width: auto; left: 16px; right: 16px; top: 22px; transform: none; font-size: 28px; }
  /* Нить за нитью: на телефоне вместо нити — узоры по одному */
  .weave-inner { display: none; }
  .weave-m { display: flex; }
  /* Каталог: разделы в одну строку с прокруткой пальцем */
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -24px; padding: 2px 24px 6px; scrollbar-width: none; }
  .toolbar .chips::-webkit-scrollbar { display: none; }
  .toolbar .chip { flex: none; white-space: nowrap; }
  .toolbar form { width: 100%; }
  .toolbar form input { flex: 1; min-width: 0; }
  .toolbar form select { flex: none; max-width: 52%; }
  /* Страница ковра */
  .buy-bar { display: flex; }
  .has-buy-bar { padding-bottom: 76px; }
  .has-buy-bar .toast { bottom: 92px; }
  .interiors-strip { display: block; }
  /* Оформление: сводка заказа сверху, свёрнута */
  .cart-layout .order-aside { order: -1; }
  .order-aside .peek { display: flex; }
  .order-aside:not(.open) .order-details { display: none; }
  .order-aside h2 { display: none; }
  .submit-bar { position: sticky; bottom: 0; z-index: 5; margin: 0 -26px -26px; padding: 12px 26px 16px; background: #fff; border-top: 1px solid var(--line); border-radius: 0 0 22px 22px; }
  .submit-bar .submit-total { display: block; }
  .viewer, .story-grid, .cinema, .p-desc, .cart-layout, .info, .motif-list { grid-template-columns: minmax(0, 1fr); }
  .stage-wrap { height: 52vh; }
  .info-panel { padding: 30px 22px; }
  /* История при прокрутке: ковёр закрепляется под шапкой (64 px + полоса 8 px), а не под ней */
  .story-sticky { top: 72px; height: 52vh; z-index: 1; background: var(--brown-dd); padding: 12px 0; }
  .story-sticky .stage-wrap { height: 100%; }
  .chapter { min-height: 60vh; }
  /* Кинорежим на телефоне: сверху название, ковёр, текст; кнопки всегда прижаты к низу */
  .cinema { display: flex; flex-direction: column; align-items: stretch; height: 100dvh; padding-top: 72px; }
  .cinema-close, .cinema-title { top: 16px; }
  .cinema-title { left: 22px; }
  .cinema-close { right: 22px; }
  .cinema .stage-wrap { flex: none; align-self: center; margin: 0; height: 40vh; width: calc(100% - 32px); }
  .cinema-text { flex: 1; min-height: 0; max-width: none; display: flex; flex-direction: column; padding: 18px 22px calc(16px + env(safe-area-inset-bottom)); }
  .cinema-text h3 { font-size: 32px; margin: 8px 0 12px; }
  .cinema-text p { font-size: 16px; min-height: 0; flex: 1; overflow-y: auto; }
  .cinema-nav { margin-top: 14px; flex: none; }
  .form-grid, .choice-grid, .opts, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .toolbar .chips { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .card-body { padding: 12px 12px 14px; }
  .card h3 { font-size: 21px; }
  .card .sub { font-size: 15px; }
  .price { font-size: 17px; }
  .price-uds { font-size: 11.5px; white-space: nowrap; }
  .add-btn { width: 36px; height: 36px; }
  .wordmark { font-size: 16px; }
  .logo-img { width: 44px; height: 44px; }
  .footer-cols { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 70px 1fr; }
  .cart-line .right { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
  .story-cta { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .spin, .orbits .o, .photos img.show { animation: none !important; }
  .zoomer, .spot circle { transition: none !important; }
}
