/* ===== Базовые переменные и сброс ===== */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --ink: #14110f;
  --muted: #6b645c;
  --line: #e8e1d6;
  --brand: #ff4d2e;
  --brand-ink: #ffffff;
  --coin: #f5b301;
  --coin-ink: #4a3500;
  --ok: #16a34a;
  --err: #dc2626;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(20, 17, 15, .08);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Unbounded', 'Inter', system-ui, sans-serif;
  /* Токены интерфейса в духе shadcn/ui (input, ring, hover, destructive...), значения — под палитру магазина */
  --input: #d6cdbf;                       /* граница полей и outline-кнопок */
  --ring: rgba(20, 17, 15, .16);          /* кольцо фокуса */
  --hover: rgba(20, 17, 15, .05);         /* фон при наведении на прозрачные элементы */
  --destructive: var(--err);
  --shadow-sm: 0 1px 2px rgba(20, 17, 15, .07);
  interpolate-size: allow-keywords;       /* плавное раскрытие аккордеона (Chrome 129+) */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12100e; --surface: #1c1916; --ink: #f6f1ea; --muted: #a39a8e; --line: #2e2924;
    --shadow: 0 10px 30px rgba(0, 0, 0, .4);
    --input: #40382f; --ring: rgba(255, 255, 255, .24); --hover: rgba(255, 255, 255, .07); --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding: 28px 0 56px; }

/* ===== Кнопки, поля, бейджи (в духе shadcn/ui: тонкие границы, кольцо фокуса, варианты и размеры) ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; cursor: pointer; white-space: nowrap;
  min-height: 44px; padding: .6em 1.3em; border: 1px solid var(--input); background: var(--surface); color: var(--ink);
  text-decoration: none; border-radius: 999px; font: 600 .95rem/1.2 var(--font); box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s, background .15s, border-color .15s, color .15s;
}
.btn:hover { background: color-mix(in srgb, var(--ink) 6%, var(--surface)); transform: translateY(-1px); box-shadow: 0 8px 18px rgba(20, 17, 15, .12); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-sm); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.btn .icon { width: 1.15em; height: 1.15em; vertical-align: 0; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px rgba(120, 30, 10, .35), inset 0 1px 0 rgba(255, 255, 255, .28); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 90%, #000); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-dark:hover { background: color-mix(in srgb, var(--ink) 86%, var(--bg)); }
.btn-secondary { background: color-mix(in srgb, var(--ink) 7%, var(--surface)); border-color: transparent; box-shadow: none; }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--hover); box-shadow: none; }
.btn-destructive { background: var(--destructive); border-color: var(--destructive); color: #fff; }
.btn-destructive:hover { background: color-mix(in srgb, var(--destructive) 88%, #000); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: .4em .95em; font-size: .85rem; }
.btn-lg { min-height: 54px; padding: .8em 1.7em; font-size: 1.05rem; }
.btn-icon { width: 38px; min-height: 38px; padding: 0; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; }
.link-btn:hover { color: var(--ink); }
.link-btn:focus-visible { outline: none; border-radius: 4px; box-shadow: 0 0 0 3px var(--ring); }

label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: .4em; }
input[type=text], input[type=tel], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: .65em .95em; border: 1px solid var(--input); border-radius: 12px; background: var(--surface);
  color: var(--ink); font: inherit; font-size: .95rem; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--ring); }
input::-ms-reveal, input::-ms-clear { display: none; } /* значок «показать пароль» в Edge нам не нужен (CVC) */
input[aria-invalid="true"] { border-color: var(--err); }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .22); }
.field { margin-bottom: 1rem; }
.errorlist { list-style: none; margin: .4em 0 0; padding: 0; color: var(--err); font-size: .85rem; font-weight: 500; }
.help { color: var(--muted); font-size: .85rem; margin-top: .3em; }

