/* Лавка Заокеанья: «Торговая книга» + примерочная. Палитра и приёмы — как на главной (reference_site_design_system). */
.lavka, .lavka-detail, .lavka-toast {
    --bg: #0f0c08; --bg-deep: #0a0806; --card: #191510; --leather: #382c1c; --surface: #2f251b;
    --copper-dark: #72451c; --copper-mid: #bd6a27; --copper-light: #cb7e21; --copper-glow: #e8943a;
    --cream: #f0e6d3; --cream-2: #cdbfa3; --bronze-line: rgba(205, 160, 100, .35);
    --line-copper: rgba(214, 133, 68, .32);   /* обводки витрины: медь вместо хаки (08.10, «болотные цвета») */
    --text: 'Alegreya', Georgia, serif; --caps: 'Alegreya SC', Georgia, serif;
}
.lavka { color: var(--cream); font: 17px/1.55 var(--text); padding-bottom: 60px; }
.lavka a { color: inherit; text-decoration: none; }
.lavka img { display: block; max-width: 100%; }
:where(.lavka, .lavka-detail) button { font: inherit; color: inherit; }
:is(.lavka, .lavka-detail) [hidden] { display: none !important; }

/* ── вводная ─────────────────────────────── */
.lavka-lead { text-align: center; margin: 6px auto 30px; max-width: 760px; }
.lavka-lead p { margin: 0; font-size: 20px; color: rgba(240, 230, 211, .86); }
.lavka-notes { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 26px; margin-top: 16px; font-size: 16px; color: var(--cream-2); }
.lavka-notes i { color: var(--copper-glow); margin-right: 6px; }

