/* =====================================================================
   STAR CITIZEN SHOP — тёмная тема с золотыми акцентами (стиль RSI)
   ===================================================================== */

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #101019;
    --bg-card: #12121c;
    --bg-card-hover: #1a1a28;
    --bg-elevated: #0e0e16;

    --gold: #c9a84c;
    --gold-light: #e8d48b;
    --gold-dark: #8b6914;
    --gold-glow: rgba(201, 168, 76, 0.35);

    --text-primary: #e8e8e8;
    --text-secondary: #a0a0b0;
    --text-muted: #8b8b9e;

    --border: #2a2a3e;
    --border-strong: #3a3a52;
    --success: #4caf50;
    --error: #ef5350;
    --info: #6495ed;

    /* Exo 2 покрывает и кириллицу, и латиницу — текст без перепадов */
    --font-display: 'Exo 2', 'Segoe UI', sans-serif;
    --font-body: 'Exo 2', 'Segoe UI', sans-serif;
    --font-brand: 'Orbitron', 'Exo 2', 'Segoe UI', sans-serif;

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.55);
    --shadow-gold: 0 8px 30px rgba(201, 168, 76, 0.18);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* атрибут hidden должен работать и на кнопках с display: inline-flex */
[hidden] { display: none !important; }

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: #08080e;
    scroll-behavior: smooth;
    scrollbar-color: var(--gold-dark) var(--bg-secondary);
}

body {
    font-family: var(--font-body);
    background: transparent;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

/* ===================== ФОНОВОЕ ВИДЕО ===================== */

.bg-video-layer {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: var(--bg-primary);
    pointer-events: none;
}

.bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* лёгкая версия играет сразу, полная плавно подменяет её */
.bg-video-lite {
    opacity: 1;
    transition: opacity 0.9s ease;
}

.bg-video-lite.is-hidden { opacity: 0; }

.bg-video-hd {
    opacity: 0;
    transition: opacity 0.9s ease;
}

.bg-video-hd.is-ready { opacity: 1; }

.bg-video-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(8, 8, 14, 0.34) 0%, rgba(8, 8, 14, 0.16) 38%, rgba(8, 8, 14, 0.4) 100%),
        radial-gradient(circle at 15% -10%, rgba(201, 168, 76, 0.08), transparent 45%),
        radial-gradient(circle at 85% 0%, rgba(100, 149, 237, 0.06), transparent 40%);
}

@media (prefers-reduced-motion: reduce) {
    .bg-video { display: none; }
}

::selection {
    background: var(--gold);
    color: #000;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-dark), #4a3a10);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.gold { color: var(--gold); }

/* ===================== ШАПКА ===================== */

.site-header {
    background: linear-gradient(180deg, rgba(13, 13, 21, 0.55) 0%, rgba(18, 18, 26, 0.4) 100%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.site-header.is-scrolled {
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.65);
    border-bottom-color: rgba(201, 168, 76, 0.35);
}

:root {
    /* 3D-логотип: 9× размер прежнего квадратика (18px → 162px) */
    --logo-3d-size: 121px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: auto;
    min-height: calc(var(--logo-3d-size) + 18px);
    padding: 9px 24px;
    flex-wrap: nowrap;
}

.main-nav {
    font-size: 13.5px;
    gap: 14px;
    margin-left: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.logo:hover { color: var(--gold-light); }

.logo-icon {
    font-size: 26px;
    color: var(--gold);
    text-shadow: 0 0 14px var(--gold-glow);
    transition: var(--transition);
}

/* 3D-логотип: 9× размер прежнего квадратика (18px → 162px) */
.logo-3d {
    position: relative;
    display: block;
    width: var(--logo-3d-size);
    height: var(--logo-3d-size);
    perspective: 1400px;
    perspective-origin: 50% 50%;
    transform-style: preserve-3d;
    flex: 0 0 auto;
}







/* задняя сторона: та же тень, что у лицевой грани */





.logo-3d:hover .logo-3d-inner,
.logo:focus-visible .logo-3d-inner {
    /* плавный вход и выход: разгон/торможение вместо резкого старта */
    animation: logo-3d-spin 4.6s linear infinite;
}

@media (max-width: 1700px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .main-nav {
        justify-content: center;
        flex-wrap: wrap;
        margin-left: 0;
    }
}

@media (max-width: 820px) {
    .logo-text { font-size: 13px; letter-spacing: .6px; }
    .logo-3d { --logo-3d-size: 84px; }
    .logo { gap: 10px; min-width: 0; }
    .site-header { overflow-x: clip; }
}

/* единый размер логотипа на всех устройствах: 121 px */


/* вторая модель: настоящая 3D-модель головы (WebGL) */


/* голова льва — статичный выпуклый барельеф */
.lion-relief {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: none;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}

/* вторая модель: голова в объёмном кольце звёзд */
.logo-stars3d {
    position: absolute;
    inset: -16%;
    perspective: 700px;
    perspective-origin: 50% 50%;
    pointer-events: none;
}

.stars-tilt {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    animation: logo-stars-spin 28s linear infinite;
}

.logo-3d-stars:hover .stars-tilt,
.logo:focus-visible .logo-3d-stars .stars-tilt {
    animation-duration: 7s;
}

.star-orbit {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 10%;
    height: 10%;
    margin: -5% 0 0 -5%;
    transform-style: preserve-3d;
}

.star-body {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

.star-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0.7) saturate(0.95);
}

/* лицевая грань звезды — с бликом, читается объём */
.star-layer:last-child {
    filter: brightness(1.08) drop-shadow(0 0 4px rgba(255, 236, 180, 0.55));
}

@keyframes logo-stars-spin {
    from { transform: rotateX(16deg) rotate(0deg); }
    to   { transform: rotateX(16deg) rotate(360deg); }
}

/* грань головы с рельефом (свет сверху-слева) */


@keyframes logo-stars-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}



@media (prefers-reduced-motion: reduce) {
    .logo-3d:hover .logo-3d-inner,
    .logo:focus-visible .logo-3d-inner { animation: none; }
}

.logo:hover .logo-icon {
    transform: rotate(90deg) scale(1.1);
    text-shadow: 0 0 22px var(--gold);
}

.logo-text {
    font-family: var(--font-brand);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 2.5px;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 40px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
    transition: var(--transition);
}

.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle:hover { border-color: var(--gold); }

.site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.lightbox-btn-hires {
    border-color: rgba(201, 168, 76, 0.55);
    color: var(--gold);
    font-family: var(--font-body);
    font-weight: 600;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.4px;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 4px;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.nav-link:hover { color: var(--gold); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-link.admin-link {
    color: var(--gold);
    border: 1px solid rgba(201, 168, 76, 0.35);
    margin-left: 8px;
}

.nav-link.admin-link:hover {
    background: rgba(201, 168, 76, 0.12);
    border-color: var(--gold);
}

/* ===================== ГЕРОЙ КАТАЛОГА ===================== */

.catalog-hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 64px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background:
        linear-gradient(135deg, rgba(10, 10, 26, 0.3) 0%, rgba(25, 16, 38, 0.2) 50%, rgba(10, 10, 26, 0.32) 100%);
}

.catalog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.14) 0%, transparent 65%),
        repeating-linear-gradient(90deg, transparent 0 79px, rgba(201, 168, 76, 0.05) 79px 80px),
        repeating-linear-gradient(0deg, transparent 0 79px, rgba(201, 168, 76, 0.05) 79px 80px);
    pointer-events: none;
}

.catalog-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.catalog-hero .container { position: relative; z-index: 1; }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 0 30px rgba(201, 168, 76, 0.35);
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    margin-top: 12px;
    letter-spacing: 1px;
}

/* ===================== ПАНЕЛЬ ПОИСКА И СОРТИРОВКИ ===================== */

.catalog-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 26px;
}

.search-box {
    position: relative;
    flex: 0 0 calc(50% - 7px);
    max-width: calc(50% - 7px);
    min-width: 220px;
}

.sort-dropdown {
    position: relative;
    flex: 0 0 calc(50% - 7px);
    max-width: calc(50% - 7px);
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

.sort-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #171724;
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}
.sort-toggle:hover { border-color: var(--gold); color: var(--gold); }
.sort-toggle-title { color: var(--text-muted); }
.sort-toggle-value { color: var(--gold); font-weight: 600; }
.sort-toggle-arrow { color: var(--text-muted); font-size: 11px; }
.sort-toggle[aria-expanded="true"] { border-color: var(--gold); }

.sort-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    min-width: 240px;
    padding: 6px;
    border: 1px solid #4a3b18;
    border-radius: var(--radius);
    background: linear-gradient(180deg, #17140e 0%, #0f0e12 100%);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
}

.sort-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}
.sort-option:hover { background: #241f13; color: var(--gold); }
.sort-option.active { background: #1c180e; color: var(--gold); font-weight: 600; }

.catalog-filters-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 calc(50% - 7px);
    max-width: calc(50% - 7px);
    min-width: 0;
    overflow-x: auto;
    padding: 2px 0;
    scrollbar-width: thin;
}

.catalog-filters-inline .category-link,
.catalog-filters-inline .catalog-filter-chip {
    flex: 0 0 auto;
    white-space: nowrap;
    background: #171724;
    border: 1px solid var(--border-strong);
}

.catalog-filters-inline .category-link.active,
.catalog-filters-inline .catalog-filter-chip.active {
    border-color: var(--gold);
    color: var(--gold);
    background: #1c180e;
}

.catalog-filters-inline .catalog-filter-chip {
    margin-left: 4px;
}

@media (max-width: 760px) {
    .search-box,
    .sort-dropdown {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .sort-dropdown { justify-content: flex-start; }
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold);
    font-size: 19px;
    line-height: 1;
    pointer-events: none;
}

#search-input {
    height: 44px;
    padding-left: 42px;
    padding-right: 40px;
}

.search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    line-height: 1;
    padding: 2px 7px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.search-clear:hover { color: var(--gold); background: rgba(201, 168, 76, 0.1); }

.sort-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-label {
    font-size: 12px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}

.sort-select {
    height: 44px;
    min-width: 210px;
    padding: 0 36px 0 14px;
    background-color: var(--bg-card);
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23c9a84c' stroke-width='1.6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 10px 6px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: var(--transition);
}

.sort-select:hover { border-color: rgba(201, 168, 76, 0.6); }

.sort-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

.sort-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* ===================== ФИЛЬТРЫ ===================== */

.catalog-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin: 32px 0 26px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.6px;
    transition: var(--transition);
}

.filter-tab:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-1px);
}

.filter-tab.active {
    background: linear-gradient(180deg, rgba(201, 168, 76, 0.22), rgba(201, 168, 76, 0.08));
    border-color: var(--gold);
    color: var(--gold-light);
    box-shadow: inset 0 0 12px rgba(201, 168, 76, 0.2);
}

.tab-count {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold);
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.filter-tab.active .tab-count {
    background: var(--gold);
    color: #0a0a0f;
}

.catalog-count {
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.catalog-count span { color: var(--gold); font-weight: 700; }

/* ===================== СЕТКА КАТАЛОГА ===================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 64px;
}

.product-card {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* «жидкое стекло»: полупрозрачный слой, блик и размытие фонового видео */
    background:
        radial-gradient(120% 100% at 12% -14%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 30%, rgba(255, 255, 255, 0) 56%),
        linear-gradient(158deg, rgba(24, 24, 36, 0.86) 0%, rgba(16, 16, 25, 0.9) 46%, rgba(10, 10, 16, 0.94) 100%);
    background-size: 170% 170%, 100% 100%;
    background-position: 0% 0%, 0 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(16px) saturate(165%) brightness(1.04);
    -webkit-backdrop-filter: blur(16px) saturate(165%) brightness(1.04);
    box-shadow:
        0 14px 34px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06);
    transition:
        transform 0.45s cubic-bezier(0.22, 0.68, 0, 1),
        box-shadow 0.45s cubic-bezier(0.22, 0.68, 0, 1),
        border-color 0.45s ease,
        background-position 0.8s ease;
}

/* светящаяся кромка-преломление */
.product-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(150deg,
        #ffffff 0%,
        #b9b9c6 30%,
        #7d7d8a 52%,
        #e8e8f0 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0.62;
    pointer-events: none;
    transition: opacity 0.45s ease;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.34);
    background-position: 34% 22%, 0 0;
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.52),
        0 0 26px rgba(201, 168, 76, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.62),
        inset 0 -1px 0 rgba(255, 255, 255, 0.1);
}

.product-card:hover::after { opacity: 1; }

/* блик по фотографии — как отражение на стекле */
.product-card-image img {
    display: block;
    opacity: 1;
}

/* без поддержки backdrop-filter — просто плотнее фон */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .product-card {
        background: linear-gradient(160deg, rgba(32, 32, 52, 0.94) 0%, rgba(14, 14, 24, 0.96) 100%);
    }
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ffffff, transparent);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
    z-index: 2;
}

.product-card:hover::before { opacity: 0.9; }

.product-card-image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #12121c;
    overflow: hidden;
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Подарочные карты: широкий макет прижимаем к левому краю,
   чтобы номинал не обрезался справа */
.product-card[data-category="Подарочные карты"] .product-card-image {
    aspect-ratio: 16 / 9;
}

.product-card[data-category="Подарочные карты"] .product-card-image img {
    object-fit: cover;
    object-position: left center;
}

.product-card:hover .product-card-image img { transform: scale(1.07); }

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
    color: var(--border-strong);
}

.product-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}



.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: var(--error);
    color: #fff;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(239, 83, 80, 0.35);
}

.product-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 10px 18px 9px;
    gap: 5px;
    background: linear-gradient(180deg, rgba(8, 8, 14, 0.06) 0%, rgba(8, 8, 14, 0.42) 55%, rgba(8, 8, 14, 0.56) 100%);
}

.product-card-brand {
    font-size: 12px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1.6px;
    opacity: 0.85;
    min-height: 14px;
    line-height: 1.2;
}

.product-card-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.5px;
    margin: 0;
}

.product-card-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition);
}

.product-card-name a:hover { color: var(--gold); }

.product-card-price {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: auto;
    padding-top: 2px;
}

.price-current {
    font-family: var(--font-body);
    letter-spacing: 0.5px;
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.price-old {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* ===================== КНОПКИ ===================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}

.btn-gold {
    background: linear-gradient(135deg, #d8b95c 0%, var(--gold) 45%, var(--gold-dark) 100%);
    color: #0a0a0f;
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.28);
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 60%, #9a7618 100%);
    box-shadow: 0 6px 22px rgba(201, 168, 76, 0.45);
    transform: translateY(-2px);
}

.btn-gold:active { transform: translateY(0); }

.btn-outline {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 11.5px;
}

.product-card-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 2px;
}

.product-card .btn-sm {
    width: 100%;
    margin-top: 0;
}

.card-details { flex: 0 0 74%; }

.card-details-full { flex: 1 1 100%; }

.card-buy-form {
    flex: 1 1 auto;
    display: flex;
    min-width: 0;
}

.card-buy {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 1px solid #2f9a58;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, #46c47c 0%, #33a862 100%);
    color: #0b0b12;
    box-shadow: 0 4px 16px rgba(70, 196, 124, 0.28);
    cursor: pointer;
    transition: var(--transition);
}

