/* Скрываем полосу прокрутки браузера */
html {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}
html::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Мгновенная смена темы без анимаций */
html.no-transitions,
html.no-transitions *,
html.no-transitions *::before,
html.no-transitions *::after {
    transition: none !important;
}

.che168-card--sold .che168-badges {
    opacity: 1 !important;
}

/* При наведении на блок с плашками карточка становится полностью видимой */
.che168-card--sold .che168-badges:hover ~ .che168-card {
    opacity: 1;
}

/* Для браузеров с поддержкой :has */
.che168-card--sold:has(.che168-badges:hover) {
    opacity: 1;
}

/* Прозрачность для блоков info и meta в проданных карточках */
.che168-card--sold .che168-info,
.che168-card--sold .che168-meta {
    opacity: 0.5;
}

/* Только блок картинок становится непрозрачным при наведении */
.che168-card--sold .che168-thumb {
    opacity: 0.5;
    transition: opacity 0.2s;
}
.che168-card--sold .che168-thumb:hover,
.che168-card--sold:hover .che168-thumb {
    opacity: 1;
}
/* Переменные для светлой темы */
:root {
    --bg-primary: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --text-primary: #000000;
    --text-secondary: #333333;
    --border-color: #FFFFFF;
    --telegram-bg: #31343E;
    --telegram-text: #FFFFFF;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Фон для светлой темы (орбы + градиент) */
.ambient-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    background: 
        linear-gradient(
            135deg,
            #B8C5D4 0%,
            #B8C5D4 10%,
            #E8E8E8 28%,
            #E8E8E8 82%,
            #B8C5D4 95%,
            #B8C5D4 100%
        );
}

/* Фон страницы */
html {
    background-color: #F8FAFC;
}

[data-theme="dark"] html {
    background-color: transparent;
}

/* Орбы (пастельные шары с blur) */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: floatOrb 15s infinite alternate ease-in-out;
}

.orb-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: #bfdbfe; /* Голубой */
}

.orb-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: #fbcfe8; /* Розовый */
}

.orb-3 {
    top: 40%;
    left: 40%;
    width: 400px;
    height: 400px;
    background: #fde68a; /* Желтый */
    opacity: 0.3;
}

@keyframes floatOrb {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 50px); }
}

/* Орбы для темной темы */
[data-theme="dark"] .ambient-light {
    display: block;
    background: 
        linear-gradient(
            135deg,
            #0f172a 0%,
            #0f172a 10%,
            #1e293b 28%,
            #1e293b 82%,
            #0f172a 95%,
            #0f172a 100%
        );
}

[data-theme="dark"] .orb {
    display: block;
}

[data-theme="dark"] .orb-1 {
    background: #3b82f6; /* Синий */
    opacity: 0.15;
}

[data-theme="dark"] .orb-2 {
    background: #a855f7; /* Пурпурный */
    opacity: 0.15;
}

[data-theme="dark"] .orb-3 {
    background: #f59e0b; /* Оранжевый */
    opacity: 0.1;
}

/* Переменные для темной темы - работает и на html и на body */
:root[data-theme="dark"],
[data-theme="dark"] {
    --bg-primary: #1A2238;
    --bg-secondary: #2D2D2D;
    --text-primary: #FFFFFF;
    --text-secondary: #E0E0E0;
    --border-color: #404040;
    --telegram-bg: #1F2936;
    --telegram-text: #FFFFFF;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Fira Code', monospace;
    background-color: transparent;
    color: var(--text-primary);
}

[data-theme="dark"] body {
    background-color: transparent;
}


/* Переключатель темы */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.theme-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.theme-btn:hover {
    transform: scale(1.1);
}

