/* ==========================================================================
   market.aever.one — дизайн по макетам
   Шрифт NoirPro лежит на files.aever.one (нужен CORS-заголовок, см. README)
   ========================================================================== */
@font-face { font-family: 'NoirPro'; font-weight: 300; font-style: normal; font-display: swap; src: url('https://files.aever.one/assets/fonts/NoirPro/Light.ttf') format('truetype'); }
@font-face { font-family: 'NoirPro'; font-weight: 300; font-style: italic; font-display: swap; src: url('https://files.aever.one/assets/fonts/NoirPro/LightItalic.ttf') format('truetype'); }
@font-face { font-family: 'NoirPro'; font-weight: 400; font-style: normal; font-display: swap; src: url('https://files.aever.one/assets/fonts/NoirPro/Regular.ttf') format('truetype'); }
@font-face { font-family: 'NoirPro'; font-weight: 400; font-style: italic; font-display: swap; src: url('https://files.aever.one/assets/fonts/NoirPro/RegularItalic.ttf') format('truetype'); }
@font-face { font-family: 'NoirPro'; font-weight: 500; font-style: normal; font-display: swap; src: url('https://files.aever.one/assets/fonts/NoirPro/Medium.ttf') format('truetype'); }
@font-face { font-family: 'NoirPro'; font-weight: 500; font-style: italic; font-display: swap; src: url('https://files.aever.one/assets/fonts/NoirPro/MediumItalic.ttf') format('truetype'); }
@font-face { font-family: 'NoirPro'; font-weight: 600; font-style: normal; font-display: swap; src: url('https://files.aever.one/assets/fonts/NoirPro/SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'NoirPro'; font-weight: 600; font-style: italic; font-display: swap; src: url('https://files.aever.one/assets/fonts/NoirPro/SemiBoldItalic.ttf') format('truetype'); }
@font-face { font-family: 'NoirPro'; font-weight: 700; font-style: normal; font-display: swap; src: url('https://files.aever.one/assets/fonts/NoirPro/Bold.ttf') format('truetype'); }
@font-face { font-family: 'NoirPro'; font-weight: 700; font-style: italic; font-display: swap; src: url('https://files.aever.one/assets/fonts/NoirPro/BoldItalic.ttf') format('truetype'); }
@font-face { font-family: 'NoirPro'; font-weight: 800; font-style: normal; font-display: swap; src: url('https://files.aever.one/assets/fonts/NoirPro/Heavy.ttf') format('truetype'); }
@font-face { font-family: 'NoirPro'; font-weight: 800; font-style: italic; font-display: swap; src: url('https://files.aever.one/assets/fonts/NoirPro/HeavyItalic.ttf') format('truetype'); }

:root {
    --bg: #212121;
    --panel: #1c1c1c;
    /* состояния кнопок из макетов: белый с разной прозрачностью */
    --btn-idle: rgba(255, 255, 255, .03);
    --btn-hover: rgba(255, 255, 255, .06);
    --stroke: rgba(255, 255, 255, .03);
    --item: #262626;
    --item-hover: #2d2d2d;
    --line: #2a2a2a;
    --text: #ffffff;
    --t-hover: rgba(255, 255, 255, .7);
    --t-idle: rgba(255, 255, 255, .4);
    --muted: #8c8c8c;
    --dim: #6a6a6a;
    --accent: #608dfd;
    --accent-hover: #759bfd;
    --accent-soft: rgba(96, 141, 253, .14);
    --green: #8dff3f;
    --danger: #ff6464;
    --danger-soft: rgba(255, 100, 100, .12);
    --ok: #4cd98a;
    --ok-soft: rgba(76, 217, 138, .12);
    --warn: #ffc857;
    --r-lg: 18px;
    --r-md: 12px;
    --r-sm: 9px;
    --font: 'NoirPro', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    --wrap: 1170px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
.i { flex: none; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.main { flex: 1; padding-bottom: 56px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent); color: #fff; }

/* ---------- Навигация ---------- */
.nav { background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.nav .wrap { display: flex; align-items: center; gap: 8px; height: 64px; }
.nav-logo { display: flex; align-items: center; height: 32px; margin-right: 8px; flex: none; }
.nav-logo img { height: 26px; width: auto; display: block; }
.nav-group { display: flex; align-items: center; gap: 8px; }
.nav-spacer { flex: 1; }

/* кнопка шапки: 9px, фон 3%, текст 40% → при наведении фон 6%, текст 70% */
.pill {
    display: inline-flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 12px;
    background: var(--btn-idle); color: var(--t-idle);
    border-radius: var(--r-sm); font-size: 14px; font-weight: 500;
    border: 0; cursor: pointer; font-family: inherit; line-height: 1;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.pill:hover { background: var(--btn-hover); color: var(--t-hover); }
.pill.is-current { background: var(--btn-hover); color: var(--text); }
.pill-search { gap: 6px; padding: 0 6px 0 10px; }
.pill-search .i { margin-right: 2px; }
.kbd { background: var(--btn-hover); color: var(--t-idle); border-radius: 6px; padding: 0 8px; font-size: 13px; line-height: 22px; }

/* «Маркет» + выдвинутая из него панель подкнопок (Главная / Каталог / FAQ) */
.market { display: flex; align-items: center; position: relative; }
.market-btn {
    position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 14px; background: var(--accent); color: var(--text);
    border-radius: var(--r-sm); font-size: 14px; font-weight: 600; line-height: 1;
    transition: background .15s;
}
.market-btn:hover { background: var(--accent-hover); }
.market-sub {
    display: flex; align-items: center; gap: 2px; height: 28px;
    margin-left: -14px; padding: 0 3px 0 20px;   /* левый край уходит под синюю кнопку */
    background: var(--btn-idle); border: 1px solid var(--stroke); border-radius: var(--r-sm);
}
.market-sub a {
    display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: var(--r-sm);
    font-size: 14px; font-weight: 500; line-height: 1; color: var(--t-idle); background: transparent;
    transition: background .15s, color .15s;
}
.market-sub a:hover { background: var(--btn-hover); color: var(--t-hover); }
.market-sub a.is-active { background: var(--btn-hover); color: var(--t-hover); }

.pill-icon { width: 32px; padding: 0; justify-content: center; position: relative; }
.pill-count {
    position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px;
    background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; border-radius: 8px; text-align: center;
}
.pill-user { height: 32px; padding: 0 12px 0 5px; color: var(--text); font-weight: 600; gap: 8px; }
.avatar-xs { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #7c5cff, #608dfd); display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; overflow: hidden; }
.avatar-xs img { width: 100%; height: 100%; object-fit: cover; }

.banner { background: var(--warn); color: #1a1500; font-size: 13px; font-weight: 600; text-align: center; padding: 6px 12px; }

/* ---------- Кнопки ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 36px; padding: 0 16px; border-radius: var(--r-sm); border: 0;
    background: var(--item); color: var(--text); font: 600 14px/1 var(--font);
    cursor: pointer; transition: background .15s, transform .05s; white-space: nowrap;
}
.btn:hover { background: var(--item-hover); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: rgba(255, 100, 100, .22); }
.btn-lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Панели и раскладка ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; align-items: start; margin-top: 16px; }
.content { min-width: 0; display: flex; flex-direction: column; gap: 12px; }

/* Левое меню по макету: фон #1C1C1C, скругление 10px, отступы 10px, зазор между кнопками 5px,
   перед заголовком группы 10px, кнопки 9px */
.side {
    background: var(--panel); border: 1px solid var(--stroke); border-radius: 10px; padding: 10px;
    display: flex; flex-direction: column; gap: 5px; position: sticky; top: 80px;
}
.side-title { margin-top: 5px; padding: 0; font-size: 15px; font-weight: 600; line-height: 20px; color: var(--text); }
.side-item {
    display: flex; align-items: center; gap: 10px; height: 30px; padding: 0 10px;
    background: var(--btn-idle); border-radius: var(--r-sm);
    color: var(--t-idle); font-size: 14px; font-weight: 500; line-height: 1;
    transition: background .15s, color .15s; width: 100%; border: 0; font-family: inherit; cursor: pointer; text-align: left;
}
.side-item:hover { background: var(--btn-hover); color: var(--t-hover); }
.side-item.is-active { background: var(--accent); color: var(--text); }
.side-item.is-danger:hover { color: var(--danger); }
.side form { margin: 0; }

/* ---------- Формы ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.hint { font-size: 12.5px; color: var(--dim); }
.input, .select, .textarea {
    width: 100%; background: var(--item); color: var(--text);
    border: 1px solid transparent; border-radius: var(--r-sm);
    font: 500 14px/1.4 var(--font); padding: 0 12px; height: 40px;
    transition: border-color .15s, background .15s;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; min-height: 96px; }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:hover, .select:hover, .textarea:hover { background: var(--item-hover); }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--accent); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 17px, calc(100% - 13px) 17px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.input[type=file] { padding: 7px 8px; height: auto; font-size: 13px; color: var(--muted); }
.input[type=file]::file-selector-button { background: #353535; color: var(--text); border: 0; border-radius: 6px; padding: 5px 10px; margin-right: 10px; font: 600 12px var(--font); cursor: pointer; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 8px; margin-top: 4px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form .input, .inline-form .select { flex: 1 1 150px; width: auto; }

/* Переключатели (чекбоксы-свитчи) */
.toggle { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--item); border-radius: var(--r-md); cursor: pointer; }
.toggle:hover { background: var(--item-hover); }
.toggle-text { flex: 1; min-width: 0; }
.toggle-text b { display: block; font-size: 14px; font-weight: 600; }
.toggle-text span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 40px; height: 22px; border-radius: 11px; background: #3a3a3a; position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + .switch { background: var(--accent); }
.toggle input:checked + .switch::after { transform: translateX(18px); }
.toggle input:focus-visible + .switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggle.is-warn input:checked + .switch { background: var(--warn); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- Уведомления ---------- */
.flashes { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.alert { padding: 11px 14px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500; background: var(--accent-soft); color: #b9ccff; }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.alert-error { background: var(--danger-soft); color: var(--danger); }

/* ---------- Строки-списки (покупки, админ-списки) ---------- */
.rows { display: flex; flex-direction: column; gap: 8px; }
.row {
    display: flex; align-items: center; gap: 14px; background: var(--item);
    border-radius: var(--r-md); padding: 10px 10px 10px 16px; min-height: 52px;
}
.row-num { color: var(--dim); font-size: 14px; width: 16px; }
.row-title { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; }
.row-title small { color: var(--muted); font-weight: 500; font-size: 14px; margin-left: 4px; }
.row-meta { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.empty { text-align: center; padding: 56px 16px; color: var(--muted); }
.empty h3 { color: var(--text); font-size: 17px; margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 20px; }
.badge { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; background: #333; color: var(--muted); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: rgba(255, 200, 87, .14); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-accent { background: var(--accent-soft); color: #9fb8ff; }

/* ---------- Профиль ---------- */
.profile-card { display: flex; gap: 20px; align-items: center; padding: 20px; }
.avatar-lg {
    width: 120px; height: 120px; border-radius: 22px; flex: none; overflow: hidden;
    background: radial-gradient(circle at 30% 20%, #f1eeff, #d9d3ff); display: grid; place-items: center;
    color: #6b4fe0; font-size: 64px; font-weight: 800; font-style: italic;
}
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-name { font-size: 30px; font-weight: 800; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.profile-name span { font-size: 22px; font-weight: 700; color: var(--dim); }
.profile-meta { color: var(--muted); font-size: 14px; margin-top: 6px; line-height: 1.7; }

/* ---------- Каталог ---------- */
.search { position: relative; }
.search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.search .input { height: 44px; padding-left: 40px; background: var(--item); }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pcard {
    display: grid; grid-template-columns: minmax(0, 1fr) 168px auto; gap: 10px; align-items: stretch;
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px;
    transition: border-color .15s, background .15s;
}
.pcard:hover { border-color: #3b3b3b; background: #242424; }
.pcard-body { display: flex; flex-direction: column; min-width: 0; }
.pcard h3 { font-size: 16px; font-weight: 800; }
.pcard p { color: var(--muted); font-size: 12.5px; line-height: 1.45; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-foot { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; gap: 8px; }
.price { color: var(--green); font-weight: 800; font-size: 16px; }
.rub { color: var(--dim); font-size: 13px; font-weight: 600; }
.pcat { font-size: 11.5px; color: var(--muted); }
.pcat b { color: var(--text); font-weight: 700; }
.pcard-img { border-radius: 10px; overflow: hidden; background: #151515; aspect-ratio: 3 / 2; align-self: start; display: grid; place-items: center; color: var(--dim); }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.pcard-more { width: 46px; border-radius: 10px; background: #1a1a1a; display: grid; place-items: center; text-align: center; font-size: 11px; line-height: 1.2; color: var(--dim); }
.pcard.no-more { grid-template-columns: minmax(0, 1fr) 168px; }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }

/* ---------- Главная ---------- */
.hero {
    margin-top: 28px; padding: 48px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line);
    display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; position: relative; overflow: hidden;
}
.hero::before { content: ""; position: absolute; right: -120px; top: -140px; width: 520px; height: 520px; background: radial-gradient(circle, rgba(96, 141, 253, .22), transparent 65%); pointer-events: none; }
.hero > * { position: relative; }
.hero h1 { font-size: 44px; font-weight: 800; letter-spacing: -1px; line-height: 1.08; }
.hero p { color: var(--muted); font-size: 17px; margin: 16px 0 28px; max-width: 460px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.mock { background: #161616; border: 1px solid #2c2c2c; border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); overflow: hidden; font-size: 12px; user-select: none; transform: rotate(1.5deg); }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #1c1c1c; border-bottom: 1px solid #2a2a2a; }
.mock-bar b { font-style: italic; letter-spacing: -1px; font-size: 14px; margin-right: 6px; }
.mock-tab { padding: 3px 9px; border-radius: 6px; background: #262626; color: var(--dim); }
.mock-tab.on { background: var(--accent); color: #fff; }
.mock-body { padding: 14px; display: grid; gap: 12px; }
.mock-row { display: flex; align-items: center; justify-content: space-between; color: var(--muted); gap: 12px; }
.mock-sw { width: 28px; height: 15px; border-radius: 8px; background: #333; position: relative; flex: none; }
.mock-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; }
.mock-sw.on { background: var(--accent); }
.mock-sw.on::after { left: 15px; }
.mock-slider { flex: 1; max-width: 120px; height: 5px; border-radius: 3px; background: #333; position: relative; }
.mock-slider i { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 3px; }
.mock-val { color: var(--text); width: 26px; text-align: right; }

.stats { margin-top: 28px; background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 36px 0 40px; }
.stats h2 { text-align: center; font-size: 24px; font-weight: 800; }
.stats .sub { text-align: center; color: var(--muted); margin-top: 6px; font-size: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.stat { text-align: center; }
.stat b { display: block; font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.stat span { display: block; color: var(--muted); font-size: 16px; margin-top: 6px; }
.stat small { display: block; color: var(--dim); font-size: 12px; }

.block { margin-top: 40px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.block-head h2 { font-size: 22px; font-weight: 800; }
.block-head a { color: var(--muted); font-size: 14px; font-weight: 600; }
.block-head a:hover { color: var(--text); }
.perks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.perk { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.perk .ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 14px; }
.perk h3 { font-size: 16px; font-weight: 800; }
.perk p { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- Админка ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-card { background: var(--item); border: 1px solid #333; border-radius: var(--r-md); padding: 14px 16px; }
.stat-card span { display: block; font-size: 12.5px; font-weight: 600; color: var(--accent); }
.stat-card b { display: block; font-size: 24px; font-weight: 800; margin-top: 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--dim); font-weight: 600; font-size: 12.5px; padding: 8px 12px; }
.table td { padding: 10px 12px; background: var(--item); }
.table tr td:first-child { border-radius: 10px 0 0 10px; }
.table tr td:last-child { border-radius: 0 10px 10px 0; }
.table { border-spacing: 0 6px; border-collapse: separate; }
.table-wrap { overflow-x: auto; }
.edit-row { display: grid; gap: 8px; background: var(--item); border-radius: var(--r-md); padding: 10px; }
.edit-row form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.edit-row .input, .edit-row .select { background: var(--panel); height: 36px; flex: 1 1 140px; width: auto; }
.edit-row .input.sm { flex: 0 0 110px; }
.code-tag { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .5px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 96px; }
.thumb img { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; }
.thumb .check { margin-top: 4px; font-size: 12px; }

/* ---------- Карточка товара ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.gallery-main { aspect-ratio: 16 / 10; border-radius: var(--r-md); background: #151515; overflow: hidden; display: grid; place-items: center; color: var(--dim); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery-thumbs button { border: 2px solid transparent; padding: 0; background: none; border-radius: 10px; overflow: hidden; width: 92px; height: 60px; flex: none; cursor: pointer; opacity: .7; }
.gallery-thumbs button.is-active, .gallery-thumbs button:hover { opacity: 1; border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: 28px; font-weight: 800; }
.crumb { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.crumb a:hover { color: var(--text); }
.stars { color: var(--warn); letter-spacing: 2px; }
.product-price { display: flex; align-items: baseline; gap: 10px; margin: 18px 0; }
.product-price .price { font-size: 34px; }
.product-price .rub { font-size: 16px; }
.owned { background: var(--ok-soft); color: var(--ok); padding: 14px; border-radius: var(--r-md); font-weight: 600; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.tabs { display: flex; gap: 4px; background: var(--item); padding: 3px; border-radius: 10px; width: max-content; max-width: 100%; margin-bottom: 14px; }
.tabs button { background: none; border: 0; color: var(--muted); font: 600 13px var(--font); padding: 7px 14px; border-radius: 8px; cursor: pointer; }
.tabs button.is-active { background: #353535; color: var(--text); }
.tab-pane[hidden] { display: none; }
.prose { color: #c9c9c9; line-height: 1.7; }
.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.review p { color: var(--muted); font-size: 14px; }
.review small { color: var(--dim); }

/* ---------- Корзина / оплата ---------- */
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding: 4px 4px 0; font-size: 18px; font-weight: 800; }
.summary { display: grid; gap: 8px; }
.summary-line { display: flex; justify-content: space-between; color: var(--muted); }
.summary-line.total { color: var(--text); font-weight: 800; font-size: 20px; padding-top: 10px; border-top: 1px solid var(--line); }
.summary-line.discount { color: var(--ok); }
.radio-card { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--item); border-radius: var(--r-md); cursor: pointer; border: 1px solid transparent; }
.radio-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.radio-card input { accent-color: var(--accent); }

/* ---------- Авторизация / сообщения ---------- */
.auth { max-width: 420px; margin: 56px auto 0; }
.auth h1 { font-size: 26px; font-weight: 800; margin-bottom: 18px; }
.auth form { display: grid; gap: 14px; }
.auth .alt { text-align: center; color: var(--muted); font-size: 14px; margin-top: 16px; }
.auth .alt a { color: var(--accent); font-weight: 600; }
.notice { max-width: 520px; margin: 96px auto 0; text-align: center; }
.notice .code { font-size: 72px; font-weight: 800; letter-spacing: -3px; color: var(--accent); line-height: 1; }
.notice h1 { font-size: 24px; margin: 14px 0 8px; }
.notice p { color: var(--muted); }
.notice .btn { margin-top: 22px; }

/* ---------- FAQ и информационные страницы ---------- */
.page { max-width: 780px; margin: 32px auto 0; }
.page h1 { font-size: 30px; font-weight: 800; margin-bottom: 18px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 18px 18px; color: var(--muted); }
.faq a { color: var(--accent); }

/* ---------- Футер ---------- */
.footer { background: var(--panel); border-top: 1px solid var(--line); }
.footer-top { display: flex; justify-content: space-between; gap: 40px; padding: 28px 0 26px; flex-wrap: wrap; }
.footer-brand h3 { font-size: 20px; font-weight: 800; }
.footer-brand p { color: var(--dim); font-size: 12.5px; margin-top: 4px; max-width: 300px; }
.footer-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col h4 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.footer-col a, .footer-col button { display: block; color: var(--dim); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; padding: 0; font-family: inherit; cursor: pointer; line-height: 1.55; text-align: left; }
.footer-col a:hover, .footer-col button:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 16px 0 18px; border-top: 1px solid var(--line); font-size: 13px; }
.footer-bottom nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
    .hero { grid-template-columns: 1fr; padding: 32px 24px; }
    .mock { display: none; }
    .hero h1 { font-size: 34px; }
    .pgrid { grid-template-columns: 1fr; }
    .product { grid-template-columns: 1fr; }
    .stat-cards, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .perks { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .layout { grid-template-columns: 1fr; }
    .side { position: static; }
    .nav .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
    .nav-ext { display: none; }
    .market-sub a { padding: 0 8px; }
    .pill-search .kbd { display: none; }
    .profile-card { flex-direction: column; align-items: flex-start; }
    .row { flex-wrap: wrap; }
    .stat b { font-size: 40px; }
    .pcard { grid-template-columns: minmax(0, 1fr) 120px; }
    .pcard-more { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