.card-buy:hover {
    background: linear-gradient(180deg, #55d78c 0%, #3bb96d 100%);
    border-color: #46c47c;
    box-shadow: 0 6px 22px rgba(70, 196, 124, 0.45);
    transform: translateY(-2px);
}

.card-buy:active { transform: translateY(0); }

.card-buy-icon { display: block; }

.btn-lg {
    padding: 14px 30px;
    font-size: 14px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===================== ПУСТОЕ СОСТОЯНИЕ ===================== */

.empty-state {
    text-align: center;
    padding: 80px 24px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    margin-bottom: 64px;
    background: rgba(26, 26, 46, 0.4);
}

.empty-icon {
    font-size: 54px;
    color: var(--gold-dark);
    margin-bottom: 18px;
    animation: pulse 2.4s ease-in-out infinite;
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.empty-state p { color: var(--text-secondary); }

@keyframes pulse {
    0%, 100% { opacity: 0.45; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.06); }
}

/* ===================== СТРАНИЦА ТОВАРА ===================== */

.product-page { padding: 28px 0 72px; }

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
    letter-spacing: 0.4px;
}

.breadcrumbs a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.breadcrumbs a:hover { color: var(--gold); }
.breadcrumbs .current { color: var(--gold); }

.product-main-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.product-detail {
    display: grid;
    /* галерея ~65.5%, описание ~34.5%: изображения шире на 25%, текст уже на 25% */
    grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
    gap: 36px;
    align-items: start;
}

.product-gallery {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gallery-main {
    position: relative;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: radial-gradient(circle at 50% 40%, #1f1f36 0%, var(--bg-secondary) 70%);
    box-shadow: var(--shadow-card);
}

.gallery-main::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.image-placeholder-large {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 88px;
    color: var(--border-strong);
}

.gallery-thumbs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
}

.gallery-thumbs .thumb {
    flex: 0 0 auto;
    width: 96px;
}

.thumb {
    aspect-ratio: 4 / 3;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: 1;
    transition: var(--transition);
    background: #12121c;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb:hover,
.thumb.active {
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.3);
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #12121c 0%, #0d0d14 100%);
}

.product-info-brand {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.brand-tag {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    border-left: 2px solid var(--gold);
    padding-left: 10px;
}



.product-name {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 1px;
}

.product-price-block {
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.55), rgba(18, 18, 26, 0.6));
    box-shadow: inset 0 0 40px rgba(201, 168, 76, 0.05);
}

.price-main {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 14px;
}

.price-value {
    font-family: var(--font-body);
    font-size: 34px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 1px;
    text-shadow: 0 0 24px rgba(201, 168, 76, 0.25);
}

.price-usd {
    font-size: 15px;
    color: var(--text-muted);
    letter-spacing: 0.6px;
}

.price-compare {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}

.price-old-large {
    flex: none;
    white-space: nowrap;
    font-size: 17px;
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.discount-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #fff;
    background: var(--error);
    padding: 3px 10px;
    border-radius: 3px;
}

.product-description {
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

.product-description h3 {
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.product-description p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.7;
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.product-notice {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-left: 2px solid var(--gold);
    border-radius: var(--radius-sm);
    background: #241f10;
    color: var(--text-dim);
    font-size: 12.5px;
    line-height: 1.5;
}

/* колонка описания узкая — кнопки ставим в столбик */
.product-actions .btn {
    flex: 1 1 100%;
    min-width: 0;
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.meta-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 6px 0;
}

.meta-label { color: var(--text-muted); }

.meta-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
}

.in-stock { color: var(--success); }
.out-of-stock { color: var(--error); }

.in-stock::before,
.out-of-stock::before {
    content: '●';
    margin-right: 6px;
    font-size: 10px;
    vertical-align: middle;
}

/* ===================== ПОХОЖИЕ ТОВАРЫ ===================== */

.related-section {
    margin-top: 56px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.related-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 22px;
}

.related-section .products-grid { margin-bottom: 0; }

/* ===================== МОДАЛЬНОЕ ОКНО ===================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(5, 5, 10, 0.78);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #1d1d33 0%, #14141f 100%);
    border: 1px solid rgba(201, 168, 76, 0.35);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(201, 168, 76, 0.12);
    transform: translateY(16px) scale(0.98);
    transition: transform var(--transition);
}

.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    transition: var(--transition);
}

.modal-close:hover { color: var(--error); transform: rotate(90deg); }

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 22px 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-group label {
    font-size: 12px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--text-muted);
}

input[type='email'],
input[type='text'],
input[type='number'],
input[type='password'],
input[type='search'] {
    width: 100%;
    padding: 11px 14px;
    background: rgba(10, 10, 15, 0.55);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 15px;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

input::placeholder { color: var(--text-muted); }

.modal-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(201, 168, 76, 0.07);
    border: 1px solid rgba(201, 168, 76, 0.22);
    font-size: 16px;
    letter-spacing: 0.6px;
}

.modal-total .gold {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
}

.modal-footer {
    padding: 0 24px 24px;
}

.modal-footer .btn { width: 100%; }

/* ===================== АДМИН-ПАНЕЛЬ ===================== */

.admin-page { padding-top: 40px; padding-bottom: 80px; }

.admin-title {
    font-family: var(--font-display);
    font-size: clamp(24px, 3vw, 34px);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 22px;
}

.admin-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    background: linear-gradient(180deg, rgba(20, 20, 34, 0.82) 0%, rgba(12, 12, 22, 0.9) 100%);
    backdrop-filter: blur(6px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.admin-card:hover {
    border-color: rgba(201, 168, 76, 0.4);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.admin-card h2 {
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
}

.admin-desc {
    font-size: 14px;
    color: var(--text-muted);
}

.rate-form {
    display: flex;
    gap: 10px;
}

.rate-form input { flex: 1; }

.status-msg {
    font-size: 14px;
    min-height: 20px;
    transition: color var(--transition);
}

.status-msg.success { color: var(--success); }
.status-msg.error { color: var(--error); }

.sync-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid var(--border);
    font-size: 14px;
}

.sync-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--text-secondary);
}

.sync-item.error { color: var(--error); flex-direction: column; }

.sync-status {
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sync-status.idle { color: var(--text-muted); }
.sync-status.syncing { color: var(--gold); animation: blink 1.4s ease-in-out infinite; }
.sync-status.done { color: var(--success); }
.sync-status.error { color: var(--error); }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 18px 12px;
    border-radius: var(--radius-sm);
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid var(--border);
}

.stat-value {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
}

.stat-label {
    font-size: 12px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: center;
}

/* ===================== ПОДВАЛ ===================== */

.site-footer {
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(18, 18, 26, 0.5) 0%, rgba(7, 7, 11, 0.75) 100%);
    padding: 40px 0 20px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 26px;
    padding-bottom: 26px;
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 2px;
    color: var(--text-primary);
}

.footer-brand .logo-icon { font-size: 18px; }

.footer-info p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover { color: var(--gold); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 18px;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 12.5px;
    text-align: center;
    letter-spacing: 0.4px;
}

.site-main { min-height: calc(100vh - 340px); }

/* ===================== АНИМАЦИИ ПОЯВЛЕНИЯ ===================== */

.product-card {
    /* backwards, а не both: иначе конечный кадр анимации навсегда
       фиксирует transform и перебивает сдвиг при наведении */
    animation: card-in 0.45s ease backwards;
}

@keyframes card-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===================== АВТОРИЗАЦИЯ ===================== */

.logout-form { display: contents; }

.nav-button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
}

.auth-page {
    display: flex;
    justify-content: center;
    padding: 60px 24px 90px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 32px;
    background: linear-gradient(180deg, rgba(26, 26, 46, 0.72) 0%, rgba(18, 18, 32, 0.8) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.auth-title {
    font-family: var(--font-display);
    font-size: 22px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-primary);
}

.auth-subtitle {
    margin: 10px 0 22px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-block { width: 100%; }

.auth-switch {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-switch a { color: var(--gold); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(239, 83, 80, 0.12);
    border-color: rgba(239, 83, 80, 0.45);
    color: #ff8a85;
}

/* ===================== ЛИЧНЫЙ КАБИНЕТ ===================== */

.account-page { padding: 40px 0 80px; }

.account-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.account-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.account-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.empty-state-compact { padding: 36px 20px; margin-bottom: 0; }
.empty-state-compact .btn { margin-top: 14px; }

/* ===================== ТАБЛИЦЫ (заказы, товары) ===================== */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    text-align: left;
    padding: 12px 14px;
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(10, 10, 15, 0.7);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(42, 42, 62, 0.6);
    vertical-align: middle;
    color: var(--text-secondary);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(201, 168, 76, 0.05); }

.cell-id { color: var(--text-muted); font-size: 13px; white-space: nowrap; }
.cell-name { color: var(--text-primary); font-weight: 600; }
.cell-name a { color: inherit; text-decoration: none; }
.cell-name a:hover { color: var(--gold); }
.cell-sub { margin-top: 4px; font-size: 12px; color: var(--text-muted); font-weight: 400; }
.cell-price { color: var(--gold); font-weight: 700; white-space: nowrap; }

.state-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
    border: 1px solid transparent;
}

.state-on, .state-paid {
    color: #7ee0a1;
    background: rgba(76, 175, 80, 0.12);
    border-color: rgba(76, 175, 80, 0.4);
}

.state-hidden, .state-pending {
    color: #ff9a95;
    background: rgba(239, 83, 80, 0.12);
    border-color: rgba(239, 83, 80, 0.4);
}

.admin-thumb {
    width: 56px;
    height: 42px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: block;
}

.admin-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-strong);
    background: var(--bg-secondary);
}

.row-hidden { opacity: 0.55; }

.data-table-products .toggle-btn { width: auto; white-space: nowrap; }

/* ===================== ФИЛЬТРЫ И ПЕЙДЖЕР В АДМИНКЕ ===================== */

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.admin-head .admin-title { margin-bottom: 0; padding-bottom: 14px; }

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 18px 0 10px;
}

.admin-filters .search-box { flex: 1 1 300px; }

.admin-hint {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.admin-hint strong { color: var(--gold); }

.pager {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 20px;
}

.pager-info { font-size: 14px; color: var(--text-muted); }

.catalog-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 6px 0 48px;
}

#catalog-sentinel { height: 1px; width: 100%; }

.empty-state { margin-bottom: 64px; }

/* ===================== ССЫЛКИ НА РАЗДЕЛЫ ===================== */

.hero-link {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(201, 168, 76, 0.4);
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-dim);
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.category-link:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.category-link.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(201, 168, 76, 0.12);
}

/* ===================== БЛОКИ ПОД КАРТОЧКОЙ ТОВАРА ===================== */

.product-extra {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
    gap: 24px;
    align-items: start;
    margin: 32px 0 24px;
}

.product-extra .product-specs,
.product-extra .product-contents {
    margin-top: 0;
}

.product-extra .product-contents {
    margin-bottom: 0;
}

/* если характеристик нет, список состава занимает всю ширину */
.product-extra > :only-child {
    grid-column: 1 / -1;
}

/* ===================== ГЛАВНАЯ: БЛОКИ КАТЕГОРИЙ ===================== */



.category-block {
    margin-bottom: 56px;
}

.category-block-head .btn { width: auto; flex: 0 0 auto; }

.category-block-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.category-block-title {
    font-family: var(--font-display);
    font-size: 24px;
    letter-spacing: 1.5px;
    color: var(--text);
    margin: 0;
}

.category-block-count {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.products-grid-block {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0;
}

/* ===================== КАРТОЧКА ТОВАРА: ДОПОЛНИТЕЛЬНО ===================== */

.product-subtitle {
    margin: -8px 0 18px;
    color: var(--text-muted);
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.product-specs,
.product-contents {
    margin-top: 28px;
    padding: 20px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.product-specs h3,
.product-contents h3 {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
}

.specs-list {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
}

.spec-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed var(--border);
}

.spec-row dt {
    color: var(--text-muted);
    font-size: 13px;
}

.spec-row dd {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.contents-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contents-list-images {
    flex-direction: column;
    gap: 0;
}

.contents-list-images li {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 0;
    border: none;
    border-bottom: 1px dashed var(--border);
    border-radius: 0;
}

.contents-list-images li:last-child {
    border-bottom: none;
}

.content-thumb {
    width: 84px;
    height: 47px;
    object-fit: cover;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    flex: 0 0 auto;
}

.content-name {
    font-size: 14px;
    color: var(--text-dim);
}

.contents-count {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(201, 168, 76, 0.15);
    color: var(--gold);
    font-size: 12px;
}

.contents-list li {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    color: var(--text-dim);
}

/* компактный состав: простой список без плашек и картинок */
.product-contents-compact .contents-list {
    display: block;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: content-item;
}

.product-contents-compact .contents-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border: none;
    border-bottom: 1px dashed var(--border);
    border-radius: 0;
    font-size: 13.5px;
    color: var(--text-dim);
}

.product-contents-compact .contents-list li:last-child {
    border-bottom: none;
}

.product-specs-compact .specs-list {
    grid-template-columns: 1fr;
}

.product-specs-compact {
    margin-top: 24px;
}

.product-contents-compact {
    margin-top: 24px;
}

.product-contents-compact h3,
.product-specs-compact h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ===================== АДМИН: ФИНАНСЫ И СТАТИСТИКА ===================== */

.admin-card-wide { grid-column: 1 / -1; }

.finance-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 4px;
}

.finance-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(12, 12, 22, 0.55);
}

.finance-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 13px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--gold);
}

.stats-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 6px 0 22px;
}

.stat-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgba(28, 28, 48, 0.85), rgba(14, 14, 24, 0.9));
}

.stat-tile-value {
    font-family: var(--font-display);
    font-size: clamp(20px, 2.2vw, 28px);
    font-weight: 700;
    color: var(--gold);
    line-height: 1.1;
}

.stat-tile-label {
    font-size: 13px;
    color: var(--text-primary);
}

.stat-tile-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.stats-charts {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}

.stats-chart {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(12, 12, 22, 0.55);
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 190px;
    margin-top: 14px;
}

.chart-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    height: 100%;
}

.chart-bar {
    width: 100%;
    min-height: 3px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
    box-shadow: 0 0 12px rgba(201, 168, 76, 0.35);
    transition: height 0.4s ease;
}

.chart-bar-value {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
}

.chart-bar-label {
    font-size: 11px;
    color: var(--text-muted);
}

.top-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.top-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border);
    font-size: 13px;
}

.top-name { color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-sum { color: var(--gold); font-weight: 700; white-space: nowrap; }

.stats-table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
    font-size: 13px;
}

.stats-table th,
.stats-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.stats-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-size: 11px;
}

.stats-table td { color: var(--text-dim); }

@media (max-width: 1100px) {
    .finance-grid, .stats-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stats-charts { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
    .finance-grid, .stats-tiles { grid-template-columns: 1fr; }
}

/* ---------- индикатор сессии RSI ---------- */

.rsi-session {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 6px 0 4px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #12121c;
    font-size: 13px;
    color: var(--text-dim);
}

.rsi-session-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--text-muted);
    box-shadow: 0 0 8px currentColor;
    flex: none;
}