.theme-btn .sun-icon {
    position: absolute;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.theme-btn .moon-icon {
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
}

[data-theme="dark"] .theme-btn .sun-icon {
    opacity: 0;
}

[data-theme="dark"] .theme-btn .moon-icon {
    opacity: 1;
}

/* Контейнер */
.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Блок с телеграмом */
.telegram-block {
    background-color: #31343E;
    height: 30px;
    margin-top: 0;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

[data-theme="light"] .telegram-block {
    background-color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .telegram-block .block,
[data-theme="light"] .telegram-block .car-brand,
[data-theme="light"] .telegram-block .car-date {
    color: #000000;
    font-size: 12px;
}

[data-theme="light"] .rates-title {
    color: #31343E;
}

.telegram-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 0;
    align-items: stretch;
    padding: 0;
}

/* Левый блок в telegram-block */
.telegram-left {
    width: 136px;
    background-color: transparent;
    padding: 0 24px 0 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    height: 100%;
    border: none;
}

.rates-title {
    color: #FFFFFF;
    font-weight: bold;
    font-size: 14px;
}

.rate-item {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 400;
    color: #000000;
    text-transform: uppercase;
}

[data-theme="dark"] .rate-item {
    color: #F5F5F5;
}

.rate-label {
    margin-right: 4px;
}

.rate-value {
    margin-right: 4px;
}

.rate-arrow {
    font-size: 15px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

.rate-down {
    color: #E53935;
}

.rate-up {
    color: #74AF52;
}

/* Правый блок в telegram-block */
.telegram-right {
    display: flex;
    flex: 1;
    overflow: hidden;
    padding: 0;
    align-items: stretch;
    height: 100%;
}

.carousel-track {
    display: flex;
    animation: scroll 180s linear infinite;
    height: 100%;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.carousel-track:hover {
    animation-play-state: paused;
}

.block {
    width: auto;
    color: #FFFFFF;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0 24px;
    border: none;
    flex-shrink: 0;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
}

.block-time {
    display: none;
}

.block-content {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 5px;
}

.tg-line-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Белая иконка телеграма в темной теме */
[data-theme="dark"] .tg-line-icon {
    filter: brightness(0) invert(1);
}

.car-brand {
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
}

.car-date {
    font-size: 12px;
    font-weight: 400;
}

.car-price {
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(14deg, #E07D14 0%, #FEB801 60%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.block:last-child {
    border-right: none;
}

.telegram-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.telegram-link {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s ease;
}

.telegram-link:hover {
    opacity: 0.8;
}

/* Основной контент */
.main-content {
    display: flex;
    justify-content: center;
    width: 100%;
    background-color: transparent;
}

[data-theme="dark"] .main-content {
    background-color: transparent;
}

.content-wrapper {
    width: 1280px;
    max-width: 100%;
    padding: 0 24px 0 24px;
    display: flex;
    flex-direction: column;
}

/* Header меню */
.topbar {
    display: flex;
    align-items: center;
    padding: 50px 0;
    width: 100%;
}

.topbar-left {
    display: flex;
    align-items: center;
    width: 60px;
    flex-shrink: 0;
}

.topbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 40px;
}

.topbar-right {
    width: 60px;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    position: relative;
}

.logo::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(190, 203, 224, 0.3) 0%, rgba(190, 203, 224, 0.15) 35%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    z-index: 0;
}

[data-theme="dark"] .logo::before {
    display: none;
}

.logo img {
    height: 67px;
    width: auto;
    position: relative;
    z-index: 1;
}

.logo .logo-dark {
    display: block;
}

.logo .logo-light {
    display: none;
}

[data-theme="dark"] .logo .logo-light {
    display: none;
}

[data-theme="dark"] .logo .logo-dark {
    display: block;
    filter: none;
}

.nav {
    display: flex;
    gap: 40px;
}

/* Одинаковая ширина для симметрии логотипа */
.nav.nav-left,
.nav.nav-right {
    flex: 1;
    min-width: 0;
}

.nav.nav-left {
    justify-content: flex-end;
}

.nav.nav-right {
    justify-content: flex-start;
}

.nav-btn {
    position: relative;
    height: 45px;
    padding: 0 24px;
    background: transparent;
    
    /* Шрифт */
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    
    /* Цвет текста неактивной кнопки */
    color: #555555;
    
    /* Граница прозрачная */
    border: 1.5px solid transparent;
    border-radius: 8px;
    
    cursor: pointer;
    outline: none;
    
    /* Плавная анимация */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Состояние: НАВЕДЕНИЕ (HOVER) */
.nav-btn:hover:not(.active) {
    color: #000000;
    border-color: rgba(0, 0, 0, 0.6);
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1), inset 0 0 10px rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
}

/* Состояние: АКТИВНАЯ (ACTIVE) */
.nav-btn.active {
    color: #000000;
    border-color: #000000;
    background-color: rgba(0, 0, 0, 0.03);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
}

/* Эффект клика */
.nav-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

/* Акцентная кнопка (красная) */
.nav-btn.accent {
    background-color: #c9252b;
    color: white;
    border-color: #c9252b;
}

.nav-btn.accent:hover {
    background-color: #a81e23;
    color: white;
    border-color: #a81e23;
    box-shadow: 0 0 15px rgba(201, 37, 43, 0.4);
    text-shadow: none;
    transform: translateY(-2px);
}

.nav-btn.accent:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 0 5px rgba(201, 37, 43, 0.3);
}

/* Темная тема */
[data-theme="dark"] .nav-btn {
    color: #aaaaaa;
}

[data-theme="dark"] .nav-btn:hover:not(.active) {
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1), inset 0 0 10px rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .nav-btn.active {
    color: #FFFFFF;
    border-color: #FFFFFF;
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .nav-btn:active {
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

/* Disabled nav buttons */
.nav-btn--disabled,
.nav-btn--disabled:hover,
.nav-btn--disabled:active {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

/* Theme Switch */
.theme-switch {
    display: inline-block;
    position: relative;
    width: 36px;
    height: 19px;
}

.theme-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.theme-switch .track {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffefb2 0%, #e0d4a8 10%, #040509 100%);
    box-shadow: inset 50px 0 10px rgb(0 0 0 / 30%), inset 1px 0 10px rgb(0 0 0);
    cursor: pointer;
}

.theme-switch .thumb {
    position: absolute;
    top: 50%;
    left: 2px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    transform: translate(0, -50%);
    transition: transform .35s ease;
}

.theme-switch input:checked + .track .thumb {
    transform: translate(17px, -50%);
}

.theme-switch .icon-sun,
.theme-switch .icon-moon {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    transition: opacity .3s ease, transform .3s ease;
}

.theme-switch .icon-sun {
    background: #feb801;
    box-shadow: 0 0 1.5px rgba(255, 248, 180, 0.3);
}

.theme-switch .icon-moon {
    background: #e6e7eb;
    box-shadow: 0 0 4px rgba(0,0,0,0.35);
    opacity: 0;
    transform: scale(.7);
}

.theme-switch input:checked + .track .thumb .icon-sun {
    opacity: 0;
    transform: scale(.7);
}

.theme-switch input:checked + .track .thumb .icon-moon {
    opacity: 1;
    transform: scale(1);
}

.theme-switch .icon-moon .crater {
    position: absolute;
    border-radius: 50%;
    background: #c7c8ce;
    opacity: .95;
}

.theme-switch .icon-moon .c1 { width: 4px; height: 4px; top: 3px; left: 3px; }
.theme-switch .icon-moon .c2 { width: 3px; height: 3px; bottom: 3px; right: 3px; }
.theme-switch .icon-moon .c3 { width: 2px; height: 2px; top: 2px; right: 4px; }
.theme-switch .icon-moon .c4 { width: 2px; height: 2px; bottom: 2px; left: 5px; }
.theme-switch .icon-moon .c5 { width: 2px; height: 2px; top: 7px; left: 7px; }
.theme-switch .icon-moon .c6 { width: 1px; height: 1px; top: 5px; right: 5px; }
.theme-switch .icon-moon .c7 { width: 2px; height: 2px; bottom: 5px; left: 2px; }

/* Тень track для темной темы */
[data-theme="dark"] .theme-switch .track {
    box-shadow:
        inset 2px 0 6px rgba(0,0,0,0.5),
        inset -2px 0 6px rgba(255,255,255,0.3);
}

/* Блоки контента */
.content-blocks {
    display: flex;
    gap: 18px;
}

.content-left {
    flex: 1;
    background-color: transparent;
    border-radius: 20px;
}

[data-theme="dark"] .content-left {
    background-color: transparent;
}

.content-right {
    width: 250px;
    flex-shrink: 0;
    background: transparent;
    border-radius: 20px;
    height: fit-content;
    position: relative;
}

[data-theme="dark"] .content-right {
    background: transparent;
}

/* Filter Box */
.filter_box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .filter_box {
    background: rgba(57, 61, 92, 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

    .filter-under-block {
        width: 100%;
        margin-top: 18px;
        padding: 0;
        background: transparent;
        border-radius: 20px;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

/* На странице "В наличии" нет фильтров - убираем верхний отступ */
.content-left > .filter-under-block:first-child {
    margin-top: 0;
}

/* Mobile-only duplicate container should be hidden on desktop */
#che168-cards-mobile {
    display: none;
}

/* Loading state for AJAX card loading */
.loading-cards {
    position: relative;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.loading-cards::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    z-index: 100;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

[data-theme="dark"] .filter-under-block {
    background: transparent;
}

.che168-card {
    display: flex;
    padding: 15px 0 15px 15px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 0.5px solid rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .che168-card {
    background: rgb(31 35 54 / 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.che168-card-wrap {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Кнопка удаления для администратора */
.admin-hide-btn {
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #B22234;
    color: #FFFFFF;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.2s ease;
    z-index: 10;
}

.admin-hide-btn:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 2px 8px rgba(178, 34, 52, 0.4);
}

.admin-hide-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.admin-hide-btn.loading {
    opacity: 0.5;
    pointer-events: none;
}

.che168-good-choice {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 10px;
    background: #EFDDAF;
    color: #B48609;
    border: 1px solid #E6C263;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    z-index: 10;
}

[data-theme="dark"] .che168-good-choice {
    background: #355E69;
    border-color: #4D9888;
    color: #71F0B3;
}

/* --- Badges & title/spec consolidated (cleanup of prior conflicting rules) --- */
/* Container for badges (desktop) */
.che168-badges {
    position: absolute;
    top: 16px;
    right: 60px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    height: auto;
    min-height: 0;
    z-index: 10;
    padding: 0;
}

/* Base badge appearance */
.che168-sold-badge,
.che168-badge--new,
.che168-badge--used,
.che168-badge--sold {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 1;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    font-weight: 500;
    border-radius: 40px;
    padding: 0 8px;
    height: auto;
    white-space: nowrap;
}

/* Variant colors */
.che168-badge--new { background: #FFB900; color: #000; font-weight: 700; }
.che168-badge--used { background: #000; color: #FFF; }
.che168-badge--sold { background: #B22234; color: #FFF; }

/* Title/spec text sizing */
.che168-title-text,
.che168-spec-value {
    height: auto !important;
    min-height: 0 !important;
    line-height: 1 !important;
    display: inline !important;
    padding: 0 !important;
}

/* End of consolidated badge/title rules */

/* Убираем прозрачность для проданных карточек в темной теме */
[data-theme="dark"] .che168-card--sold .che168-info,
[data-theme="dark"] .che168-card--sold .che168-meta,
[data-theme="dark"] .che168-card--sold .che168-thumb {
    opacity: 0.5;
}

[data-theme="dark"] .che168-card--sold .che168-thumb:hover,
[data-theme="dark"] .che168-card--sold:hover .che168-thumb {
    opacity: 1;
}

[data-theme="dark"] .che168-card {
    background: rgba(57, 61, 92, 0.4);
    color: #FFFFFF;
}

[data-theme="dark"] .che168-card--sold {
    background: rgba(49, 52, 62, 0.5);
}

.che168-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 12px 0 12px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
}

.che168-pagination-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 2px 12px;
    height: 39px;
}

/* --- Final clean overrides: authoritative badge colors (cleanup) --- */
/* Keep this block at the end of the badge area to ensure precedence over earlier overrides. */
.che168-badge--new {
    background: #FFB900 !important;
    color: #000000 !important;
    font-weight: 700 !important;
}
.che168-badge--new, .che168-sold-badge.che168-badge--new { font-weight: 400 !important; }
.che168-badge--used {
    background: #000000 !important;
    color: #FFFFFF !important;
}
.che168-badge--sold,
.che168-sold-badge,
.che168-sold-badge.che168-badge--sold {
    background: #B22234 !important;
    color: #FFFFFF !important;
}

/* Ensure combined sold/used wrapper classes are not bold */
.che168-sold-badge.che168-badge--sold,
.che168-sold-badge.che168-badge--used,
.che168-badge--sold.che168-sold-badge,
.che168-badge--used.che168-sold-badge {
    font-weight: 400 !important;
}

/* Explicitly set text color for combined badge classes to avoid ambiguity */
.che168-sold-badge.che168-badge--new { color: #000000 !important; }
.che168-sold-badge.che168-badge--sold { color: #FFFFFF !important; }

/* Combined selector backgrounds (desktop) */
.che168-sold-badge.che168-badge--new {
    background: #FFB900 !important;
    color: #000000 !important;
}
.che168-sold-badge.che168-badge--used {
    background: #000000 !important;
    color: #FFFFFF !important;
}

/* Desktop (PC) badge colors: mirror mobile palette so desktop badges match mobile */
.che168-card .che168-badge--new,
.che168-card-wrap .che168-badge--new,
.che168-badges .che168-badge--new {
    background: #FFB900 !important;
    color: #000000 !important;
}
.che168-card .che168-badge--used,
.che168-card-wrap .che168-badge--used,
.che168-badges .che168-badge--used {
    background: #000000 !important;
    color: #FFFFFF !important;
}
.che168-card .che168-badge--sold,
.che168-card-wrap .che168-badge--sold,
.che168-badges .che168-badge--sold,
.che168-card .che168-sold-badge,
.che168-card-wrap .che168-sold-badge {
    background: #B22234 !important;
    color: #FFFFFF !important;
}

/* Ensure combined desktop sold/used wrapper classes are not bold */
.che168-card .che168-sold-badge.che168-badge--sold,
.che168-card .che168-sold-badge.che168-badge--used,
.che168-card .che168-badge--sold.che168-sold-badge,
.che168-card .che168-badge--used.che168-sold-badge {
    font-weight: 400 !important;
}


[data-theme="dark"] .che168-pagination-numbers {
    background: #78787880;
}

/* Highest-priority fix: ensure combined 'new' badge always uses black text on #FFB900 background */
.che168-badges > .che168-sold-badge.che168-badge--new,
.che168-card .che168-badges > .che168-sold-badge.che168-badge--new,
body[data-theme] .che168-badges > .che168-sold-badge.che168-badge--new {
    background: #FFB900 !important;
    color: #000000 !important;
    font-weight: 400 !important;
}

/* Highest-priority fix: ensure combined 'used' badge always has black background and white text */
.che168-badges > .che168-sold-badge.che168-badge--used,
.che168-card .che168-badges > .che168-sold-badge.che168-badge--used,
body[data-theme] .che168-badges > .che168-sold-badge.che168-badge--used {
    background: #000000 !important;
    color: #FFFFFF !important;
    font-weight: 400 !important;
}

/* Hide mobile-only header on desktop; mobile.css will re-enable it for small screens */
@media (min-width: 769px) {
    .che168-card-header-mobile { display: none !important; }
}

.che168-page-link {
    border: 1.5px solid transparent;
    padding: 3px 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    box-sizing: border-box;
}

.che168-page-link.che168-page-prev,
.che168-page-link.che168-page-next {
    background: rgba(255, 255, 255, 0.5);
    min-width: 37px;
    height: 39px;
    border-radius: 10px;
}

[data-theme="dark"] .che168-page-link.che168-page-prev,
[data-theme="dark"] .che168-page-link.che168-page-next {
    background: #78787880;
}

[data-theme="dark"] .che168-page-link img {
    filter: brightness(0) invert(1);
}

.che168-page-link:hover:not(.che168-page-prev):not(.che168-page-next) {
    border-color: #000000;
}

[data-theme="dark"] .che168-page-link:hover:not(.che168-page-prev):not(.che168-page-next) {
    border-color: #FFB900;
}

.che168-page-link.is-active {
    border-color: #000000;
    color: #000;
    font-weight: 500;
}

[data-theme="dark"] .che168-page-link.is-active {
    border-color: #FFB900;
    color: #FFFFFF;
    font-weight: 500;
}

.che168-page-link.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.che168-page-link img {
    width: 8px;
    height: 13px;
}

.che168-page-next img {
    transform: scaleX(-1);
}

.che168-page-ellipsis {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 0 4px;
}

/* ========== THUMB SLIDER ========== */
.che168-thumb {
    width: 238px;
    height: 178px;
    margin-left: 40px;
    margin-right: 35px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #1a1d2d;
    box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    font-size: 0;
    line-height: 0;
    user-select: none;
    -webkit-user-select: none;
}

[data-theme="dark"] .che168-thumb {
    background: rgba(255, 255, 255, 0.06);
}

.che168-thumb-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
    z-index: 1;
}

.che168-thumb-empty.is-hidden {
    display: none;
}

.che168-thumb-skeleton {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    z-index: 2;
    background: linear-gradient(
        90deg,
        #e8eaed 0%,
        #f5f6f7 25%,
        #e8eaed 50%,
        #f5f6f7 75%,
        #e8eaed 100%
    );
    background-size: 400% 100%;
    animation: skeleton-shimmer-thumb 1.5s ease-in-out infinite;
}

[data-theme="dark"] .che168-thumb-skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.06) 0%,
        rgba(255,255,255,0.12) 25%,
        rgba(255,255,255,0.06) 50%,
        rgba(255,255,255,0.12) 75%,
        rgba(255,255,255,0.06) 100%
    );
    background-size: 400% 100%;
}

@keyframes skeleton-shimmer-thumb {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

.che168-thumb-skeleton.hidden {
    display: none;
}

/* Slides wrapper */
.che168-slides-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* Individual slide */
.che168-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
    will-change: transform, opacity;
    transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
}

.che168-slide.is-active {
    z-index: 20;
    transform: translateX(0) scale(1);
    opacity: 1;
    transition-duration: 250ms;
}

.che168-slide.is-leaving {
    z-index: 10;
    transform: translateX(0) scale(0.9);
    opacity: 0.6;
    filter: brightness(0.5);
    transition-duration: 250ms;
}

.che168-slide.is-waiting {
    z-index: 0;
    transform: scale(0.9);
    opacity: 0;
    transition-duration: 0ms;
    transition-delay: 75ms;
}

.che168-slide.is-waiting.is-right {
    transform: translateX(100%) scale(0.9);
}

.che168-slide.is-waiting.is-left {
    transform: translateX(-100%) scale(0.9);
}

/* Slide image */
.che168-slide-img {
    position: absolute;
    top: -1px;
    left: -1px;
    width: calc(100% + 2px);
    height: calc(100% + 2px);
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 150ms ease;
}

/* Show image only when loaded */
.che168-slide-img[data-loaded="1"] {
    opacity: 1;
}

/* Hide vignettes until first image is loaded */
.che168-thumb:not(.is-loaded) .che168-vignette-top,
.che168-thumb:not(.is-loaded) .che168-vignette-bottom {
    opacity: 0;
}

/* Hide nav arrows until loaded */
.che168-thumb:not(.is-loaded) .che168-nav-arrows {
    display: none;
}

/* Hide dots until loaded */
.che168-thumb:not(.is-loaded) .che168-dots {
    display: none;
}

/* Vignettes (gradients) */
.che168-vignette-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
    pointer-events: none;
    z-index: 20;
    transition: opacity 300ms;
}

.che168-vignette-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    pointer-events: none;
    z-index: 20;
    transition: opacity 300ms;
}

.che168-thumb.is-cta .che168-vignette-top,
.che168-thumb.is-cta .che168-vignette-bottom {
    opacity: 0;
}

/* Navigation arrows */
.che168-nav-arrows {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    z-index: 30;
    pointer-events: none;
    opacity: 0;
    transition: opacity 300ms;
}

.che168-thumb:hover .che168-nav-arrows {
    opacity: 1;
}

.che168-nav-btn {
    pointer-events: auto;
    padding: 6px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(4px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 150ms;
}

.che168-nav-btn:hover {
    background: #fff;
    color: #000;
    transform: scale(1.1);
}

.che168-nav-btn:active {
    transform: scale(0.95);
}

.che168-nav-btn svg {
    width: 16px;
    height: 16px;
}

/* Dots container */
.che168-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 30;
}

.che168-dot {
    height: 6px;
    border-radius: 9999px;
    transition: all 300ms;
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: none;
    padding: 0;
    cursor: pointer;
}

.che168-dot.is-active {
    width: 20px;
    background: #fff;
    box-shadow: 0 0 8px rgba(255,255,255,0.6);
}

.che168-dot:not(.is-active) {
    width: 6px;
    background: rgba(255,255,255,0.3);
}

.che168-dot:not(.is-active):hover {
    background: rgba(255,255,255,0.7);
}

/* CTA slide (last slide with "View more") */
.che168-cta-slide {
    width: 100%;
    height: 100%;
    background: #252a40;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px;
    box-sizing: border-box;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.05);
}

.che168-cta-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top right, #1a1d2d, transparent);
    opacity: 0.5;
}

.che168-cta-slide::after {
    content: '';
    position: absolute;
    right: -32px;
    top: -32px;
    width: 96px;
    height: 96px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    filter: blur(40px);
    transition: background 300ms;
}

.che168-cta-slide:hover::after {
    background: rgba(255,255,255,0.1);
}

.che168-cta-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.che168-cta-icon {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 300ms;
}

.che168-cta-slide:hover .che168-cta-icon {
    transform: scale(1.1);
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.che168-cta-icon svg {
    width: 24px;
    height: 24px;
    color: rgba(255,255,255,0.8);
}

.che168-cta-title {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.25;
    margin-bottom: 2px;
}

.che168-cta-subtitle {
    font-size: 10px;
    color: #9ca3af;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    padding-top: 4px;
}

.che168-cta-button {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: #ffb900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 300ms;
}

.che168-cta-slide:hover .che168-cta-button {
    transform: translateX(4px);
}

.che168-cta-button svg {
    width: 12px;
    height: 12px;
}

/* ========== LIGHT THEME OVERRIDES FOR SLIDER ========== */
/* Thumb background */
.che168-thumb {
    background: #e8eaed;
}

[data-theme="dark"] .che168-thumb {
    background: rgba(255, 255, 255, 0.06);
}

/* CTA slide - light theme */
.che168-cta-slide {
    background: #f0f2f5;
    border: 1px solid rgba(0,0,0,0.08);
}

.che168-cta-slide::before {
    background: linear-gradient(to top right, #e0e3e8, transparent);
}

.che168-cta-slide::after {
    background: rgba(0,0,0,0.03);
}

.che168-cta-slide:hover::after {
    background: rgba(0,0,0,0.06);
}

.che168-cta-icon {
    background: rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.1);
}

.che168-cta-slide:hover .che168-cta-icon {
    background: rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.15);
}

.che168-cta-icon svg {
    color: rgba(0,0,0,0.7);
}

.che168-cta-title {
    color: #1a1a2e;
}

.che168-cta-subtitle {
    color: #6b7280;
}

.che168-cta-button {
    color: #d97706;
}

/* Dark theme CTA overrides */
[data-theme="dark"] .che168-cta-slide {
    background: #252a40;
    border: none;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

[data-theme="dark"] .che168-cta-slide::before {
    background: linear-gradient(to top right, #1a1d2d, transparent);
}

[data-theme="dark"] .che168-cta-slide::after {
    background: rgba(255,255,255,0.05);
}

[data-theme="dark"] .che168-cta-slide:hover::after {
    background: rgba(255,255,255,0.1);
}

[data-theme="dark"] .che168-cta-icon {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}

[data-theme="dark"] .che168-cta-slide:hover .che168-cta-icon {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

[data-theme="dark"] .che168-cta-icon svg {
    color: rgba(255,255,255,0.8);
}

[data-theme="dark"] .che168-cta-title {
    color: #fff;
}

[data-theme="dark"] .che168-cta-subtitle {
    color: #9ca3af;
}

[data-theme="dark"] .che168-cta-button {
    color: #ffb900;
}

.che168-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.che168-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.che168-details {
    flex: 1;
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.che168-title {
    margin-top: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.che168-trim {
    font-size: 12px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.75);
    margin-top: 0;
    margin-left: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-theme="dark"] .che168-trim {
    color: rgba(255, 255, 255, 0.75);
}

.che168-engine-icon {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

.che168-engine-icon.icon_dark {
    display: none;
}

[data-theme="dark"] .che168-engine-icon.icon_light {
    display: none;
}

[data-theme="dark"] .che168-engine-icon.icon_dark {
    display: inline-block;
}

.che168-title-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: uppercase;
    font-weight: 700;
}


.che168-spec-list {
    margin-top: auto;
    margin-bottom: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: #828282;
}

.che168-spec-row {
    display: flex;
    align-items: baseline;
    gap: 40px;
    font-size: 14px;
    min-width: 0;
}

.che168-spec-label {
    flex: 0 0 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.che168-spec-row--labelonly {
    margin-top: 2px;
}

.che168-spec-row--labelonly .che168-spec-label {
    flex: 0 0 auto;
}

.che168-spec-value {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400;
}

.che168-spec-row--trim .che168-spec-value {
    flex: 0 1 auto;
    display: inline-block;
    font-size: 12px;
    padding: 0 5px;
    border-radius: 4px;
    background: #31343E;
    color: #F5F5F5;
}

[data-theme="dark"] .che168-spec-row--trim .che168-spec-value {
    background: #392237;
    color: #F5F5F5;
}

/* Desktop-specific: ensure spec value has no padding */
@media (min-width: 769px) {
    .che168-spec-value {
        padding: 0 !important;
    }
}

.che168-spec {
    font-size: 12px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.che168-sub {
    margin-top: auto;
    font-size: 10px;
    font-weight: 400;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Bottom block with price and date */
.che168-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    margin-left: 20px;
    margin-right: 15px;
    margin-bottom: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .che168-bottom {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.che168-bottom-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.che168-bottom-right {
    display: flex;
    align-items: flex-end;
}

.che168-city {
    font-size: 10px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.5);
    line-height: 1;
    margin-bottom: 2px;
    text-align: left;
}

[data-theme="dark"] .che168-city {
    color: rgba(255, 255, 255, 0.5);
}

.che168-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    text-align: left;
}

.che168-date {
    font-size: 10px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.75);
    line-height: 1;
}

[data-theme="dark"] .che168-date {
    color: rgba(255, 255, 255, 0.75);
}

/* Legacy meta styles - keeping for compatibility */
.che168-meta {
    width: 220px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 8px;
    text-align: left;
}

.che168-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary);
    align-self: flex-end;
    text-align: right;
    padding-right: 0;
}

.che168-price-block {
    align-self: flex-end;
    padding-right: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.che168-choice {
    margin-top: 6px;
    display: inline-block;
    align-self: flex-end;
    background: #74AF52;
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 400;
    line-height: 1;
    padding: 1px 5px;
    border-radius: 20px;
    white-space: nowrap;
}

.che168-link {
    margin-top: auto;
}

.che168-link {
    font-size: 12px;
    text-decoration: none;
    color: #B22234;
}

[data-theme="dark"] .che168-link {
    color: #FFB900;
}

/* ========== REVIEWS WIDGET ========== */
.reviews-widget {
    width: 250px;
    height: 634px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 25px -5px rgba(226, 232, 240, 0.6), 0 8px 10px -6px rgba(226, 232, 240, 0.6);
    font-family: 'Manrope', sans-serif;
    margin-bottom: 15px;
}

[data-theme="dark"] .reviews-widget {
    background: rgba(57, 61, 92, 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

/* Header */
.reviews-widget-header {
    flex-shrink: 0;
    padding: 20px 20px 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.5);
    z-index: 10;
    border-bottom: 1px solid #f1f5f9;
}

[data-theme="dark"] .reviews-widget-header {
    background: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.reviews-widget-title {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    letter-spacing: -0.025em;
    text-transform: uppercase;
}

[data-theme="dark"] .reviews-widget-title {
    color: #f1f5f9;
}

.reviews-widget-icon {
    width: 16px;
    height: 16px;
    color: #b22234;
}

.reviews-widget-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reviews-widget-count {
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

[data-theme="dark"] .reviews-widget-count {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #94a3b8;
}

.reviews-widget-all-btn {
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 2px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: color 0.15s;
}

.reviews-widget-all-btn:hover {
    color: #1e293b;
}

[data-theme="dark"] .reviews-widget-all-btn:hover {
    color: #f1f5f9;
}

.reviews-widget-chevron {
    width: 12px;
    height: 12px;
    transition: transform 0.15s;
}

.reviews-widget-all-btn:hover .reviews-widget-chevron {
    transform: translateX(2px);
}

/* Scrollable List */
.reviews-widget-list {
    flex: 1;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.4);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.reviews-widget-list::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

[data-theme="dark"] .reviews-widget-list {
    background: rgba(30, 41, 59, 0.4);
}

/* Review Item */
.reviews-widget-item {
    padding: 20px;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s;
    cursor: default;
}

.reviews-widget-item:hover {
    background: #ffffff;
}

[data-theme="dark"] .reviews-widget-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .reviews-widget-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.reviews-widget-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.reviews-widget-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reviews-widget-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    font-family: 'JetBrains Mono', monospace;
}

[data-theme="dark"] .reviews-widget-avatar {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #94a3b8;
}

.reviews-widget-author-info {
    display: flex;
    flex-direction: column;
}

.reviews-widget-name {
    font-weight: 700;
    font-size: 12px;
    color: #0f172a;
    line-height: 1;
}

[data-theme="dark"] .reviews-widget-name {
    color: #f1f5f9;
}

.reviews-widget-stars {
    display: flex;
    gap: 2px;
    margin-top: 6px;
}

.reviews-widget-stars svg {
    width: 10px;
    height: 10px;
}

.reviews-widget-stars svg.star-filled {
    fill: #d97706;
    stroke: #d97706;
    stroke-width: 2;
}

.reviews-widget-stars svg.star-empty {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 2;
}

[data-theme="dark"] .reviews-widget-stars svg.star-empty {
    stroke: #475569;
}

.reviews-widget-date {
    font-size: 9px;
    font-family: 'JetBrains Mono', monospace;
    color: #94a3b8;
    margin-top: 2px;
}

/* Content */
.reviews-widget-content {
    margin-top: 12px;
    display: flex;
    gap: 12px;
}

.reviews-widget-text {
    font-size: 11px;
    color: #475569;
    line-height: 1.625;
    margin: 0;
    flex: 1;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .reviews-widget-text {
    color: #94a3b8;
}

.reviews-widget-thumb {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    cursor: pointer;
    align-self: flex-start;
    margin-top: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: border-color 0.15s;
}

.reviews-widget-item:hover .reviews-widget-thumb {
    border-color: rgba(217, 119, 6, 0.5);
}

.reviews-widget-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.reviews-widget-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.reviews-widget-play > div,
.reviews-widget-play {
    width: 20px;
    height: 20px;
}

.reviews-widget-play::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.reviews-widget-play svg {
    position: relative;
    z-index: 1;
    width: 10px;
    height: 10px;
    fill: #ffffff;
    stroke: #ffffff;
    stroke-width: 2;
    margin-left: 2px;
}

/* Source badge */
.reviews-widget-source {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    text-decoration: none;
    color: #0088cc;
    opacity: 0.6;
    transition: opacity 0.15s;
}

.reviews-widget-item:hover .reviews-widget-source {
    opacity: 1;
}

.reviews-widget-source svg {
    width: 12px;
    height: 12px;
}

.reviews-widget-source-2gis {
    color: #16a34a;
}

.reviews-widget-source-youtube {
    color: #dc2626;
}

/* Add button */
.reviews-widget-add-btn {
    width: 100%;
    padding: 20px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s;
}

.reviews-widget-add-btn:hover {
    color: #1e293b;
    background: #f8fafc;
}

[data-theme="dark"] .reviews-widget-add-btn:hover {
    color: #f1f5f9;
    background: rgba(255, 255, 255, 0.05);
}

.reviews-widget-add-btn svg {
    width: 12px;
    height: 12px;
}

/* Bottom fade */
.reviews-widget-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(to top, #ffffff, transparent);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

[data-theme="dark"] .reviews-widget-fade {
    background: linear-gradient(to top, rgba(30, 41, 59, 0.9), transparent);
}

/* ========== END REVIEWS WIDGET ========== */

/* Comments Box */
.comments_box {
    width: 100%;
    background: rgba(255, 255, 255, 0.5);
    border: 0.5px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: visible;
    position: relative;
    padding: 17px 5px 22px 5px;
    margin-bottom: 15px;
}

[data-theme="dark"] .comments_box {
    background: rgba(57, 61, 92, 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.purchase_info_box {
    width: 100%;
    margin-top: 0;
    margin-bottom: 15px;
    padding: 20px;
    background: linear-gradient(90deg, #B22234 0%, #641515 100%);
    border: 0.5px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    position: sticky;
    top: 20px;
    z-index: 10;
    overflow: hidden;
}

.purchase_info_box::before {
    content: '';
    position: absolute;
    top: 55px;
    right: 19px;
    width: 136px;
    height: 166px;
    background: url('/static/img/shield.svg') no-repeat center center;
    background-size: contain;
    pointer-events: none;
}

[data-theme="dark"] .purchase_info_box {
    background: linear-gradient(90deg, #B22234 0%, #641515 100%);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 20px;
    z-index: 10;
}

.purchase_info_title {
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 23px;
}

.purchase_info_item {
    font-size: 14px;
    font-weight: 400;
    color: inherit;
    margin-bottom: 20px;
}

.purchase_info_item:last-child {
    margin-bottom: 0;
}

.purchase_info_list {
    color: #FFFFFF;
}

[data-theme="dark"] .purchase_info_list {
    color: #FFFFFF;
}

.comments_header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-shrink: 0;
    padding: 0;
    margin: 0;
}

.comments_header-title {
    font-size: 16px;
    font-weight: 500;
    color: #1a1a2e;
}

[data-theme="dark"] .comments_header-title {
    color: #ffffff;
}

.comments_header-icon {
    width: 11px;
    height: 11px;
    margin-left: 22px;
    margin-right: 8px;
}

/* Reviews Buttons */
.reviews-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    margin-top: 15px;
}

.review-btn {
    display: flex;
    align-items: center;
    width: 232px;
    height: 48px;
    padding: 0 15px;
    background: transparent;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    box-sizing: border-box;
}

[data-theme="dark"] .review-btn {
    background: transparent;
    border: none;
}

.review-btn-telegram:hover {
    background: #7ABEE0 !important;
    border: none !important;
    outline: 1px solid #ffffff;
    outline-offset: -1.5px;
    box-shadow: 0 8px 25px rgba(122, 190, 224, 0.5);
}

.review-btn-2gis:hover {
    background: #DFEEC0 !important;
    border: none !important;
    outline: 1px solid #ffffff;
    outline-offset: -1.5px;
    box-shadow: 0 8px 25px rgba(223, 238, 192, 0.5);
}

[data-theme="dark"] .review-btn-telegram:hover {
    background: #478BAD !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 8px 25px rgba(71, 139, 173, 0.5);
}

[data-theme="dark"] .review-btn-2gis:hover {
    background: #ACBB8D !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 8px 25px rgba(172, 187, 141, 0.5);
}

.review-btn-icon-left {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 0.5px solid #BFBFBF;
    border-radius: 8px;
    padding: 7px;
    box-sizing: border-box;
}

.review-btn:hover .review-btn-icon-left {
    border-color: transparent;
}

.review-btn-icon-left img {
    width: 21px;
    height: 18px;
}

.review-btn-2gis .review-btn-icon-left img {
    width: 16px;
    height: 20px;
}

.review-btn-text {
    flex: 1;
    text-align: left;
    padding-left: 20px;
    font-size: 12px;
    font-weight: 500;
    color: #1a1a2e;
}

[data-theme="dark"] .review-btn-text {
    color: #ffffff;
}

.review-btn-icon-right {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.comments_content {
    flex: 1;
    background: transparent;
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 5px;
    border-radius: 0 0 20px 20px;
}

.comments_content::-webkit-scrollbar {
    display: none;
}

.comments_inner {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

[data-theme="dark"] .comments_content {
    background: transparent;
}

/* Custom Scrollbar */
.custom-scrollbar {
    position: absolute;
    top: 36px;
    right: -16px;
    width: 10px;
    bottom: 5px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    z-index: 10;
}

[data-theme="dark"] .custom-scrollbar {
    background: rgba(255, 255, 255, 0.1);
}

.custom-scrollbar-thumb {
    width: 100%;
    background: #FFFFFF;
    border-radius: 5px;
    cursor: pointer;
    position: absolute;
    top: 0;
    transition: background 0.2s ease;
}

.custom-scrollbar-thumb:hover {
    background: #E0E0E0;
}

[data-theme="dark"] .custom-scrollbar-thumb {
    background: #C5C9D6;
}

[data-theme="dark"] .custom-scrollbar-thumb:hover {
    background: #D5D9E6;
}

.comment_card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 11px;
}

[data-theme="dark"] .comment_card {
    background: rgba(120, 120, 120, 0.25);
}

.comment_header {
    display: flex;
    align-items: center;
    padding: 0 5px;
}

.comment_avatar {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

[data-theme="dark"] .comment_avatar {
    filter: brightness(0) invert(1);
}

.comment_name {
    margin-left: 8px;
    font-size: 12px;
    color: #FFB900;
    font-weight: 600;
}

.comment_date {
    margin-left: auto;
    font-size: 8px;
    color: #000000;
}

[data-theme="dark"] .comment_date {
    color: #C5C9D6;
}

.comment_body {
    padding-top: 10px;
}

.comment_body_text {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: #000000;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 5px 0;
}

[data-theme="dark"] .comment_body_text {
    color: #F5F5F5;
}

/* Comment Buttons */
.comment_buttons {
    display: flex;
    gap: 18px;
    margin-top: 9px;
    justify-content: center;
}

.comment_btn {
    width: 84px;
    height: 25px;
    border: 1.5px solid rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    font-size: 10px;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
}

.comment_btn:hover {
    background: rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.1);
}

.comment_btn .icon_white {
    filter: brightness(0);
}

.comment_btn .icon_hover {
    display: none;
}

.comment_btn_icon {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

.comment_btn_icon.icon_white {
    position: relative;
}

.comment_btn_icon.icon_hover {
    display: none;
}

.comment_btn_source {
    position: relative;
}

.comment_btn_source .icons-wrapper {
    position: relative;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    margin-top: -1px;
}

.comment_btn_2gis {
    width: 30px;
    height: 8px;
    filter: brightness(0);
}

.comment_btn_2gis.icon_white {
    position: relative;
}

.comment_btn_2gis.icon_hover {
    display: none;
}

.icons-wrapper-2gis {
    position: relative;
    width: 30px;
    height: 8px;
    display: flex;
    align-items: center;
}

.comment_btn span {
    color: #000000;
}

[data-theme="dark"] .comment_btn {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .comment_btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .comment_btn .icon_white {
    filter: none;
}

[data-theme="dark"] .comment_btn_2gis {
    filter: none;
}

[data-theme="dark"] .comment_btn span {
    color: #FFFFFF;
}

.comment_preview {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    width: 218px;
    height: 130px;
    z-index: 1;
}

.comment_stars {
    display: flex;
    gap: 2px;
    padding-top: 10px;
}

.comment_star {
    width: 10px;
    height: 10px;
}

.star_empty_dark {
    display: block;
}

[data-theme="dark"] .star_empty_dark {
    display: none;
}

.star_empty_light {
    display: none;
}

[data-theme="dark"] .star_empty_light {
    display: block;
}

.star_empty_light {
    display: none;
}

[data-theme="light"] .star_empty_dark {
    display: none;
}

[data-theme="light"] .star_empty_light {
    display: block;
}

.comment_preview_img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.4s ease;
}

.comment_preview_img.loaded {
    opacity: 1;
}

/* Эффект увеличения и поворота картинки при hover */
.comment_preview:hover .comment_preview_img {
    transform: scale(1.08) rotate(1.5deg);
}

.comment_body:has(.comment_btn_watch:hover) .comment_preview_img {
    transform: scale(1.08) rotate(1.5deg);
}

.comment_preview_overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.1) 70%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.video_play_icon {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin-left: -20px;
    margin-top: -20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

.video_play_icon img {
    width: 40px;
    height: 40px;
    display: block;
}

.video_play_icon .play_vid_white {
    position: absolute;
    opacity: 1;
}

.video_play_icon .play_vid_hover {
    display: none;
}

.comment_preview_overlay.visible {
    opacity: 1;
}

/* Skeleton Loading */
.skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, #E0E0E0 0%, #F5F5F5 50%, #E0E0E0 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    z-index: 10;
    pointer-events: none;
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #3A3A3A 0%, #4A4A4A 50%, #3A3A3A 100%);
    background-size: 200% 100%;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton.hidden {
    display: none;
}

/* Comments Arrows */
.comments_arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.comments_arrow_up {
    margin-bottom: 14px;
    order: -1;
}

.comments_arrow_down {
    margin-top: 14px;
    order: 1;
}

.comments_arrow_down img {
    transform: rotate(180deg);
}

/* Modal Overlay */
.modal_overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

.modal_overlay.active {
    display: block;
}

body.modal-open {
    overflow: hidden;
}

/* Comment Modal Wrapper */
.comment_modal_wrapper {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    max-height: 85vh;
    overflow-y: auto;
}

.comment_modal_wrapper.active {
    display: flex;
}

/* Comment Modal */
.comment_modal {
    display: flex;
    width: 250px;
    height: 450px;
    background: #EAEAEA;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    flex-direction: column;
    position: relative;
    max-height: 450px;
}

.comment_modal_stack {
    position: relative;
    width: 250px;
}

/* No-video mode: limit overall modal stack height and scroll only text */
.comment_modal_stack:not(.has-video) {
    min-height: 450px;
    max-height: 450px;
}

.comment_modal_stack:not(.has-video) .comment_modal {
    height: 450px;
    min-height: 450px;
    max-height: 450px;
}

.comment_modal_stack:not(.has-video) .comment_modal_body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.comment_modal_stack:not(.has-video) .comment_modal_text {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.comment_modal_stack:not(.has-video) .comment_modal_text::-webkit-scrollbar {
    width: 0;
    height: 0;
}

[data-theme="dark"] .comment_modal {
    background: #787878;
}

.comment_modal_header {
    display: flex;
    align-items: center;
    padding: 15px 26px 9px 15px;
    flex-shrink: 0;
}

.comment_modal_header.has-video {
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    padding: 0 26px 0 15px !important;
    border-bottom: none !important;
    box-sizing: border-box;
}

[data-theme="dark"] .comment_modal_header {
    border-bottom-color: #404040;
}

[data-theme="dark"] .comment_modal_header.has-video {
    border-bottom: none;
}

.modal_controls {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: -3px;
    padding: 0 4px;
    gap: 7px;
}

#modal-controls-slot {
    width: 250px;
    position: absolute;
    top: -5px;
    transform: translateY(-100%);
    display: none;
    justify-content: flex-end;
    pointer-events: auto;
    z-index: 1003;
    padding-right: 5px;
}

/* Close icon should be white only in floated (non-video) controls */
#modal-controls-slot .comment_modal_close {
    filter: invert(1);
    opacity: 1;
}

#modal-controls-slot .modal_controls {
    margin: 0;
    padding: 0;
}

.comment_modal_expand {
    width: 11px;
    height: 11px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.comment_modal_expand:hover {
    opacity: 1;
}

[data-theme="dark"] .comment_modal_expand {
    filter: invert(1);
}

.comment_modal_close {
    margin-top: 1px;
    width: 11px;
    height: 11px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    z-index: 1002;
}

.comment_modal_close:hover {
    opacity: 1;
}

[data-theme="dark"] .comment_modal_close {
    filter: invert(1);
}

.comment_modal_body {
    flex: 1;
    padding: 0 26px 14px 26px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    max-height: none;
}

.comment_modal_body:not(.has-video) {
    padding: 0 11px 14px 11px;
}

/* When modal HAS video: push the source button to the bottom of the whole modal body */
.comment_modal_body.has-video {
    display: flex;
    flex-direction: column;
}

.comment_modal_body.has-video .modal_source_btn {
    margin-top: auto;
}

.video_wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video_skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        #E0E0E0 0%,
        #F0F0F0 50%,
        #E0E0E0 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    z-index: 1;
    border-radius: 8px;
    pointer-events: none;
}

[data-theme="dark"] .video_skeleton {
    background: linear-gradient(
        90deg,
        #3A3A3A 0%,
        #4A4A4A 50%,
        #3A3A3A 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.video_skeleton.hidden {
    display: none;
}

.image_wrapper {
    position: relative;
    width: 100%;
    min-height: 130px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 9px;
}

.comment_modal_image {
    width: 100%;
    height: 130px;
    min-height: 130px;
    display: block;
    border-radius: 8px;
    object-fit: cover;
}

.comment_modal_stars {
    margin: 0;
    padding: 0;
}

.comment_modal_stars .comment_stars {
    display: flex;
    width: 100%;
    gap: 3px;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
}

.comment_modal_video {
    height: 100%;
    display: block;
    border-radius: 8px;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    z-index: 2;
    cursor: pointer;
}

.comment_modal_video:fullscreen {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.comment_modal_video:-webkit-full-screen {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.comment_modal_video:-moz-full-screen {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal_source_btn {
    width: 100%;
    text-align: center;
}

/* When modal has no video, add spacing above the button */
.comment_modal_body:not(.has-video) .modal_source_btn {
    margin-top: 15px;
}

.modal_source_btn_link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 170px;
    height: 25px;
    background: #31343E;
    border: none;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 500;
    color: #FFB900;
    text-decoration: none;
    gap: 6px;
    cursor: pointer;
}

/* Keep "Смотреть в" from wrapping/weird spacing */
#modal-source-text {
    white-space: nowrap;
    word-spacing: normal;
    letter-spacing: normal;
}

.modal_source_type_icon {
    height: 8px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.modal_source_btn_link img {
    margin-top: -1px;
}

.video_time {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 4px;
    border-radius: 20px;
    background: #494D58;
    color: #ECECEC;
    font-size: 8px;
    line-height: 1;
    z-index: 4;
    pointer-events: none;
}

/* Volume control */
.video_volume {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 26px;
    height: 72px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 4;
}

.video_volume_track {
    position: relative;
    width: 2px;
    height: 55px;
    background: #88898B;
    border-radius: 1px;
    margin-left: 11.5px;
}

.video_volume_filled {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #FFFFFF;
    border-radius: 1px;
    height: 100%;
}

.video_volume_handle {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 5px;
    height: 5px;
    background: transparent;
    bottom: 100%;
    cursor: pointer;
}

.video_volume_handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 7px;
    height: 2px;
    background: #FFFFFF;
    border-radius: 1px;
}

.video_volume_icon {
    height: 12px;
    margin-top: 6px;
    margin-left: 7.5px;
    flex-shrink: 0;
    cursor: pointer;
}

/* Light theme volume styles */
body:not([data-theme="dark"]) .video_volume_filled {
    background: #000000;
}

body:not([data-theme="dark"]) .video_volume_handle::after {
    background: #000000;
}

.video_progress_bar {
    position: absolute;
    bottom: 9px;
    left: 12px;
    right: 12px;
    cursor: pointer;
    z-index: 4;
}

.video_progress_track {
    position: relative;
    height: 5px;
    background: #494D58;
    border-radius: 3px;
}

.video_progress_filled {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #FFFFFF;
    border-radius: 3px;
    width: 0%;
}

.video_progress_handle {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 9px;
    height: 9px;
    background: #FFB900;
    border-radius: 50%;
    left: 0%;
    cursor: pointer;
}

/* Video overlay с кнопками play/stop */
.video_overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    pointer-events: none;
}

.video_overlay > img {
    pointer-events: auto;
}

.video_overlay:hover {
    pointer-events: auto;
}

.video_play_btn {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
    filter: drop-shadow(0 0 15px rgba(0, 0, 0, 0.8));
}

.video_play_btn .play_vid_white,
.video_play_btn .play_vid_hover,
.video_stop_icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    pointer-events: none;
}

/* По умолчанию: видео на паузе -> показываем play */
#video-wrapper:not(.playing) .video_play_btn .play_vid_white {
    display: block;
    opacity: 1;
    transition: opacity 0.2s ease;
}

#video-wrapper:not(.playing) .video_play_btn .play_vid_hover {
    display: block;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Hover на видео: переключаем play -> hover */
#video-wrapper:not(.playing):hover .video_play_btn .play_vid_white {
    opacity: 0;
}

#video-wrapper:not(.playing):hover .video_play_btn .play_vid_hover {
    opacity: 1;
}

/* Когда видео играет: прячем play-иконки */
#video-wrapper.playing .video_play_btn .play_vid_white,
#video-wrapper.playing .video_play_btn .play_vid_hover {
    display: none;
}

/* Stop: показываем только при hover и только когда играет */
.video_stop_icon {
    display: none;
}

#video-wrapper.playing:hover .video_stop_icon {
    display: block;
}

.video_play_btn img,
.video_stop_icon img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Hover эффект для stop иконки когда видео играет */
.video_play_btn.show-stop:hover .stop_vid_white {
    opacity: 0;
}

.video_play_btn.show-stop:hover .stop_vid_hover {
    opacity: 1;
    display: block !important;
}

/* Hover эффект когда мышка на видео и оно паузировано */
.video_play_btn.hovered:not(.show-stop) .play_vid_white {
    opacity: 0;
}

.video_play_btn.hovered:not(.show-stop) .play_vid_hover {
    opacity: 1;
    display: block !important;
}

.comment_modal_text {
    font-size: 12px;
    font-weight: 400;
    margin: 5px 0;
    line-height: 1.5;
    color: #000000;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

[data-theme="dark"] .comment_modal_text {
    color: #F5F5F5;
}

/* If date is shown in modal (non-video), keep it readable in dark theme */
[data-theme="dark"] #comment-modal .comment_date {
    color: #F5F5F5;
}

.filter_box .row {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Ряд с чекбоксом и кнопкой */
.filter_box .row.row-actions {
    justify-content: flex-end;
}

/* =============== DROPDOWN STYLES (3D Physics) =============== */
.filter_box .dropdown,
.filter_box .range-dd {
    position: relative;
    flex: 1;
    max-width: calc((100% - 16px) / 3);
    perspective: 1200px;
    z-index: 1;
}

/* Price range input styles */
.filter_box .price-range {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    max-width: calc((100% - 16px) / 3);
    position: relative;
}

.filter_box .price-range .price-input-wrap {
    flex: 1;
    cursor: text;
    padding: 0 5px 0 16px;
}

.filter_box .price-range .price-input {
    width: 100%;
    height: 100%;
    text-align: left;
    padding: 0;
}

.filter_box .price-range .price-input::placeholder {
    color: #676767;
    font-weight: 400;
}

.filter_box .price-range .price-input:focus::placeholder {
    color: transparent;
}

.filter_box .price-divider {
    color: #94a3b8;
    font-size: 12px;
    flex-shrink: 0;
}

.filter_box .dropdown:has(.dd-panel:not([hidden])),
.filter_box .range-dd:has(.range-panel:not([hidden])) {
    z-index: 9999;
}

.filter_box .filter-checkbox {
    flex: none;
}

.filter_box .dd-head,
.filter_box .range-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 38px;
    padding: 0 40px 0 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    cursor: pointer;
    position: relative;
    z-index: 1;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter_box .dd-head:hover,
.filter_box .range-head:hover {
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.filter_box .dd-head[aria-expanded="true"] {
    z-index: 10000;
    background: linear-gradient(to bottom, #ffffff, transparent);
    position: relative;
    border-radius: 8px 8px 0 0;
    border: 1px solid rgb(234 179 8 / 0.5);
    border-bottom-color: transparent;
    box-shadow: none;
    transition: none;
}

.filter_box .range-head[aria-expanded="true"] {
    z-index: 10000;
}

/* Активный slot при открытой панели */
.filter_box .range-dd:has(.panel-from:not([hidden])) .slot-from,
.filter_box .range-dd:has(.panel-to:not([hidden])) .slot-to {
    border-radius: 8px 8px 0 0;
    border: 1px solid rgb(234 179 8 / 0.5);
    border-bottom-color: transparent;
    box-shadow: none;
    z-index: 10000;
    background: linear-gradient(to bottom, #ffffff, transparent);
}

/* Slot с фокусом на input */
.filter_box .slot:focus-within {
    border: 1px solid rgb(234 179 8 / 0.5);
}

/* Price input обводка при фокусе */
.filter_box .price-range .dd-head:focus-within {
    border: 1px solid rgb(234 179 8 / 0.5);
}

/* Стрелка */
.filter_box .chev {
    width: 16px;
    height: 8px;
    background: url('/static/img/arrow.svg') no-repeat center;
    background-size: contain;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    opacity: 0.6;
    filter: brightness(0) saturate(100%) invert(67%) sepia(11%) saturate(531%) hue-rotate(176deg) brightness(92%) contrast(88%);
}

/* Стрелка в dd-head - позиционируем абсолютно справа */
.filter_box .dd-head > .chev {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.filter_box .dd-head[aria-expanded="true"] > .chev {
    transform: translateY(-50%) rotate(180deg);
}

/* Крестик для очистки поля */
.filter_box .dd-clear {
    display: none;
    width: 20px;
    height: 20px;
    font-size: 18px;
    font-weight: 300;
    font-style: normal;
    color: #9CA3AF;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 20px;
    text-align: center;
    transition: color 0.2s ease;
}

.filter_box .dd-clear:hover {
    color: #EF4444;
}

/* Когда есть значение - показываем крестик, скрываем стрелку */
.filter_box .dropdown.has-value .chev {
    visibility: hidden;
}

.filter_box .dropdown.has-value .dd-clear {
    display: block;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

/* Крестик очистки для range-dd */
.filter_box .range-clear {
    display: none;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    font-size: 18px;
    font-weight: 300;
    font-style: normal;
    color: #9CA3AF;
    cursor: pointer;
    line-height: 20px;
    text-align: center;
    transition: color 0.2s ease;
    z-index: 5;
}

.filter_box .range-clear:hover {
    color: #EF4444;
}

/* Когда есть значение в range-dd - показываем крестик, скрываем стрелки */
.filter_box .range-dd.has-value .slot .chev {
    visibility: hidden;
}

.filter_box .range-dd.has-value .range-clear {
    display: block;
}

/* Крестик очистки для price-range */
.filter_box .price-clear {
    display: none;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    font-size: 18px;
    font-weight: 300;
    font-style: normal;
    color: #9CA3AF;
    cursor: pointer;
    line-height: 20px;
    text-align: center;
    transition: color 0.2s ease;
    z-index: 5;
}

.filter_box .price-clear:hover {
    color: #EF4444;
}

.filter_box .price-range.has-value .price-clear {
    display: block;
}

/* Выпадающее меню */
.filter_box .dd-panel,
.filter_box .range-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
    overflow: visible;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    margin-top: -1px;
    border: 1px solid rgb(234 179 8 / 0.5);
    border-top: none;
}

.filter_box .range-panel.panel-from {
    left: 0;
    right: auto;
    width: calc(50% - 4px);
    border-radius: 0 0 8px 8px;
    box-sizing: border-box;
}

.filter_box .range-panel.panel-to {
    left: auto;
    right: 0;
    width: calc(50% - 4px);
    border-radius: 0 0 8px 8px;
    box-sizing: border-box;
}

/* Шапка списка - скрыта */
.filter_box .dd-header {
    display: none;
}

.filter_box .dd-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #FBBF24, transparent);
}

.filter_box .dd-header svg {
    color: #FBBF24;
    stroke: #FBBF24;
}

.filter_box .dd-header:hover {
    background-color: #4a2d48;
}

.filter_box .dd-inner {
    max-height: 340px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 3px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* Bounce effect */
    transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    /* Prevent scroll propagation to page */
    overscroll-behavior: contain;
    position: relative;
}

/* Gradient masks for scroll indication */
.filter_box .dd-inner-wrapper {
    position: relative;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.filter_box .dd-inner-wrapper::before,
.filter_box .dd-inner-wrapper::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 40px;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.filter_box .dd-inner-wrapper::before {
    top: 0;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100%);
}

.filter_box .dd-inner-wrapper::after {
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0) 100%);
}

/* Show gradients based on scroll position via JS classes */
.filter_box .dd-inner-wrapper.can-scroll-up::before {
    opacity: 1;
}

.filter_box .dd-inner-wrapper.can-scroll-down::after {
    opacity: 1;
}

/* Скроллбар скрыт */
.filter_box .dd-inner::-webkit-scrollbar {
    display: none;
}

.filter_box .dd-options {
    list-style: none;
    margin: 0;
    padding: 0;
    padding-bottom: 4px;
}

/* Скругление последнего элемента списка */
.filter_box .dd-options li:last-child {
    border-radius: 8px;
}

/* Пункты списка */
.filter_box .dd-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 36px;
    margin: 4px 8px;
    padding: 12px 4px 12px 6px;
    cursor: pointer;
    font-size: 13px;
    color: #334155;
    font-weight: 500;
    position: relative;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    transition: all 0.2s ease;
    
    /* Анимация появления */
    opacity: 0;
    transform: translateY(10px);
    animation: slideUpFade 0.4s forwards;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hover эффект */
.filter_box .dd-row:hover {
    color: #1e293b;
    background: #f8fafc;
    border-color: #e2e8f0;
}



/* Активный/выбранный элемент */
.filter_box .dd-row.dd-active {
    background: #fffbeb;
    border-color: rgba(255, 185, 0, 0.5);
    box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
    color: #0f172a;
}

/* Комплектация с деталями */
.filter_box .dd-row-spec {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 12px;
    gap: 10px;
}

.filter_box .dd-row-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    gap: 5px;
}

.filter_box .dd-row-details {
    display: flex;
    gap: 6px;
    margin-top: 0;
    flex-wrap: wrap;
    padding-right: 24px;
}

.filter_box .dd-row-detail {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-family: 'Fira Code', monospace;
}

.filter_box .dd-row-detail:empty {
    display: none;
}

/* Сохраняем цвет деталей при hover */
.filter_box .dd-row:hover .dd-row-detail {
    color: #64748b;
}

/* Счетчик */
.filter_box .dd-row-count {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 700;
    background: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    font-family: 'Fira Code', monospace;
    transition: all 0.2s ease;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: 4px;
    flex-shrink: 0;
}

/* Счетчик в комплектации - к верху */
.filter_box .dropdown.has-carousel .dd-row-count,
.filter_box .dd-row-main .dd-row-count {
    align-self: flex-start;
}

[data-theme="dark"] .filter_box .dropdown.has-carousel .dd-row-count,
[data-theme="dark"] .filter_box .dd-row-main .dd-row-count {
    align-self: flex-start;
}

.filter_box .dd-row:hover .dd-row-count {
    background: #ffffff;
    color: #64748b;
}

.filter_box .dd-row.dd-active .dd-row-count {
    background: #ffffff;
    color: #0f172a;
    border-color: rgb(234 179 8 / 0.5);
}

/* Checkbox для multi-select */
.filter_box .dd-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #94a3b8;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 10px;
    transition: all 0.15s ease;
    position: relative;
}

.filter_box .dd-checkbox::after {
    content: '';
    width: 10px;
    height: 6px;
    border-left: 2px solid transparent;
    border-bottom: 2px solid transparent;
    transform: rotate(-45deg) translate(1px, -1px);
    transition: border-color 0.15s ease;
}

.filter_box .dd-checkbox.checked {
    background: #eab308;
    border-color: #eab308;
}

.filter_box .dd-checkbox.checked::after {
    border-left-color: #0f172a;
    border-bottom-color: #0f172a;
}

.filter_box .dd-row:hover .dd-checkbox {
    border-color: #64748b;
}

.filter_box .dd-row.dd-selected {
    background: rgb(234 179 8 / 0.1);
}

.filter_box .dd-row.dd-selected:hover {
    background: rgb(234 179 8 / 0.15);
}

[data-theme="dark"] .filter_box .dd-checkbox {
    border-color: #475569;
}

[data-theme="dark"] .filter_box .dd-checkbox.checked {
    background: #eab308;
    border-color: #eab308;
}

[data-theme="dark"] .filter_box .dd-row:hover .dd-checkbox {
    border-color: #94a3b8;
}

[data-theme="dark"] .filter_box .dd-row.dd-selected {
    background: rgb(234 179 8 / 0.15);
}

[data-theme="dark"] .filter_box .dd-row.dd-selected:hover {
    background: rgb(234 179 8 / 0.2);
}

/* Первый пункт (сброс) - скрыт */
.filter_box .dd-row.dd-reset {
    display: none;
}

/* Первый пункт */
.filter_box .dd-row:first-child {
    border-radius: 12px 12px 0 0;
}

/* Последний пункт */
.filter_box .dd-row:last-child {
    border-radius: 0 0 12px 12px;
}

.filter_box .col-split {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: calc((100% - 16px) / 3);
}

.filter_box .col-split.col-split-3 {
    max-width: calc((100% - 8px) / 2);
}

.filter_box .col-split .dropdown {
    flex: 1;
    max-width: none;
}

.filter_box .range-head {
    gap: 8px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.filter_box .range-head:hover {
    border-color: transparent;
    box-shadow: none;
}

.filter_box .slot {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 50%;
    min-width: 0;
    height: 38px;
    padding: 0 40px 0 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter_box .slot:hover {
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.filter_box .slot-text {
    color: #000000;
    font-weight: 400;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
}

.filter_box .slot-text.has-value {
    color: var(--text-primary);
    font-weight: 500;
}

.filter_box .slot-from {
    justify-content: flex-start;
}

.filter_box .slot-from .chev {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.filter_box .range-dd:has(.panel-from:not([hidden])) .slot-from .chev {
    transform: translateY(-50%) rotate(180deg);
}

.filter_box .slot-to {
    justify-content: flex-start;
}

.filter_box .slot-to .chev {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.filter_box .range-dd:has(.panel-to:not([hidden])) .slot-to .chev {
    transform: translateY(-50%) rotate(180deg);
}

.filter_box .slot-to .slot-text {
    text-align: left;
}

.filter_box .divider {
    display: none;
}

/* Input в dropdown */
.filter_box .dd-input {
    flex: 1;
    border: none;
    background: transparent;
    color: #000000;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    font-weight: 400;
    outline: none;
    width: 100%;
    cursor: pointer;
}

.filter_box .dd-input:not([readonly]):focus {
    cursor: text;
}

/* Price inputs keep their own style */
.filter_box .price-range .price-input {
    color: var(--text-primary);
    font-weight: 500;
}

/* Spec carousel slider */
.filter_box .dd-head .spec-carousel {
    position: absolute;
    left: 16px;
    right: 40px;
    top: 0;
    height: 38px;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
}

.filter_box .dd-head .spec-slider {
    display: flex;
    flex-direction: column;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.filter_box .dd-head .spec-slider.slide-up {
    transform: translateY(-38px);
}

.filter_box .dd-head .spec-slide {
    height: 38px;
    min-height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.filter_box .dd-head .spec-slide-name {
    color: var(--text-primary);
    font-weight: 500;
}

.filter_box .dd-head .spec-slide-details {
    color: #64748b;
    font-size: 11px;
}

.filter_box .dd-head .spec-slide-details span {
    margin-right: 8px;
}

.filter_box .dd-head .spec-slide-details span:last-child {
    margin-right: 0;
}

/* Hide input when carousel is shown */
.filter_box .dropdown.has-carousel .dd-input {
    opacity: 0;
    pointer-events: none;
}

.filter_box .dropdown.has-carousel .spec-carousel {
    display: flex;
}

.filter_box .dropdown:not(.has-carousel) .spec-carousel {
    display: none;
}

/* Hide carousel when dropdown is open */
.filter_box .dropdown.has-carousel .dd-head[aria-expanded="true"] .spec-carousel {
    display: none;
}

.filter_box .dropdown.has-carousel .dd-head[aria-expanded="true"] + .dd-panel ~ .dd-input,
.filter_box .dropdown.has-carousel .dd-head[aria-expanded="true"] .dd-input {
    opacity: 1;
    pointer-events: auto;
}

.filter_box .dd-input::placeholder {
    color: #000000;
    font-weight: 400;
}

/* Placeholder для price-input остаётся серым */
.filter_box .price-range .price-input::placeholder {
    color: #676767;
    font-weight: 400;
}

/* Активное поле с выбранным значением */
.filter_box .dropdown.has-value .dd-input {
    color: var(--text-primary);
    font-weight: 500;
}

/* Price range inputs - активное состояние */
.filter_box .price-range .price-input.has-value {
    color: var(--text-primary);
    font-weight: 500;
}

/* Checkbox */
.filter-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding-left: 16px;
    cursor: pointer;
    user-select: none;
}

.filter-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-box {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #D9D9D9;
    transition: box-shadow .2s ease, background .2s ease;
}

.checkbox-box::before {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: border-color .2s ease;
}

.filter-checkbox:hover .checkbox-box::before,
.filter-checkbox input:focus-visible + .checkbox-box::before {
    border-color: #D9D9D9;
}

.checkbox-box::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin-top: -6px;
    margin-left: -6px;
    border-radius: 2px;
    background: #B22234;
    transform: scale(0);
    transition: transform .18s ease-out;
    transform-origin: center;
}

.filter-checkbox input:checked + .checkbox-box::after {
    transform: scale(1);
}

.checkbox-text {
    font-size: 14px;
    color: #000000;
}

[data-theme="dark"] .checkbox-text {
    color: #f3f3f3;
}

/* Группа кнопок фильтра */
.filter-buttons-group {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: calc((100% - 16px) / 3);
}

/* Кнопка-переключатель "Непроданные" */
.toggle-btn {
    position: relative;
    flex: 1;
    max-width: none;
    height: 38px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.025em;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    user-select: none;
    cursor: pointer;
    background: #FFFFFF;
    color: #64748b;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.toggle-btn:hover {
    border-color: #ffb900;
    color: #ffb900;
    background: #FFFFFF;
}

.toggle-btn:active {
    transform: scale(0.95);
}

.toggle-btn-text {
    position: relative;
    z-index: 10;
}

.toggle-btn-glow {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: rgba(255, 185, 0, 0.1);
    pointer-events: none;
}

.toggle-btn:hover .toggle-btn-glow {
    opacity: 1;
}

/* Активное состояние кнопки Непроданные */
.toggle-btn.active {
    background: #ffb900;
    border-color: #ffb900;
    color: #172554;
    box-shadow: 0 0 15px rgba(255, 185, 0, 0.4);
}

.toggle-btn.active:hover {
    background: #ffb900;
    border-color: #ffb900;
    color: #172554;
}

.toggle-btn.active .toggle-btn-glow {
    display: none;
}

/* Темная тема для кнопки Непроданные */
[data-theme="dark"] .toggle-btn {
    background: #1f2533;
    color: #94a3b8;
    border-color: transparent;
    box-shadow: none;
}

[data-theme="dark"] .toggle-btn:hover {
    border-color: #ffb900;
    color: #ffb900;
    background: #1f2533;
}

[data-theme="dark"] .toggle-btn:hover .toggle-btn-glow {
    background: rgba(255, 185, 0, 0.05);
}

[data-theme="dark"] .toggle-btn.active {
    background: #ffb900;
    border-color: #ffb900;
    color: #1a1f2e;
    box-shadow: 0 0 20px rgba(255, 185, 0, 0.4);
}

/* Кнопка Показать */
.filter_box .btn-show {
    position: relative;
    flex: 1;
    max-width: none;
    height: 38px;
    background: #172554;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 13px;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.filter_box .btn-show:hover:not(:disabled) {
    background: #1e3a8a;
    box-shadow: 0 4px 15px rgba(23, 37, 84, 0.3);
}

.filter_box .btn-show:active:not(:disabled) {
    transform: scale(0.98);
    background: #172554;
}

.btn-show-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.btn-show-count {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    transition: opacity 0.3s ease, max-width 0.3s ease;
    display: flex;
    align-items: center;
}

.filter_box .btn-show:hover .btn-show-count {
    opacity: 1;
    max-width: 50px;
}

.count-badge {
    background: #FFFFFF;
    color: #172554;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

[data-theme="dark"] .filter_box .btn-show {
    background: #FFFFFF;
    color: #1a1f2e;
}

[data-theme="dark"] .filter_box .btn-show:hover:not(:disabled) {
    background: #f8fafc;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .filter_box .btn-show:active:not(:disabled) {
    background: #e2e8f0;
}

[data-theme="dark"] .count-badge {
    background: #1a1f2e;
    color: #ffb900;
}

.filter_box .btn-show:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.filter_box .btn-show.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Счетчики в dropdown строках */
.filter_box .dd-row {
    justify-content: space-between;
}

.filter_box .dd-row-text {
    flex: 1;
}

.filter_box .dd-row-count {
    color: #666666;
    font-size: 10px;
    margin-left: auto;
}

.filter_box .dd-row:first-child .dd-row-count {
    color: #FFB900;
}

.filter_box .dd-row:hover .dd-row-count {
    color: inherit;
}

/* Disabled состояние dropdown */
.filter_box .dropdown.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.filter_box .dropdown.disabled .dd-head {
    cursor: not-allowed;
    background: #F5F5F5;
}

.filter_box .dropdown.disabled .dd-input {
    cursor: not-allowed;
}

/* Disabled состояние range-dd */
.filter_box .range-dd.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.filter_box .range-dd.disabled .range-head {
    cursor: not-allowed;
    background: #F5F5F5;
}

/* Disabled строка в dropdown */
.filter_box .dd-row.dd-disabled {
    color: #999999;
    cursor: not-allowed;
    font-style: italic;
}

.filter_box .dd-row.dd-disabled:hover {
    color: #999999;
    background: inherit;
}

/* =============== ТЕМНАЯ ТЕМА ДЛЯ ФИЛЬТРОВ =============== */
[data-theme="dark"] .filter_box .dd-head {
    background: #2B3045;
    border: 0.5px solid rgba(107, 110, 133, 0.3);
    color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .filter_box .range-head {
    background: transparent;
    border-color: transparent;
}

[data-theme="dark"] .filter_box .dd-head:hover {
    border-color: #586182;
    background: #323852;
}

[data-theme="dark"] .filter_box .range-head:hover {
    background: transparent;
    border-color: transparent;
}

[data-theme="dark"] .filter_box .dd-head[aria-expanded="true"] {
    background: linear-gradient(to bottom, #2B3045, transparent);
    border-color: rgb(234 179 8 / 0.5);
    border-width: 1px;
    border-bottom-color: transparent;
}

[data-theme="dark"] .filter_box .dd-input {
    color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .filter_box .dd-input::placeholder {
    color: #94A3B8;
}

[data-theme="dark"] .filter_box .slot {
    background: #2B3045;
    border: 0.5px solid rgba(107, 110, 133, 0.3);
}

[data-theme="dark"] .filter_box .slot:hover {
    border-color: #586182;
    background: #323852;
}

/* Активный slot при открытой панели - темная тема */
[data-theme="dark"] .filter_box .range-dd:has(.panel-from:not([hidden])) .slot-from,
[data-theme="dark"] .filter_box .range-dd:has(.panel-to:not([hidden])) .slot-to {
    border: 1px solid rgb(234 179 8 / 0.5);
    border-bottom-color: transparent;
    background: linear-gradient(to bottom, #2B3045, transparent);
}

/* Slot с фокусом на input - темная тема */
[data-theme="dark"] .filter_box .slot:focus-within {
    border: 1px solid rgb(234 179 8 / 0.5);
}

[data-theme="dark"] .filter_box .slot-text {
    color: #94A3B8;
}

[data-theme="dark"] .filter_box .slot-text.has-value {
    color: #e2e8f0;
}

[data-theme="dark"] .filter_box .dd-panel,
[data-theme="dark"] .filter_box .range-panel {
    background: #2B3045;
    border-color: rgb(234 179 8 / 0.5);
    border-width: 1px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
}

/* Dark theme gradient masks */
[data-theme="dark"] .filter_box .dd-inner-wrapper::before {
    background: linear-gradient(to bottom, #2B3045 0%, transparent 100%);
}

[data-theme="dark"] .filter_box .dd-inner-wrapper::after {
    background: linear-gradient(to top, #2B3045 0%, transparent 100%);
}

[data-theme="dark"] .filter_box .dd-row:not(.dd-row-spec) {
    color: #e2e8f0;
    background: transparent;
    border: 0.5px solid transparent;
    border-radius: 8px;
    padding: 12px 4px 12px 6px;
    margin-bottom: 4px;
    transition: all 0.2s ease-out;
    font-size: 13px;
}

[data-theme="dark"] .filter_box .dd-row:hover {
    background: #323852;
    border: 0.5px solid #3E455F;
    color: #ffffff;
}

[data-theme="dark"] .filter_box .dd-row.dd-active:hover {
    background: #1F2336;
    border-color: rgba(234, 179, 8, 0.3);
    color: inherit;
}

/* Сохраняем цвет деталей при hover в dark theme */
[data-theme="dark"] .filter_box .dd-row:hover .dd-row-detail {
    color: rgb(148 163 184 / var(--tw-text-opacity, 1));
    background-color: rgb(31 35 54 / 0.5);
    border: none;
}

[data-theme="dark"] .filter_box .dd-row:hover .dd-row-count {
    background-color: rgb(31 35 54 / 0.5);
    color: rgb(148 163 184 / var(--tw-text-opacity, 1));
    border: none;
}

[data-theme="dark"] .filter_box .dd-row.dd-active {
    background: #1F2336;
    border-color: rgba(234, 179, 8, 0.3);
}

[data-theme="dark"] .filter_box .dd-row-text {
    font-size: 13px;
    color: #FFFFFF;
}

[data-theme="dark"] .filter_box .dd-row.dd-active .dd-row-text {
    color: rgb(234 179 8 / var(--tw-text-opacity, 1));
}

[data-theme="dark"] .filter_box .dd-row.dd-active .dd-row-count {
    background-color: transparent;
    border: 1px solid rgb(51 65 85 / var(--tw-border-opacity, 1));
    color: rgb(148 163 184 / var(--tw-text-opacity, 1));
}

[data-theme="dark"] .filter_box .dd-row.dd-active .dd-row-detail {
    background-color: transparent;
}

[data-theme="dark"] .filter_box .dd-row-count {
    background-color: rgb(31 35 54 / 0.5);
    color: rgb(148 163 184 / var(--tw-text-opacity, 1));
    border: none;
    padding-left: 0.375rem;
    padding-right: 0.375rem;
    height: 16.5px;
    display: inline-flex;
    align-items: center;
    align-self: center;
    justify-content: center;
    border-radius: 0.25rem;
    font-size: 10px;
    font-weight: 400;
}

[data-theme="dark"] .filter_box .dd-row-detail {
    color: rgb(148 163 184 / var(--tw-text-opacity, 1));
    background-color: rgb(31 35 54 / 0.5);
    padding-left: 0.375rem;
    padding-right: 0.375rem;
    height: 16.5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    font-size: 10px;
    font-weight: 400;
    border: none;
}

[data-theme="dark"] .filter_box .chev {
    filter: brightness(0) saturate(100%) invert(70%) sepia(10%) saturate(500%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

[data-theme="dark"] .filter_box .dd-clear,
[data-theme="dark"] .filter_box .range-clear,
[data-theme="dark"] .filter_box .price-clear {
    color: #64748b;
}

[data-theme="dark"] .filter_box .dd-clear:hover,
[data-theme="dark"] .filter_box .range-clear:hover,
[data-theme="dark"] .filter_box .price-clear:hover {
    color: #EF4444;
}

/* Price input обводка при фокусе - темная тема */
[data-theme="dark"] .filter_box .price-range .dd-head:focus-within {
    border: 1px solid rgb(234 179 8 / 0.5);
}

[data-theme="dark"] .filter_box .dropdown.disabled .dd-head,
[data-theme="dark"] .filter_box .range-dd.disabled .range-head {
    background: #1F2336;
    border-color: #2E354F;
}

[data-theme="dark"] .filter_box .dropdown.disabled .dd-input {
    color: #64748b;
}

/* Spec carousel в тёмной теме */
[data-theme="dark"] .filter_box .spec-slide-name {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
}

[data-theme="dark"] .filter_box .spec-slide-details {
    color: #94a3b8;
}

/* ========== PAGE CONTENT (Compare, Contacts) ========== */
.page-content {
    padding: 40px 0;
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
}

.page-title h1 {
    font-family: 'Fira Code', monospace;
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.page-subtitle {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: #666666;
    margin: 0;
}

[data-theme="dark"] .page-subtitle {
    color: #94a3b8;
}

/* Compare page */
.compare-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.compare-placeholder {
    text-align: center;
    padding: 60px 40px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .compare-placeholder {
    background: rgba(57, 61, 92, 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.placeholder-icon {
    font-size: 48px;
    color: #FFB900;
    margin-bottom: 24px;
}

.compare-placeholder p {
    font-family: 'Fira Code', monospace;
    font-size: 16px;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.placeholder-hint {
    font-size: 13px !important;
    color: #666666 !important;
}

[data-theme="dark"] .placeholder-hint {
    color: #94a3b8 !important;
}

/* Contacts page */
.contacts-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    border: 0.5px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .contact-card {
    background: rgba(57, 61, 92, 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .contact-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFB900;
    border-radius: 12px;
    font-size: 24px;
    color: #000000;
}

.contact-icon .fa-telegram {
    color: #000000;
}

.contact-icon .fa-whatsapp {
    color: #000000;
}

.contact-info h3 {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.contact-link {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: #FFB900;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: #e5a600;
}

.contact-text {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: var(--text-primary);
    margin: 0;
}

.contacts-cta {
    text-align: center;
    margin-top: 40px;
}

/* Back to home button */
.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: 1.5px solid rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 24px;
}

.btn-back-home:hover {
    border-color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .btn-back-home {
    border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .btn-back-home:hover {
    border-color: #FFFFFF;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

/* ========== PAGE HEADER INLINE ========== */
.page-header-inline {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.8);
    margin-bottom: 18px;
}

[data-theme="dark"] .page-header-inline {
    background: rgba(57, 61, 92, 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.page-title-inline {
    font-family: 'Fira Code', monospace;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.page-count-inline {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: #FFB900;
    background: rgba(255, 185, 0, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

/* ========== PAGE PLACEHOLDER BOX ========== */
.page-placeholder-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 40px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.8);
    min-height: 300px;
}

[data-theme="dark"] .page-placeholder-box {
    background: rgba(57, 61, 92, 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.page-placeholder-box .placeholder-icon {
    font-size: 48px;
    color: #FFB900;
    margin-bottom: 24px;
}

.page-placeholder-box .placeholder-text {
    font-family: 'Fira Code', monospace;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.page-placeholder-box .placeholder-hint {
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    color: #666666;
    margin: 0;
}

[data-theme="dark"] .page-placeholder-box .placeholder-hint {
    color: #94a3b8;
}

/* ========== CONTACTS GRID ========== */
.contacts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.contacts-grid .contact-card {
    margin: 0;
}

/* ========== FOOTER ========== */
.footer {
    background-color: rgba(46, 54, 79, 0.5);
    width: 100%;
    margin-top: 84px;
    padding-bottom: 60px;
}

[data-theme="dark"] .footer {
    background-color: rgba(46, 54, 79, 0.5);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 80px 0;
    box-sizing: border-box;
}

/* Колонки */
.footer-columns {
    display: flex;
    height: auto;
    justify-content: center;
    gap: 40px;
}

.footer-column {
    flex: 1;
    padding: 0 20px;
}

.footer-column-left {
    flex: 1.2;
    padding: 30px 0 0;
}

.footer-column-center {
    flex: 0 0 430px;
    padding: 30px 0;
    display: flex;
    justify-content: center;
    gap: 70px;
}

.footer-column-right {
    padding: 30px 0 0 50px;
}

.footer-nav-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: center;
}

.footer-nav-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 12px 0;
}

[data-theme="dark"] .footer-nav-title {
    color: #FFFFFF;
}

.footer-nav-link {
    font-size: 16px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.5);
    text-decoration: none;
    margin-bottom: 8px;
}

.footer-nav-link:hover {
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .footer-nav-link {
    color: #A2A2A2;
}

[data-theme="dark"] .footer-nav-link:hover {
    color: #FFFFFF;
}

.footer-column-center {
    border-right: 1px solid #5A586A;
    border-left: 1px solid #5A586A;
}

.footer-column-left {
    padding-left: 0;
}

.footer-column-right {
    padding-right: 0;
}

.footer-logo {
    display: block;
    margin: 5px 50px 0;
    width: 182px;
    height: auto;
}

.footer-slogan {
    margin: 14px 50px 0;
    font-size: 16px;
    color: #FFFFFF;
    text-align: center;
}

/* Иконки */
.footer-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

.footer-icon-link {
    display: block;
    width: 26px;
    height: 26px;
    line-height: 0;
}

.footer-icon-link img {
    display: block;
    width: 26px;
    height: 26px;
    opacity: 0.5;
    filter: brightness(0);
}

[data-theme="dark"] .footer-icon-link img {
    opacity: 1;
    filter: none;
}

/* Контакты в правой колонке футера */
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: #000000;
    font-size: 16px;
    line-height: 1.4;
    text-align: left;
}

[data-theme="dark"] .footer-contact-item {
    color: #FFFFFF;
}

.phone-contact {
    margin-bottom: 16px;
}

.footer-contact-icon {
    width: 12px;
    height: auto;
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.5;
    filter: brightness(0);
}

[data-theme="dark"] .footer-contact-icon {
    opacity: 1;
    filter: none;
}

/* increase spacing between phone number lines by 3px */
.phone-contact span {
    line-height: calc(1.4em + 3px);
}

/* Карта в футере для мобильной версии */
.footer-map-mobile {
    display: none;
    margin-top: 30px;
    text-align: center;
    position: relative;
}

.footer-map-mobile #map {
    display: inline-block;
    max-width: 100%;
    height: auto;
    position: relative !important;
    z-index: 1;
}

/* Нижняя часть */
.footer-legal-block {
    padding-top: 28px;
    text-align: center;
}

.footer-legal-text {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.5);
    margin: 0;
}

[data-theme="dark"] .footer-legal-text {
    color: #A2A2A2;
}

.footer-spacer {
    display: inline-block;
    width: 19px;
}

.copyright-icon {
    width: 10px;
    height: 10px;
    vertical-align: -1px;
    filter: brightness(0);
}

[data-theme="dark"] .copyright-icon {
    filter: none;
}

.mobile-br {
    display: none;
}

.footer-copyright-text {
    margin-top: 16px;
    font-size: 12px;
    color: #000000;
}

[data-theme="dark"] .footer-copyright-text {
    color: #FFFFFF;
}

[data-theme="dark"] .nav-item:hover {
    border-left-color: #6366F1;
}

/* Правый блок - содержимое */
.right-content {
    flex: 1;
    padding: 20px;
    background-color: transparent;
}

[data-theme="dark"] .right-content {
    background-color: transparent;
}

/* Сетка карточек */
.cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    justify-content: flex-start;
}

.card {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    flex: 0 0 300px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

/* Скролл для темной темы */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1A1A1A;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #404040;
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #505050;
}



@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.map-container {
    background-color: gray;
    border-radius: 20px;
    margin: 24px auto;
    position: relative;
    overflow: hidden;
    display: none; /* hide by default; shown on mobile below */
    width: 100%;
    aspect-ratio: 219 / 144;
    height: auto;
}

#yandex-map {
    width: 100%;
    height: 100%;
    border: none;
}

/* Mobile rules moved to static/css/mobile.css and are loaded via a
   media-prefixed <link> so they do not affect desktop views. */

/* Desktop: ensure mobile-only containers and markup remain hidden */
@media (min-width: 769px) {
    #che168-cards-mobile,
    #che168-cards-mobile-gallery,
    .che168-card-mobile,
    .che168-card-mobile-wrap,
    .che168-card-header-mobile {
        display: none !important;
    }
}

/* ============================================
   IN STOCK BUTTON - "В наличии" (Glass Style)
   ============================================ */

/* --- КНОПКА --- */
.btn-in-stock {
    width: 160px; 
    height: 45px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    
    /* Стеклянный фон */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    border: 1px solid rgba(255, 255, 255, 0.15);
    
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    font-family: 'Fira Code', monospace;
}

/* Hover и Active состояния */
.btn-in-stock:hover,
.btn-in-stock:active {
    background: rgba(255, 255, 255, 0.08);
    border-color: #ffb900;
    box-shadow: 0 0 20px rgba(255, 185, 0, 0.15), 0 0 0 1px rgba(255, 185, 0, 0.1);
    transform: translateY(-1px);
}

.btn-in-stock:active {
    transform: translateY(0);
}

/* --- ПУЛЬСИРУЮЩАЯ ТОЧКА --- */
.btn-in-stock .status-dot-wrapper {
    position: relative;
    width: 8px;
    height: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-in-stock .status-dot {
    width: 6px;
    height: 6px;
    background-color: #ffb900;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 8px rgba(255, 185, 0, 0.8);
}

.btn-in-stock .status-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    transform: translate(-50%, -50%);
    background-color: #ffb900;
    border-radius: 50%;
    opacity: 0.7;
    animation: stock-ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes stock-ping {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    75%, 100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

/* --- ТЕКСТ --- */
.btn-in-stock .btn-text-stock {
    color: #e2e8f0;
    font-size: 16px; 
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    transition: color 0.3s ease;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.btn-in-stock:hover .btn-text-stock,
.btn-in-stock:active .btn-text-stock {
    color: #ffb900;
    text-shadow: 0 0 15px rgba(255, 185, 0, 0.6);
}

/* --- ИКОНКА КОРОБКИ --- */
.btn-in-stock .icon-box-wrapper {
    color: #94a3b8;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.btn-in-stock:hover .icon-box-wrapper,
.btn-in-stock:active .icon-box-wrapper {
    color: #ffffff; 
    transform: translateY(-2px);
}

/* --- ЭФФЕКТ СКАНЕРА --- */
.btn-in-stock::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 185, 0, 0.2),
        rgba(255, 255, 255, 0.05),
        transparent
    );
    transform: skewX(-20deg);
    pointer-events: none;
    transition: none;
}

.btn-in-stock:hover::after {
    animation: scan-stock 1.5s ease-in-out infinite;
}

@keyframes scan-stock {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* === LIGHT THEME === */
[data-theme="light"] .btn-in-stock {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .btn-in-stock:hover,
[data-theme="light"] .btn-in-stock:active {
    background: rgba(255, 255, 255, 0.8);
    border-color: #b22234;
    box-shadow: 0 10px 25px -5px rgba(178, 34, 52, 0.2), 0 0 0 1px rgba(178, 34, 52, 0.1);
}

[data-theme="light"] .btn-in-stock .status-dot {
    background-color: #b22234;
    box-shadow: none;
}

[data-theme="light"] .btn-in-stock .status-pulse {
    background-color: #b22234;
}

[data-theme="light"] .btn-in-stock .btn-text-stock {
    color: #0f172a;
    text-shadow: none;
}

[data-theme="light"] .btn-in-stock:hover .btn-text-stock,
[data-theme="light"] .btn-in-stock:active .btn-text-stock {
    color: #b22234;
    text-shadow: none;
}

[data-theme="light"] .btn-in-stock .icon-box-wrapper {
    color: #64748b;
}

[data-theme="light"] .btn-in-stock:hover .icon-box-wrapper,
[data-theme="light"] .btn-in-stock:active .icon-box-wrapper {
    color: #0f172a;
}

[data-theme="light"] .btn-in-stock::after {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(178, 34, 52, 0.1),
        transparent
    );