/* бейдж (shadcn Badge) и алерт (shadcn Alert) */
.pill { display: inline-flex; align-items: center; gap: .4em; padding: .2em .7em; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: .75rem; font-weight: 600; line-height: 1.5; }
.pill-dot::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: currentColor; }
.pill-success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.pill-warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.pill-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.pill-info { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }
.alert { display: flex; align-items: flex-start; gap: .7em; padding: .8em 1em; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: .9rem; line-height: 1.45; }
.alert > .icon { margin-top: .1em; width: 1.2em; height: 1.2em; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.alert b { font-weight: 700; }

/* ===== Шапка и подвал ===== */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; gap: 18px; height: 66px; }
.logo { font: 800 1.15rem var(--font-display); text-decoration: none; letter-spacing: -.02em; }
.logo b { color: var(--brand); }
.nav { display: flex; gap: 6px; margin-left: 12px; }
.nav a { text-decoration: none; padding: .45em .9em; border-radius: 999px; font-weight: 600; color: var(--muted); }
.nav a:hover, .nav a.active { background: var(--ink); color: var(--bg); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.coin-pill { display: inline-flex; align-items: center; gap: .4em; background: var(--coin); color: var(--coin-ink); padding: .4em .85em; border-radius: 999px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.coin-icon { display: inline-grid; place-items: center; color: #8a6200; }
.coin-icon .icon { width: 1.35em; height: 1.35em; vertical-align: 0; }
.cart-link .icon { width: 24px; height: 24px; vertical-align: 0; }
.cart-link { position: relative; display: inline-grid; place-items: center; text-decoration: none; font-weight: 700; padding: .4em .7em; border-radius: 999px; }
.cart-link .badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--brand); color: #fff; font-size: .75rem; display: grid; place-items: center; }
.site-footer { border-top: 1px solid var(--line); padding: 24px 0; color: var(--muted); font-size: .9rem; }

/* сообщения Django показываются тостами (как Sonner в shadcn/ui); без JS они просто остаются на экране */
.toaster { position: fixed; z-index: 100; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(440px, calc(100vw - 24px)); display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; pointer-events: none; }
.toast { --accent: var(--muted); position: relative; overflow: hidden; pointer-events: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7em; align-items: start;
  padding: .85em .7em .85em 1em; border-radius: 16px; background: var(--surface); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(20, 17, 15, .2), 0 2px 6px rgba(20, 17, 15, .08); font-size: .92rem; line-height: 1.4;
  animation: toast-in .45s cubic-bezier(.16, 1, .3, 1) both; transition: opacity .3s, transform .3s; }
.toast > .icon { margin-top: .12em; color: var(--accent); }
.toast.success { --accent: var(--ok); } .toast.error { --accent: var(--err); } .toast.warning { --accent: #d97706; } .toast.info { --accent: #2563eb; }
.toast-close { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.toast-close:hover { background: var(--hover); color: var(--ink); }
.toast-close:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.toast-close .icon { width: 14px; height: 14px; vertical-align: 0; }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--accent); opacity: .55; transform-origin: left; animation: toast-timer var(--toast-ms, 6000ms) linear forwards; animation-play-state: var(--toast-run, paused); }
.js-toasts .toast { --toast-run: running; }
.toast.is-paused::after { animation-play-state: paused; }
.toast.is-out { opacity: 0; transform: translateY(10px) scale(.97); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-timer { to { transform: scaleX(0); } }

/* ===== Товары ===== */
.art { width: 100%; }
.art svg { width: 100%; height: auto; }
.art .fill-c { fill: var(--c); } .art .fill-a { fill: var(--a); } .art .stroke-c { stroke: var(--c); }
.art-img { width: 100%; height: 100%; object-fit: cover; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, box-shadow .2s; display: flex; flex-direction: column; text-decoration: none; position: relative; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 1 / 1; display: grid; place-items: center; padding: 14px; background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--a, #f59e0b) 22%, var(--surface)), var(--surface) 70%); }
.card-media:has(.art-img) { padding: 0; position: relative; overflow: hidden; }
.card-media--studio { background: #fff !important; }
.card-media:has(.art-img):not(.is-loaded):not(.card-media--studio), .detail-media:has(.art-img):not(.is-loaded) { background: linear-gradient(100deg, color-mix(in srgb, var(--ink) 6%, var(--surface)) 30%, color-mix(in srgb, var(--ink) 12%, var(--surface)) 50%, color-mix(in srgb, var(--ink) 6%, var(--surface)) 70%); background-size: 220% 100%; animation: shimmer 1.5s linear infinite; }
.card-media--studio .art-img { object-fit: contain; }
.card-media .art-img { position: absolute; inset: 0; object-position: center 34%; transition: transform .5s; }
.card:hover .card-media .art-img { transform: scale(1.05); }
.card-media .art { transition: transform .35s; }
.card:hover .card-media .art { transform: scale(1.06) rotate(-2deg); }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-brand { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; min-height: 1.1em; }
.card-title { font-weight: 700; }
.price { font-weight: 800; font-size: 1.1rem; }
.price-old { color: var(--muted); text-decoration: line-through; font-size: .9rem; margin-left: .4em; font-weight: 500; }
.tag { position: absolute; top: 12px; left: 12px; background: var(--brand); color: #fff; font-weight: 700; font-size: .78rem; padding: .25em .7em; border-radius: 999px; }
.tag-out { background: var(--ink); color: var(--bg); }
.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }

/* обложка после входа: фото справа плавно «растворяется» в фоне, цвета подобраны по краям снимка */
.cover { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: clamp(420px, 58vh, 540px); border-radius: 30px; overflow: hidden; color: #fff; isolation: isolate;
  background: radial-gradient(900px 520px at 6% 0%, #3b474d, transparent 62%), linear-gradient(100deg, #15191b 0%, #232a2e 46%, #2a3135 100%); }
.cover-text { position: relative; z-index: 2; padding: clamp(24px, 5vw, 56px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.cover-text .coin-pill { margin-bottom: 18px; }
.cover .brandline { display: flex; align-items: center; gap: .5em; color: #ffd166; opacity: 1; margin-bottom: 8px; }
.cover h1 { font-size: clamp(1.9rem, 4.1vw, 3.1rem); margin-bottom: .35em; }
.cover p { color: #d5dadd; max-width: 46ch; }
.cover-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.cover .btn:not(.btn-primary) { color: #fff; border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .06); box-shadow: none; }
.cover .btn:not(.btn-primary):hover { background: rgba(255, 255, 255, .16); }
.cover-features { list-style: none; display: flex; gap: 8px; margin: 22px 0 0; padding: 0; flex-wrap: wrap; }
.cover-features li { display: inline-flex; align-items: center; gap: .45em; padding: .4em .85em; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); font-size: .85rem; font-weight: 600; }
.cover-photo { position: relative; margin: 0; min-height: 320px; }
.cover-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 28%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28%); mask-image: linear-gradient(90deg, transparent 0, #000 28%); animation: cover-in 1.3s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes cover-in { from { opacity: 0; transform: scale(1.07); } to { opacity: 1; transform: none; } }
@media (max-width: 800px) {
  .cover { grid-template-columns: minmax(0, 1fr); }
  .cover-photo { order: -1; min-height: 300px; }
  .cover-photo img { -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 100%); mask-image: linear-gradient(180deg, #000 60%, transparent 100%); }
  .cover-text { padding-top: 8px; }
}
.cat-tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cat-tile { border-radius: var(--radius); padding: 22px; text-decoration: none; color: #fff; min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; position: relative; overflow: hidden; transition: transform .2s; }
.cat-tile:hover { transform: translateY(-4px); }
.cat-tile { background: linear-gradient(135deg, #27221d, #3a322a); }
.cat-tile .tile-icon { position: absolute; top: 14px; right: 16px; color: #fff; opacity: .95; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.cat-tile:hover .tile-icon { transform: rotate(-8deg) scale(1.1); }
.cat-tile h3 { margin: 0; }
.cat-tile p { margin: .2em 0 0; font-size: .85rem; opacity: .9; }
.theme-glasses { background: linear-gradient(135deg, #0f172a, #1d4ed8); }
.theme-accessories { background: linear-gradient(135deg, #6d28d9, #ec4899); }
.theme-sneakers { background: linear-gradient(135deg, #7f1d1d, #ef4444); }
.promo { margin-top: 44px; border-radius: 24px; padding: 28px; background: var(--coin); color: var(--coin-ink); display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.promo h2 { margin: 0; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: .45em; padding: .45em 1em; border-radius: 999px; border: 2px solid var(--line); text-decoration: none; font-weight: 600; background: var(--surface); }
.chip.active, .chip:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.toolbar form { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.toolbar input[type=search] { width: 200px; }
.toolbar select { width: auto; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 28px; align-items: center; }
.empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.empty-icon { width: 104px; height: 104px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: color-mix(in srgb, var(--ink) 7%, transparent); }
.empty-icon .icon { width: 56px; height: 56px; vertical-align: 0; }

/* ===== Страница товара ===== */
.detail { display: grid; gap: 32px; grid-template-columns: 1.1fr 1fr; align-items: start; }
.detail-media { border-radius: 28px; padding: 28px; border: 1px solid var(--line); background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--a, #f59e0b) 28%, var(--surface)), var(--surface) 72%); }
.detail-media .art { max-width: 520px; margin: 0 auto; animation: float 5s ease-in-out infinite; }
.detail-media:has(.art-img) { padding: 0; overflow: hidden; background: var(--surface); }
.detail-media .art-img { height: auto; max-height: 640px; }
.breadcrumbs { color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.breadcrumbs a { text-decoration: none; }
.detail .price { font-size: 1.8rem; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.sizes input { position: absolute; opacity: 0; pointer-events: none; }
.sizes label { margin: 0; padding: .5em .9em; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; min-width: 52px; text-align: center; background: var(--surface); }
.sizes input:checked + label { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sizes input:focus-visible + label { box-shadow: 0 0 0 4px rgba(255, 77, 46, .25); }
.buy-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.buy-row input[type=number] { width: 84px; }
.cashback-note { display: inline-flex; gap: .5em; align-items: center; background: color-mix(in srgb, var(--coin) 25%, var(--surface)); padding: .5em .9em; border-radius: 12px; font-weight: 600; }

/* ===== Корзина и заказ ===== */
.two-col { display: grid; gap: 28px; grid-template-columns: 1fr 360px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel > h2, .panel-head h2 { font-size: 1.25rem; }
.card-hint { margin-top: 14px; }
.demo-fill .icon { width: 1.9em; height: 1.9em; margin: -.45em 0; }
.cart-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: 0; }
.cart-row .thumb { border-radius: 14px; padding: 6px; background: color-mix(in srgb, var(--a, #f59e0b) 18%, var(--surface)); }
.cart-row .thumb:has(.art-img) { padding: 0; overflow: hidden; }
.cart-row .thumb .art-img { aspect-ratio: 1; }
.cart-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.cart-actions input[type=number] { width: 78px; padding: .4em .6em; }
.sum-line { display: flex; justify-content: space-between; gap: 12px; padding: .35em 0; }
.sum-total { border-top: 2px dashed var(--line); margin-top: 8px; padding-top: 12px; font-weight: 800; font-size: 1.25rem; }
.sum-coin { color: #b57f00; font-weight: 700; }
.pay-options { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.pay-option input { position: absolute; opacity: 0; pointer-events: none; }
.pay-option label { margin: 0; display: flex; align-items: center; gap: 10px; border: 2px solid var(--line); border-radius: 14px; padding: .8em 1em; cursor: pointer; font-weight: 700; background: var(--surface); transition: border-color .15s, transform .15s; }
.pay-option label:hover { transform: translateY(-2px); }
.pay-option input:checked + label { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 15%, transparent); }
.pay-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font: 800 .8rem var(--font-display); flex: none; }
.pay-logo .icon { width: 20px; height: 20px; vertical-align: 0; }
.pm-payme { background: #00cccc; } .pm-click { background: #00aeef; } .pm-uzum { background: #7000ff; } .pm-card { background: #374151; } .pm-cash { background: #16a34a; } .pm-coins { background: var(--coin); color: var(--coin-ink); }
.coins-box { display: grid; gap: 10px; }
.coins-row { display: flex; gap: 10px; align-items: center; }
.coins-row input[type=number] { width: 150px; }
.order-card { display: flex; gap: 16px; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.status { display: inline-flex; align-items: center; gap: .45em; padding: .2em .8em; border-radius: 999px; font-size: .8rem; font-weight: 700; background: var(--line); }
.status::before { content: ""; width: .5em; height: .5em; border-radius: 50%; background: currentColor; opacity: .75; }
.status-paid, .status-confirmed, .status-delivered { background: #dcfce7; color: #166534; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-shipped { background: #dbeafe; color: #1e40af; }
.coin-big { font: 800 2.4rem var(--font-display); color: #b57f00; }
.tx { display: flex; justify-content: space-between; gap: 12px; padding: .55em 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.tx .plus { color: var(--ok); font-weight: 700; } .tx .minus { color: var(--err); font-weight: 700; }

/* ===== Экраны входа (без шапки) ===== */
body.auth { background: #0b0a09; color: #f6f1ea; }
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden;
  background: radial-gradient(900px 500px at 15% 10%, rgba(255, 77, 46, .35), transparent 60%), radial-gradient(800px 500px at 90% 90%, rgba(124, 58, 237, .35), transparent 60%), #0b0a09; }
.auth-card { width: 100%; max-width: 440px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); backdrop-filter: blur(18px); border-radius: 28px; padding: 32px 28px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); position: relative; z-index: 1; animation: rise .6s both; }
.auth-card h1 { font-size: 1.9rem; }
.auth-card .muted { color: #b8aea1; }
.auth-card input[type=text], .auth-card input[type=tel], .auth-card input[type=password] { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: #fff; }
.auth-card input::placeholder { color: #8d8478; }
.auth-card .errorlist { color: #ff8a7a; }
.auth-card .btn { border-color: rgba(255, 255, 255, .35); color: #fff; background: transparent; box-shadow: none; }
.auth-card .btn-primary { border-color: var(--brand); background: var(--brand); }
.auth-links { margin-top: 18px; text-align: center; font-size: .95rem; }
.auth-links a { color: #ffd166; }
.floaty { position: absolute; color: #fff; opacity: .1; animation: float 7s ease-in-out infinite; user-select: none; }
.floaty .icon { width: 5.5rem; height: 5.5rem; vertical-align: 0; }
.floaty-coin { color: var(--coin); opacity: .22; }

/* ===== Презентация ===== */
body.deck-page { overflow: hidden; background: #0b0a09; color: #fff; }
.deck { height: 100vh; height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; scroll-behavior: smooth; outline: none; }
.slide { min-height: 100vh; min-height: 100dvh; scroll-snap-align: start; display: grid; place-items: center; padding: 72px 20px 56px; position: relative; overflow: hidden; }
.slide-inner { width: 100%; max-width: 1100px; display: grid; gap: 28px; align-items: center; grid-template-columns: 1fr 1.2fr; }
.slide h2 { font-size: clamp(2rem, 6vw, 4.2rem); }
.slide .lead { font-size: 1.15rem; max-width: 460px; color: rgba(255, 255, 255, .82); }
.slide .brandline { text-transform: uppercase; letter-spacing: .25em; font-size: .8rem; font-weight: 700; opacity: .8; margin-bottom: 12px; }
.slide--intro { background: radial-gradient(900px 600px at 20% 20%, #ff4d2e55, transparent 60%), radial-gradient(900px 600px at 90% 80%, #7c3aed66, transparent 60%), #0b0a09; text-align: center; }
.slide--intro .slide-inner { grid-template-columns: 1fr; justify-items: center; }
.slide--intro .lead { margin-inline: auto; }
.slide--intro h1 { font-size: clamp(2.2rem, 8vw, 5.5rem); }
.slide--glasses { background: linear-gradient(160deg, #0f172a, #1e3a8a 70%, #f59e0b22); }
.slide--accessories { background: linear-gradient(160deg, #2e1065, #7e22ce 60%, #ec4899); }
.slide--sneakers { background: linear-gradient(160deg, #1c0a0a, #991b1b 65%, #f97316); }
.slide--coins { background: radial-gradient(700px 500px at 50% 40%, #f5b30166, transparent 65%), #14110f; text-align: center; }
.slide--coins .slide-inner { grid-template-columns: 1fr; justify-items: center; }
.slide--final { background: radial-gradient(900px 600px at 50% 0%, #ff4d2e66, transparent 60%), #0b0a09; text-align: center; }
.slide--final .slide-inner { grid-template-columns: 1fr; justify-items: center; }
.showcase { display: grid; gap: 14px; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; }
.show-card { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 24px; padding: 14px; backdrop-filter: blur(8px); transition: transform .3s; }
.show-card:hover { transform: translateY(-6px) rotate(-1deg); }
.show-card:first-child { grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }
.show-card .art { animation: float 5s ease-in-out infinite; }
.show-card:nth-child(2) .art { animation-delay: -1.5s; } .show-card:nth-child(3) .art { animation-delay: -3s; }
.show-card .meta { font-size: .9rem; margin-top: 6px; }
.show-card .meta b { display: block; }
/* ===== Слайд-галерея с настоящими фото ===== */
.gal-style-lifestyle { background: #0b0a09; }
:where(.gal-style-studio) { background: linear-gradient(160deg, #1c1917, #44403c); } /* категории без своего градиента */
.ambient { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.ambient-img { position: absolute; inset: -60px; background-size: cover; background-position: center; filter: blur(46px) brightness(.5) saturate(1.3); opacity: 0; transition: opacity .9s ease; }
.ambient-img.is-active { opacity: 1; }
.gal-style-lifestyle::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(90deg, rgba(8, 7, 6, .6), rgba(8, 7, 6, .1) 70%); }
.slide--gallery .slide-inner { position: relative; z-index: 1; }
.slide--gallery .scroll-hint { z-index: 1; }

.slide-inner.gal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "head stage" "body stage"; grid-template-rows: auto auto; align-content: center; align-items: start; column-gap: clamp(28px, 6vw, 88px); row-gap: 22px; max-width: 1120px; }
.gal-head { grid-area: head; align-self: end; }
.gal-body { grid-area: body; }
.gal-stage { grid-area: stage; position: relative; justify-self: center; align-self: center; height: min(76vh, 720px); aspect-ratio: 4 / 5; max-width: 100%; border-radius: 28px; overflow: hidden; background: #1c1916; box-shadow: 0 40px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08); touch-action: pan-y; user-select: none; }
.gal-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 35%; opacity: 0; transform: scale(1.07); transition: opacity .8s ease, transform 1.6s cubic-bezier(.2, .7, .2, 1); }
.gal-photo.is-active { opacity: 1; transform: scale(1); }
.gal-arrow { position: absolute; top: 50%; z-index: 2; width: 46px; height: 46px; padding: 0; transform: translateY(-50%); display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(10, 8, 7, .35); backdrop-filter: blur(8px); color: #fff; cursor: pointer; transition: background .2s; }
.gal-arrow .icon { width: 20px; height: 20px; vertical-align: 0; }
.gal-arrow:hover { background: rgba(255, 255, 255, .22); }
.gal-prev { left: 14px; } .gal-next { right: 14px; }
.gal-count { position: absolute; left: 16px; bottom: 16px; z-index: 2; padding: .35em .85em; border-radius: 999px; background: rgba(10, 8, 7, .45); backdrop-filter: blur(8px); font-size: .8rem; letter-spacing: .16em; }
.gal-info { display: grid; }
.gal-item { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; pointer-events: none; }
.gal-item.is-active { opacity: 1; transform: none; pointer-events: auto; transition-delay: .12s; }
.gal-brand { margin: 0 0 .5em; text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; font-weight: 700; color: rgba(255, 255, 255, .7); }
.gal-name { margin: 0 0 .5em; font: 800 clamp(1.5rem, 3.4vw, 2.4rem) / 1.1 var(--font-display); }
.gal-desc { max-width: 44ch; margin: 0 0 .9em; color: rgba(255, 255, 255, .8); }
.gal-thumbs { display: flex; gap: 10px; margin-top: 22px; }
.gal-thumb { flex: 0 1 62px; min-width: 0; aspect-ratio: 1; height: auto; padding: 0; overflow: hidden; border-radius: 16px; border: 2px solid transparent; background: #1c1916; cursor: pointer; opacity: .55; transition: opacity .25s, transform .25s, border-color .25s; }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; }
.gal-thumb:hover { opacity: .9; }
.gal-thumb.is-active { opacity: 1; border-color: #fff; transform: translateY(-4px); }
.gal-arrow:focus-visible, .gal-thumb:focus-visible { outline: 3px solid #ffd166; outline-offset: 2px; }
.gal-count b { display: inline-block; }
.gal-head h2 { overflow: hidden; padding-block: .04em .1em; font-size: clamp(1.9rem, 3.8vw, 3.2rem); }

/* --- «студийный» вариант: товар на белом фоне (кроссовки) --- */
.gal-style-studio .gal-stage { height: auto; width: min(100%, 72vh, 640px); aspect-ratio: 1 / 1; border-radius: 32px; background: #fff; box-shadow: 0 40px 90px rgba(0, 0, 0, .45); }
.gal-style-studio .gal-photo { object-fit: contain; object-position: 50% 50%; }
.gal-style-studio .gal-arrow { background: rgba(255, 255, 255, .92); border-color: rgba(20, 17, 15, .1); color: #14110f; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); backdrop-filter: none; }
.gal-style-studio .gal-arrow:hover { background: #fff; }
.gal-style-studio .gal-count { background: rgba(20, 17, 15, .08); color: #14110f; backdrop-filter: none; }
.gal-style-studio .gal-thumb { background: #fff; border-color: rgba(255, 255, 255, .25); opacity: .8; }
.gal-style-studio .gal-thumb:hover, .gal-style-studio .gal-thumb.is-active { opacity: 1; }
.gal-style-studio .gal-thumb img { object-fit: cover; object-position: 50% 55%; transform: scale(1.3); }
.gal-style-studio .gal-thumb.is-active { border-color: #fff; }
.gal-style-studio .gal-brand { color: rgba(255, 255, 255, .8); }

/* --- когда движением управляет Anime.js (.fx): до показа слайда всё спрятано, CSS-переходы отключены --- */
.slide--gallery.fx .reveal { transition: none; }
.slide--gallery.fx:not(.fx-ready) .reveal { opacity: 0; transform: none; }
.slide--gallery.fx:not(.fx-ready) :is(.gal-thumb, .gal-arrow, .gal-count, .gal-item.is-active > :not(.gal-name), [data-char]) { opacity: 0; }
.slide--gallery.fx .gal-photo, .slide--gallery.fx .gal-item { transition: none; }
.slide--gallery.fx .gal-thumb { transition: opacity .25s, border-color .25s; }
.reveal { opacity: 0; transform: translateY(32px); transition: opacity .8s ease, transform .8s ease; }
.slide.in .reveal { opacity: 1; transform: none; }
.slide.in .reveal:nth-child(2) { transition-delay: .12s; } .slide.in .reveal:nth-child(3) { transition-delay: .24s; } .slide.in .reveal:nth-child(4) { transition-delay: .36s; }
.coins-stack { display: flex; gap: 14px; justify-content: center; margin: 12px 0 24px; flex-wrap: wrap; }
.coin-3d { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font: 800 1.9rem var(--font-display); color: #7a5600; background: radial-gradient(circle at 30% 30%, #fff3c4, #f5b301 60%, #c58f00); border: 4px solid #ffd966; box-shadow: 0 10px 30px rgba(245, 179, 1, .45), inset 0 -6px 12px rgba(0, 0, 0, .18); animation: coin-spin 3.6s ease-in-out infinite; }
.coin-3d:nth-child(2) { animation-delay: -1.2s; } .coin-3d:nth-child(3) { animation-delay: -2.4s; }
.big-percent { font: 800 clamp(4rem, 14vw, 9rem) var(--font-display); line-height: 1; color: var(--coin); }
.dots { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); display: grid; gap: 10px; z-index: 5; }
.dots button { width: 11px; height: 11px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .35); padding: 0; cursor: pointer; transition: transform .2s, background .2s; }
.dots button.on { background: #fff; transform: scale(1.5); }
.deck-top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; z-index: 5; pointer-events: none; }
.deck-top > * { pointer-events: auto; }
.deck-top .btn { background: rgba(255, 255, 255, .08); box-shadow: none; }
.deck-top .btn:hover { background: rgba(255, 255, 255, .2); }
.deck-top .logo { color: #fff; }
.progress { position: fixed; left: 0; top: 0; height: 3px; background: var(--brand); width: 0; z-index: 6; transition: width .15s; }
.scroll-hint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); background: none; border: 0; color: #fff; opacity: .85; cursor: pointer; font: 600 .85rem var(--font); display: grid; gap: 2px; justify-items: center; animation: bounce 1.8s infinite; }
.scroll-hint .icon { width: 18px; height: 18px; vertical-align: 0; }
.final-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.final-actions .btn { border-color: rgba(255, 255, 255, .5); color: #fff; font-size: 1.1rem; padding: .9em 1.8em; background: rgba(255, 255, 255, .06); box-shadow: none; }
.final-actions .btn:not(.btn-primary):hover { background: rgba(255, 255, 255, .16); }
.final-actions .btn-primary { border-color: var(--brand); background: var(--brand); }

/* ===== Демо-оплата ===== */
.pay-page { max-width: 460px; margin: 0 auto; }
.demo-banner { background: #fef3c7; color: #92400e; border-radius: 12px; padding: .6em 1em; font-weight: 600; font-size: .9rem; text-align: center; margin-bottom: 16px; }
.pay-phone { border-radius: 32px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.pay-head { padding: 28px 24px; color: #fff; display: flex; align-items: center; gap: 14px; }
.pay-head .pay-logo { width: 48px; height: 48px; background: rgba(255, 255, 255, .22); font-size: 1rem; }
.pay-head .pay-logo .icon { width: 28px; height: 28px; }
.pay-head h1 { font-size: 1.4rem; margin: 0; }
.pay-body { padding: 24px; }
.pay-amount { font: 800 2rem var(--font-display); margin: 4px 0 12px; }
.theme-payme .pay-head { background: linear-gradient(135deg, #00b8b8, #00e0d0); }
.theme-click .pay-head { background: linear-gradient(135deg, #0095e0, #38c0ff); }
.theme-uzum .pay-head { background: linear-gradient(135deg, #5b00d6, #9a4dff); }
.theme-card .pay-head { background: linear-gradient(135deg, #1f2937, #4b5563); }
.theme-cash .pay-head { background: linear-gradient(135deg, #15803d, #4ade80); }
.processing { position: fixed; inset: 0; background: rgba(11, 10, 9, .8); display: none; place-items: center; z-index: 50; color: #fff; text-align: center; }
.processing.on { display: grid; }
.spinner { width: 54px; height: 54px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .25); border-top-color: #fff; animation: spin 0.9s linear infinite; margin: 0 auto 16px; }

/* ===== Чек ===== */
.receipt-wrap { max-width: 440px; margin: 0 auto; }
.success-head { text-align: center; margin-bottom: 22px; }
.success-head .check { width: 72px; height: 72px; margin: 0 auto 12px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; animation: pop .5s both; }
.success-head .check .icon { width: 42px; height: 42px; vertical-align: 0; }
.receipt-shadow { filter: drop-shadow(0 18px 24px rgba(20, 17, 15, .18)); }
.receipt { --paper: #fffef9; background: var(--paper); color: #1b1a17; position: relative; padding: 28px 26px 22px; font-family: 'Courier New', ui-monospace, monospace; font-size: .92rem; }
.receipt::before, .receipt::after { content: ""; position: absolute; left: 0; right: 0; height: 9px; background-repeat: repeat-x; background-size: 18px 9px; }
.receipt::before { top: -8px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='9' viewBox='0 0 18 9'%3E%3Cpath d='M0 9 L9 0 L18 9Z' fill='%23fffef9'/%3E%3C/svg%3E"); }
.receipt::after { bottom: -8px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='9' viewBox='0 0 18 9'%3E%3Cpath d='M0 0 L9 9 L18 0Z' fill='%23fffef9'/%3E%3C/svg%3E"); }
.receipt .brand { text-align: center; font: 800 1.5rem var(--font-display); letter-spacing: -.02em; }
.receipt .brand b { color: var(--brand); }
.receipt .sub { text-align: center; text-transform: uppercase; letter-spacing: .25em; font-size: .72rem; color: #78716c; margin: 2px 0 14px; }
.receipt .stamp { display: block; width: fit-content; margin: 0 auto 14px; border: 3px solid var(--ok); color: var(--ok); font: 800 1rem var(--font-display); padding: .15em .7em; border-radius: 8px; transform: rotate(-4deg); opacity: .9; letter-spacing: .06em; }
.receipt .stamp.cash { border-color: #b45309; color: #b45309; }
.receipt hr { border: 0; border-top: 2px dashed #cfc8bb; margin: 14px 0; }
.r-line { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.r-line .l { color: #78716c; }
.r-item { padding: 5px 0; }
.r-item .name { font-weight: 700; }
.r-item .calc { display: flex; justify-content: space-between; color: #57534e; }
.r-total { font-size: 1.25rem; font-weight: 800; }
.r-coins { background: #fff3c4; border: 2px dashed #c58f00; border-radius: 10px; padding: 10px 12px; margin: 12px 0; color: #5c4300; }
.r-coins .r-line .l { color: #7a5600; }
.r-coins strong { font-size: 1.05rem; }
.pm-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.pm-chip .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.barcode { width: 100%; height: 56px; margin: 10px 0 4px; color: #1b1a17; }
.r-num { text-align: center; letter-spacing: .3em; font-size: .78rem; color: #78716c; }
.r-thanks { text-align: center; margin-top: 12px; font-weight: 700; }
.receipt-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 32px; }

/* ===== Иконки (Phosphor, MIT): inline SVG, цвет берётся из текста ===== */
.icon { display: inline-block; width: 1.25em; height: 1.25em; flex: none; vertical-align: -.22em; }
.icon-sm { width: 1em; height: 1em; vertical-align: -.14em; }
.icon-lg { width: 1.9em; height: 1.9em; vertical-align: 0; }
.icon-xl { width: 2.6em; height: 2.6em; vertical-align: 0; }
.icon-2xl { width: 4.5rem; height: 4.5rem; vertical-align: 0; }
.page-title { display: flex; align-items: center; gap: 16px; }
:where(.title-badge) { background: linear-gradient(135deg, #27221d, #3a322a); }
.title-badge { display: inline-grid; place-items: center; width: 60px; height: 60px; flex: none; border-radius: 19px; color: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .25); }
.title-badge .icon { width: 34px; height: 34px; }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; }
.link-arrow .icon { transition: transform .2s; }
.link-arrow:hover .icon { transform: translateX(4px); }
.wave { color: var(--coin); }
.r-coins .l .icon { color: #8a6200; vertical-align: -.18em; }

/* ===== Источники фото ===== */
.footer-row { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.footer-row a { color: inherit; }
.final-note { margin-top: 18px; font-size: .85rem; opacity: .7; }
.final-note a { color: inherit; }
.credit-list { display: grid; gap: 10px; margin-top: 18px; }
.credit-row { display: grid; grid-template-columns: 64px minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px 16px; align-items: center; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.credit-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; background: #fff; }
.credit-row small { display: block; color: var(--muted); }
.credit-row a { overflow-wrap: anywhere; }
.credit-row--text { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .6fr); }
@media (max-width: 760px) { .credit-row { grid-template-columns: 56px minmax(0, 1fr); } .credit-row > :nth-child(n+3) { grid-column: 2; } .credit-row--text { grid-template-columns: minmax(0, 1fr); } .credit-row--text > :nth-child(n+2) { grid-column: 1; } }

/* ===== Банковские карты: превью с переворотом (форма), мини-карточки (выбор оплаты) и строки профиля =====
   Оформление — собственное, фирменных дизайнов банков здесь нет; цвета карты зависят от платёжной системы. */
.card-skin { color: #fff; background: radial-gradient(120% 90% at 100% 0%, var(--glow, rgba(255, 255, 255, .22)), transparent 55%), linear-gradient(135deg, var(--c1, #333b4a), var(--c2, #12161d)); }
[data-brand="visa"] { --c1: #2748c6; --c2: #0e1b58; --glow: rgba(130, 175, 255, .5); }
[data-brand="mastercard"] { --c1: #40404a; --c2: #121216; --glow: rgba(255, 150, 70, .4); }
[data-brand="uzcard"] { --c1: #0f766e; --c2: #083b3a; --glow: rgba(94, 234, 212, .38); }
[data-brand="humo"] { --c1: #15803d; --c2: #0a3d1e; --glow: rgba(134, 239, 172, .4); }
[data-brand="unionpay"] { --c1: #b91c1c; --c2: #3b0d0d; --glow: rgba(252, 165, 165, .34); }

/* знаки платёжных систем: у Visa и Mastercard — иконки, у остальных — текстовая подпись */
.bm { display: none; align-items: center; line-height: 1; }
.bm .icon { vertical-align: 0; }
.bm-text { font: 800 italic .8rem var(--font); letter-spacing: .06em; text-transform: uppercase; }
.bm .icon { width: var(--bm, 3em); height: var(--bm, 3em); }
.bm-visa .icon { margin-block: calc(var(--bm, 3em) * -.33); }
.bm-mastercard .icon { width: calc(var(--bm, 3em) * .78); height: calc(var(--bm, 3em) * .78); margin-block: calc(var(--bm, 3em) * -.15); }
.bm-other .icon { width: 1.6em; height: 1.6em; margin: 0; }
.bank-card[data-brand="visa"] .bm-visa, .bank-card[data-brand="mastercard"] .bm-mastercard, .bank-card[data-brand="uzcard"] .bm-uzcard,
.bank-card[data-brand="humo"] .bm-humo, .bank-card[data-brand="unionpay"] .bm-unionpay, .bank-card[data-brand="other"] .bm-other { display: inline-flex; }

/* большое превью: поворот по движению мыши (tilt), переворот на CVC (flip) */
.bank-card { --rx: 0deg; --ry: 0deg; --gx: 30%; --gy: 0%; position: relative; width: 100%; max-width: 380px; margin: 4px auto 22px; aspect-ratio: 85.6 / 54; perspective: 1100px; }
.bank-card-tilt { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s ease-out; }
.bank-card-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.bank-card.is-flipped .bank-card-flip { transform: rotateY(180deg); }
.bank-card-face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 6.5% 7%; border-radius: 22px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 28px 54px rgba(20, 14, 8, .34), inset 0 1px 0 rgba(255, 255, 255, .28); }
.bank-card-face::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, .26), transparent 46%); }
.bank-card-back { transform: rotateY(180deg); padding: 0; justify-content: flex-start; }
.bc-top { display: flex; align-items: center; gap: 12px; }
.bc-chip { width: 46px; height: 35px; border-radius: 7px; background: linear-gradient(135deg, #f6e3a1, #c8a24a 55%, #f0d57a); box-shadow: inset 0 0 0 1px rgba(90, 60, 0, .35);
  background-image: linear-gradient(90deg, transparent 32%, rgba(90, 60, 0, .35) 32% 34%, transparent 34% 66%, rgba(90, 60, 0, .35) 66% 68%, transparent 68%), linear-gradient(135deg, #f6e3a1, #c8a24a 55%, #f0d57a); }
.bc-contactless { opacity: .8; transform: rotate(90deg); display: inline-flex; }
.bc-contactless .icon { width: 24px; height: 24px; vertical-align: 0; }
.bc-brand { --bm: 3.4em; margin-left: auto; min-height: 30px; display: flex; align-items: center; }
.bc-number { font: 600 clamp(1.1rem, 5.6vw, 1.55rem) / 1.2 ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .09em; text-shadow: 0 1px 2px rgba(0, 0, 0, .45); white-space: nowrap; }
.bc-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.bc-field { min-width: 0; display: grid; gap: 2px; }
.bc-field small { font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; opacity: .7; }
.bc-field span.is-empty { opacity: .5; }
.bc-field span { font: 600 .92rem ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace; letter-spacing: .06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; }
.bc-stripe { height: 17%; margin-top: 8%; background: #0a0a0c; }
.bc-sign { display: flex; align-items: center; gap: 10px; margin: 6% 7% 0; }
.bc-sign-line { flex: 1; height: 2.4em; border-radius: 6px; background: repeating-linear-gradient(135deg, #f4f1ea 0 6px, #e4ddcd 6px 12px); }
.bc-cvc { min-width: 3.6em; padding: .55em .8em; border-radius: 6px; background: #fff; color: #111; text-align: center; font: 700 1rem ui-monospace, Consolas, monospace; letter-spacing: .12em; }
.bc-note { margin: 6% 7% 0; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }

/* компактная карточка в выборе оплаты и строка в профиле */
.mini-card { position: relative; flex: 0 0 176px; aspect-ratio: 85.6 / 54; display: flex; flex-direction: column; justify-content: space-between; padding: 12px 14px; margin: 0;
  border-radius: 16px; overflow: hidden; isolation: isolate; cursor: pointer; scroll-snap-align: start; font-weight: 400;
  box-shadow: 0 8px 20px rgba(20, 14, 8, .26), inset 0 1px 0 rgba(255, 255, 255, .22); transition: transform .22s, box-shadow .22s, filter .22s; }
.mini-card::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, .2), transparent 55%); }
.mini-card input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mini-card:hover { transform: translateY(-3px); }
.mini-card:has(input:checked) { transform: translateY(-3px); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink), 0 16px 28px rgba(20, 14, 8, .3); }
.mini-card:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 3px; }
.mc-top { --bm: 2.9em; display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.mc-top .bm { display: inline-flex; }
.mc-num { font: 600 1.05rem ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace; letter-spacing: .1em; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.mc-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.mc-bottom span:first-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-check { position: absolute; top: 9px; right: 9px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #111; transform: scale(0); transition: transform .32s cubic-bezier(.34, 1.56, .64, 1); }
.mc-check .icon { width: 13px; height: 13px; vertical-align: 0; }
.mini-card:has(input:checked) .mc-check { transform: scale(1); }
.mini-card:has(input:checked) .mc-top .bm { margin-right: 28px; }
.mini-card[data-expired] { filter: grayscale(1); opacity: .6; cursor: not-allowed; }
.mini-card[data-expired] input { cursor: not-allowed; }
.mc-expired { position: absolute; left: 14px; right: 14px; top: 50%; transform: translateY(-50%) rotate(-6deg); text-align: center; padding: .15em .4em; border: 2px solid #fff; border-radius: 6px; font: 800 .8rem var(--font); letter-spacing: .12em; text-transform: uppercase; background: rgba(0, 0, 0, .35); }
.mini-card[data-fresh] { animation: card-pop .8s cubic-bezier(.34, 1.56, .64, 1) both; }
.mini-card--add { background: transparent; color: var(--muted); border: 2px dashed var(--input); box-shadow: none; align-items: center; justify-content: center; gap: 6px; text-decoration: none; font-weight: 600; font-size: .85rem; text-align: center; }
.mini-card--add::after { display: none; }
.mini-card--add:hover { color: var(--ink); border-color: var(--ink); box-shadow: none; }
.mini-card--add .icon { width: 22px; height: 22px; vertical-align: 0; }
@keyframes card-pop { from { opacity: 0; transform: translateY(14px) scale(.86) rotate(-3deg); } }

.card-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.card-row:last-child { border-bottom: 0; }
.card-row-skin { --bm: 2.5em; flex: none; width: 58px; height: 38px; display: grid; place-items: center; border-radius: 8px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.card-row-skin .bm { display: inline-flex; }
.card-row-skin .bm-text { font-size: .5rem; }
.card-row-info { flex: 1; min-width: 0; }
.card-row-info b { display: block; }
.card-row-info small { color: var(--muted); }
.card-row-info .pill { margin-left: .5em; }

/* ===== Анимации ===== */
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes coin-spin { 0%, 100% { transform: rotateY(0) translateY(0); } 50% { transform: rotateY(180deg) translateY(-10px); } }
@keyframes pop { from { transform: scale(.2); opacity: 0; } 70% { transform: scale(1.15); } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Адаптив ===== */
@media (max-width: 900px) {
  .detail, .two-col { grid-template-columns: 1fr; }
  .slide-inner { grid-template-columns: minmax(0, 1fr); text-align: center; }
  .slide-inner > * { min-width: 0; }
  .slide .lead { margin-left: auto; margin-right: auto; }
  .dots { right: 8px; }
}
@media (max-width: 640px) {
  .site-header .container { height: auto; flex-wrap: wrap; gap: 6px 8px; padding-top: 8px; padding-bottom: 8px; }
  .logo { font-size: 1rem; }
  .nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .nav a { padding: .35em .8em; }
  .header-right { gap: 8px; }
  .header-right .btn-sm { display: none; }
  .cart-row { grid-template-columns: 72px 1fr; }
  .cart-row .line-sum { grid-column: 2; }
  .toolbar form { margin-left: 0; width: 100%; }
  .toolbar input[type=search] { flex: 1; width: auto; }
  .showcase { grid-template-columns: 1fr 1fr; }
  .show-card:first-child { grid-column: span 2; grid-row: auto; }
  .coin-pill .coin-text { display: none; }
  .slide { padding: 64px 16px 48px; }
  .slide-inner { gap: 16px; }
  .slide h2 { font-size: clamp(1.8rem, 9vw, 2.6rem); }
  .slide .lead { font-size: 1rem; }
  .show-card:first-child .art { max-width: 58%; margin: 0 auto; }
  .show-card { padding: 10px; border-radius: 18px; }
}

/* галерея на планшете и телефоне: заголовок, фото, затем описание и миниатюры */
@media (max-width: 900px) {
  .slide-inner.gal { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "stage" "body"; align-content: start; row-gap: 16px; text-align: center; }
  .gal-head { align-self: auto; }
  .gal-stage { height: min(40dvh, 400px); }
  .gal-style-studio .gal-stage { height: auto; width: min(100%, 40dvh, 400px); }
  .gal-item { justify-self: center; }
  .gal-desc { margin-left: auto; margin-right: auto; }
  .gal-thumbs { justify-content: center; margin-top: 14px; }
  .gal-tagline { display: none; }
}
@media (max-width: 900px) and (max-height: 820px) { .gal-desc { display: none; } }
@media (max-width: 900px) { .slide--gallery .scroll-hint { display: none; } }

/* ===== Плавные переходы между страницами (View Transitions) =====
   Chrome/Edge 126+ и Safari 18.2+. В остальных браузерах страницы открываются как обычно. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.site-header { view-transition-name: site-header; } /* шапка остаётся на месте и не мигает */
.detail-media { view-transition-name: product-photo; } /* фото товара «перелетает» из карточки */
::view-transition-old(root) { animation: vt-fade-out .35s cubic-bezier(.4, 0, .2, 1) both; }
::view-transition-new(root) { animation: vt-fade-in .35s cubic-bezier(.4, 0, .2, 1) both, vt-rise .5s cubic-bezier(.16, 1, .3, 1) both; }
::view-transition-group(product-photo) { animation-duration: .6s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); overflow: clip; border-radius: 22px; }
::view-transition-old(product-photo), ::view-transition-new(product-photo) { width: 100%; height: 100%; object-fit: cover; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }
@keyframes vt-rise { from { transform: translateY(16px); } }

/* ===== Переключатель (Switch) ===== */
.switch { display: inline-flex; align-items: center; gap: .7em; margin: 0; cursor: pointer; font-weight: 600; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 20%, var(--surface)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18); transition: background .25s; }
.switch-thumb { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 999px; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .3); transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), width .15s; }
.switch:active .switch-thumb { width: 28px; }
.switch input:checked + .switch-track { background: var(--ok); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
.switch input:checked:active + .switch-track .switch-thumb { transform: translateX(12px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--ring); }
.switch input:disabled + .switch-track { opacity: .5; cursor: not-allowed; }

/* ===== Вкладки (Tabs) ===== */
.tabs-list { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, var(--surface)); }
.tab { display: inline-flex; align-items: center; gap: .45em; min-height: 36px; padding: .35em 1.05em; border: 0; border-radius: 999px; background: none; color: var(--muted); font: 600 .9rem var(--font); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.tab .icon { width: 1.1em; height: 1.1em; vertical-align: 0; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 17, 15, .18); }
.tab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.tab-panel[hidden] { display: none; }

/* ===== Диалог подтверждения (Dialog) ===== */
.dialog { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.dialog[open] { animation: dialog-in .28s cubic-bezier(.16, 1, .3, 1); }
.dialog::backdrop { background: rgba(12, 10, 8, .55); backdrop-filter: blur(4px); animation: backdrop-in .25s both; }
.dialog-card { padding: 24px; }
.dialog-card h3 { margin: 0 0 .4em; font-size: 1.15rem; }
.dialog-card p { margin: 0; color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes backdrop-in { from { opacity: 0; } }

/* ===== Аккордеон (Accordion) на <details> ===== */
.acc { border: 1px solid var(--line); border-radius: 18px; background: var(--surface); overflow: hidden; }
.acc details + details { border-top: 1px solid var(--line); }
.acc summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 1em 1.15em; font-weight: 600; cursor: pointer; list-style: none; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { background: var(--hover); }
.acc summary:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--ring); }
.acc summary .icon { color: var(--muted); transition: transform .25s; }
.acc details[open] summary .icon { transform: rotate(180deg); }
.acc-body { padding: 0 1.15em 1.1em; color: var(--muted); font-size: .93rem; }
.acc-body p { margin: 0 0 .6em; } .acc-body p:last-child { margin: 0; }
.acc details::details-content { height: 0; overflow: clip; transition: height .3s ease, content-visibility .3s allow-discrete; }
.acc details[open]::details-content { height: auto; }

/* ===== Скелетон: мерцающая заглушка, пока грузится картинка или 3D ===== */
.skeleton { background: linear-gradient(100deg, color-mix(in srgb, var(--ink) 6%, var(--surface)) 30%, color-mix(in srgb, var(--ink) 12%, var(--surface)) 50%, color-mix(in srgb, var(--ink) 6%, var(--surface)) 70%); background-size: 220% 100%; animation: shimmer 1.5s linear infinite; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* ===== Печать чека ===== */
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .receipt-actions, .success-head, .messages { display: none !important; }
  main { padding: 0; }
  .receipt-shadow { filter: none; }
  .receipt::before, .receipt::after { display: none; }
}

/* значок 3D на карточках очков */
.badge-3d { position: absolute; right: 12px; top: 12px; z-index: 2; display: inline-flex; align-items: center; gap: .3em; padding: .2em .6em; border-radius: 999px; background: rgba(20, 17, 15, .78); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; backdrop-filter: blur(4px); }

/* ===== «Бросок в корзину»: летящая копия фото товара ===== */
.fly-thumb { position: fixed; left: 0; top: 0; z-index: 200; overflow: hidden; border-radius: 22px; background: var(--surface); box-shadow: 0 18px 40px rgba(20, 14, 8, .35); pointer-events: none; will-change: transform; }
.fly-thumb > * { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; animation: none; }
.fly-thumb .art { display: grid; place-items: center; padding: 8px; }
.fly-dot { border-radius: 50%; background: var(--brand); }
.cart-link { transform-origin: center; }

/* ===== Кнопка «Назад» ===== */
.page-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-bottom: 16px; }
.page-nav .breadcrumbs { margin: 0; }
.back-link { display: inline-flex; align-items: center; gap: .4em; min-height: 38px; padding: .35em 1em .35em .75em; border: 1px solid var(--input); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: .9rem; font-weight: 600; text-decoration: none; box-shadow: var(--shadow-sm); transition: transform .15s, background .15s, box-shadow .15s; }
.back-link:hover { background: color-mix(in srgb, var(--ink) 6%, var(--surface)); transform: translateX(-2px); }
.back-link:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
.back-link .icon { width: 1.05em; height: 1.05em; vertical-align: 0; }
.back-link--dark { margin-bottom: 14px; border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .06); color: #fff; box-shadow: none; }
.back-link--dark:hover { background: rgba(255, 255, 255, .16); }
.auth-card .back-link { display: flex; width: fit-content; }