/* ── разделы вкладками сверху · витрина сеткой · примерочная справа (08.10.2026) ── */
.lavka-book { margin-top: 8px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px 24px; align-items: start; }
.ledger-tabs { grid-column: 1; grid-row: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.ledger { grid-column: 1; grid-row: 2; }
.fitting { grid-column: 2; grid-row: 1 / span 2; }

.ledger-tabs a { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border: 1px solid var(--line-copper); border-radius: 4px; background: #1a120c;
    font: 700 16px var(--caps); letter-spacing: .05em; color: var(--cream) !important; white-space: nowrap; transition: border-color .15s, background .15s; }
.ledger-tabs a:hover { border-color: var(--copper-glow); background: #24180f; }
.ledger-tabs a.on { color: #fff6e8 !important; border-color: var(--copper-glow); background: linear-gradient(to bottom, var(--copper-mid), var(--copper-dark)); box-shadow: 0 0 14px rgba(189, 106, 39, .35); }
.ledger-tabs a small { font: 600 13px var(--text); color: rgba(240, 230, 211, .6); }
.ledger-tabs a.on small { color: rgba(255, 246, 232, .8); }

/* раздел — сетка плиток */
.shelf { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }   /* 4 в ряд (08.10, «три — дофига»); плитка своей высоты — длинная соседка не растягивает (08.10) */
.shelf[hidden] { display: none; }

/* заголовок раздела */
.group-head { display: flex; align-items: baseline; gap: 16px; margin: 40px 0 16px; scroll-margin-top: 90px; }
.ledger > .group-head:first-child { margin-top: 0; }
.group-head h2 { font: 700 26px var(--caps); letter-spacing: .05em; margin: 0; color: var(--cream); white-space: nowrap; }
.group-head .rule { flex: 1; height: 1px; background: linear-gradient(to right, rgba(189, 106, 39, .55), transparent); }

/* плитка товара: картинка сверху, под ней название (если его нет на картинке), варианты, цена и кнопки */
.row-l { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px;
    border: 1px solid var(--line-copper); border-radius: 6px; background: linear-gradient(to bottom, #1f1610, #130e0a); transition: border-color .2s, box-shadow .2s; }
.row-l:hover { border-color: rgba(232, 148, 58, .6); }
.row-l.worn { border-color: var(--copper-glow); box-shadow: 0 0 0 1px rgba(232, 148, 58, .35), 0 0 22px rgba(189, 106, 39, .2); }
.row-img { padding: 0; border: 1px solid rgba(214, 133, 68, .3); border-radius: 4px; background: #0d0907; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer; }
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.row-img .ph { display: grid; place-items: center; height: 100%; font-size: 40px; color: rgba(205, 160, 100, .4); }
.row-body { min-width: 0; flex: 1; }
.card-tag { font: 600 15px var(--caps); letter-spacing: .1em; text-transform: uppercase; color: var(--copper-glow); }
.row-l h3 { font: 700 20px/1.2 var(--caps); margin: 0; letter-spacing: .03em; color: var(--cream); cursor: pointer;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-l.baked .row-body h3, .row-l.baked .row-body .card-tag { display: none; }
.row-l p { margin: 6px 0 0; font-size: 17px; line-height: 1.4; color: rgba(240, 230, 211, .85); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-l.baked p { display: none; }
/* текстовые плитки одного ряда — одной высоты: заголовок ≤ 2 строк, описание ≤ 2, пометка — 1; запас под текстом (08.10) */
.row-l:not(.baked) .row-body { min-height: 122px; }
.row-l:not(.baked) .row-body:has(.row-note) { min-height: 152px; }
.row-l .row-body .row-note { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-note { margin-top: 6px !important; font-size: 16px !important; color: var(--cream-2) !important; }
.chips { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
/* вариант — строка как текст: название слева (обрезается), цена справа */
.chip { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; font: 16px var(--text); padding: 5px 10px; border: 1px solid var(--line-copper); border-radius: 3px; color: var(--cream-2); background: rgba(15, 12, 8, .35); cursor: pointer; }
.chip span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip b { flex: none; color: var(--cream); font-weight: 700; white-space: nowrap; }
.chip:hover { border-color: rgba(232, 148, 58, .7); }
.chip.on { border-color: var(--copper-glow); color: var(--cream); background: linear-gradient(to bottom, rgba(189, 106, 39, .25), rgba(189, 106, 39, .06)); }
/* низ плитки одинаковый у всех: цена и «примерить» сверху, «В корзину» во всю ширину (08.10.2026) */
.row-buy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 6px; }
.row-buy .price { grid-column: 1; font-size: 19px; }
.row-buy [data-try] { grid-column: 2; grid-row: 1; }
.row-buy .btn-copper { grid-column: 1 / -1; width: 100%; }
.row-buy .btn-ghost { padding: 7px 9px; font-size: 0; gap: 0; }   /* «Примерить» — только значок, подсказка в title */
.row-buy .btn-ghost i { font-size: 16px; }
.price { font: 700 22px var(--text); color: var(--cream); white-space: nowrap; }
.price small { font: 400 15px var(--text); color: var(--cream-2); margin-right: 4px; }
.price s { font: 400 16px var(--text); color: rgba(240, 230, 211, .45); margin-left: 6px; }

.seal { position: absolute; top: -8px; left: -8px; z-index: 2; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--text); color: #fff1dc;
    background: radial-gradient(circle at 35% 30%, #b8441e, #7a2410 70%); box-shadow: 0 3px 10px rgba(0, 0, 0, .5), inset 0 0 0 3px rgba(255, 210, 170, .18); transform: rotate(-12deg); pointer-events: none; }

.btn-copper { font: 500 15px var(--caps); letter-spacing: .1em; text-transform: uppercase; color: #fff4e3 !important; background: linear-gradient(135deg, var(--copper-dark), var(--copper-mid) 55%, var(--copper-light));
    border: 0; border-radius: 6px; padding: 9px 14px; cursor: pointer; white-space: nowrap; transition: box-shadow .2s; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.btn-copper:hover { box-shadow: 0 0 18px rgba(189, 106, 39, .45); }
.btn-copper:disabled { opacity: .45; cursor: default; box-shadow: none; }
.btn-ghost { font: 500 14px var(--caps); letter-spacing: .1em; text-transform: uppercase; color: var(--cream) !important; background: transparent; border: 1px solid var(--bronze-line);
    border-radius: 6px; padding: 7px 12px; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn-ghost:hover { border-color: var(--copper-glow); }
.btn-ghost.on { border-color: var(--copper-glow); color: var(--copper-glow) !important; }

/* ── примерочная ─────────────────────────── */
.fitting { position: sticky; top: 92px; background: var(--surface); border: 1px solid var(--bronze-line); border-radius: 6px; overflow: hidden; }
.fitting::before { content: ''; position: absolute; inset: 0; background: url('/storage/img/leather-texture.jpg') center/800px; mix-blend-mode: multiply; opacity: .45; pointer-events: none; }
.fitting > * { position: relative; }
.stage { position: relative; height: 470px; background: radial-gradient(ellipse at 50% 40%, rgba(232, 148, 58, .13), transparent 58%), linear-gradient(to bottom, #1b1510, #0f0c08); border-bottom: 1px solid rgba(205, 160, 100, .2); }
.stage > canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.stage .loading { position: absolute; inset: 0; display: grid; place-items: center; font-size: 16px; color: var(--cream-2); pointer-events: none; }
.stage-title { position: absolute; top: 12px; left: 0; right: 0; text-align: center; pointer-events: none; z-index: 2; }
.stage-title .ooc { display: block; font: 400 15px/1.2 var(--text); letter-spacing: .03em; color: var(--copper-mid); }
.stage-title b { display: block; font: 700 24px/1.15 var(--caps); letter-spacing: .06em; text-shadow: 0 2px 14px rgba(0, 0, 0, .8); }
.stage-title .hairline { width: 120px; height: 1px; margin: 10px auto 0; background: linear-gradient(to right, transparent, var(--copper-mid), transparent); }
.stage-medals { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 16px 6px; background: linear-gradient(to top, rgba(10, 8, 6, .95), rgba(10, 8, 6, .65) 60%, transparent); z-index: 2; }
.medals-wrap { position: relative; }
.medals { display: flex; justify-content: center; align-items: flex-end; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 8px 6px 14px; scroll-behavior: smooth; }
.medals::-webkit-scrollbar { display: none; }
.medals-wrap.scrolls .medals { justify-content: flex-start; -webkit-mask-image: linear-gradient(to right, transparent, #000 30px, #000 calc(100% - 30px), transparent); mask-image: linear-gradient(to right, transparent, #000 30px, #000 calc(100% - 30px), transparent); }
.medal { position: relative; flex: none; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(205, 160, 100, .45); border-radius: 3px; background: #120e0a; cursor: pointer; filter: saturate(.5) brightness(.7); transition: width .2s, height .2s, filter .2s, border-color .2s, box-shadow .2s; }
.medal img { display: block; width: 100%; height: 100%; image-rendering: pixelated; border-radius: 2px; }
.medal:hover { filter: none; border-color: rgba(232, 148, 58, .75); }
.medal.on { width: 58px; height: 58px; filter: none; border: 2px solid var(--copper-glow); box-shadow: 0 0 0 3px rgba(15, 12, 8, .9), 0 0 0 4px rgba(205, 160, 100, .4), 0 0 24px rgba(232, 148, 58, .35); }
.medal-nav { position: absolute; top: 50%; transform: translateY(-65%); width: 26px; height: 44px; border: 0; background: none; color: var(--cream-2); cursor: pointer; display: none; font-size: 18px; z-index: 2; }
.medal-nav:hover { color: var(--copper-glow); }
.medals-wrap.scrolls .medal-nav { display: block; }
.medal-nav.prev { left: -10px; }
.medal-nav.next { right: -10px; }
.fit-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.worn-list { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.worn-list:empty { display: none; }
.worn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 10px; border: 1px solid rgba(205, 160, 100, .35); border-radius: 3px; background: rgba(15, 12, 8, .4); font-size: 15px; }
.worn-chip button { border: 0; background: transparent; cursor: pointer; color: var(--cream-2); padding: 0 2px; }
.recipient:empty { display: none; }
.fit-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 17px; color: var(--cream-2); }
.fit-total b { font: 700 24px var(--text); color: var(--cream); }
.recipient { font-size: 15px; color: rgba(240, 230, 211, .75); margin: 0; }
.recipient b { color: var(--cream); }
.recipient a { color: var(--copper-glow) !important; text-decoration: underline; text-underline-offset: 3px; }

/* ── карточка товара ─────────────────────── */
.lavka-detail { width: min(960px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--bronze-line); border-radius: 6px; background: var(--surface); color: var(--cream); font: 17px/1.55 var(--text); }
.lavka-detail::backdrop { background: rgba(10, 8, 6, .75); }
.lavka-detail .detail { display: grid; grid-template-columns: var(--dimg) minmax(0, 1fr); position: relative; --dimg: min(460px, 46vw); }
.lavka-detail .detail::before { content: ''; position: absolute; inset: 0; background: url('/storage/img/leather-texture.jpg') center/800px; mix-blend-mode: multiply; opacity: .45; pointer-events: none; }
.lavka-detail .detail > * { position: relative; }
/* картинка — ровный квадрат на всю левую колонку, текстура кожи её не затемняет (08.10.2026) */
.detail-img { z-index: 1; width: var(--dimg); aspect-ratio: 1 / 1; background: #0d0907; border-right: 1px solid var(--line-copper); overflow: hidden; }
.detail-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s ease; }
.detail-body { padding: 24px 26px; display: flex; flex-direction: column; gap: 12px; height: var(--dimg); overflow-y: auto; }
.detail-body h3 { font: 700 28px var(--caps); margin: 0; letter-spacing: .03em; }
.detail-desc { font-size: 17px; color: rgba(240, 230, 211, .88); }
.detail-desc p { margin: 0 0 8px; }
.detail-desc ul { margin: 0 0 8px; padding-left: 20px; }
.variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.variant { text-align: left; padding: 9px 12px; border: 1px solid rgba(205, 160, 100, .3); border-radius: 4px; background: rgba(15, 12, 8, .4); color: var(--cream-2); font: 16px/1.3 var(--text); cursor: pointer; }
.variant b { display: block; font: 700 16px var(--caps); color: var(--cream); letter-spacing: .02em; margin-bottom: 2px; }
.variant.on { border-color: var(--copper-glow); background: linear-gradient(to bottom, rgba(189, 106, 39, .22), rgba(189, 106, 39, .06)); color: var(--cream); }
.buy-line { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid rgba(205, 160, 100, .2); }
.buy-line .price { font-size: 28px; }
.qty { display: inline-flex; border: 1px solid var(--bronze-line); border-radius: 4px; overflow: hidden; }
.qty button { width: 34px; background: transparent; border: 0; color: var(--cream); font-size: 18px; cursor: pointer; }
.qty span { padding: 6px 12px; border-left: 1px solid var(--bronze-line); border-right: 1px solid var(--bronze-line); font-size: 17px; min-width: 40px; text-align: center; }
.legal { font-size: 15px; color: rgba(240, 230, 211, .72); margin: 0; }
.legal a { color: var(--copper-glow) !important; text-decoration: underline; text-underline-offset: 3px; }
.detail-close { position: absolute; top: 10px; right: 12px; z-index: 3; border: 0; background: rgba(15, 12, 8, .7); color: var(--cream); width: 34px; height: 34px; border-radius: 4px; cursor: pointer; font-size: 18px; }

/* как получить покупку */
.lavka-terms { margin-top: 10px; padding-bottom: 40px; }
.terms-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.terms-grid > div { background: var(--surface); border: 1px solid var(--bronze-line); border-radius: 6px; padding: 18px 20px; }
.terms-grid h3 { font: 700 20px var(--caps); letter-spacing: .03em; margin: 0 0 8px; color: var(--cream); }
.terms-grid h3 i { color: var(--copper-glow); margin-right: 6px; }
.terms-grid p { margin: 0; font-size: 16px; color: rgba(240, 230, 211, .82); }
.lavka-terms a { color: var(--copper-glow) !important; text-decoration: underline; text-underline-offset: 3px; }
.terms-legal { margin: 16px 0 0; font-size: 15px; color: rgba(240, 230, 211, .7); }
@media (max-width: 860px) { .terms-grid { grid-template-columns: 1fr; } }

/* корзина поверх лавки */
.lavka-cart { width: min(860px, calc(100vw - 32px)); }
.lavka-cart .cart-body { position: relative; padding: 24px 26px; max-height: 88vh; overflow-y: auto; }
.lavka-cart .cart-body::before { content: ''; position: absolute; inset: 0; background: url('/storage/img/leather-texture.jpg') center/800px; mix-blend-mode: multiply; opacity: .45; pointer-events: none; }
.lavka-cart .cart-body > * { position: relative; }
.lavka-cart h2 { font: 700 24px var(--caps); letter-spacing: .04em; margin: 0 0 14px; }
.lavka-cart .lnk, .lavka-panel .lnk { color: var(--copper-glow) !important; text-decoration: underline; text-underline-offset: 3px; }
.cart-badge { font: 700 13px var(--text); background: var(--copper-mid); color: #1a120a; border-radius: 3px; padding: 0 6px; }
.fit-body .btn-ghost { justify-content: center; }

/* всплывашка «в корзине» */
.lavka-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 1080; padding: 12px 18px; border: 1px solid var(--copper-glow);
    border-radius: 6px; background: #1d1711; color: #f0e6d3; font: 17px 'Alegreya', Georgia, serif; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: opacity .25s, transform .25s; pointer-events: none; }
.lavka-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.lavka-toast a { color: #e8943a !important; text-decoration: underline; margin-left: 8px; }

/* ── корзина, заказ ──────────────────────── */
.lavka-panel { position: relative; background: var(--surface); border: 1px solid var(--bronze-line); border-radius: 6px; padding: 22px 24px; margin-bottom: 20px; }
.lavka-panel::before { content: ''; position: absolute; inset: 0; background: url('/storage/img/leather-texture.jpg') center/800px; mix-blend-mode: multiply; opacity: .45; pointer-events: none; border-radius: 6px; }
.lavka-panel > * { position: relative; }
.lavka-panel h2 { font: 700 24px var(--caps); letter-spacing: .04em; margin: 0 0 14px; }
.cart-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(205, 160, 100, .16); }
.cart-line img, .cart-line .ph { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; border: 1px solid var(--bronze-line); background: #120e0a; }
.cart-line h3 { font: 700 18px var(--caps); margin: 0; }
.cart-line .remove { border: 0; background: none; color: var(--cream-2); cursor: pointer; font-size: 18px; }
.cart-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; font-size: 18px; color: var(--cream-2); }
.cart-total b { font: 700 28px var(--text); color: var(--cream); }
.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.who label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid rgba(205, 160, 100, .3); border-radius: 4px; background: rgba(15, 12, 8, .35); cursor: pointer; }
.who label:has(input:checked) { border-color: var(--copper-glow); background: linear-gradient(to bottom, rgba(189, 106, 39, .22), rgba(189, 106, 39, .06)); }
.who input { accent-color: #bd6a27; }
.who img { width: 32px; height: 32px; image-rendering: pixelated; border-radius: 2px; }
.who span { display: flex; flex-direction: column; line-height: 1.2; }
.who small { color: var(--copper-mid); font-size: 14px; }
.lavka-check { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; font-size: 16px; }
.lavka-check input { margin-top: 5px; accent-color: #bd6a27; width: 18px; height: 18px; flex: none; }
.lavka-check a { color: var(--copper-glow) !important; text-decoration: underline; }
.lavka-alert { padding: 12px 16px; border: 1px solid rgba(232, 148, 58, .5); border-radius: 6px; background: rgba(189, 106, 39, .12); margin-bottom: 16px; font-size: 17px; }
.lavka-alert.err { border-color: rgba(200, 70, 40, .7); background: rgba(160, 50, 20, .18); }
.pay-box { font-size: 18px; }
.pay-box .amount { font: 700 32px var(--text); color: var(--cream); }
.pay-box .requisites { white-space: pre-line; padding: 12px 14px; margin: 10px 0; border: 1px dashed rgba(232, 148, 58, .55); border-radius: 4px; background: rgba(15, 12, 8, .35); font-size: 19px; }
.pay-box .comment { font-size: 19px; }
.pay-box .comment b { color: var(--copper-glow); }
/* оплата переводом: точная сумма, реквизиты, ожидание */
.transfer-box h2 { margin-bottom: 4px; }
.tr-amount { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }
.tr-amount .amount { font-size: 40px; color: var(--copper-glow); letter-spacing: .01em; }
.tr-note { margin: 4px 0 14px; color: var(--cream-2); font-size: 17px; }
.tr-req { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 14px; padding: 12px 14px;
    border: 1px dashed rgba(232, 148, 58, .55); border-radius: 4px; background: rgba(15, 12, 8, .35); }
.tr-req dt { color: var(--cream-2); font-weight: 400; }
.tr-req dd { margin: 0; color: var(--cream); }
.tr-copy-sm { border: 0; background: transparent; color: var(--copper-glow); cursor: pointer; padding: 0 4px; font-size: 16px; }
.tr-wait { display: flex; align-items: center; gap: 10px; color: var(--cream); }
.tr-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--copper-glow); animation: tr-pulse 1.4s ease-in-out infinite; flex: none; }
@keyframes tr-pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
@media (max-width: 560px) { .tr-req { grid-template-columns: 1fr; } .tr-req dt { margin-top: 6px; } .tr-amount .amount { font-size: 32px; } }
.state { display: inline-block; font: 500 13px var(--caps); letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; border-radius: 3px; border: 1px solid var(--bronze-line); }
.state.pending { border-color: #c99a2e; color: #e8c36a; }
.state.paid { border-color: #6d8fc9; color: #a9c3f0; }
.state.delivered { border-color: #6aa86a; color: #a6dba6; }
.state.cancelled, .state.other, .state.refunded { color: var(--cream-2); }
.state.failed { border-color: #c95b3a; color: #f0a48a; }
.orders-table { width: 100%; border-collapse: collapse; font-size: 17px; }
.orders-table th { font: 500 13px var(--caps); letter-spacing: .1em; text-transform: uppercase; color: var(--cream-2); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--bronze-line); }
.orders-table td { padding: 10px; border-bottom: 1px solid rgba(205, 160, 100, .14); vertical-align: top; }
.orders-table a { color: var(--copper-glow) !important; }

/* ── узкие экраны ───────────────────────── */
@media (max-width: 1199px) {
    .lavka-book { grid-template-columns: minmax(0, 1fr); }
    .fitting { grid-column: 1; grid-row: 1; position: relative; top: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
    .fitting .stage { height: 420px; border-bottom: 0; border-right: 1px solid rgba(205, 160, 100, .2); }
    .ledger-tabs { grid-row: 2; }
    .ledger { grid-row: 3; }
}
@media (max-width: 860px) {
    .lavka-book { gap: 12px; }
    .fitting { display: block; }
    .fitting .stage { height: 400px; border-right: 0; border-bottom: 1px solid rgba(205, 160, 100, .2); }
    .ledger-tabs { position: sticky; top: 64px; z-index: 5; flex-wrap: nowrap; overflow-x: auto; padding: 4px 0; background: #120e0a; }
    .shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .lavka-detail .detail { grid-template-columns: 1fr; --dimg: 100%; }
    .detail-img { width: 100%; border-right: 0; border-bottom: 1px solid var(--line-copper); }
    .detail-body { height: auto; max-height: none; }
    .cart-line { grid-template-columns: 56px minmax(0, 1fr) auto; }
    .cart-line .line-qty { grid-column: 2; }
}
@media (max-width: 420px) {
    .shelf { grid-template-columns: minmax(0, 1fr); }
}

/* ── плавность (08.10.2026, «анимации поплавнее») ─────────── */
.shelf:not([hidden]) .row-l { animation: tile-in .42s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 35ms); }
@keyframes tile-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.row-l { transition: border-color .25s ease, box-shadow .25s ease, transform .25s cubic-bezier(.2, .7, .2, 1); }
.row-l:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, .45), 0 0 0 1px rgba(232, 148, 58, .25); }
.row-img img { transition: transform .45s cubic-bezier(.2, .7, .2, 1), opacity .14s ease; }
.row-l:hover .row-img img { transform: scale(1.035); }
.row-img img.swap, .detail-img img.swap { opacity: 0; }
.ledger-tabs a { transition: border-color .2s ease, background .25s ease, color .2s ease, box-shadow .25s ease, transform .2s ease; }
.ledger-tabs a:active, .btn-copper:active, .btn-ghost:active, .chip:active { transform: scale(.97); }
.btn-copper, .btn-ghost, .chip { transition: box-shadow .2s ease, border-color .2s ease, transform .12s ease, background .2s ease; }
.lavka-detail[open] { animation: dlg-in .28s cubic-bezier(.2, .8, .2, 1) both; }
.lavka-detail[open]::backdrop { animation: dlg-fade .28s ease both; }
.lavka-detail.closing { animation: dlg-out .18s ease-in both; }
.lavka-detail.closing::backdrop { animation: dlg-fade .18s ease-in reverse both; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes dlg-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes dlg-fade { from { opacity: 0; } to { opacity: 1; } }
.lavka-toast { transition: opacity .3s ease, transform .35s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) {
    .shelf:not([hidden]) .row-l, .lavka-detail[open], .lavka-detail.closing, .lavka-detail[open]::backdrop { animation: none; }
    .row-l:hover, .row-l:hover .row-img img { transform: none; }
}