.rsi-session-active { border-color: rgba(76, 175, 80, 0.45); }
.rsi-session-active .rsi-session-dot { background: #4caf50; color: #4caf50; }

.rsi-session-expired { border-color: rgba(239, 83, 80, 0.5); }
.rsi-session-expired .rsi-session-dot { background: #ef5350; color: #ef5350; }

.rsi-session-time { margin-left: auto; color: var(--text-muted); font-size: 12px; }

/* ---------- инструкция по cookie RSI ---------- */

.rsi-guide code,
.rsi-code { max-width: 100%; }



.rsi-guide {
    margin: 4px 0 8px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(8, 8, 14, 0.35);
}

.rsi-guide-title {
    cursor: pointer;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 12.5px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.rsi-guide-title:hover { color: var(--gold-light); }

.rsi-steps {
    margin: 12px 0 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.55;
}

.rsi-steps li::marker { color: var(--gold); font-weight: 700; }

.rsi-steps strong { color: var(--text-primary); font-weight: 600; }

.rsi-code {
    display: inline-block;
    margin-top: 5px;
    padding: 6px 9px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #0b0b14;
    color: var(--gold-light);
    font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: 12px;
    word-break: break-all;
}

.rsi-note {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-left: 2px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #14141f;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.rsi-note strong { color: var(--text-dim); }

.rsi-warning { border-left-color: #c9a84c; }

.rsi-warning strong { color: var(--gold); }

.rsi-list { display: block; margin-top: 4px; }

kbd {
    padding: 1px 6px;
    border: 1px solid var(--border-strong);
    border-radius: 4px;
    background: #0b0b14;
    color: var(--text-dim);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 11.5px;
}

.rsi-guide code {
    padding: 1px 5px;
    border-radius: 4px;
    background: #0b0b14;
    color: var(--gold-light);
    font-size: 12px;
}

.rsi-guide a { color: var(--gold); text-decoration: underline; }

.stats-reset {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: -6px 0 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

.stats-reset-label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.stats-reset form { display: contents; }

.stats-periods {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 4px 0 18px;
}

.stats-period {
    padding: 7px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    color: var(--text-dim);
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition);
}

.stats-period:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.stats-period.active {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.18);
    color: var(--gold-light);
    font-weight: 600;
}

.stats-range {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-wrap: wrap;
}

.stats-range input[type="date"] {
    padding: 6px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
}

.stats-range input[type="date"]:focus { outline: none; border-color: var(--gold); }

.stats-range span { color: var(--text-muted); }

@media (max-width: 760px) {
    .stats-range { margin-left: 0; width: 100%; }
}

/* ---------- стартовый набор на главной ---------- */

.starter-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 0;
    margin: 26px 0 10px;
    border: 1px solid #5a4a24;
    border-radius: var(--radius);
    overflow: hidden;
    background: #0f0f17;
}

.starter-hero-media {
    position: relative;
    min-height: 340px;
    background: #12121c;
}

.starter-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.starter-hero-label {
    position: absolute;
    left: 18px;
    top: 18px;
    padding: 7px 14px;
    border-radius: 999px;
    background: #2a2110;
    border: 1px solid var(--gold);
    color: var(--gold-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.starter-hero-body {
    padding: 30px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(180deg, #15130f 0%, #0d0d13 100%);
}

.starter-hero-kicker {
    margin: 0;
    color: var(--gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.starter-hero-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 32px;
    line-height: 1.15;
    color: var(--text);
}

.starter-hero-desc {
    margin: 0;
    color: var(--text-dim);
    font-size: 15px;
    line-height: 1.65;
    white-space: pre-line;
}

.starter-hero-list {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.starter-hero-list li {
    padding: 6px 12px;
    border: 1px solid #3a3320;
    border-radius: 999px;
    background: #1a1710;
    color: var(--text-dim);
    font-size: 12.5px;
}

.starter-hero-buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #2a2418;
}

.starter-hero-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.starter-old-price {
    flex: none;
    white-space: nowrap;
    color: var(--text-muted);
    font-size: 15px;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.starter-price {
    font-family: var(--font-display);
    font-size: 30px;
    color: var(--gold);
}

.starter-discount {
    padding: 3px 9px;
    border-radius: 999px;
    background: #3a1512;
    color: #ff8b7d;
    font-size: 12px;
    font-weight: 700;
}

.starter-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.starter-hero-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}

@media (max-width: 980px) {
    .starter-hero { grid-template-columns: 1fr; }
    .starter-hero-media { min-height: 220px; }
    .starter-hero-body { padding: 22px; }
    .starter-hero-title { font-size: 26px; }
}

/* ---------- Магазин подписчиков ---------- */

.badge-subscriber {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #1f2b1c;
    border: 1px solid #7fbf6a;
    color: #d6f0c8;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.subscribers-block {
    border: 1px solid #3a5231;
    border-radius: var(--radius);
    padding: 22px 22px 8px;
    background: linear-gradient(180deg, rgba(28, 44, 24, 0.5) 0%, rgba(14, 22, 12, 0.6) 100%);
}

.subscribers-mark { color: #d6f0c8; }

.subscribers-block .category-block-count { color: #b3d49f; }

/* ---------- админ-страницы ---------- */

.admin-page {
    background: linear-gradient(180deg, #0d0d15 0%, #0a0a11 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 26px;
    margin-top: 22px;
    margin-bottom: 32px;
}

/* ---------- чат поддержки ---------- */

.support-chat {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 60;
    font-family: var(--font-body);
}

body { padding-bottom: 0; }

@media (max-width: 760px) {
    .support-chat { right: 12px; bottom: 12px; }
    .site-main { padding-bottom: 84px; }
    /* компактная круглая кнопка, чтобы не закрывать текст */
    .chat-toggle {
        width: 52px;
        height: 52px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
        font-size: 20px;
    }
    .chat-toggle-text { display: none; }
    .chat-badge { top: -4px; right: -4px; }
    .chat-panel { width: calc(100vw - 24px); right: 0; }
}

.chat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: #1a1710;
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.chat-toggle:hover { background: #241f13; }
.chat-toggle-icon { font-size: 15px; }

.chat-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--error);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.chat-panel {
    display: none;
    position: absolute;
    right: 0;
    bottom: 62px;
    width: 340px;
    max-height: 70vh;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: #12121c;
    overflow: hidden;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.chat-panel.open { display: flex; flex-direction: column; }

.chat-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    background: #171724;
}
.chat-head-sub { display: block; color: var(--text-muted); font-size: 11.5px; margin-top: 2px; }
.chat-close { background: none; border: 0; color: var(--text-dim); font-size: 20px; cursor: pointer; }

.chat-body { padding: 14px; overflow-y: auto; }
.chat-hint { color: var(--text-dim); font-size: 12.5px; line-height: 1.55; margin-bottom: 10px; }
.chat-email-form { display: flex; flex-direction: column; gap: 8px; }
.chat-email-form input,
.chat-send-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #0f0f18;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
}
.chat-error { color: #ff8b7d; font-size: 12px; }

.chat-messages { display: flex; flex-direction: column; gap: 8px; max-height: 38vh; overflow-y: auto; margin-bottom: 10px; }
.chat-message { padding: 8px 11px; border-radius: 10px; font-size: 13px; line-height: 1.5; max-width: 92%; }
.chat-message p { margin: 0; }
.chat-message-user { align-self: flex-end; background: #2a2110; border: 1px solid #4a3b18; color: #f0e2bd; }
.chat-message-admin { align-self: flex-start; background: #1b2436; border: 1px solid #2f4463; color: #d6e4f7; }
.chat-message-system { align-self: center; background: transparent; color: var(--text-muted); font-size: 11.5px; text-align: center; }
.chat-send-form { display: flex; flex-direction: column; gap: 8px; }

/* панель обращений в админке */
.chats-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
.chats-list { display: flex; flex-direction: column; gap: 8px; }
.chat-item {
    display: block;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #12121c;
    text-decoration: none;
    color: inherit;
}
.chat-item.active { border-color: var(--gold); background: #191810; }
.chat-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chat-email { color: var(--text-primary); font-size: 13px; font-weight: 600; }
.chat-preview { margin: 6px 0 4px; color: var(--text-dim); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-time { color: var(--text-muted); font-size: 11.5px; }
.chat-thread { border: 1px solid var(--border); border-radius: var(--radius); background: #12121c; padding: 16px; }
.chat-thread-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.chat-reply { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.chat-reply textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #0f0f18;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
}

/* заказы */
.orders-list { display: flex; flex-direction: column; gap: 14px; }
.order-card { border: 1px solid var(--border); border-radius: var(--radius); background: #12121c; padding: 16px 18px; }
.order-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.order-id { color: var(--gold); font-weight: 700; margin-right: 10px; }
.order-date, .order-email { color: var(--text-dim); font-size: 12.5px; }
.order-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.order-open { color: #e8c766; font-size: 12px; }
.order-done { color: #7fbf6a; font-size: 12px; }
.order-items { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.order-items li { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; border-bottom: 1px dashed #23233a; padding-bottom: 6px; }
.order-item-name { color: var(--text-primary); font-size: 13.5px; }
.order-item-link { color: var(--gold); font-size: 12px; }
.order-item-price { margin-left: auto; color: var(--text-dim); font-size: 13px; }
.order-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.order-total { color: var(--text-primary); font-weight: 700; }
.badge-unread { padding: 3px 9px; border-radius: 999px; background: #3a1512; color: #ff8b7d; font-size: 12px; font-weight: 700; }

@media (max-width: 820px) {
    .chats-layout { grid-template-columns: 1fr; }
    .chat-panel { width: min(340px, calc(100vw - 44px)); }
}

/* ---------- инструкция провайдера эквайринга ---------- */

.provider-guide {
    margin: 12px 0 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #101019;
}
.provider-guide > summary {
    cursor: pointer;
    padding: 10px 14px;
    color: var(--gold);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    list-style: none;
}
.provider-guide > summary::-webkit-details-marker { display: none; }
.provider-guide > summary::before { content: '▸ '; color: var(--text-muted); }
.provider-guide[open] > summary::before { content: '▾ '; }
.provider-guide-steps {
    margin: 0;
    padding: 4px 18px 14px 34px;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.65;
}
.provider-guide-steps li { margin-bottom: 6px; }

/* ---------- CCU в админке ---------- */

.ccu-row {
    margin: 18px 0 0;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #101019;
}
.ccu-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ccu-status { color: var(--text-muted); font-size: 12.5px; }
.ccu-hint { margin: 8px 0 12px; color: var(--text-muted); font-size: 12.5px; line-height: 1.6; }
.ccu-form textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #171724;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 13px;
    resize: vertical;
}

.upgrade-ccu-note {
    margin: 14px 0 0;
    padding: 12px 16px;
    border: 1px solid #4a3b18;
    border-radius: var(--radius-sm);
    background: #17140e;
    color: var(--gold);
    font-size: 13px;
}

.ccu-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.ccu-strict {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 12px;
    color: var(--text-dim);
    font-size: 12.5px;
    line-height: 1.5;
}
.ccu-strict input { margin-top: 2px; accent-color: var(--gold); }

.ccu-import {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.ccu-dropzone {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 380px;
    padding: 14px 16px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: #14141f;
    color: var(--text-muted);
    font-size: 12.5px;
    cursor: pointer;
    transition: var(--transition);
}
.ccu-dropzone:hover { border-color: var(--gold); color: var(--gold); }
.ccu-dropzone.is-dragover {
    border-color: var(--gold);
    background: #1c180e;
    color: var(--gold);
}
.ccu-dropzone input[type=file] { display: none; }
.ccu-dropzone-icon { font-size: 18px; color: var(--gold); }
.ccu-dropzone-text { flex: 1 1 auto; }
.ccu-dropzone-name { color: var(--gold); font-weight: 600; white-space: nowrap; }

.ccu-history { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.ccu-history-title { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.ccu-history-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ccu-history-list li { display: flex; gap: 12px; align-items: baseline; font-size: 12.5px; color: var(--text-dim); }
.ccu-history-date { color: var(--text-muted); }
.ccu-history-count { color: var(--text); }
.ccu-history-link { color: var(--gold); text-decoration: none; }
.ccu-history-link:hover { text-decoration: underline; }

.ccu-missing {
    margin: 10px 0 0;
    padding: 10px 14px;
    border: 1px solid #6b4a1c;
    border-radius: var(--radius-sm);
    background: #1c1409;
    color: #e0a95c;
    font-size: 12.5px;
}
.upgrade-ccu-missing { display: block; margin-top: 6px; color: #e0a95c; font-size: 12.5px; }

/* ---------- калькулятор апгрейдов ---------- */

.upgrade-page { padding-bottom: 60px; }

.upgrade-form {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #101019;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

.upgrade-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.upgrade-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}
.upgrade-field > span { color: var(--text-dim); font-size: 13px; }
.upgrade-field select,
.upgrade-field input {
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #171724;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
}
.upgrade-field select:focus,
.upgrade-field input:focus { outline: none; border-color: var(--gold); }

.upgrade-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 6px 0 18px;
    padding: 16px 18px;
    border: 1px solid #4a3b18;
    border-radius: var(--radius-sm);
    background: #17140e;
}
.upgrade-result-text { display: flex; flex-direction: column; gap: 4px; }
.upgrade-route { color: var(--gold); font-weight: 700; }
.upgrade-hint { color: var(--text-muted); font-size: 12.5px; }
.upgrade-price {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
}

.upgrade-note,
.upgrade-faq {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    max-width: 760px;
}
.upgrade-faq {
    margin-top: 16px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(16, 16, 25, 0.92);
}

.upgrade-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

@media (max-width: 760px) {
    .upgrade-row { grid-template-columns: 1fr; }
}

/* ---------- ежедневный отчёт ---------- */

.report-card { margin: 18px 0 22px; }
.report-card > summary {
    cursor: pointer;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 13px;
}
.report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin: 16px 0;
}
.report-text {
    margin: 12px 0 0;
    padding: 14px 16px;
    max-height: 320px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #0f0f18;
    color: var(--text-dim);
    font-size: 12.5px;
    line-height: 1.55;
    white-space: pre-wrap;
}

/* ---------- список проблемных товаров ---------- */

.health-tile-link { display: block; text-decoration: none; transition: var(--transition); }
.health-tile-link:hover { border-color: var(--gold); }
.health-tile-link.active { border-color: var(--gold); background: #191810; }
.health-tile-hint { display: block; margin-top: 4px; color: var(--text-muted); font-size: 11.5px; }
.health-tile-static { opacity: 0.9; }

.issue-section { margin-top: 22px; }
.issue-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.issue-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.issue-table th {
    text-align: left;
    padding: 8px 10px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border);
}
.issue-table td { padding: 9px 10px; border-bottom: 1px solid #1c1c2b; vertical-align: top; }
.issue-table a { color: var(--text-primary); text-decoration: none; }
.issue-table a:hover { color: var(--gold); }
.issue-category { color: var(--text-dim); white-space: nowrap; }
.issue-reason { color: #e8c766; font-size: 12.5px; }
.issue-actions { text-align: right; white-space: nowrap; }
.issue-actions a { color: var(--gold); font-size: 12px; }

/* ---------- страница состояния витрины ---------- */

.health-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 20px 0 16px;
}
.health-tile {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #12121c;
}
.health-tile-value {
    display: block;
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--gold);
    line-height: 1.1;
}
.health-tile-label { color: var(--text-muted); font-size: 12.5px; }

.health-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 8px 0 12px; }
.health-status { color: var(--text-dim); font-size: 13px; }
.admin-subtitle {
    margin: 26px 0 8px;
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* ---------- строка стартового набора ---------- */

.featured-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0 0;
    padding: 11px 16px;
    border: 1px solid #4a3b18;
    border-radius: var(--radius);
    background: #17140e;
    font-size: 13px;
    color: var(--text-dim);
}
.featured-label { color: var(--gold); font-weight: 700; }
.featured-text { color: var(--text-muted); font-size: 12.5px; }
.inline-form { margin-left: auto; }

/* ---------- статус источника ---------- */

.source-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 0;
    padding: 11px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #12121c;
    font-size: 13px;
    color: var(--text-dim);
}
.source-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); flex: none; }
.source-ok { border-color: rgba(76, 175, 80, 0.45); }
.source-ok .source-dot { background: #4caf50; box-shadow: 0 0 8px #4caf50; }
.source-bad { border-color: rgba(239, 83, 80, 0.5); }
.source-bad .source-dot { background: #ef5350; box-shadow: 0 0 8px #ef5350; }
.source-error { color: var(--text-muted); font-size: 12px; }

/* ---------- состояние витрины ---------- */

.health-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin: 18px 0 20px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #12121c;
    font-size: 13px;
    color: var(--text-dim);
}

.health-item { display: flex; align-items: baseline; gap: 7px; }
.health-label { color: var(--text-muted); }
.health-value { color: var(--text-primary); font-weight: 700; }
.health-link { margin-left: auto; color: var(--gold); }

/* ---------- Concierge ---------- */

.nav-concierge {
    color: #cfdcff !important;
}

.nav-concierge::after {
    content: '';
    display: none;
}

.concierge-block {
    border: 1px solid #35446b;
    border-radius: var(--radius);
    padding: 22px 22px 8px;
    background: linear-gradient(180deg, rgba(24, 34, 58, 0.55) 0%, rgba(12, 16, 28, 0.6) 100%);
}

.concierge-mark {
    color: #cfdcff;
}

.concierge-block .category-block-count { color: #9fb2dd; }



.stats-chairs {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 18px;
    padding: 12px 16px;
    border: 1px solid #35446b;
    border-radius: var(--radius);
    background: #141a2a;
    font-size: 13px;
    color: var(--text-dim);
}

.stats-chair-badge {
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #6f8fd8;
    background: #1d2a4a;
    color: #cfdcff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.stats-chair-link { margin-left: auto; color: var(--gold); font-size: 13px; }


.badge-chairman {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #1d2a4a;
    border: 1px solid #6f8fd8;
    color: #cfdcff;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.catalog-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 11px 16px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: var(--transition);
}

.catalog-filter-chip:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.catalog-filter-chip.active {
    border-color: #6f8fd8;
    background: #1d2a4a;
    color: #cfdcff;
}

/* ===================== КОРЗИНА ===================== */

.cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }

.cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--gold);
    color: #14141f;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.product-cart-form { display: contents; }

.cart-hero { padding-bottom: 40px; }

.cart-list {
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-item {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) 120px 190px 130px;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.cart-item-off { opacity: 0.6; }

.cart-item-image img {
    width: 132px;
    height: 74px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    display: block;
}

.cart-item-info { min-width: 0; }

.cart-item-name {
    display: block;
    color: var(--text);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.35;
}

.cart-item-name:hover { color: var(--gold); }

.cart-item-meta {
    display: block;
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.cart-item-warning {
    display: block;
    margin-top: 6px;
    color: #ff9a9a;
    font-size: 12px;
}

.cart-item-price { font-size: 16px; }

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cart-qty-label { color: var(--text-muted); font-size: 12px; }

.cart-qty-input {
    width: 64px;
    padding: 7px 8px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    text-align: center;
}

.cart-item-sum {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    color: var(--gold);
    font-size: 16px;
    font-weight: 700;
}

.cart-remove {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255, 92, 92, 0.4);
    border-radius: 50%;
    background: transparent;
    color: #ff9a9a;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.cart-remove:hover { border-color: #ff6b6b; color: #ff6b6b; }

.cart-footer {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 24px;
    margin-bottom: 48px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.cart-checkout {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;
}

.cart-email {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 300px;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.cart-email input {
    padding: 11px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
}

.cart-email input:focus { outline: none; border-color: var(--gold); }

.cart-total {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
    margin-left: auto;
}

.cart-total-label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.cart-total-value {
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 26px;
    font-weight: 700;
}

.cart-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.cart-list-done .cart-item {
    grid-template-columns: minmax(0, 1fr) 140px;
}

/* ===================== МЕТКИ ТОВАРА ===================== */

.product-card-badges {
    position: absolute;
    left: 12px;
    bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 2;
}

.badge-new,
.badge-limited,
.badge-soldout {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-new {
    background: var(--gold);
    color: #14141f;
}

.badge-limited {
    background: #4a3316;
    border: 1px solid #ffaa50;
    color: #ffd9a8;
}

.badge-soldout {
    background: #4a1d1d;
    border: 1px solid #ff5c5c;
    color: #ffc0c0;
}

.product-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 4px;
}

.product-actions .btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ===================== РУЧНЫЕ ТОВАРЫ В АДМИНКЕ ===================== */

.admin-head-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.manual-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 48px;
}

.manual-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.manual-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.manual-field input,
.manual-field select,
.manual-field textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
}

.manual-field input:focus,
.manual-field select:focus,
.manual-field textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.manual-checks {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    color: var(--text-dim);
    font-size: 13.5px;
}

.manual-checks label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.cell-source { white-space: nowrap; font-size: 12px; color: var(--text-muted); }

.state-manual {
    background: rgba(140, 140, 255, 0.14);
    border: 1px solid rgba(140, 140, 255, 0.4);
    color: #b8b8ff;
}

/* ===================== ПЛАТЁЖНОЕ ОКНО ===================== */

.payment-window {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 56px;
}

.payment-summary,
.payment-form-wrap {
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.payment-summary-title {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold);
}

.payment-lines {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payment-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border);
    font-size: 14px;
}

.payment-line-name { color: var(--text-dim); }
.payment-line-sum { color: var(--text); font-weight: 600; white-space: nowrap; }

.payment-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
}

.payment-email {
    margin: 14px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.payment-email strong { color: var(--text); }

.payment-note {
    margin: 12px 0 0;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.payment-form .form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.payment-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 15px;
    letter-spacing: 1px;
}

.payment-form input:focus { outline: none; border-color: var(--gold); }

.payment-secure {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.payment-submit { width: 100%; }

.payment-cancel { margin-top: 14px; text-align: center; }

.payment-hero { padding-bottom: 32px; }

/* ===================== ПОЧТА ПОКУПАТЕЛЯ ===================== */

.cart-email-block {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 340px;
}

/* внутри колонки flex-basis не должен задавать высоту */
.cart-email-block .cart-email {
    flex: 0 0 auto;
}

.email-warning {
    margin: 0;
    padding: 10px 12px;
    border-left: 2px solid var(--gold);
    border-radius: var(--radius-sm);
    background: #241f10;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.email-warning strong { color: var(--gold); font-weight: 600; }

.email-confirm {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-dim);
    font-size: 13px;
    line-height: 1.4;
    cursor: pointer;
}

.email-confirm input { margin-top: 2px; }

/* ===================== ЭКВАЙРИНГ ===================== */

.payments-form { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }

.payment-card { margin: 0; }
.payment-card-active { border-color: rgba(201, 168, 76, 0.55); box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.25); }

.payment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.payment-choice {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.payment-title {
    font-family: var(--font-display);
    font-size: 15px;
    letter-spacing: 0.6px;
    color: var(--text);
}

.payment-hint {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 13px;
}

.payment-hint-empty { margin-bottom: 0; }

.payment-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.payment-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.payment-help { margin-bottom: 48px; }

.payment-steps {
    margin: 0;
    padding-left: 20px;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.7;
}

.payment-steps code {
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--gold);
    font-size: 12.5px;
    word-break: break-all;
}

.payment-redirect {
    margin: 0;
    padding: 14px 16px;
    border-left: 2px solid var(--gold);
    border-radius: var(--radius-sm);
    background: #241f10;
    color: var(--text-dim);
    font-size: 13.5px;
    line-height: 1.55;
}

.payment-redirect strong { color: var(--gold); }

/* ===================== ЗАГРУЗКА ИЗОБРАЖЕНИЙ ===================== */

.upload-zone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 26px 20px;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    background: var(--bg-secondary);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-zone:hover,
.upload-zone.is-dragging {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.07);
}

.upload-zone.has-files {
    border-style: solid;
    border-color: rgba(201, 168, 76, 0.45);
}

.upload-zone-icon {
    font-size: 26px;
    color: var(--gold);
    opacity: 0.8;
}

.upload-zone-text {
    margin: 0;
    color: var(--text-dim);
    font-size: 14px;
}

.upload-zone-button {
    padding: 0;
    border: none;
    background: none;
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 14px;
    text-decoration: underline;
    cursor: pointer;
}

.upload-zone-hint {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.upload-preview-item {
    position: relative;
    width: 132px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}

.upload-preview-item img {
    width: 100%;
    height: 74px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.upload-preview-name {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-preview-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(255, 92, 92, 0.5);
    background: var(--bg-card);
    color: #ff9a9a;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.upload-preview-remove:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* ===================== ОТЗЫВЫ ===================== */

.product-reviews {
    padding: 20px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: linear-gradient(180deg, #12121c 0%, #0d0d14 100%);
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.reviews-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.reviews-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 17px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text);
}

.reviews-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.rating-stars {
    color: var(--gold);
    letter-spacing: 2px;
    font-size: 15px;
}

.rating-stars.small { font-size: 13px; }

.reviews-average {
    color: var(--text);
    font-weight: 700;
    font-size: 15px;
}

.reviews-list {
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.review-item {
    padding: 12px 0;
    border-bottom: 1px dashed var(--border);
}

.review-item:last-child { border-bottom: none; }

.review-top {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.review-author {
    color: var(--text);
    font-weight: 600;
    font-size: 13.5px;
}

.review-date {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 12px;
}

.review-text {
    margin: 0;
    color: var(--text-dim);
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-line;
}

.reviews-empty,
.review-hint {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 13.5px;
}

.review-hint a { color: var(--gold); }

.review-flash {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
}

.review-flash.ok {
    border: 1px solid rgba(80, 200, 120, 0.4);
    background: rgba(80, 200, 120, 0.08);
    color: #9ce6b4;
}

.review-flash.warn {
    border: 1px solid rgba(255, 170, 80, 0.4);
    background: rgba(255, 170, 80, 0.08);
    color: #ffc888;
}

.review-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-form h3 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold);
}

.review-form-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-label { color: var(--text-muted); font-size: 13px; }

.review-textarea {
    width: 100%;
    min-height: 96px;
    padding: 12px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    resize: vertical;
}

.review-textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.review-form .btn { align-self: flex-start; }

/* страница всех отзывов */
.reviews-summary-page {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 24px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
}

.reviews-list-page { gap: 14px; margin-bottom: 32px; }

.review-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    transition: var(--transition);
}

.review-card:hover { border-color: var(--border-strong); }

.review-product {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
}

.review-product-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.review-product-name {
    color: var(--text);
    font-size: 13px;
    line-height: 1.35;
}

.review-product-category {
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.review-body { min-width: 0; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 8px 0 48px;
}

/* ===================== ПОЛНОЭКРАННЫЙ ПРОСМОТР ===================== */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    background: rgba(8, 8, 14, 0.97);
    backdrop-filter: blur(6px);
}

.lightbox[hidden] { display: none; }

.lightbox-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--border);
    background: rgba(12, 12, 22, 0.92);
}

.lightbox-size {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 13px;
    letter-spacing: 1px;
}

.lightbox-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lightbox-btn {
    min-width: 42px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.lightbox-btn-hires {
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    border-color: rgba(201, 168, 76, 0.5);
}

.lightbox-btn-close {
    border-color: rgba(255, 92, 92, 0.45);
    color: #ff9a9a;
}

.lightbox-btn-close:hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
    background: rgba(255, 92, 92, 0.12);
}

.lightbox-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.lightbox-stage:active { cursor: grabbing; }

.lightbox img {
    max-width: 92vw;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    transform-origin: center center;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
    transition: transform 0.08s linear;
}

.zoom-hint {
    position: absolute;
    right: 14px;
    bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: rgba(12, 12, 22, 0.85);
    color: var(--gold);
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.zoom-hint:hover {
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.14);
}

.zoomable { cursor: zoom-in; }

.lightbox-hint {
    margin: 0;
    padding: 10px 20px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12.5px;
}

/* ===================== АДАПТИВНОСТЬ ===================== */

@media (max-width: 1024px) {
    .product-detail { grid-template-columns: 1fr; gap: 28px; }
    .product-gallery { position: static; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .account-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .logo-3d { --logo-3d-size: 72px; }
    .logo-text { font-size: 12.5px; letter-spacing: .4px; }
    .header-inner {
        padding: 10px 0;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        row-gap: 0;
    }
    .logo { flex: 1 1 auto; min-width: 0; }
    .nav-toggle { flex: 0 0 auto; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .header-inner { height: auto; padding: 12px 0; flex-wrap: wrap; row-gap: 10px; }
    .nav-toggle { display: flex; margin-left: auto; }
    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding-top: 8px;
        border-top: 1px solid var(--border);
    }
    .site-header.nav-open .main-nav { display: flex; }
    .nav-link { padding: 11px 12px; font-size: 15px; border-radius: var(--radius-sm); }
    .nav-link::after { display: none; }
    .nav-link.admin-link { margin-left: 0; text-align: center; }
    .logout-form { display: block; }
    .nav-button { width: 100%; text-align: left; }
    .catalog-hero { padding: 40px 0 32px; }
    .hero-title { letter-spacing: 2px; }
    .hero-subtitle { font-size: 15px; }
    .catalog-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
    .catalog-toolbar .search-box { flex: 0 0 auto; min-width: 0; }
    .catalog-toolbar .search-box input { height: 46px; }
    .sort-box { justify-content: space-between; }
    .sort-select { flex: 1; min-width: 0; }
    .catalog-filters { margin-top: 14px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
    .products-grid-block { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-block-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .category-block { margin-bottom: 36px; }
    .specs-list { grid-template-columns: 1fr; }
    .product-extra { grid-template-columns: 1fr; gap: 16px; }
    .product-reviews { padding: 16px; }
    .review-card { grid-template-columns: 1fr; gap: 12px; }
    /* на мобильных размытие дешевле */
    .product-card { backdrop-filter: blur(10px) saturate(150%) brightness(1.03); -webkit-backdrop-filter: blur(10px) saturate(150%) brightness(1.03); }
    .product-card:hover { transform: none; }

    .cart-item { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
    .cart-item-image img { width: 96px; height: 58px; }
    .cart-item-price, .cart-item-qty, .cart-item-sum { grid-column: 2; justify-content: flex-start; }
    .cart-checkout { flex-direction: column; align-items: stretch; }
    .cart-total { align-items: flex-start; margin-left: 0; }
    .cart-actions { justify-content: flex-start; }
    .manual-grid { grid-template-columns: 1fr; }
    .payment-fields { grid-template-columns: 1fr; }
    .payment-window { grid-template-columns: 1fr; }
    .review-product { flex-direction: row; align-items: center; }
    .review-product-image { width: 84px; flex: 0 0 auto; }
    .product-specs, .product-contents { padding: 16px; }
    .product-card-body { padding: 12px; gap: 8px; }
    .product-card-name { font-size: 14px; }
    .price-current { font-size: 17px; }
    .btn-sm { padding: 10px 12px; font-size: 11px; }
    .product-actions .btn { flex: 1 1 100%; }
    .price-value { font-size: 28px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { flex-direction: column; }
    .lightbox-bar { padding: 8px 12px; gap: 10px; }
    .lightbox-btn { min-width: 44px; height: 40px; font-size: 18px; }
    .lightbox-btn-hires { font-size: 13px; }
    .lightbox-hint { display: none; }
    .lightbox-size { font-size: 12px; }
    .zoom-hint { right: 8px; bottom: 8px; padding: 8px 12px; font-size: 12px; }
    .data-table { font-size: 13px; }
    .admin-filters { flex-direction: column; align-items: stretch; }
    .admin-filters .sort-select { width: 100%; }
    .row-actions { justify-content: flex-start; }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr; }
    .filter-tabs { width: 100%; }
    .filter-tab { flex: 1 1 auto; padding: 7px 12px; font-size: 13px; }
    .catalog-count { width: 100%; }
    .catalog-toolbar { flex-direction: column; align-items: stretch; }
    .sort-box { justify-content: space-between; }
    .sort-select { flex: 1; min-width: 0; }
    .modal { max-height: 94vh; }
    .form-row { flex-direction: column; gap: 16px; }
    .product-name { font-size: 22px; }
    .price-value { font-size: 24px; }
    .lightbox-controls { gap: 6px; }
    .lightbox-btn { min-width: 40px; height: 38px; }
    .lightbox-btn-hires { font-size: 12px; padding: 0 8px; }
}


/* логотип не сжимается: текст всегда виден целиком, меню при нехватке места переносится */
.logo {
    flex: 0 0 auto;
    min-width: 0;
}

.logo > .logo-text {
    white-space: nowrap;
}

@media (max-width: 1700px) {
    .main-nav { row-gap: 6px; }
}


/* ===== доступность и читаемость поверх видео ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.breadcrumbs,
.hero-subtitle,
.catalog-hero .hero-title {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.hero-subtitle {
    color: #c8c8d6;
}

.breadcrumbs a {
    color: #c9c9d8;
}

.breadcrumbs a:hover {
    color: var(--gold-light);
}

/* ===== страница 404 ===== */
.error-page {
    min-height: 62vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
}

.error-page > div {
    background: rgba(10, 10, 16, 0.78);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 52px;
    backdrop-filter: blur(10px);
    max-width: 640px;
}

.error-code {
    font-family: var(--font-brand);
    font-size: clamp(64px, 12vw, 140px);
    font-weight: 900;
    color: var(--gold);
    line-height: 1;
    letter-spacing: 6px;
    text-shadow: 0 0 40px rgba(201, 168, 76, 0.35);
}

.error-title {
    font-size: 26px;
    margin: 18px 0 10px;
    color: var(--text-primary);
}

.error-text {
    color: #c2c2d0;
    max-width: 520px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}


/* ===== история цен, избранное, промокоды ===== */
.price-trend {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.price-trend-badge {
    font-size: 13px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid currentColor;
}

.price-trend-badge.down { color: #7dbb7d; }
.price-trend-badge.up { color: #d9a24c; }

.price-spark-wrap { line-height: 0; }
.price-spark { opacity: 0.85; }
.price-trend-range { font-size: 12px; color: var(--text-muted); }

.product-watch-form { display: inline-flex; }
.product-watch-form .is-watching {
    border-color: var(--gold);
    color: var(--gold-light);
}

.watch-base { color: var(--text-muted); font-size: 13px; margin: 6px 0 10px; }
.watch-remove { margin-top: 6px; }

.cart-promo { margin: 14px 0; }
.cart-promo summary {
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
    list-style: none;
}
.cart-promo summary::-webkit-details-marker { display: none; }
.cart-promo-form { display: flex; gap: 8px; margin-top: 10px; }
.cart-promo-form input {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    padding: 10px 12px;
    letter-spacing: 1px;
}
.cart-promo-error { color: var(--error); font-size: 13px; margin-top: 8px; }
.cart-total-discount .cart-total-label,
.cart-total-discount .cart-total-value { color: #7dbb7d; }
.cart-promo-remove { margin-top: 8px; }
.btn-link {
    background: none;
    border: 0;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}


/* ===== роли кораблей и гайды ===== */
.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin: 28px 0 40px;
}

.role-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 150px;
    padding: 22px 22px 18px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: rgba(10, 10, 16, 0.78);
    backdrop-filter: blur(10px);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.role-card:hover {
    border-color: var(--gold);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.role-card-count {
    position: absolute;
    top: 14px;
    right: 16px;
    font-family: var(--font-brand);
    font-size: 13px;
    color: var(--gold);
    opacity: 0.9;
}

.role-card-title { font-size: 18px; font-weight: 700; }
.role-card-sub { font-size: 13.5px; color: var(--text-secondary); line-height: 1.5; }
.role-card-more { margin-top: 10px; font-size: 13px; color: var(--gold); }

.product-card-link { text-decoration: none; color: inherit; display: block; }
.product-card-brand { display: block; font-size: 12.5px; color: var(--text-muted); margin: 2px 0 8px; }

.role-note {
    color: var(--text-muted);
    font-size: 13.5px;
    margin: 28px 0 40px;
    text-align: center;
}
.role-note a { color: var(--gold); }

.guide-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    margin: 28px 0 48px;
}

.guide-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 24px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: rgba(10, 10, 16, 0.78);
    backdrop-filter: blur(10px);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.guide-card:hover { border-color: var(--gold); background: var(--bg-card-hover); }

.guide-card-tag {
    align-self: flex-start;
    font-size: 11.5px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid var(--gold-dark);
    border-radius: 999px;
    padding: 3px 10px;
}

.guide-card-title { font-size: 19px; font-weight: 700; }
.guide-card-text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

.guide-prose {
    max-width: 780px;
    margin: 0 auto 64px;
    line-height: 1.75;
    color: var(--text-secondary);
}

.guide-prose h1 { color: var(--text-primary); font-size: 34px; margin: 18px 0 14px; }
.guide-prose h2 { color: var(--text-primary); font-size: 22px; margin: 34px 0 10px; }
.guide-prose p { margin: 0 0 14px; }
.guide-prose ul { margin: 0 0 16px; padding-left: 22px; }
.guide-prose li { margin-bottom: 8px; }
.guide-prose a { color: var(--gold); }
.guide-lead { font-size: 17px; color: var(--text-primary); }
.guide-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }


/* ===== админ-аналитика ===== */
.analytic-page { padding: 32px 0 60px; }
.analytic-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.analytic-title { font-size: 30px; margin: 0 0 6px; }
.analytic-sub { color: var(--text-muted); margin: 0; }
.analytic-periods { display: flex; gap: 8px; flex-wrap: wrap; }

.analytic-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 26px; }
.analytic-card { background: rgba(10,10,16,.72); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.analytic-card-gold { border-color: var(--gold-dark); }
.analytic-card-label { font-size: 12.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--text-muted); }
.analytic-card-value { font-family: var(--font-brand); font-size: 26px; color: var(--gold-light); }
.analytic-card-note { font-size: 12.5px; color: var(--text-secondary); }

.analytic-block { background: rgba(10,10,16,.6); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 22px; margin-bottom: 18px; }
.analytic-block-title { font-size: 16px; margin: 0 0 16px; letter-spacing: .4px; }
.analytic-empty { color: var(--text-muted); font-size: 14px; margin: 0; }

.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel-bar { min-width: 160px; background: linear-gradient(90deg, rgba(201,168,76,.85), rgba(201,168,76,.45)); color: #14141c; font-weight: 700; font-size: 13px; border-radius: 6px; padding: 8px 12px; }
.funnel-bar span { white-space: nowrap; }

.revenue-chart { display: flex; align-items: flex-end; justify-content: flex-start; gap: 10px; height: 180px; padding-bottom: 4px; }
.revenue-bar { flex: 0 1 64px; min-width: 18px; max-width: 64px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.revenue-fill { width: 100%; background: linear-gradient(180deg, rgba(232,212,139,.9), rgba(201,168,76,.35)); border-radius: 4px 4px 0 0; min-height: 3px; }
.revenue-day { font-size: 10.5px; color: var(--text-muted); }

.analytic-columns { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
@media (max-width: 1000px) { .analytic-columns { grid-template-columns: 1fr; } }

.analytic-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.analytic-table th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.analytic-table td { padding: 7px 8px; border-bottom: 1px solid rgba(255,255,255,.05); }
.analytic-table a { color: var(--gold-light); text-decoration: none; }

.source-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; font-size: 13px; }
.source-name { width: 92px; color: var(--text-secondary); }
.source-bar { flex: 1; height: 8px; background: rgba(255,255,255,.08); border-radius: 999px; overflow: hidden; }
.source-bar span { display: block; height: 100%; background: var(--gold); }
.source-value { color: var(--text-muted); font-size: 12px; }


/* ===== переключатель языка ===== */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-left: 6px;
    padding: 3px;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.lang-switch a {
    font-size: 11.5px;
    letter-spacing: .8px;
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.lang-switch a.active {
    background: var(--gold);
    color: #12121a;
    font-weight: 700;
}

.lang-switch a:hover { color: var(--gold-light); }


/* ===== мобильная шапка: одна строка, без лишней высоты ===== */
@media (max-width: 760px) {
    .site-header { --logo-3d-size: 72px; }
    .header-inner {
        min-height: 0;
        height: auto;
        padding: 10px 0;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
        gap: 10px;
    }
    .logo { flex: 1 1 auto; min-width: 0; gap: 8px; }
    .logo-text { font-size: 12.5px; letter-spacing: .4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .nav-toggle { flex: 0 0 auto; margin-left: 0; }
}


/* ===== типографическая шкала ===== */
:root {
    --fs-xs: 12px;
    --fs-sm: 14px;
    --fs-base: 16px;
    --fs-md: 18px;
    --fs-lg: 24px;
    --fs-xl: 34px;
}

.product-price-block {
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
}

.price-value {
    font-size: 40px;
    letter-spacing: -.3px;
    line-height: 1.1;
}

.price-main { gap: 12px; }

.product-actions { display: flex; flex-direction: column; gap: 10px; }
.product-actions .btn-primary-buy { order: 1; width: 100%; padding: 14px 22px; font-size: 14px; }
.product-actions .product-cart-form { order: 2; width: 100%; }
.product-actions .product-cart-form .btn { width: 100%; }
.product-actions .product-watch-form { order: 3; }

.product-watch-form .btn {
    border: 0;
    background: none;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.product-watch-form .btn:hover,
.product-watch-form .btn.is-watching { color: var(--gold); }

h1, .hero-title { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }


.product-actions #buy-button {
    order: 1;
    width: 100%;
    padding: 14px 22px;
    font-size: 14px;
}

.product-actions > a.btn { order: 4; }
.product-actions .product-watch-form { order: 3; }
.product-actions .product-cart-form { order: 2; }
.product-actions #buy-button { order: 1; }

/* форма корзины на карточке товара должна быть блоком, иначе order не работает */
.product-actions .product-cart-form {
    display: block;
    order: 2;
    width: 100%;
}

/* счётчик каталога: плашка, чтобы линия не пересекала текст */
.catalog-count {
    position: relative;
    z-index: 1;
    padding: 4px 10px;
    border-radius: 4px;
    background: rgba(10, 10, 16, 0.92);
    border: 1px solid var(--border);
    font-size: 12px;
    letter-spacing: 1px;
}


/* мобильный порядок карточки товара: фото → цена и кнопки → отзывы */
@media (max-width: 900px) {
    .product-detail { display: flex; flex-direction: column; gap: 16px; }
    .product-main-col { display: contents; }
    .product-detail .product-gallery { order: 1; }
    .product-detail .product-info { order: 2; }
    .product-detail .product-reviews { order: 3; }
}


/* ===== этап 3: карточки каталога ===== */
/* 1. единая рамка кадра: светлые рендеры не выбиваются из тёмной сетки */
.product-card-image {
    aspect-ratio: 16 / 10;
    background:
        radial-gradient(90% 70% at 50% 0%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 60%),
        #0b0b12;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .45s ease;
}

.product-card:hover .product-card-image img { transform: scale(1.04); }

/* 2. кнопки всегда внизу, названия не разъезжают сетку */
.product-card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-card-body { justify-content: flex-start; }
.product-card-actions { margin-top: auto; padding-top: 8px; }

/* 3. кнопка корзины — в золотой палитре, а не зелёная */
.card-buy {
    border-color: var(--gold-dark);
    background: linear-gradient(180deg, #e3c877 0%, var(--gold) 55%, var(--gold-dark) 100%);
    box-shadow: 0 4px 16px rgba(201, 168, 76, 0.24);
}

.card-buy:hover {
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    box-shadow: 0 6px 20px rgba(201, 168, 76, 0.34);
}


/* ===== этап 4: таблицы, формы, пустые состояния, футер ===== */

/* таблицы: воздух, читаемая шапка, подсветка строки */
.data-table { font-size: 14px; }
.data-table th {
    font-size: 12px;
    letter-spacing: 1px;
    color: var(--text-secondary);
    padding: 14px 16px;
    background: rgba(8, 8, 14, 0.85);
    border-bottom: 1px solid var(--border-strong);
}
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}
.data-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.015); }
.data-table tbody tr:hover { background: rgba(201, 168, 76, 0.06); }

.state-badge { font-size: 12px; letter-spacing: .5px; padding: 4px 11px; }
.state-paid { color: #8fd6a4; background: rgba(125, 187, 125, 0.14); border-color: rgba(125, 187, 125, 0.4); }
.state-pending { color: var(--gold-light); background: rgba(201, 168, 76, 0.12); border-color: rgba(201, 168, 76, 0.4); }
.state-canceled, .state-failed { color: #e59393; background: rgba(229, 110, 110, 0.12); border-color: rgba(229, 110, 110, 0.35); }

/* формы: одинаковая высота и заметный фокус */
.form-group label { font-size: 13px; color: var(--text-secondary); letter-spacing: .3px; }
.form-group input,
.form-group select,
.form-group textarea,
.auth-form input,
.auth-form select {
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: rgba(8, 8, 14, 0.75);
    color: var(--text-primary);
    font-size: 15px;
}

.form-group input:focus,
.auth-form input:focus,
.sort-select:focus,
.search-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.18);
}

.auth-card { max-width: 460px; padding: 34px 32px; }

/* панель поиска и сортировки: одна высота, ровная линия */
.catalog-toolbar { align-items: stretch; }
.search-box { flex: 1 1 auto; max-width: none; }
.search-box input { height: 46px; }
.sort-select { height: 46px; align-self: stretch; }

/* пустые состояния: карточка вместо пунктирного прямоугольника */
.empty-state {
    padding: 64px 28px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background:
        radial-gradient(80% 120% at 50% 0%, rgba(201, 168, 76, 0.07) 0%, rgba(255, 255, 255, 0) 60%),
        rgba(10, 10, 16, 0.72);
}
.empty-icon {
    font-size: 40px;
    color: var(--gold);
    animation: none;
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gold-dark);
    border-radius: 50%;
    background: rgba(201, 168, 76, 0.08);
}
.empty-state p, .empty-state .empty-text { color: var(--text-secondary); font-size: 15px; }

/* футер: плотный фон, сетка, место под кнопку поддержки */
.site-footer {
    background: linear-gradient(180deg, rgba(10, 10, 16, 0.96) 0%, rgba(6, 6, 10, 0.99) 100%);
    border-top: 1px solid var(--border-strong);
    padding: 44px 0 26px;
}
.footer-content {
    display: grid;
    grid-template-columns: 1.2fr 1.6fr 1fr;
    gap: 28px;
    align-items: start;
    padding-right: 150px;
}
.footer-links a { color: var(--text-secondary); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    .footer-content { grid-template-columns: 1fr; padding-right: 0; }
}


/* классы страниц не должны сбрасывать боковые отступы контейнера */
.container.account-page { padding: 40px 24px 80px; }
.container.analytic-page { padding: 32px 24px 60px; }
.container.catalog-page { padding-left: 24px; padding-right: 24px; }

/* ссылки футера не под кнопкой поддержки */
.footer-links { padding-right: 120px; }
@media (max-width: 900px) { .footer-links { padding-right: 0; } }


/* поле поиска: место под иконку */
.search-box input { padding-left: 44px; }

/* кнопки в строке таблицы — одинаковой ширины */
.row-actions { display: flex; flex-direction: column; gap: 6px; min-width: 176px; }
.row-actions .btn, .row-actions form { width: 100%; }
.row-actions .btn { justify-content: center; }


/* ===== этап 5: фокус, отступы, движение ===== */

/* 1. фокус для клавиатуры — виден всегда */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* мышь не рисует рамку */
:focus:not(:focus-visible) { outline: none; }

/* 2. сетка отступов кратна 8 px */
:root {
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 48px;
}

.catalog-hero { padding: 40px 0 32px; }
.product-page { padding: 32px 0 72px; }
.container.account-page { padding: 40px 24px 80px; }
.site-footer { padding: 48px 0 24px; }
.products-grid { gap: 16px; }
.product-card-body { padding: 12px 16px; }

/* 3. уважение к prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .product-card:hover .product-card-image img,
    .role-card:hover,
    .guide-card:hover,
    .product-card:hover {
        transform: none !important;
    }

    .bg-video { display: none; }
}

/* бренд в карточке: контраст выше 4,5:1 */
.product-card-brand { color: #9a9aad; }


/* кнопки внутри текстовых страниц не должны наследовать цвет ссылок */
.guide-prose a.btn,
.guide-cta .btn-gold,
.guide-prose .btn-gold { color: #14141c; }

.guide-prose a.btn-outline,
.guide-cta .btn-outline,
.guide-prose .btn-outline { color: var(--gold-light); }

/* скидочный бейдж: контраст выше 4,5:1 */
.discount-badge { background: #b3261e; color: #ffffff; }


/* ===== юридические документы и cookie-баннер ===== */
.legal-doc {
    max-width: 880px;
    margin: 40px auto 72px;
    padding: 34px 38px 40px;
    line-height: 1.75;
    color: var(--text-secondary);
    background: rgba(10, 10, 16, 0.93);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.legal-doc h1 { color: var(--text-primary); font-size: 32px; margin-bottom: 6px; }
.legal-doc h2 { color: var(--text-primary); font-size: 20px; margin: 32px 0 10px; }
.legal-doc p { margin: 0 0 14px; }
.legal-doc ul { margin: 0 0 16px; padding-left: 22px; }
.legal-doc li { margin-bottom: 8px; }
.legal-doc a { color: var(--gold); }
.legal-updated { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }
.legal-seller {
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid var(--gold-dark);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: var(--text-primary);
}
.legal-warning {
    background: rgba(229, 110, 110, 0.1);
    border: 1px solid rgba(229, 110, 110, 0.4);
    border-radius: var(--radius);
    padding: 14px 16px;
    color: #e9a0a0;
}
.legal-note { margin-top: 32px; font-size: 13px; color: var(--text-muted); }
.legal-requisites { list-style: none; padding-left: 0; }
.legal-requisites li { margin-bottom: 6px; }

.footer-requisites { margin-bottom: 8px; font-size: 12.5px; color: var(--text-muted); }
.footer-requisites a { color: var(--gold); }

.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 120;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 16px 20px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: rgba(10, 10, 16, 0.97);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.cookie-banner[hidden] { display: none; }
.cookie-text { margin: 0; font-size: 13.5px; color: var(--text-secondary); max-width: 720px; }
.cookie-text a { color: var(--gold); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@media (min-width: 1100px) {
    .cookie-banner { left: 24px; right: 220px; }
}

.state-delivered { color: #a5c8ff; background: rgba(100, 149, 237, 0.14); border-color: rgba(100, 149, 237, 0.4); }
.state-pending { color: var(--gold-light); background: rgba(201, 168, 76, 0.12); border-color: rgba(201, 168, 76, 0.4); }


/* ===== липкая панель покупки на мобильном ===== */
.buy-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 110;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 10, 16, 0.97);
    border-top: 1px solid var(--border-strong);
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(110%);
    transition: transform .25s ease;
}

.buy-bar.is-visible { transform: translateY(0); }

.buy-bar-price { display: flex; flex-direction: column; min-width: 0; }
.buy-bar-value { font-size: 20px; font-weight: 700; color: var(--gold); line-height: 1.1; }
.buy-bar-name {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 46vw;
}

.buy-bar-actions { display: flex; gap: 8px; align-items: center; }
.buy-bar-cart { display: inline-flex; }
.buy-bar-sold { color: var(--text-muted); font-size: 13px; }

@media (max-width: 900px) {
    .buy-bar { display: flex; }
    /* отступ под липкую панель — только на страницах, где она есть */
    /* панель перекрывает нижнюю часть футера, а не висит над пустотой */
    body:has(.buy-bar.is-visible) .site-footer {
        padding-bottom: calc(var(--buy-bar-h, 62px) + env(safe-area-inset-bottom, 0px) + 12px);
    }
}

.twofa-secret {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 18px;
    letter-spacing: 2px;
    color: var(--gold);
    background: rgba(201, 168, 76, 0.08);
    border: 1px dashed var(--gold-dark);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin: 10px 0;
    word-break: break-all;
}

.twofa-link {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    word-break: break-all;
    margin-top: 4px;
}

.twofa-codes {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 12px 0;
}

.twofa-codes li {
    font-family: ui-monospace, monospace;
    font-size: 15px;
    letter-spacing: 1px;
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: rgba(8, 8, 14, 0.7);
    text-align: center;
}

.fx-warning {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--gold-dark);
    border-radius: var(--radius);
    background: rgba(201, 168, 76, 0.1);
    color: var(--gold-light);
    font-size: 14px;
}

.analytic-card-alert { border-color: rgba(229, 110, 110, 0.5); }
.analytic-card-alert .analytic-card-value { color: #e9a0a0; }

.analytic-table .num { text-align: right; white-space: nowrap; }

.role-form { display: flex; gap: 8px; align-items: center; }
.role-form select {
    min-height: 38px;
    padding: 6px 10px;
    background: rgba(8, 8, 14, 0.8);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
}

.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.fleet-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: rgba(10, 10, 16, 0.88);
}

.fleet-image { display: block; aspect-ratio: 16 / 10; background: #0b0b12; }
.fleet-image img { width: 100%; height: 100%; object-fit: cover; }

.fleet-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.fleet-category { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.fleet-name { font-size: 16px; font-weight: 600; color: var(--text-primary); text-decoration: none; }
.fleet-name:hover { color: var(--gold); }
.fleet-brand { font-size: 13px; color: #9a9aad; }

.fleet-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.fleet-price { font-weight: 700; color: var(--gold); }
.fleet-count { font-size: 13px; color: var(--text-muted); }
.fleet-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* шапка на средних экранах: новые пункты не должны переносить меню */
@media (min-width: 1200px) and (max-width: 1650px) {
    .main-nav { gap: 0; }
    .nav-link { padding: 10px 7px; font-size: 13.5px; }
    .lang-switch { margin-left: 2px; }
}

/* ===== Telegram Mini App ===== */
.tg-page {
    max-width: 820px;
    margin: 0 auto;
    padding: 14px 16px calc(90px + env(safe-area-inset-bottom, 0px));
}
.tg-title { margin-top: 4px; }
.tg-head { margin-bottom: 14px; }
.tg-title { font-size: 24px; margin: 0; }
.tg-sub { color: var(--text-muted); font-size: 14px; margin: 4px 0 0; }

.tg-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 14px; }
.tg-tab {
    white-space: nowrap;
    padding: 8px 14px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-size: 13.5px;
    color: var(--text-secondary);
    text-decoration: none;
}
.tg-tab.active { background: var(--gold); border-color: var(--gold); color: #14141c; font-weight: 700; }

.tg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tg-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: rgba(10, 10, 16, 0.9);
    overflow: hidden;
}
.tg-card-image { display: block; aspect-ratio: 4 / 3; background: #0b0b12; }
.tg-card-image img { width: 100%; height: 100%; object-fit: cover; }
.tg-card-body { display: flex; flex-direction: column; gap: 4px; padding: 10px; }
.tg-card-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); text-decoration: none; line-height: 1.3; }
.tg-card-brand { font-size: 11.5px; color: #9a9aad; }
.tg-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; }
.tg-price { font-size: 14px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.tg-cart-form { display: inline-flex; }
.tg-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

@media (max-width: 480px) {
    .tg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.tg-shell .site-header,
.tg-shell .site-footer { display: none; }
.tg-shell .bg-video { opacity: 0.35; }

/* ===== Логотип и надпись: единый знак ===== */
.logo {
    gap: 16px;
    align-items: center;
}

.logo-text {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-brand);
    font-size: clamp(13px, 1.05vw + 6px, 18px);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: #f1f1f6;
    white-space: nowrap;
    padding: 6px 2px 6px 0;
    position: relative;
    transition: color .35s ease, letter-spacing .45s ease;
}

/* тонкая золотая линия под надписью: появляется при наведении */
.logo-text::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0.34em;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold) 35%, var(--gold) 100%);
    transform: scaleX(0);
    transform-origin: left center;
    opacity: 0.9;
    transition: transform .45s cubic-bezier(.22, .61, .36, 1);
}

.logo-word { display: inline-block; }
.logo-word-gold {
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--gold);
    text-shadow: 0 0 18px rgba(214, 182, 99, 0.18);
}

.logo-sep {
    width: 1px;
    height: 0.95em;
    background: linear-gradient(180deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
    opacity: 0.55;
    transition: opacity .35s ease, transform .35s ease;
}

/* наведение на любую часть знака — и на герб, и на надпись */
.logo:hover .logo-text,
.logo:focus-visible .logo-text { color: #ffffff; letter-spacing: 0.36em; }

.logo:hover .logo-text::after,
.logo:focus-visible .logo-text::after { transform: scaleX(1); }

.logo:hover .logo-sep,
.logo:focus-visible .logo-sep { opacity: 1; transform: scaleY(1.15); }

.logo:hover .logo-word-gold,
.logo:focus-visible .logo-word-gold { text-shadow: 0 0 26px rgba(214, 182, 99, 0.45); }

/* звёзды ускоряются при наведении на весь логотип, включая надпись */
.logo:hover .stars-tilt,
.logo:focus-visible .stars-tilt { animation-duration: 7s; }

.logo:hover .logo-3d-inner,
.logo:focus-visible .logo-3d-inner { animation: logo-3d-spin 4.6s linear infinite; }

@media (max-width: 900px) {
    .logo-text { gap: 8px; letter-spacing: 0.26em; font-size: 13px; }
    .logo-word-gold { letter-spacing: 0.14em; }
}

/* ===== Страница товара: цена и наличие в одной строке ===== */
.price-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.stock-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 11px 5px 9px;
    border-radius: 999px;
    font-family: var(--font-body, inherit);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.stock-in {
    color: #9fe0b4;
    background: rgba(63, 191, 112, 0.10);
    border-color: rgba(63, 191, 112, 0.35);
}
.stock-in .stock-dot {
    background: #4fd18a;
    box-shadow: 0 0 8px rgba(79, 209, 138, 0.65);
}

.stock-out {
    color: #e6a0a0;
    background: rgba(214, 90, 90, 0.10);
    border-color: rgba(214, 90, 90, 0.35);
}
.stock-out .stock-dot {
    background: #d65a5a;
    box-shadow: 0 0 8px rgba(214, 90, 90, 0.55);
}

.product-info-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.brand-divider {
    color: var(--text-muted);
    opacity: 0.7;
}

.brand-category {
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

@media (max-width: 560px) {
    .price-main { gap: 10px; }
    .stock-chip { font-size: 11.5px; padding: 4px 9px; }
}

/* уведомление про игровой набор */
.product-notice-pack {
    border-left: 2px solid var(--gold);
    padding-left: 12px;
    color: var(--gold-light);
}

.notice-link {
    color: var(--gold);
    text-decoration: none;
    border-bottom: 1px solid rgba(214, 182, 99, 0.45);
    padding-bottom: 1px;
    transition: color .25s ease, border-color .25s ease, text-shadow .25s ease;
    white-space: nowrap;
}

.notice-link:hover {
    color: var(--gold-light);
    border-color: var(--gold);
    text-shadow: 0 0 14px rgba(214, 182, 99, 0.35);
}

.notice-link::after { content: " →"; font-size: 0.9em; }

/* ссылка внутри уведомления — заметнее, чем обычный текст */
.product-notice .notice-link {
    color: var(--gold);
    font-weight: 600;
    border-bottom: 1px solid var(--gold);
    text-decoration: none;
    padding-bottom: 1px;
}

.product-notice .notice-link:hover {
    color: #14141c;
    background: var(--gold);
    border-radius: 3px;
    padding: 1px 4px;
    box-shadow: 0 0 16px rgba(214, 182, 99, 0.5);
}

/* два блока под миниатюрами: характеристики справа, состав слева */
.product-under-gallery-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
    margin-top: 18px;
}

.product-under-gallery-row > section {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
}

@media (max-width: 980px) {
    .product-under-gallery-row { flex-direction: column; }
    .product-under-gallery-row > section { width: 100%; }
}

/* увеличенный кадр: плотная подложка, чтобы видео не просвечивало */
.gallery-main {
    background: #0b0b12;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.gallery-main img { display: block; }

/* миниатюры: сами кадры плотные, фон вокруг — прозрачный */

.gallery-thumbs .thumb {
    background: #0b0b12;
    overflow: hidden;
}

.gallery-thumbs .thumb img { display: block; }

/* полноэкранный просмотр: кадр занимает всю сцену, как на сайте источника */
.lightbox-stage img {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-counter {
    margin-left: 12px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 12.5px;
    letter-spacing: 1px;
}

.lightbox-bar { gap: 10px; }

@media (max-width: 620px) {
    .lightbox-counter { display: none; }
    .lightbox-controls { gap: 6px; }
    .lightbox-btn { min-width: 38px; height: 36px; padding: 0 10px; }
}

/* ===== Мобильная шапка: логотип, меню, нажатия ===== */
:root { --star-orbit-radius: 45px; }

.logo {
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}

.logo:focus,
.logo:active { outline: none; }

.logo:focus-visible {
    outline: 1px solid rgba(214, 182, 99, 0.55);
    outline-offset: 4px;
    border-radius: 10px;
}

.logo * { -webkit-tap-highlight-color: transparent; }

.nav-link,
.nav-toggle,
.btn { -webkit-tap-highlight-color: transparent; }

@media (max-width: 760px) {
    :root { --star-orbit-radius: 31px; --star-orbit-ratio: 0.43; }
    .logo { gap: 12px; }
}

/* ===== Выпадающее меню на телефоне ===== */
@media (max-width: 768px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 200;
        background: rgba(9, 9, 15, 0.94);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
    }

    .site-header .main-nav {
        display: none;
    }

    .site-header.nav-open .main-nav {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 8px);
        left: 12px;
        right: 12px;
        width: auto;
        margin: 0;
        padding: 8px;
        gap: 0;
        background-color: #09090f;
        background-image: linear-gradient(180deg, rgba(24, 22, 16, 0.6), rgba(9, 9, 15, 0) 38%);
        border: 1px solid var(--border-strong);
        border-top-color: rgba(214, 182, 99, 0.35);
        border-radius: 18px;
        box-shadow: 0 28px 70px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        max-height: calc(100vh - 140px);
        overflow-y: auto;
        z-index: 210;
        animation: nav-sheet-in .26s cubic-bezier(.22, .61, .36, 1);
    }

    .site-header.nav-open .main-nav .nav-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        border-radius: 12px;
        font-size: 15px;
        letter-spacing: 0.02em;
        color: var(--text-primary);
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        transition: background .2s ease, color .2s ease, padding-left .2s ease;
    }

    .site-header.nav-open .main-nav .nav-link:last-child { border-bottom: none; }

    .site-header.nav-open .main-nav .nav-link::after {
        content: "›";
        color: var(--gold);
        opacity: .55;
        font-size: 17px;
        line-height: 1;
    }

    .site-header.nav-open .main-nav .nav-link:active,
    .site-header.nav-open .main-nav .nav-link:hover {
        background: rgba(214, 182, 99, 0.12);
        color: var(--gold-light);
        padding-left: 20px;
    }

    .site-header.nav-open .nav-toggle {
        border-color: rgba(214, 182, 99, 0.6);
        background: rgba(214, 182, 99, 0.12);
    }

    .site-header.nav-open .nav-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
    .site-header.nav-open .nav-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@keyframes nav-sheet-in {
    from { opacity: 0; transform: translateY(-10px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Фоновое видео на мобильных: не смещается при прокрутке ===== */
.bg-video-layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;              /* учитывает сворачивание адресной строки */
    transform: translateZ(0);    /* отдельный слой — без перерисовки при скролле */
    backface-visibility: hidden;
    will-change: transform;
    overflow: hidden;
    pointer-events: none;
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: translateZ(0);
    backface-visibility: hidden;
}

html, body { overflow-x: clip; }

@media (max-width: 760px) {
    .bg-video-layer {
        /* наибольшая высота окна: не меняется при скрытии адресной строки */
        height: 100lvh;
    }
}

/* ===== Меню под логотипом ===== */
.site-header { overflow-x: clip; }

.logo-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 20px;
    width: min(420px, calc(100vw - 32px));
    padding: 10px;
    background-color: #09090f;
    background-image: linear-gradient(180deg, rgba(28, 24, 14, 0.75), rgba(9, 9, 15, 0) 42%);
    border: 1px solid var(--border-strong);
    border-top-color: rgba(214, 182, 99, 0.45);
    border-radius: 18px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 260;
    animation: logo-menu-in .3s cubic-bezier(.22, .61, .36, 1);
}

.logo-menu[hidden] { display: none; }

.logo-menu-inner { display: flex; flex-direction: column; gap: 2px; }

.logo-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-family: var(--font-brand);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background .18s ease, color .18s ease, padding-left .18s ease;
}

.logo-menu-link:last-child { border-bottom: none; }

.logo-menu-link::after {
    content: "›";
    color: var(--gold);
    opacity: 0.5;
    font-size: 16px;
    line-height: 1;
    transition: transform .18s ease, opacity .18s ease;
}

.logo-menu-link:hover,
.logo-menu-link:focus-visible {
    background: rgba(214, 182, 99, 0.12);
    color: var(--gold-light);
    padding-left: 18px;
    outline: none;
}

.logo-menu-link:hover::after { opacity: 1; transform: translateX(2px); }

.logo-menu-cart { color: var(--gold); }

.logo-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--gold);
    color: #14141c;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
}

/* ускорение звёзд по нажатию на знак */
.logo.logo-kick .stars-tilt { animation-duration: 1.6s; }
.logo.logo-kick .logo-3d-inner { animation: logo-3d-spin 1.6s linear infinite; }
.logo.logo-kick .logo-text::after { transform: scaleX(1); }
.logo.logo-kick .logo-sep { opacity: 1; transform: scaleY(1.2); }

@keyframes logo-menu-in {
    from { opacity: 0; transform: translateY(-12px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 768px) {
    .logo-menu {
        left: 12px;
        right: 12px;
        width: auto;
        top: calc(100% + 8px);
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }
    .logo-menu-link { font-size: 13.5px; letter-spacing: 0.1em; }
}

/* ===== Меню строго под названием сайта ===== */
.logo-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.logo-caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--gold);
    transform-origin: 50% 40%;
    animation: caret-bounce 1.6s ease-in-out infinite;
    transition: transform .25s ease, border-color .25s ease;
}

.logo-caret.is-open {
    animation: none;
    transform: rotate(180deg);
    border-top-color: var(--gold-light);
}

@keyframes caret-bounce {
    0%, 100% { transform: translateY(0); opacity: .75; }
    50%      { transform: translateY(4px); opacity: 1; }
}

/* панель в той же подложке, что и шапка */
.logo-menu {
    position: absolute;
    top: calc(50% + 20px);
    left: calc(var(--logo-3d-size) + 16px);
    width: min(360px, calc(100vw - var(--logo-3d-size) - 40px));
    padding: 8px;
    background: linear-gradient(180deg, rgba(13, 13, 21, 0.94) 0%, rgba(18, 18, 26, 0.92) 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 260;
    animation: logo-menu-in .26s cubic-bezier(.22, .61, .36, 1);
}

.logo-menu[hidden] { display: none; }

.logo-menu.is-closing {
    animation: logo-menu-out .22s cubic-bezier(.4, 0, .6, 1) forwards;
}

.logo-menu-inner { display: flex; flex-direction: column; gap: 1px; }

.logo-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 9px;
    font-family: var(--font-brand);
    font-size: 12.5px;
    font-weight: 400;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background .18s ease, color .18s ease, padding-left .18s ease;
}

.logo-menu-link:last-child { border-bottom: none; }

.logo-menu-link::after {
    content: "›";
    color: var(--gold);
    opacity: .45;
    font-size: 15px;
    line-height: 1;
    transition: transform .18s ease, opacity .18s ease;
}

.logo-menu-link:hover,
.logo-menu-link:focus-visible {
    background: rgba(214, 182, 99, 0.10);
    color: var(--gold-light);
    padding-left: 16px;
    outline: none;
}

.logo-menu-link:hover::after { opacity: 1; transform: translateX(2px); }

.logo-menu-cart { color: var(--gold); }

.logo-menu-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--gold);
    color: #14141c;
    font-family: var(--font-body);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0;
}

@keyframes logo-menu-in {
    from { opacity: 0; transform: translateY(-8px) scale(.99); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes logo-menu-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-8px) scale(.99); }
}

@media (max-width: 768px) {
    .logo-menu {
        left: 0;
        right: auto;
        width: min(320px, calc(100vw - 24px));
        top: calc(100% + 8px);
        max-height: calc(100vh - 130px);
        overflow-y: auto;
    }
    .logo-menu-link { font-size: 12px; letter-spacing: 0.14em; padding: 9px 11px; }
}

/* знак в состоянии «меню открыто»: линия и трекинг держатся, при закрытии плавно возвращаются */
.logo.logo-open .logo-text { color: #ffffff; letter-spacing: 0.36em; }
.logo.logo-open .logo-text::after { transform: scaleX(1); }
.logo.logo-open .logo-sep { opacity: 1; transform: scaleY(1.15); }
.logo.logo-open .logo-word-gold { text-shadow: 0 0 26px rgba(214, 182, 99, 0.45); }

/* при закрытии подчёркивание убирается чуть медленнее — видно обратный ход */
.logo.logo-close .logo-text::after {
    transform: scaleX(0);
    transition-duration: 0.5s;
    transform-origin: left center;
}
.logo.logo-close .logo-text { letter-spacing: 0.34em; }

/* ===== Наведение только там, где есть настоящий курсор ===== */
@media (hover: hover) and (pointer: fine) {
    .logo:hover .logo-text { color: #ffffff; letter-spacing: 0.36em; }
    .logo:hover .logo-text::after { transform: scaleX(1); }
    .logo:hover .logo-sep { opacity: 1; transform: scaleY(1.15); }
    .logo:hover .logo-word-gold { text-shadow: 0 0 26px rgba(214, 182, 99, 0.45); }
    .logo:hover .stars-tilt { animation-duration: 7s; }
    .logo:hover .logo-3d-inner { animation: logo-3d-spin 4.6s linear infinite; }
}

/* на телефонах касание не «залипает» в наведении: расширение только по нажатию */
@media (hover: none) {
    .logo:hover .logo-text { color: #f1f1f6; letter-spacing: 0.26em; }
    .logo:hover .logo-text::after { transform: scaleX(0); }
    .logo:hover .logo-sep { opacity: 0.55; transform: none; }
    .logo:hover .logo-word-gold { text-shadow: 0 0 18px rgba(214, 182, 99, 0.18); }
    .logo:hover .stars-tilt { animation-duration: 28s; }
    .logo:hover .logo-3d-inner { animation: none; }

    .logo.logo-open .logo-text { color: #ffffff; letter-spacing: 0.36em; }
    .logo.logo-open .logo-text::after { transform: scaleX(1); }
}

/* ===== Рассылка в админке ===== */
.admin-form { display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.admin-label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px;
               letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); }
.admin-input { width: 100%; padding: 11px 14px; background: var(--bg-secondary);
               border: 1px solid var(--border); border-radius: 10px; color: var(--text-primary);
               font-family: var(--font-body); font-size: 14.5px; letter-spacing: normal;
               text-transform: none; }
.admin-input:focus { border-color: var(--gold); outline: none; }
textarea.admin-input { min-height: 84px; resize: vertical; }
.admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 2px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 12px; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.admin-table th { color: var(--text-secondary); font-weight: 500; font-size: 11.5px;
                  text-transform: uppercase; letter-spacing: .08em; }

/* ===== Страница доставки ===== */
.delivery-page { padding: 48px 0 72px; max-width: 980px; }
.delivery-head { margin-bottom: 32px; }
.delivery-kicker { font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase;
                   color: var(--text-secondary); margin: 0 0 10px; }
.delivery-head h1 { margin: 0 0 14px; font-size: clamp(28px, 4vw, 40px); }
.delivery-lead { font-size: 16px; line-height: 1.75; color: var(--text-secondary); max-width: 760px; }

.delivery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: 22px 0; }
.delivery-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.delivery-card h2 { font-size: 17px; margin: 0 0 10px; color: var(--gold); }
.delivery-card p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.75; color: var(--text-secondary); }
.delivery-card p:last-child { margin-bottom: 0; }
.delivery-card a { color: var(--gold); }

.delivery-time { display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
                 background: linear-gradient(135deg, rgba(214,182,99,.12), rgba(214,182,99,.03));
                 border: 1px solid rgba(214,182,99,.35); border-radius: 18px; padding: 24px 28px; margin: 26px 0; }
.delivery-time-value { font-family: var(--font-brand); font-size: clamp(22px, 3.4vw, 32px); color: var(--gold-light); white-space: nowrap; }
.delivery-time-note { display: flex; flex-direction: column; gap: 6px; font-size: 14px; line-height: 1.7; color: var(--text-secondary); max-width: 560px; }
.delivery-time-note strong { color: var(--text-primary); font-size: 15px; }

.delivery-steps { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 26px; margin: 26px 0; }
.delivery-steps h2 { margin: 0 0 16px; font-size: 19px; }
.delivery-steps ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.delivery-steps li { font-size: 14.5px; line-height: 1.7; color: var(--text-secondary); }
.delivery-steps strong { color: var(--text-primary); }

.delivery-note { border-left: 2px solid var(--gold); padding: 6px 0 6px 20px; margin: 26px 0; }
.delivery-note h2 { font-size: 17px; margin: 0 0 10px; color: var(--gold); }
.delivery-note ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.delivery-note li { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }

.delivery-help { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 26px; margin-top: 28px; }
.delivery-help h2 { margin: 0 0 10px; font-size: 18px; }
.delivery-help p { margin: 0 0 16px; color: var(--text-secondary); font-size: 14.5px; }
.delivery-help-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* блок выдачи в карточке товара */
.product-delivery { display: flex; align-items: center; gap: 12px; margin: 16px 0 20px; padding: 13px 16px;
                    background: rgba(214,182,99,.07); border: 1px solid rgba(214,182,99,.28); border-radius: 12px; }
.product-delivery-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
                        box-shadow: 0 0 12px rgba(214,182,99,.7); flex: 0 0 8px; }
.product-delivery-text { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; }
.product-delivery-text strong { color: var(--text-primary); font-weight: 600; }
.product-delivery-text span { color: var(--text-secondary); }
.product-delivery-text a { color: var(--gold); }

.order-sla { font-size: 11.5px; letter-spacing: .04em; padding: 3px 9px; border-radius: 999px;
             background: rgba(214,182,99,.12); color: var(--gold-light); border: 1px solid rgba(214,182,99,.28); }
.order-sla.is-overdue { background: rgba(220,80,80,.14); color: #ff9b9b; border-color: rgba(220,80,80,.4); }

.order-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.order-refund { font-size: 11.5px; letter-spacing: .03em; padding: 3px 9px; border-radius: 999px;
                background: rgba(220,170,80,.14); color: #ffcc80; border: 1px solid rgba(220,170,80,.4); }
.order-refunded { font-size: 11.5px; letter-spacing: .03em; padding: 3px 9px; border-radius: 999px;
                  background: rgba(90,190,120,.14); color: #a8e6b8; border: 1px solid rgba(90,190,120,.4); }

/* ===== Информационные блоки: плотный фон без просвечивания ===== */
:root {
    --bg-secondary: #101019;
    --bg-card: #12121c;
    --bg-card-hover: #1a1a28;
    --bg-elevated: #0e0e16;
}

.stat-item,
.finance-item,
.rsi-guide,
.role-card,
.guide-card,
.analytic-card,
.analytic-block,
.fleet-card,
.tg-card,
.product-card,
.admin-card,
.delivery-card,
.order-card,
.review-card,
.cart-item,
.product-under-gallery-row > section,
.product-specs,
.product-contents {
    background-color: #12121c;
}

.product-card:hover { background-color: #1a1a28; }

/* карточки на странице стартового набора */
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 24px 0; }
.info-card {
    background-color: #12121c;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
}
.info-card h2 { margin: 0 0 10px; font-size: 16px; color: var(--gold); }
.info-card p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--text-secondary); }

/* характеристики и состав — одинаковой высоты */
.product-under-gallery-row { align-items: stretch; }
.product-under-gallery-row > section {
    display: flex;
    flex-direction: column;
    height: auto;
}
.product-under-gallery-row > section .contents-list,
.product-under-gallery-row > section .specs-list {
    flex: 1 1 auto;
}

/* пунктир под последним пунктом состава — как между остальными */
.product-contents-compact .contents-list li:last-child {
    border-bottom: 1px dashed var(--border);
}

/* ===== Карточка товара на планшете и телефоне: блоки под миниатюрами ===== */
@media (max-width: 900px) {
    .product-detail { align-items: stretch; }
    .product-detail .product-gallery { order: 1; }
    .product-detail .product-under-gallery-row { order: 2; }
    .product-detail .product-info { order: 3; }
    .product-detail .product-reviews { order: 4; }

    .product-under-gallery-row { margin-top: 14px; gap: 12px; }
    .product-under-gallery-row > section {
        padding: 16px 16px;
        border-radius: 12px;
    }
    .product-under-gallery-row > section h3 { font-size: 13.5px; margin-bottom: 10px; }
    .product-under-gallery-row .contents-list li,
    .product-under-gallery-row .spec-row { font-size: 12.5px; }
}

@media (max-width: 560px) {
    .product-under-gallery-row > section { padding: 14px 14px; }
    .product-under-gallery-row .contents-list li { padding: 8px 0; }
    .product-under-gallery-row .spec-row { padding: 7px 0; }
}

/* ===== Поддержка не перекрывается липкой панелью покупки ===== */
@media (max-width: 900px) {
    .support-chat {
        right: 14px;
        bottom: calc(88px + env(safe-area-inset-bottom, 0px));
        z-index: 120;
    }
    .buy-bar { padding-right: 64px; }
}

/* ===== Кнопка поддержки: аккуратная плашка и круглая кнопка на мобильных ===== */
.support-chat { right: 24px; bottom: 24px; }

.chat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 18px 11px 16px;
    border: 1px solid rgba(201, 168, 76, 0.42);
    border-radius: 999px;
    background: linear-gradient(180deg, #16161f 0%, #0d0d14 100%);
    color: var(--gold-light);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.chat-toggle:hover {
    transform: translateY(-2px);
    border-color: rgba(201, 168, 76, 0.9);
    color: #f4e6b6;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(201, 168, 76, 0.18),
                inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.chat-toggle:active { transform: translateY(0) scale(0.985); }
.chat-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.chat-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--gold);
    flex: 0 0 20px;
}
.chat-toggle-icon svg { display: block; }

.chat-badge {
    top: -5px;
    right: -5px;
    box-shadow: 0 0 0 2px #0d0d14;
}

@media (max-width: 900px) {
    .chat-toggle {
        width: 56px;
        height: 56px;
        padding: 0;
        gap: 0;
        justify-content: center;
        border-radius: 50%;
        border-color: rgba(201, 168, 76, 0.55);
        background: radial-gradient(circle at 32% 26%, #1d1b12 0%, #0d0d14 72%);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(201, 168, 76, 0.055),
                    inset 0 1px 0 rgba(255, 255, 255, 0.07);
    }
    .chat-toggle:hover { transform: translateY(-1px) scale(1.03); }
    .chat-toggle-icon { width: 23px; height: 23px; flex-basis: 23px; }
    .chat-toggle-text { display: none; }
    .chat-badge { top: -1px; right: -1px; }
}

@media (prefers-reduced-motion: reduce) {
    .chat-toggle, .chat-toggle:hover, .chat-toggle:active { transition: none; transform: none; }
}

/* на мобильных кнопка внизу справа; выше панели покупки — только когда та видна */
@media (max-width: 900px) {
    .support-chat { right: 14px; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
    body:has(.buy-bar.is-visible) .support-chat {
        bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }
}

/* на телефоне меню тоже раскрывается под названием, а не под гербом */
@media (max-width: 768px) {
    .logo-menu {
        left: calc(var(--logo-3d-size) + 12px);
        right: auto;
        width: min(320px, calc(100vw - var(--logo-3d-size) - 36px));
        top: calc(50% + 18px);
        max-height: calc(100vh - 150px);
    }
}

/* мобильное меню: плотный фон и не задевает кнопку-гамбургер */
@media (max-width: 768px) {
    .logo-menu {
        width: min(300px, calc(100vw - var(--logo-3d-size) - 60px));
        background-color: #0b0b13;
        background-image: linear-gradient(180deg, #17150f 0%, #0b0b13 42%);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: 0 26px 64px rgba(0, 0, 0, 0.72);
    }
}

/* ===== Корзина в шапке — акцентная кнопка ===== */
.main-nav .nav-cart {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px 9px 14px;
    border: 1px solid rgba(201, 168, 76, 0.5);
    border-radius: 999px;
    background: linear-gradient(180deg, #181610 0%, #0d0d14 100%);
    color: var(--gold-light);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.main-nav .nav-cart:hover {
    transform: translateY(-1px);
    border-color: var(--gold);
    color: #f4e6b6;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(201, 168, 76, 0.2);
}

.main-nav .nav-cart:active { transform: translateY(0) scale(0.985); }
.main-nav .nav-cart:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.nav-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--gold);
    flex: 0 0 18px;
}
.nav-cart-icon svg { display: block; }

.main-nav .nav-cart .cart-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--gold);
    color: #14141c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px #0d0d14;
}

@media (max-width: 768px) {
    .main-nav .nav-cart {
        width: 100%;
        margin: 2px 0;
        padding: 14px 16px;
        border-radius: 12px;
        justify-content: flex-start;
        background: rgba(201, 168, 76, 0.09);
        box-shadow: none;
    }
    .main-nav .nav-cart .cart-badge {
        position: static;
        margin-left: auto;
        box-shadow: none;
    }
}

/* ===== Поиск и личный кабинет в шапке ===== */
.main-nav { gap: 8px; }

.nav-search { display: inline-flex; align-items: center; gap: 6px; }

.nav-search-toggle {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background: linear-gradient(180deg, #15151f 0%, #0d0d14 100%);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.nav-search-toggle:hover {
    color: var(--gold);
    border-color: rgba(201, 168, 76, 0.65);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.nav-search-toggle:active { transform: scale(0.96); }
.nav-search-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.nav-search-toggle svg { display: block; }

.nav-search-input {
    width: 0;
    height: 38px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    background: #0d0d14;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13.5px;
    opacity: 0;
    pointer-events: none;
    transition: width 0.28s ease, opacity 0.2s ease, padding 0.28s ease, border-color 0.2s ease;
}
.nav-search-input::placeholder { color: var(--text-muted); }
.nav-search-input:focus { outline: none; border-color: rgba(201, 168, 76, 0.5); }

.nav-search.is-open .nav-search-input {
    width: min(240px, 30vw);
    padding: 0 15px;
    opacity: 1;
    pointer-events: auto;
    border-color: rgba(201, 168, 76, 0.4);
}

.main-nav .nav-account {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 16px 9px 13px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: linear-gradient(180deg, #15151f 0%, #0d0d14 100%);
    color: var(--text-primary);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.main-nav .nav-account:hover {
    transform: translateY(-1px);
    border-color: rgba(201, 168, 76, 0.7);
    color: var(--gold-light);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
}
.main-nav .nav-account:active { transform: translateY(0) scale(0.985); }
.main-nav .nav-account:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.nav-account-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    color: var(--gold);
    flex: 0 0 18px;
}
.nav-account-icon svg { display: block; }

@media (max-width: 768px) {
    .nav-search { width: 100%; order: -1; }
    .nav-search-toggle { display: none; }
    .nav-search-input {
        width: 100%;
        opacity: 1;
        pointer-events: auto;
        padding: 0 15px;
        border-color: var(--border);
        height: 42px;
    }
    .main-nav .nav-account {
        width: 100%;
        margin: 2px 0;
        padding: 14px 16px;
        border-radius: 12px;
        justify-content: flex-start;
        background: rgba(255, 255, 255, 0.03);
        box-shadow: none;
    }
}

.nav-search-submit {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(201, 168, 76, 0.45);
    border-radius: 50%;
    background: rgba(201, 168, 76, 0.1);
    color: var(--gold);
    cursor: pointer;
    flex: 0 0 42px;
}
.nav-search-submit:hover { background: rgba(201, 168, 76, 0.18); }
.nav-search-submit svg { display: block; }

@media (max-width: 768px) {
    .nav-search-submit { display: inline-flex; }
}

/* ===== Шапка: единый тулбар, одинаковые кнопки ===== */
.main-nav { gap: 0; }
.nav-tools { display: flex; align-items: center; gap: 8px; }

/* поиск: круглая кнопка, раскрывается в капсулу рядом с корзиной */
.nav-search {
    display: flex;
    align-items: center;
    height: 40px;
    width: 40px;
    padding: 0 4px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: linear-gradient(180deg, #15151f 0%, #0d0d14 100%);
    transition: width 0.26s ease, border-color 0.2s ease;
    overflow: hidden;
}
.nav-search.is-open { width: 250px; border-color: rgba(201, 168, 76, 0.45); }

.nav-search-toggle,
.nav-search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}
.nav-search-toggle:hover,
.nav-search-submit:hover { color: var(--gold); background: rgba(201, 168, 76, 0.1); }
.nav-search-toggle:focus-visible,
.nav-search-submit:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.nav-search-toggle svg, .nav-search-submit svg { display: block; }
.nav-search-submit { display: none; }

.nav-search-input {
    width: 0;
    min-width: 0;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13.5px;
    opacity: 0;
    transition: opacity 0.2s ease, padding 0.2s ease;
}
.nav-search-input:focus { outline: none; }
.nav-search-input::placeholder { color: var(--text-muted); }
.nav-search.is-open .nav-search-input { flex: 1 1 auto; width: auto; padding: 0 8px; opacity: 1; }

/* корзина, кабинет, вход, админ — один размер и одна обводка */
.main-nav .nav-cart,
.main-nav .nav-account,
.main-nav .nav-login,
.main-nav .nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: linear-gradient(180deg, #15151f 0%, #0d0d14 100%);
    color: var(--text-primary);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.main-nav .nav-cart { color: var(--gold-light); border-color: rgba(201, 168, 76, 0.5); }

.main-nav .nav-icon-btn { width: 40px; padding: 0; color: var(--text-secondary); }

.main-nav .nav-cart:hover,
.main-nav .nav-account:hover,
.main-nav .nav-login:hover,
.main-nav .nav-icon-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(201, 168, 76, 0.7);
    color: var(--gold-light);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
}
.main-nav .nav-cart:active,
.main-nav .nav-account:active,
.main-nav .nav-login:active { transform: translateY(0) scale(0.985); }
.main-nav .nav-cart:focus-visible,
.main-nav .nav-account:focus-visible,
.main-nav .nav-login:focus-visible,
.main-nav .nav-icon-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.nav-cart-icon, .nav-account-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    color: var(--gold);
    flex: 0 0 17px;
}
.nav-cart-icon svg, .nav-account-icon svg { display: block; }

/* переключатель языка — сегментированный, той же высоты */
.main-nav .lang-switch {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 3px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: linear-gradient(180deg, #15151f 0%, #0d0d14 100%);
    gap: 2px;
}
.main-nav .lang-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 32px;
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.main-nav .lang-switch a:hover { color: var(--gold-light); }
.main-nav .lang-switch a.active { background: var(--gold); color: #14141c; }

.main-nav .nav-cart .cart-badge {
    position: static;
    margin-left: 2px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    font-size: 11px;
    box-shadow: none;
}

@media (max-width: 768px) {
    .nav-tools { flex-direction: column; align-items: stretch; width: 100%; gap: 8px; }
    .nav-search { width: 100%; height: 44px; padding: 0 2px; }
    .nav-search.is-open { width: 100%; }
    .nav-search-toggle { display: none; }
    .nav-search-submit { display: inline-flex; }
    .nav-search-input { flex: 1 1 auto; width: auto; opacity: 1; padding: 0 10px; }

    .main-nav .nav-cart,
    .main-nav .nav-account,
    .main-nav .nav-login,
    .main-nav .nav-icon-btn {
        width: 100%;
        height: 46px;
        justify-content: flex-start;
        padding: 0 16px;
        border-radius: 12px;
    }
    .main-nav .nav-icon-btn { gap: 10px; }
    .main-nav .lang-switch { width: 100%; height: 46px; justify-content: center; }
    .main-nav .lang-switch a { flex: 1; height: 36px; }
}

.nav-icon-label { display: none; }
@media (max-width: 768px) {
    .nav-icon-label {
        display: inline;
        font-size: 11.5px;
        letter-spacing: 0.09em;
        text-transform: uppercase;
        color: var(--text-primary);
    }
    .main-nav .nav-icon-btn { color: var(--gold); }
}

/* ===== Мобильный тулбар: поиск на всю ширину, корзина и кабинет в одну строку ===== */
.nav-account-label-short { display: none; }

@media (max-width: 768px) {
    .nav-tools {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .nav-search {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        height: 46px;
        padding: 0 8px 0 14px;
        border-radius: 14px;
    }
    .nav-search.is-open { width: 100%; }
    .nav-search-toggle { display: none; }
    .nav-search-submit { display: inline-flex; }
    .nav-search-input {
        flex: 1 1 auto;
        width: auto;
        padding: 0 6px;
        opacity: 1;
    }

    .main-nav .nav-cart { grid-column: 1; grid-row: 2; }
    .main-nav .nav-account,
    .main-nav .nav-login { grid-column: 2; grid-row: 2; }
    .main-nav .nav-icon-btn { grid-column: 1 / -1; grid-row: 3; }

    .main-nav .nav-cart,
    .main-nav .nav-account,
    .main-nav .nav-login {
        width: 100%;
        height: 44px;
        padding: 0 10px;
        justify-content: center;
        gap: 7px;
        border-radius: 12px;
        font-size: 10.5px;
        letter-spacing: 0.05em;
    }

    .main-nav .nav-account-label { display: none; }
    .main-nav .nav-account-label-short { display: inline; }

    .main-nav .nav-icon-btn {
        height: 44px;
        border-radius: 12px;
        justify-content: flex-start;
        padding: 0 14px;
        gap: 10px;
    }
}

/* ===== Мобильные: поля не вызывают зум, видео не меняет размер ===== */
@media (max-width: 768px) {
    .form-group input,
    .form-group select,
    .form-group textarea,
    .auth-form input,
    .auth-form select,
    .chat-email-form input,
    .search-input,
    .sort-select,
    input[type="email"],
    input[type="password"],
    input[type="text"],
    input[type="search"] {
        font-size: 16px;
    }
}

@media (max-width: 760px) {
    .bg-video-layer {
        height: 100lvh;
    }
}

/* ===== Логотип в футере — тот же знак, что в шапке ===== */
.footer-brand { display: flex; align-items: center; gap: 12px; }

.logo.footer-logo {
    --logo-3d-size: 56px;
    --star-orbit-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex: 0 0 auto;
}

.footer-logo .logo-text {
    font-size: 12px;
    letter-spacing: 0.28em;
    gap: 8px;
    color: var(--text-primary);
}

.footer-logo .logo-word-gold {
    letter-spacing: 0.2em;
    font-size: 1.02em;
}

.footer-logo .logo-sep { height: 0.8em; opacity: 0.8; }

/* в футере подчёркивание и разъезд не нужны */
.footer-logo .logo-text::after { display: none; }
.footer-logo:hover .logo-text,
.footer-logo:hover .logo-word-gold { letter-spacing: inherit; color: inherit; }

.footer-logo .lion-relief { filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.5)); }

@media (max-width: 760px) {
    .logo.footer-logo { --logo-3d-size: 46px; gap: 8px; }
    .footer-logo .logo-text { font-size: 10.5px; letter-spacing: 0.22em; gap: 6px; }
}

/* орбита звёзд в футере шире головы льва, размер головы не уменьшаем */
.footer-logo .logo-3d {
    --logo-3d-size: 84px;
}
@media (max-width: 760px) {
    .footer-logo .logo-3d {
        --logo-3d-size: 72px;
    }
}
.footer-logo .logo-text { color: #f2f2f7; }

/* ===== Пустая корзина: герб со звёздами вместо условного значка ===== */
.empty-logo {
    display: flex;
    justify-content: center;
    margin: 0 auto 18px;
}
.empty-logo .logo-3d {
    --logo-3d-size: 96px;
}
.empty-logo .lion-relief { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45)); }

@media (max-width: 760px) {
    .empty-logo .logo-3d {
        --logo-3d-size: 80px;
    }
}

/* орбита звёзд у любого логотипа = размер головы × коэффициент шапки */
.logo-3d { --star-orbit-radius: calc(var(--logo-3d-size) * var(--star-orbit-ratio, 0.372)); }

:root { --star-orbit-ratio: 0.372; }

@media (max-width: 760px) {
    :root { --star-orbit-ratio: 0.43; }
}

/* ===== Компактный футер ===== */
.site-footer { padding: 26px 0 14px; }

.footer-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    padding: 0 0 16px;
    padding-right: 0;
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
    flex: 0 0 auto;
}

.footer-tagline {
    margin: 0;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.5;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(118px, auto));
    gap: 7px 26px;
    font-size: 12.5px;
    line-height: 1.4;
    justify-content: end;
}

.footer-links a { color: var(--text-secondary); }

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 11.5px;
    color: var(--text-muted);
}

.footer-bottom p { margin: 0; }

.footer-requisites { padding-right: 12px; }

@media (max-width: 900px) {
    .footer-content { gap: 20px; }
    .footer-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .site-footer { padding: 20px 0 12px; }
    .footer-content { flex-direction: column; gap: 16px; padding-bottom: 14px; }
    .footer-links { width: 100%; justify-content: start; gap: 8px 16px; font-size: 12px; }
    .footer-brand-col { max-width: none; }
    .footer-bottom { padding-right: 74px; font-size: 11px; line-height: 1.5; }
}

/* ===== Футер всегда у нижней границы, даже на коротких страницах ===== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}
.site-main { flex: 1 0 auto; }
.site-footer { margin-top: auto; }

@media (max-width: 980px) {
    .site-main { padding-bottom: 0; }
}


/* ===== Компактная шапка: высота 94px вместо 188px ===== */
@media (min-width: 821px) {
    .header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 20px;
        height: 94px;
        min-height: 94px;
        padding: 7px 24px;
    }
    .logo-3d {
        --logo-3d-size: 80px;
        width: 80px;
        height: 80px;
    }
    .logo-text {
        font-size: 14.5px;
        letter-spacing: 2px;
    }
    .main-nav {
        margin-left: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
    }
}


/* индивидуальный НДС в таблице товаров */
.cell-vat .vat-form{display:flex;align-items:center;gap:4px;margin:0}
.cell-vat .vat-form input[type="number"]{width:58px;padding:4px 6px;font-size:12px;border-radius:6px;
    border:1px solid var(--border-strong);background:var(--bg-card);color:var(--text-primary)}
.cell-vat .vat-form .btn{padding:4px 7px;font-size:10px;min-height:0}


/* ===== Логотип Game Bay ===== */
.logo-gb-tile {
    display: block;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: 12px;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.35));
    transition: transform .25s ease, filter .25s ease;
}
.logo-gb-word {
    font-family: var(--font-brand);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .16em;
    color: #f2f2f7;
    white-space: nowrap;
    line-height: 1;
}
.logo-gb-word b { color: var(--gold); font-weight: 700; }
.footer-logo .logo-gb-tile { width: 46px; height: 46px; border-radius: 11px; }
.footer-logo .logo-gb-word { font-size: 16px; }
.logo:hover .logo-gb-tile { transform: translateY(-1px); filter: drop-shadow(0 6px 18px rgba(214,182,99,.28)); }
@media (max-width: 820px) {
    .logo-gb-tile { width: 40px; height: 40px; border-radius: 10px; }
    .logo-gb-word { font-size: 16px; letter-spacing: .12em; }
    .footer-logo .logo-gb-tile { width: 40px; height: 40px; }
    .footer-logo .logo-gb-word { font-size: 14px; }
}


/* ===== Логотип: иконка ведёт на главную, название открывает меню ===== */
.logo-wrap { gap: 10px; }
.logo-name-wrap {
    position: relative;
    display: flex;
    align-items: center;
    align-self: center;
    height: auto;
}
.logo-name {
    display: flex;
    align-items: center;
    gap: 0;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.logo-name:hover .logo-gb-word,
.logo-name.is-open .logo-gb-word { color: #ffffff; }
.logo-name:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
.logo-name .logo-caret { flex: 0 0 auto; }
.logo-name-wrap .logo-menu {
    top: calc(100% + 8px);
    left: 0;
    width: min(340px, calc(100vw - 32px));
}
@media (max-width: 820px) {
    .logo-wrap { gap: 8px; }
    .logo-name-wrap .logo-menu { width: min(310px, calc(100vw - 24px)); }
}


/* ===== Отдельная страница поддержки в кабинете ===== */
.support-page-wrap { max-width: 860px; padding-top: 26px; padding-bottom: 54px; }
.support-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 18px; }
.support-kicker { font-family: var(--font-brand); color: var(--gold); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 8px; }
.support-page-head .admin-title { margin: 0 0 8px; }
.support-page-head .admin-desc { margin: 0; max-width: 560px; }
.support-page .chat-panel {
    position: static;
    display: flex;
    width: 100%;
    max-height: none;
    margin: 0;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(0,0,0,.35);
}
.support-page .chat-panel-head { padding: 16px 20px; }
.support-page .chat-body { padding: 20px; }
.support-page .chat-messages { max-height: 48vh; }
.support-page .chat-email-form { max-width: 480px; }
.support-page .chat-send-form textarea { min-height: 82px; resize: vertical; }
.support-page .chat-send-form .btn { align-self: flex-start; }
.support-note { margin: 14px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.6; }
.support-note a { color: var(--gold-light); }
@media (max-width: 700px) {
    .support-page-wrap { padding-top: 16px; }
    .support-page-head { flex-direction: column; }
    .support-page .chat-body { padding: 14px; }
}


/* карточка поддержки: кнопка не выходит за поля карточки */
.account-support-card .account-actions { width: 100%; }
.account-support-card .account-actions .btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-left: 14px;
    padding-right: 14px;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
}


/* ===== Компактный заголовок каталога ===== */
.catalog-hero {
    padding: 16px 0 14px;
    text-align: left;
    background: linear-gradient(180deg, rgba(6,6,12,.76) 0%, rgba(6,6,12,.34) 62%, rgba(6,6,12,.08) 100%);
}
.catalog-crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
    font-family: var(--font-brand);
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #d2c9b6;
    text-shadow: 0 1px 8px rgba(0,0,0,.9);
}
.catalog-crumbs a { color: #bdb5a4; text-decoration: none; }
.catalog-crumbs a:hover { color: var(--gold-light); }
.catalog-crumbs .is-current { color: var(--gold); }
.catalog-hero .hero-title {
    margin: 0;
    font-size: clamp(22px, 2.6vw, 28px);
    letter-spacing: 2.5px;
    text-shadow: 0 0 24px rgba(201,168,76,.24);
}
.catalog-hero .hero-subtitle {
    margin: 7px 0 0;
    font-size: 13px;
    letter-spacing: .2px;
    line-height: 1.5;
}
@media (max-width: 600px) {
    .catalog-hero { padding: 14px 0 12px; }
    .catalog-hero .hero-title { font-size: 22px; letter-spacing: 2px; }
    .catalog-crumbs { font-size: 9.5px; margin-bottom: 6px; }
}


/* чекбоксы подтверждения: не растягиваются стилями полей ввода */
.email-confirm input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 0;
    flex: 0 0 16px;
    margin: 2px 0 0;
    padding: 0;
    border-radius: 4px;
    accent-color: var(--gold);
    cursor: pointer;
}


/* ===== Адаптивная сетка карточек ===== */
/* Планшеты и телефоны: две карточки в ряд вместо одной огромной */
@media (max-width: 768px) {
    .products-grid,
    .products-grid.products-grid-block {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .product-card-body { padding: 10px 11px; gap: 5px; }
    .product-card-name { font-size: 13px; }
    .price-current { font-size: 16px; }
    .product-card-actions { gap: 6px; }
    .card-details { flex: 1 1 auto; }
    .card-buy-form { flex: 0 0 34px; }
    .card-buy { padding: 0 4px; }
    .product-card .btn-sm { padding: 9px 8px; font-size: 10px; letter-spacing: .5px; }
    .card-buy-icon { width: 18px; height: 18px; }
}

/* Очень узкие экраны: одна карточка */
@media (max-width: 360px) {
    .products-grid,
    .products-grid.products-grid-block { grid-template-columns: 1fr; }
}

/* Большие мониторы: пять карточек в ряд, чтобы блок расширялся */
/* до 1600 в домашних блоках видно 4 товара, пятый скрыт */
@media (max-width: 1599px) {
    .products-grid.products-grid-block > .product-card:nth-child(n+5) { display: none; }
}

/* на широком экране показываем пятый товар; колонки подстраиваются под их число */
@media (min-width: 1600px) {
    .products-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .products-grid.products-grid-block {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
    .products-grid.products-grid-block > .product-card { display: flex; }
}


/* пустая корзина: только фирменный знак */
.empty-logo { align-items: center; }
.empty-logo .logo-gb-tile { width: 96px; height: 96px; border-radius: 24px; }
.empty-logo .logo-gb-word { font-size: 26px; letter-spacing: .16em; }
@media (max-width: 760px) {
    .empty-logo .logo-gb-tile { width: 72px; height: 72px; border-radius: 18px; }
    .empty-logo .logo-gb-word { font-size: 20px; }
}


/* кнопка в пустой корзине — с воздухом после подсказки */
.empty-state .empty-cart-btn { margin-top: 28px; }


/* ===== Компактный футер: финальный размер ===== */
.site-footer { padding: 14px 0 10px; }
.footer-content { gap: 18px; padding-bottom: 10px; }
.footer-brand-col { gap: 4px; }
.footer-logo .logo-gb-tile { width: 38px; height: 38px; border-radius: 9px; }
.footer-logo .logo-gb-word { font-size: 13px; letter-spacing: .12em; }
.footer-tagline { font-size: 11px; line-height: 1.4; }
.footer-links { gap: 4px 20px; font-size: 11.5px; line-height: 1.35; }
.footer-bottom { padding-top: 8px; font-size: 10.5px; line-height: 1.4; }
.footer-requisites { margin-bottom: 4px; font-size: 11px; }

@media (max-width: 760px) {
    .site-footer { padding: 12px 0 8px; }
    .footer-content { gap: 10px; padding-bottom: 8px; }
    .footer-logo .logo-gb-tile { width: 32px; height: 32px; border-radius: 8px; }
    .footer-logo .logo-gb-word { font-size: 12px; }
    .footer-tagline { font-size: 10.5px; }
    .footer-links { gap: 4px 14px; font-size: 11px; }
    .footer-bottom { padding-top: 6px; padding-right: 64px; font-size: 10px; line-height: 1.35; }
}


/* мобильное нажатие «В корзину»: убираем системный квадрат/вспышку */
.card-buy {
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    touch-action: manipulation;
    outline: none;
}
.card-buy:focus { outline: none; }
.card-buy:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 2px;
}
.card-buy::-moz-focus-inner { border: 0; }


/* локальный предпросмотр писем */
.email-preview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.email-preview-card { background: #101018; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.email-preview-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px 16px; }
.email-preview-slug { color: var(--gold); font: 10px var(--font-brand), sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.email-preview-head h2 { margin: 4px 0 0; font-size: 15px; color: var(--text-primary); }
.email-preview-card iframe { display: block; width: 100%; height: 720px; border: 0; background: #0b0b12; }
@media (max-width: 900px) {
    .email-preview-grid { grid-template-columns: 1fr; }
    .email-preview-card iframe { height: 650px; }
}


/* восстановление и смена пароля */
.alert-success {
    background: rgba(201, 168, 76, 0.12);
    border-color: rgba(201, 168, 76, 0.45);
    color: var(--gold-light);
}
.auth-forgot { text-align: right; margin: -4px 0 16px; font-size: 13px; }
.auth-forgot a { color: var(--gold); text-decoration: none; }
.auth-forgot a:hover { text-decoration: underline; }
.account-password-wrap { max-width: 640px; margin: 0 auto; }
.account-password-note {
    margin: 18px 0 0;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.65;
}
.account-password-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }


/* ===== Эргономика админ-панели ===== */
.admin-area .site-main { padding-top: 0; }
.admin-area .site-footer { display: none; }
.admin-area .nav-search,
.admin-area .nav-cart { display: none; }
.admin-area .bg-video-layer { opacity: .35; }
.admin-area .cookie-banner { display: none !important; }

.admin-shell {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 10px 24px 0;
}
.admin-content { flex: 1 1 auto; min-width: 0; }

.admin-sidebar {
    position: sticky;
    top: 108px;
    z-index: 30;
    flex: 0 0 208px;
    width: 208px;
    max-height: calc(100vh - 124px);
    overflow-y: auto;
    padding: 12px;
    background: linear-gradient(180deg, rgba(18, 18, 29, .97), rgba(9, 9, 15, .98));
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .28);
    scrollbar-width: thin;
}
.admin-sidebar-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 9px 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border);
}
.admin-sidebar-kicker {
    color: var(--gold);
    font-family: var(--font-brand);
    font-size: 9px;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.admin-sidebar-head strong { color: var(--text-primary); font-size: 14px; letter-spacing: .02em; }
.admin-nav { display: flex; flex-direction: column; gap: 2px; }
.admin-nav-label {
    margin: 12px 9px 5px;
    color: var(--text-muted);
    font-size: 9.5px;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.admin-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.25;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}
.admin-nav-link:hover {
    background: rgba(201, 168, 76, .07);
    border-color: rgba(201, 168, 76, .22);
    color: var(--text-primary);
}
.admin-nav-link.is-active {
    background: linear-gradient(90deg, rgba(201, 168, 76, .16), rgba(201, 168, 76, .04));
    border-color: rgba(201, 168, 76, .34);
    color: var(--gold-light);
}
.admin-nav-link.is-active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 2px;
    background: var(--gold);
}
.admin-nav-icon { display: inline-flex; flex: 0 0 18px; width: 18px; height: 18px; color: currentColor; opacity: .9; }
.admin-nav-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.admin-nav-badge, .admin-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--gold);
    color: #14141c;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}
.admin-nav-badge { margin-left: auto; }
.admin-count { margin-left: 5px; background: rgba(201, 168, 76, .2); color: var(--gold-light); }
.admin-sidebar-foot {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.admin-sidebar-link { padding: 5px 9px; color: var(--text-muted); font-size: 11.5px; text-decoration: none; }
.admin-sidebar-link:hover { color: var(--gold); }

/* Рабочая зона: компактные заголовки, липкая панель действий */
.admin-content .admin-page,
.admin-content .analytic-page { margin-top: 12px; padding: 20px 22px 30px; }
.admin-area .admin-head {
    position: sticky;
    top: 95px;
    z-index: 20;
    margin: 0 0 18px;
    padding: 10px 0 0;
    background: linear-gradient(180deg, rgba(13, 13, 21, .97) 70%, rgba(13, 13, 21, 0));
    backdrop-filter: blur(7px);
}
.admin-area .admin-head .admin-title {
    font-size: clamp(21px, 2.2vw, 28px);
    letter-spacing: 2px;
    padding-bottom: 10px;
}
.admin-area .admin-head-actions { align-items: center; }
.admin-area .admin-title { color: var(--text-primary); }

/* CCU — свернутый инструмент, чтобы не раздувать дашборд */
.ccu-row.admin-details { padding: 0; overflow: hidden; }
.admin-details-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.admin-details-summary::-webkit-details-marker { display: none; }
.admin-details-title {
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}
.admin-details-summary .ccu-status { flex: 1; }
.admin-details-caret { color: var(--gold); font-size: 17px; line-height: 1; transition: transform .18s ease; }
.admin-details[open] .admin-details-caret { transform: rotate(180deg); }
.admin-details[open] { padding-bottom: 16px; }
.admin-details[open] > :not(summary) { margin-left: 16px; margin-right: 16px; }
.admin-details[open] > .ccu-hint { margin-top: 10px; }

@media (max-width: 1200px) {
    .admin-area .stats-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-area .finance-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
    .admin-shell { display: block; padding: 0 12px; }
    .admin-sidebar {
        position: static;
        width: auto;
        max-height: none;
        margin-top: 10px;
        padding: 8px;
        overflow: visible;
    }
    .admin-sidebar-head { display: none; }
    .admin-nav { flex-direction: row; gap: 4px; overflow-x: auto; padding-bottom: 2px; }
    .admin-nav-label { display: none; }
    .admin-nav-link { flex: 0 0 auto; min-height: 34px; padding: 7px 10px; white-space: nowrap; }
    .admin-nav-link.is-active::before { display: none; }
    .admin-sidebar-foot { display: none; }
    .admin-content .admin-page,
    .admin-content .analytic-page { margin-top: 8px; padding: 16px 16px 26px; }
    .admin-area .admin-head { position: relative; top: auto; margin-bottom: 14px; padding-top: 0; }
}
@media (max-width: 820px) {
    .admin-area .nav-account-label { display: none; }
    .admin-area .header-inner { min-height: 61px; }
}
@media (max-width: 700px) {
    .admin-area .stats-tiles,
    .admin-area .finance-grid { grid-template-columns: 1fr; }
    .admin-area .admin-head { flex-direction: column; align-items: flex-start; gap: 10px; }
    .admin-area .admin-head-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        overflow: visible;
        gap: 8px;
    }
    .admin-area .admin-head-actions .btn { width: 100%; justify-content: center; }
    .admin-details-summary { align-items: flex-start; flex-wrap: wrap; }
    .admin-details-summary .ccu-status { flex: 1 1 100%; order: 3; }
}
@media (prefers-reduced-motion: reduce) {
    .admin-nav-link, .admin-details-caret { transition: none; }
}


@media (max-width: 1100px) {
    .admin-nav { scroll-snap-type: x proximity; }
    .admin-nav-link { scroll-snap-align: start; }
}


.admin-nav-link:focus-visible,
.admin-sidebar-link:focus-visible,
.admin-details-summary:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}


/* в админке щит в шапке дублирует боковое меню */
.admin-area .nav-icon-btn[aria-label="Админ-панель"] { display: none; }


/* таблица товаров: колонка действий всегда под рукой */
.data-table-products th:last-child,
.data-table-products td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #101018;
    box-shadow: -10px 0 16px rgba(7, 7, 12, .55);
}
.data-table-products thead th:last-child { z-index: 3; background: #0b0b12; }
.data-table-products tbody tr:hover td:last-child { background: #13131d; }


/* на узком рабочем месте убираем второстепенный источник, чтобы не прятать статус */
@media (max-width: 1500px) {
    .data-table-products th:nth-child(5),
    .data-table-products td:nth-child(5) { display: none; }
}


/* модерация отзывов */
.reviews-admin-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 14px 0;
    color: var(--text-muted);
    font-size: 12.5px;
}
.reviews-admin-summary strong { color: var(--gold-light); }
.reviews-admin-table .reviews-admin-product {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
}
.reviews-admin-table .reviews-admin-product:hover { color: var(--gold); }
.reviews-admin-author { color: var(--text-primary); }
.reviews-admin-rating { margin-left: 4px; color: var(--text-muted); font-size: 11.5px; white-space: nowrap; }
.reviews-admin-table td { vertical-align: top; }
.reviews-admin-text {
    max-width: 390px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.55;
    white-space: normal;
    overflow-wrap: anywhere;
}
.reviews-admin-delete {
    color: #e59393;
    border-color: rgba(229, 147, 147, .42);
    background: rgba(229, 147, 147, .06);
    white-space: nowrap;
}
.reviews-admin-delete:hover {
    color: #ffd1d1;
    border-color: rgba(229, 147, 147, .7);
    background: rgba(229, 147, 147, .14);
}
@media (max-width: 900px) {
    .reviews-admin-text { max-width: 260px; }
}


/* пустые состояния: фирменный знак вместо ромба */
.empty-icon.empty-icon-logo {
    width: 72px;
    height: 72px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0;
    animation: none;
}
.empty-logo-mark {
    display: block;
    width: 68px;
    height: 68px;
    border-radius: 16px;
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .42));
}


/* «Купить сейчас» ведёт в корзину, без карточных полей */
.product-actions .product-buy-now { order: 0; width: 100%; display: block; }
.product-actions .product-buy-now .btn { width: 100%; }
