/* ===== CAR PAGE STYLES ===== */
/* Вынесено из car.html для кэширования и оптимизации */

/* Скрываем мобильные элементы на десктопе */
@media (min-width: 769px) {
    .mobile-header,
    .mobile-sidebar,
    .mobile-sidebar-overlay {
        display: none !important;
    }
}

/* Заливка у левого блока только на странице car */
.content-left {
    width: 630px;
    max-width: 630px;
    flex-shrink: 0;
}

/* ===== ЦЕНТРАЛЬНЫЙ БЛОК С НАЗВАНИЕМ АВТО ===== */
.content-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 16px;
}

/* ===== БЛОК ЦЕНЫ И ДЕЙСТВИЙ ===== */
.car-price-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 26px 22px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 100;
}

/* Первый ряд: цена + плашка */
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 28px;
}

.price-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-label {
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: #64748b;
    font-weight: 400;
}

.price-value {
    font-family: 'Fira Code', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #000000;
}

.car-good-choice {
    padding: 5px 10px;
    background: #EFDDAF;
    color: #B48609;
    border: 1px solid #E6C263;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    margin-bottom: 3px;
}

/* Ряд с кнопками */
.action-row {
    display: flex;
    justify-content: center;
}

.action-row + .action-row {
    margin-top: 18px;
}

/* Кнопка "Выбрать этот авто" */
.btn-select-car {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    width: 100%;
    height: 38px;
    padding: 0 16px;
    background: #172554;
    color: #ffffff;
    border: 1px solid #1e3a8a;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    overflow: hidden;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-select-car:hover {
    background: #1e3a8a;
    box-shadow: 0 4px 12px rgba(23, 37, 84, 0.3);
}

/* Shimmer effect */
.btn-select-car::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transform: skewX(-12deg);
}

.btn-select-car:hover::before {
    animation: btn-shimmer 1.5s infinite;
}

@keyframes btn-shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

.btn-select-car .btn-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.btn-select-car:hover .btn-icon {
    transform: translateX(2px);
}

/* Кнопка "Формирование цены" */
.btn-price-calc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 38px;
    padding: 0 16px;
    background: #e2e8f0;
    color: #64748b;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-price-calc:hover {
    background: #d1d5db;
    border-color: #9ca3af;
}

.btn-price-calc .btn-icon-arrow {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    transition: transform 0.2s ease;
}

.btn-price-calc:hover .btn-icon-arrow {
    transform: translateX(4px);
}

/* Dark theme */
[data-theme="dark"] .car-price-actions {
    background: rgba(57, 61, 92, 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .price-label {
    color: #94a3b8;
}

[data-theme="dark"] .price-value {
    color: #ffffff;
}

[data-theme="dark"] .car-good-choice {
    background: #355E69;
    border-color: #4D9888;
    color: #71F0B3;
}

[data-theme="dark"] .btn-select-car {
    background: #ffffff;
    color: #111428;
    border: none;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .btn-select-car:hover {
    box-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .btn-select-car::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
}

[data-theme="dark"] .btn-select-car .btn-icon {
    filter: none;
}

[data-theme="dark"] .btn-price-calc {
    background: #2d3246;
    border-color: rgba(51, 65, 85, 0.5);
    color: #94a3b8;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .btn-price-calc:hover {
    background: #373d54;
    border-color: #475569;
}

/* Блок краткие характеристики авто */
.car-specs-summary {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 22px 22px;
    gap: 14px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 100;
    font-family: 'Fira Code', monospace;
}

[data-theme="dark"] .car-specs-summary {
    background: rgba(57, 61, 92, 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

/* Строка характеристики */
.specs-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.specs-summary-row:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.car-specs-summary .specs-label {
    font-size: 14px;
    font-weight: 400;
    color: #888;
}

.car-specs-summary .specs-value {
    font-size: 14px;
    font-weight: 400;
    color: #333;
    text-align: right;
}

[data-theme="dark"] .specs-summary-row {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .specs-label {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .specs-value {
    color: #fff;
}

/* Хлебные крошки под меню */
.car-page-breadcrumb {
    font-size: 12px;
    color: #666666;
    margin: 8px 0 12px 0;
    font-family: 'Fira Code', monospace;
}
[data-theme="dark"] .car-page-breadcrumb {
    color: #AAAAAA;
}

/* ===== ЗАГОЛОВОК АВТОМОБИЛЯ (НАД ГАЛЕРЕЕЙ) ===== */
.car-hero-title {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
    padding: 5px 20px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    border: 0.5px solid rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 100;
}

.car-hero-name {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 24px;
    font-weight: 600;
    color: #000000;
    line-height: 1.3;
}

.car-hero-brand {
    text-transform: uppercase;
}

.car-hero-model {
    text-transform: uppercase;
}

.car-hero-year {
    color: #000000;
    font-weight: 700;
}

.car-hero-spec {
    font-family: 'Fira Code', monospace;
    font-size: 14px;
    color: #38383A;
    font-weight: 400;
}

[data-theme="dark"] .car-hero-title {
    background: rgba(57, 61, 92, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .car-hero-name {
    color: #ffffff;
}

[data-theme="dark"] .car-hero-year {
    color: #ffffff;
}

[data-theme="dark"] .car-hero-spec {
    color: #94a3b8;
}

/* ===== ГАЛЕРЕЯ ИЗОБРАЖЕНИЙ ===== */
.car-gallery {
    width: 630px;
    max-width: 630px;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
[data-theme="dark"] .car-gallery {
    background: transparent;
}

/* Hero Image */
.gallery-hero {
    position: relative;
    aspect-ratio: 899 / 675;
    overflow: hidden;
    cursor: pointer;
    border-radius: 20px;
}

/* Скелетон для hero */
.gallery-hero-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0.3) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}
[data-theme="dark"] .gallery-hero-skeleton {
    background: linear-gradient(90deg, rgba(58,58,58,0.5) 0%, rgba(74,74,74,0.5) 50%, rgba(58,58,58,0.5) 100%);
    background-size: 200% 100%;
}
.gallery-hero-skeleton.hidden {
    display: none;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.gallery-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}
.gallery-hero-img.fade {
    opacity: 0;
}

/* Counter - скрыт на большой картинке */
.gallery-counter {
    display: none;
}

/* Navigation Arrows */
.gallery-nav {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 3;
}
.gallery-nav svg {
    display: block;
}
.gallery-hero:hover .gallery-nav {
    opacity: 1;
}
.gallery-nav:hover {
    opacity: 1;
}
.gallery-nav:focus {
    outline: none;
}
.gallery-nav-prev { left: 0; padding-left: 16px; }
.gallery-nav-next { right: 0; padding-right: 16px; }

/* Thumbnails - 6 в ряд */
.gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    padding: 13px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.5);
    border: 0.5px solid rgba(255, 255, 255, 0.8);
}

[data-theme="dark"] .gallery-thumbs {
    background: rgba(57, 61, 92, 0.4);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.gallery-thumb {
    /* 6 в ряд: (100% - 8px * 5 - 40px padding) / 6 */
    width: calc((100% - 8px * 5) / 6);
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    border: none;
    background: transparent;
    transition: all 0.2s ease;
    position: relative;
}

.gallery-thumb.active {
    transform: translateY(-2px);
}

/* Скелетон для миниатюр */
.gallery-thumb-skeleton {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.5) 50%, rgba(255,255,255,0.3) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    z-index: 5;
    pointer-events: none;
}
[data-theme="dark"] .gallery-thumb-skeleton {
    background: linear-gradient(90deg, rgba(58,58,58,0.5) 0%, rgba(74,74,74,0.5) 50%, rgba(58,58,58,0.5) 100%);
    background-size: 200% 100%;
}
.gallery-thumb-skeleton.hidden {
    display: none;
}

[data-theme="dark"] .gallery-thumb {
    background: transparent;
}
/* Без затемнения для неактивных */
.gallery-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    pointer-events: none;
    transition: all 0.2s ease;
}
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-thumb:hover::after {
    background: rgba(0, 0, 0, 0.15);
}
/* Активная миниатюра */
.gallery-thumb.active::after {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 0;
}
.gallery-thumb:focus {
    outline: none;
}

/* ===== LIGHTBOX ===== */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.gallery-lightbox:not([hidden]) {
    display: block;
    opacity: 1;
}
.gallery-lightbox[hidden] {
    display: none !important;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: #F8FAFC;
    cursor: pointer;
}

.lightbox-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    overflow: hidden;
}

/* --- HEADER --- */
.lightbox-header {
    pointer-events: auto;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 20;
    transition: transform 0.3s ease;
}
.lightbox-header.is-hidden {
    transform: translateY(-100%);
}

.lightbox-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.lightbox-counter {
    font-family: 'Fira Code', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: 0.1em;
}
.lightbox-counter-total {
    color: #64748b;
    font-size: 1rem;
}

.lightbox-header-divider {
    height: 16px;
    width: 1px;
    background: #e2e8f0;
}

.lightbox-header-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: #64748b;
    display: none;
}
@media (min-width: 640px) {
    .lightbox-header-title {
        display: block;
    }
}

.lightbox-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lightbox-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.lightbox-btn:hover {
    color: #d97706;
    border-color: #d97706;
}
.lightbox-btn:focus {
    outline: none;
}
.lightbox-btn-close:hover {
    color: #ef4444;
    border-color: #ef4444;
    background: #fef2f2;
}
.lightbox-btn svg {
    width: 20px;
    height: 20px;
}
.lightbox-btn .icon-zoom.hidden {
    display: none;
}

/* --- MAIN IMAGE AREA --- */
.lightbox-content {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.lightbox-content:hover .lightbox-nav {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.lightbox-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.lightbox-loader.is-loading {
    opacity: 1;
}
.lightbox-loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #d97706;
    border-radius: 9999px;
    animation: lightbox-spin 1s linear infinite;
}
@keyframes lightbox-spin {
    to { transform: rotate(360deg); }
}

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0, 0, 0.2, 1), opacity 0.3s ease;
    cursor: zoom-in;
    user-select: none;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 25px 25px rgba(0,0,0,0.15));
    opacity: 0;
}
.lightbox-img.is-loaded {
    opacity: 1;
}
.lightbox-img.is-zoomed {
    cursor: grab;
}
.lightbox-img.is-zoomed.is-dragging {
    cursor: grabbing;
}
.lightbox-img.is-loading {
    opacity: 0.5;
    filter: blur(4px) drop-shadow(0 25px 25px rgba(0,0,0,0.15));
}

/* --- NAVIGATION ARROWS --- */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.8);
    color: #0F172A;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 20;
    opacity: 0;
    backdrop-filter: blur(4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}
.lightbox-nav:hover {
    background: #fff;
    color: #d97706;
    transform: translateY(-50%) scale(1.1);
}
.lightbox-nav:active {
    transform: translateY(-50%) scale(0.95);
}
.lightbox-nav:focus {
    outline: none;
}
.lightbox-nav svg {
    width: 24px;
    height: 24px;
}
.lightbox-nav-prev {
    left: 24px;
    transform: translateY(-50%) translateX(-16px);
}
.lightbox-nav-next {
    right: 24px;
    transform: translateY(-50%) translateX(16px);
}

/* --- FOOTER with Thumbnails --- */
.lightbox-footer {
    pointer-events: auto;
    height: 112px;
    z-index: 20;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0 32px;
}
.lightbox-footer.is-hidden {
    transform: translateY(100%);
}

.lightbox-thumbs-wrapper {
    position: relative;
    max-width: 90vw;
    width: 100%;
    overflow: hidden;
}
@media (min-width: 768px) {
    .lightbox-thumbs-wrapper {
        width: auto;
    }
}

.lightbox-thumbs-gradient {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 64px;
    z-index: 10;
    pointer-events: none;
    border-radius: 16px;
}
.lightbox-thumbs-gradient-left {
    left: 0;
    background: linear-gradient(to right, #F8FAFC, rgba(248, 250, 252, 0.8), transparent);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.lightbox-thumbs-gradient-right {
    right: 0;
    background: linear-gradient(to left, #F8FAFC, rgba(248, 250, 252, 0.8), transparent);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.lightbox-thumbs-panel {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 20px 25px -5px rgba(226, 232, 240, 0.5);
    overflow: hidden;
}
.lightbox-thumbs-panel:hover {
    background: #fff;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
}

.lightbox-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    max-width: 672px;
    padding: 4px 16px;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
}
.lightbox-thumbs::-webkit-scrollbar {
    display: none;
}
.lightbox-thumbs.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.lightbox-thumb {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.5;
    cursor: pointer;
    background: none;
    padding: 0;
}
.lightbox-thumb:hover {
    opacity: 1;
    transform: scale(1.05);
}
.lightbox-thumb.active {
    border-color: #d97706;
    opacity: 1;
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    -webkit-user-drag: none;
    user-drag: none;
}

/* ===== LIGHTBOX DARK THEME ===== */
[data-theme="dark"] .lightbox-overlay {
    background: #0f111a;
}

[data-theme="dark"] .lightbox-counter {
    color: #fff;
}
[data-theme="dark"] .lightbox-counter-total {
    color: #4B5563;
}

[data-theme="dark"] .lightbox-header-divider {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .lightbox-header-title {
    color: #9CA3AF;
}

[data-theme="dark"] .lightbox-btn {
    background: transparent;
    border-color: transparent;
    color: #9CA3AF;
}
[data-theme="dark"] .lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: transparent;
}
[data-theme="dark"] .lightbox-btn-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

[data-theme="dark"] .lightbox-loader-spinner {
    border-color: #374151;
    border-top-color: #ffb900;
}

[data-theme="dark"] .lightbox-nav {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}
[data-theme="dark"] .lightbox-nav:hover {
    background: #ffb900;
    border-color: transparent;
    color: #000;
}

[data-theme="dark"] .lightbox-thumbs-gradient-left {
    background: linear-gradient(to right, #0f111a, rgba(15, 17, 26, 0.8), transparent);
}
[data-theme="dark"] .lightbox-thumbs-gradient-right {
    background: linear-gradient(to left, #0f111a, rgba(15, 17, 26, 0.8), transparent);
}

[data-theme="dark"] .lightbox-thumbs-panel {
    background: rgba(26, 29, 45, 0.9);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .lightbox-thumbs-panel:hover {
    background: rgba(26, 29, 45, 0.95);
    border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .lightbox-thumb {
    opacity: 0.4;
}
[data-theme="dark"] .lightbox-thumb.active {
    border-color: #ffb900;
    box-shadow: 0 0 12px rgba(255, 185, 0, 0.2);
}

/* ===== АККОРДЕОН ХАРАКТЕРИСТИК ===== */
.specs-container {
    margin-top: 16px;
}

/* --- АККОРДЕОНЫ (LIGHT) --- */
.accordion-item {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.accordion-item:hover {
    border-color: #cbd5e1;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.accordion-item.open {
    border-color: #cbd5e1;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
}

.accordion-header {
    padding: 18px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0F172A;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.3;
}

.header-icon-box {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFB900;
}

.chevron {
    color: #94a3b8;
    transition: transform 0.3s ease;
    margin-left: 12px;
    font-size: 1.2rem;
}

.accordion-item.open .chevron {
    transform: rotate(180deg);
    color: #0F172A;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
}

.content-inner {
    padding: 0 24px 24px 24px;
    border-top: 1px solid #f1f5f9;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 40px;
    margin-top: 20px;
}

.spec-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.spec-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    font-weight: 700;
}

.spec-value {
    font-size: 1rem;
    font-weight: 600;
    color: #0F172A;
    display: block;
    border-bottom: 1px dashed #e2e8f0;
    padding-bottom: 4px;
    line-height: 1.8;
}

.spec-value-mono {
    font-family: 'Fira Code', monospace;
    font-weight: 700;
    color: #334155;
}

.spec-value-accent {
    color: #B22234;
}

.spec-value-yellow {
    color: #d97706;
}

.spec-value-na {
    color: #94a3b8;
}

.spec-line-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-primary, #1e293b);
}

.spec-line-item .check-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    color: #22c55e;
    flex-shrink: 0;
}

.spec-line-item.spec-value-na {
    color: #94a3b8;
}

[data-theme="dark"] .spec-line-item {
    color: #e2e8f0;
}

/* --- АККОРДЕОНЫ (DARK) --- */
[data-theme="dark"] .accordion-item {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

[data-theme="dark"] .accordion-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(30, 41, 59, 0.75);
}

[data-theme="dark"] .accordion-item.open {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.3);
}

[data-theme="dark"] .accordion-header {
    background: rgba(57, 61, 92, 0.4);
    border-radius: 0;
}

[data-theme="dark"] .header-title {
    color: #ffffff;
}

[data-theme="dark"] .header-icon-box {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .chevron {
    color: #64748b;
}

[data-theme="dark"] .accordion-item.open .chevron {
    color: #ffffff;
}

[data-theme="dark"] .content-inner {
    border-top-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .spec-label {
    color: #94a3b8;
}

[data-theme="dark"] .spec-value {
    color: #f1f5f9;
    border-bottom-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .spec-value-mono {
    color: #e2e8f0;
}

[data-theme="dark"] .spec-value-yellow {
    color: #FFB900;
}

/* Статусы для параметров */
.status-yes { color: #16a34a; }
.status-yes i { color: #16a34a; }
.status-no { color: #94a3b8; opacity: 0.8; }
[data-theme="dark"] .status-yes { color: #4ade80; }
[data-theme="dark"] .status-yes i { color: #4ade80; }
[data-theme="dark"] .status-no { color: #64748b; opacity: 0.6; }

/* Серые разделители */
.spec-separator {
    color: #94a3b8;
    margin: 0 4px;
}
.spec-dash {
    color: #94a3b8;
    margin-left: 4px;
}
.spec-value-muted {
    color: #94a3b8;
}
[data-theme="dark"] .spec-separator,
[data-theme="dark"] .spec-dash,
[data-theme="dark"] .spec-value-muted {
    color: #64748b;
}

/* Цветные кубики */
.color-swatch-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}
.color-swatch-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
}
/* Двухцветный квадрат - диагональ */
.color-swatch-dual {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.15);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.color-swatch-dual::before,
.color-swatch-dual::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
}
.color-swatch-dual::before {
    left: 0;
}
.color-swatch-dual::after {
    right: 0;
}
[data-theme="dark"] .color-swatch,
[data-theme="dark"] .color-swatch-dual {
    border-color: rgba(255,255,255,0.2);
}
.color-swatch-name {
    font-size: 0.85rem;
    color: #334155;
}
[data-theme="dark"] .color-swatch-name {
    color: #e2e8f0;
}

/* ===== БЛОК ХАРАКТЕРИСТИК ===== */

/* Панель управления аккордеонами - sticky при скроле */
.accordion-controls {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 4px;
    margin-bottom: 16px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px;
    box-shadow: none;
}

/* Когда фильтр прилип — убираем верхние скругления и усиливаем тень */
.accordion-controls.is-stuck {
    border-radius: 0 0 20px 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
}

/* ===== УМНЫЙ ПОИСК ===== */
.specs-search-box {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;

    display: flex;
    align-items: center;
}

.specs-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #94a3b8;
    pointer-events: none;
}

.specs-search-input {
    width: 100%;
    height: 100%;
    padding: 10px 12px 10px 33px;
    border: 1px solid #e2e8f0;
    border-radius: 16px 4px 4px 16px;
    font-size: 0.875rem;
    color: #1e293b;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(8px);
    transition: all 0.2s;
    box-sizing: border-box;
    min-height: 44px;
}

.specs-search-input::placeholder {
    color: #94a3b8;
}

.specs-search-input:focus {
    outline: none;
    border-color: #B22234;
    box-shadow: 0 0 0 3px rgba(178, 34, 52, 0.1);
}

/* Выпадающий список подсказок */
.specs-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    max-height: 280px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.specs-suggestions.active {
    display: block;
}

.specs-suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
}

.specs-suggestion-item:last-child {
    border-bottom: none;
}

.specs-suggestion-item:hover,
.specs-suggestion-item.selected {
    background: rgba(178, 34, 52, 0.05);
}

.specs-suggestion-icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    color: #94a3b8;
    margin-top: 2px;
}

/* SVG иконки в подсказках поиска */
.specs-suggestion-item svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    color: #94a3b8;
    margin-top: 2px;
    flex-shrink: 0;
}

.specs-suggestion-item:hover .specs-suggestion-icon,
.specs-suggestion-item.selected .specs-suggestion-icon,
.specs-suggestion-item:hover svg,
.specs-suggestion-item.selected svg {
    color: #B22234;
}

.specs-suggestion-text {
    flex: 1;
    min-width: 0;
}

.specs-suggestion-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
}

.specs-suggestion-section {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.specs-suggestion-no-results {
    padding: 12px 14px;
    font-size: 0.875rem;
    color: #64748b;
    text-align: center;
}

/* Подсветка найденного элемента */
.spec-cell.highlight-flash {
    animation: specFlash 1.5s ease;
}

@keyframes specFlash {
    0%, 100% { background: transparent; }
    25%, 75% { background: rgba(178, 34, 52, 0.15); }
}

/* Dark theme стили поиска */
[data-theme="dark"] .specs-search-input {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

[data-theme="dark"] .specs-search-input::placeholder {
    color: #64748b;
}

[data-theme="dark"] .specs-search-input:focus {
    border-color: #FFB900;
    box-shadow: 0 0 0 3px rgba(255, 185, 0, 0.15);
}

[data-theme="dark"] .specs-search-icon {
    color: #ffffff;
}

[data-theme="dark"] .specs-suggestions {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .specs-suggestion-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .specs-suggestion-item:hover,
[data-theme="dark"] .specs-suggestion-item.selected {
    background: rgba(255, 185, 0, 0.1);
}

[data-theme="dark"] .specs-suggestion-icon,
[data-theme="dark"] .specs-suggestion-item svg {
    color: #64748b;
}

[data-theme="dark"] .specs-suggestion-item:hover .specs-suggestion-icon,
[data-theme="dark"] .specs-suggestion-item.selected .specs-suggestion-icon,
[data-theme="dark"] .specs-suggestion-item:hover svg,
[data-theme="dark"] .specs-suggestion-item.selected svg {
    color: #FFB900;
}

[data-theme="dark"] .specs-suggestion-label {
    color: #e2e8f0;
}

[data-theme="dark"] .specs-suggestion-section {
    color: #94a3b8;
}

[data-theme="dark"] .specs-suggestion-no-results {
    color: #94a3b8;
}

[data-theme="dark"] .spec-cell.highlight-flash {
    animation: specFlashDark 1.5s ease;
}

@keyframes specFlashDark {
    0%, 100% { background: transparent; }
    25%, 75% { background: rgba(255, 185, 0, 0.15); }
}

.accordion-controls-inner {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 1);
    padding: 4px;
    border-radius: 4px 16px 16px 4px;
    border: 1px solid #e2e8f0;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.accordion-controls-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.accordion-controls-btn:hover {
    color: #B22234;
    background: rgba(178, 34, 52, 0.05);
}

.accordion-controls-divider {
    width: 1px;
    height: 16px;
    background: #cbd5e1;
    margin: 0 4px;
}

[data-theme="dark"] .accordion-controls {
    background: rgba(57, 61, 92, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: none;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .accordion-controls.is-stuck {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .accordion-controls-inner {
    background: rgba(30, 41, 59, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .accordion-controls-btn {
    color: #94a3b8;
}

[data-theme="dark"] .accordion-controls-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .accordion-controls-divider {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== MOBILE - галерея скрыта на мобильных ===== */
@media (max-width: 768px) {
    .car-gallery,
    .gallery-lightbox {
        display: none !important;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    .accordion-header {
        padding: 14px 16px;
    }
    .content-inner {
        padding: 0 16px 16px 16px;
    }
}

/* ===== PRICE MODAL ===== */
.price-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.price-modal-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.price-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
}

.price-modal-content {
    position: relative;
    background: #f8f9fa;
    width: 100%;
    max-width: 672px;
    max-height: 90vh;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.2s ease;
    border: none;
}

.price-modal-overlay.visible .price-modal-content {
    transform: scale(1);
}

/* Modal Header */
.price-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #ffffff;
}

.price-modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.price-modal-header h2 svg {
    width: 24px;
    height: 24px;
    color: #2563eb;
}

.price-modal-header p {
    font-size: 12px;
    color: #64748b;
    margin: 4px 0 0 0;
}

.price-modal-close {
    padding: 8px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.price-modal-close svg {
    width: 20px;
    height: 20px;
}

/* Modal Body */
.price-modal-body {
    overflow-y: auto;
    padding: 24px;
    background: #f8f9fa;
}

/* Custom scrollbar for modal */
.price-modal-body::-webkit-scrollbar {
    width: 6px;
}

.price-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.price-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.price-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Info Block */
.price-info-block {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.price-info-block svg {
    width: 20px;
    height: 20px;
    color: #2563eb;
    flex-shrink: 0;
    margin-top: 2px;
}

.price-info-block p {
    font-size: 14px;
    color: #1e40af;
    line-height: 1.625;
    margin: 0;
}

/* Section */
.price-section {
    margin-bottom: 24px;
}

.price-section:last-child {
    margin-bottom: 0;
}

.price-section-label {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.price-section-label.china {
    background: #fef2f2;
    color: #b91c1c;
    border: none;
}

.price-section-label.logistics {
    background: #fffbeb;
    color: #b45309;
    border: none;
}

.price-section-label.russia {
    background: #ecfdf5;
    color: #047857;
    border: none;
}

.price-section-card {
    background: #ffffff;
    border-radius: 12px;
    border: none;
    padding: 0 8px;
}

.price-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px;
    border-bottom: 1px dashed #e5e7eb;
}

.price-item:last-child {
    border-bottom: none;
}

@media (min-width: 640px) {
    .price-item {
        flex-direction: row;
        align-items: center;
    }
}

.price-item-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

@media (min-width: 640px) {
    .price-item-left {
        margin-bottom: 0;
    }
}

.price-item-icon {
    margin-top: 2px;
    color: #9ca3af;
}

.price-item-icon svg {
    width: 16px;
    height: 16px;
}

.price-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    display: block;
}

.price-item-desc {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
    display: block;
}

.price-item-value {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

/* Modal Footer */
.price-modal-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 24px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.price-total-row {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 12px;
    border-top: 1px solid #d1d5db;
}

@media (min-width: 640px) {
    .price-total-row {
        flex-direction: row;
        align-items: center;
    }
}

.price-total-left {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

@media (min-width: 640px) {
    .price-total-left {
        margin-bottom: 0;
    }
}

.price-total-left svg {
    width: 16px;
    height: 16px;
    color: #9ca3af;
    margin-top: 2px;
}

.price-total-label {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.price-total-value {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.price-modal-close-btn {
    width: 100%;
    margin-top: 16px;
    padding: 12px;
    background: #172554;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.price-modal-close-btn:hover {
    opacity: 0.9;
}

/* Dark Theme Modal */
[data-theme="dark"] .price-modal-backdrop {
    background: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .price-modal-content {
    background: #1e2130;
    border-color: rgba(51, 65, 85, 0.5);
}

[data-theme="dark"] .price-modal-header {
    background: #1e2130;
    border-color: rgba(51, 65, 85, 0.5);
}

[data-theme="dark"] .price-modal-header h2 {
    color: #ffffff;
}

[data-theme="dark"] .price-modal-header p {
    color: #94a3b8;
}

[data-theme="dark"] .price-modal-close {
    background: #1e293b;
    border-color: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .price-modal-close:hover {
    background: #334155;
    color: #ffffff;
}

[data-theme="dark"] .price-modal-body {
    background: #1e2130;
}

[data-theme="dark"] .price-modal-body::-webkit-scrollbar-track {
    background: #1e2130;
}

[data-theme="dark"] .price-modal-body::-webkit-scrollbar-thumb {
    background: #475569;
}

[data-theme="dark"] .price-modal-body::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

[data-theme="dark"] .price-info-block {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .price-info-block p {
    color: #bfdbfe;
}

[data-theme="dark"] .price-section-card {
    background: #262b3c;
    border-color: rgba(51, 65, 85, 0.3);
}

[data-theme="dark"] .price-section-label.china {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.1);
}

[data-theme="dark"] .price-section-label.logistics {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.1);
}

[data-theme="dark"] .price-section-label.russia {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

[data-theme="dark"] .price-item {
    border-color: #334155;
}

[data-theme="dark"] .price-item-icon {
    color: #475569;
}

[data-theme="dark"] .price-item-title {
    color: #e2e8f0;
}

[data-theme="dark"] .price-item-desc {
    color: #64748b;
}

[data-theme="dark"] .price-item-value {
    color: #ffffff;
}

[data-theme="dark"] .price-modal-footer {
    background: #1e2130;
    border-color: rgba(51, 65, 85, 0.5);
}

[data-theme="dark"] .price-total-row {
    border-color: #334155;
}

[data-theme="dark"] .price-total-left svg {
    color: #64748b;
}

[data-theme="dark"] .price-total-label {
    color: #ffffff;
}

[data-theme="dark"] .price-total-value {
    color: #ffffff;
}

[data-theme="dark"] .price-modal-close-btn {
    background: #ffffff;
    color: #0f172a;
}

[data-theme="dark"] .price-modal-close-btn:hover {
    background: #f1f5f9;
}

/* ===== MANAGER MODAL ===== */
/* ===== MANAGER MODAL ANIMATIONS ===== */
@keyframes qr-appear {
    0% { opacity: 0; transform: scale(0.9); filter: blur(4px); }
    100% { opacity: 1; transform: scale(1); filter: blur(0); }
}

@keyframes scan-line {
    0% { top: 0%; opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

@keyframes icon-pop {
    0% { transform: translate(-50%, -50%) scale(0); }
    60% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

/* ===== MANAGER MODAL BASE ===== */
.manager-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.manager-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.manager-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.3);
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.manager-modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 896px;
    height: 600px;
    max-height: 90vh;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.6);
    ring: 1px solid rgba(15, 23, 42, 0.05);
}

.manager-modal-overlay.visible .manager-modal-content {
    opacity: 1;
    transform: translateY(0);
}

/* Modal Header */
.manager-modal-header {
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.manager-modal-logo {
    display: flex;
    flex-direction: column;
    line-height: 1;
    letter-spacing: -0.05em;
    font-weight: 900;
    font-style: italic;
}

.manager-modal-logo-top {
    font-size: 24px;
    color: #0f172a;
}

.manager-modal-logo-bottom {
    font-size: 24px;
    color: #b22234;
    display: flex;
    align-items: center;
    gap: 4px;
}

.manager-modal-logo-star {
    font-size: 12px;
    font-style: normal;
}

/* City Tabs */
.manager-city-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.manager-city-tab {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manager-city-tab:hover {
    color: #b22234;
    background: rgba(255, 255, 255, 0.5);
}

.manager-city-tab.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    ring: 1px solid rgba(0, 0, 0, 0.05);
}

.manager-city-tab.active .city-pin-icon {
    color: #b22234;
}

.city-pin-icon {
    width: 12px;
    height: 12px;
}

.manager-modal-close {
    padding: 6px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
}

.manager-modal-close:hover {
    background: #f1f5f9;
    color: #b22234;
}

.manager-modal-close svg {
    width: 20px;
    height: 20px;
}

/* Modal Body */
.manager-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: rgba(255, 255, 255, 0.3);
}

/* Custom scrollbar */
.manager-modal-body::-webkit-scrollbar {
    width: 6px;
}

.manager-modal-body::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.manager-modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.manager-modal-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Title Section */
.manager-title-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

@media (min-width: 768px) {
    .manager-title-section {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-end;
    }
}

.manager-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.manager-title-divider {
    color: #cbd5e1;
    font-weight: 300;
}

.manager-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 4px 0 0 0;
}

.manager-time-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.manager-time-badge svg {
    width: 14px;
    height: 14px;
    color: #3b82f6;
}

.manager-time-label {
    font-size: 9px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.manager-time-value {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    font-family: 'JetBrains Mono', monospace;
}

/* Managers Grid */
.managers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .managers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Manager Card */
.manager-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 1px;
    overflow: hidden;
    transition: all 0.3s ease;
    ring: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.manager-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(226, 232, 240, 0.5);
}

.manager-card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #b22234, #991b1b);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.manager-card:hover .manager-card-gradient {
    opacity: 1;
}

.manager-card-inner {
    position: relative;
    background: #ffffff;
    border-radius: 15px;
    padding: 12px 16px;
    border: 1px solid #f1f5f9;
    height: 100%;
    transition: border-color 0.3s ease;
    display: flex;
    flex-direction: column;
}

.manager-card:hover .manager-card-inner {
    border-color: transparent;
}

/* Manager Card Header */
.manager-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.manager-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.manager-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid #f1f5f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease;
}

.manager-card:hover .manager-avatar {
    border-color: rgba(178, 34, 52, 0.2);
}

.manager-online-indicator {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: #ffffff;
    padding: 2px;
    border-radius: 50%;
}

.manager-online-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 6px #22c55e;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.manager-info h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.manager-card:hover .manager-info h3 {
    color: #b22234;
}

.manager-role {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #b22234, #991b1b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: 2px;
}

/* Channel Switcher */
.manager-channel-switcher {
    display: flex;
    background: #f1f5f9;
    padding: 2px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 10px;
    font-weight: 500;
}

.manager-channel-btn {
    flex: 1;
    padding: 4px 0;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.manager-channel-btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.5);
}

.manager-channel-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    ring: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 700;
}

/* QR Zone */
.manager-qr-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 12px;
    padding: 8px;
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
    min-height: 130px;
}

.manager-qr-glow {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    transition: all 0.5s ease;
    pointer-events: none;
}

.manager-qr-glow.telegram { background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1), transparent); }
.manager-qr-glow.whatsapp { background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1), transparent); }
.manager-qr-glow.max { background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2)); }

.manager-qr-container {
    width: 96px;
    height: 96px;
    position: relative;
}

.manager-qr-code {
    width: 100%;
    height: 100%;
    animation: qr-appear 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.manager-qr-code svg {
    width: 100%;
    height: 100%;
    color: #1e293b;
}

.manager-qr-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 28px;
    height: 28px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    ring: 2px solid #ffffff;
    animation: icon-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

.manager-qr-icon svg {
    width: 14px;
    height: 14px;
}

.manager-qr-icon.telegram svg { color: #3b82f6; fill: #3b82f6; }
.manager-qr-icon.whatsapp svg { color: #22c55e; fill: #22c55e; }
.manager-qr-icon.max span { 
    font-size: 10px;
    font-weight: 900;
    background: linear-gradient(135deg, #3b82f6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.manager-qr-scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    animation: scan-line 1.5s ease-in-out forwards;
    pointer-events: none;
    z-index: 10;
}

.manager-qr-scan-line.telegram { background: #3b82f6; box-shadow: 0 0 8px rgba(59, 130, 246, 0.5); }
.manager-qr-scan-line.whatsapp { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, 0.5); }
.manager-qr-scan-line.max { background: linear-gradient(90deg, #3b82f6, #a855f7, #ec4899); box-shadow: 0 0 8px rgba(168, 85, 247, 0.5); }

.manager-qr-hint {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
    line-height: 1.4;
    position: relative;
    z-index: 10;
}

.manager-qr-hint-channel {
    font-weight: 700;
    transition: color 0.3s ease;
}

.manager-qr-hint-channel.telegram { color: #3b82f6; }
.manager-qr-hint-channel.whatsapp { color: #22c55e; }
.manager-qr-hint-channel.max { 
    background: linear-gradient(90deg, #3b82f6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Manager Phone */
.manager-phone {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.manager-phone-number {
    font-size: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    color: #0f172a;
    cursor: text;
    user-select: all;
    transition: color 0.2s ease;
    letter-spacing: -0.02em;
}

.manager-phone-number:hover {
    color: #b22234;
}

/* Modal Footer */
.manager-modal-footer {
    padding: 12px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    font-size: 10px;
    color: #64748b;
}

.manager-footer-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.manager-footer-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.manager-footer-item svg {
    width: 12px;
    height: 12px;
}

.manager-footer-item .pin-icon {
    color: #b22234;
}

.manager-footer-item .clock-icon {
    color: #3b82f6;
}

.manager-footer-copy {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #94a3b8;
}

.manager-footer-copy svg {
    width: 12px;
    height: 12px;
}

/* ===== DARK THEME MANAGER MODAL ===== */
[data-theme="dark"] .manager-modal-backdrop {
    background: rgba(11, 13, 26, 0.9);
}

[data-theme="dark"] .manager-modal-content {
    background: #151932;
    border-color: rgba(100, 116, 139, 0.5);
}

[data-theme="dark"] .manager-modal-header {
    background: #1c223a;
    border-color: rgba(100, 116, 139, 0.5);
}

[data-theme="dark"] .manager-modal-logo-top {
    color: #ffffff;
}

[data-theme="dark"] .manager-modal-logo-bottom {
    color: #facc15;
}

[data-theme="dark"] .manager-city-tabs {
    background: #111428;
    border-color: rgba(100, 116, 139, 0.5);
}

[data-theme="dark"] .manager-city-tab {
    color: #94a3b8;
}

[data-theme="dark"] .manager-city-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .manager-city-tab.active {
    background: #475569;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .manager-city-tab.active .city-pin-icon {
    color: #facc15;
}

[data-theme="dark"] .manager-modal-close {
    color: #94a3b8;
}

[data-theme="dark"] .manager-modal-close:hover {
    background: rgba(100, 116, 139, 0.5);
    color: #ffffff;
}

[data-theme="dark"] .manager-modal-body {
    background: transparent;
}

[data-theme="dark"] .manager-modal-body::-webkit-scrollbar-track {
    background: #0b0d1a;
}

[data-theme="dark"] .manager-modal-body::-webkit-scrollbar-thumb {
    background: #2d3555;
    border: 1px solid #0b0d1a;
}

[data-theme="dark"] .manager-modal-body::-webkit-scrollbar-thumb:hover {
    background: #4b5585;
}

[data-theme="dark"] .manager-title-section {
    border-color: #334155;
}

[data-theme="dark"] .manager-title {
    color: #ffffff;
}

[data-theme="dark"] .manager-title-divider {
    color: #64748b;
}

[data-theme="dark"] .manager-subtitle {
    color: #94a3b8;
}

[data-theme="dark"] .manager-time-badge {
    background: #1e243d;
    border-color: rgba(100, 116, 139, 0.5);
}

[data-theme="dark"] .manager-time-badge svg {
    color: #60a5fa;
}

[data-theme="dark"] .manager-time-label {
    color: #64748b;
}

[data-theme="dark"] .manager-time-value {
    color: #ffffff;
}

[data-theme="dark"] .manager-card {
    background: #1e243d;
    ring: 1px solid rgba(100, 116, 139, 0.5);
}

[data-theme="dark"] .manager-card:hover {
    box-shadow: 0 20px 40px -12px rgba(251, 144, 0, 0.15);
}

[data-theme="dark"] .manager-card-gradient {
    background: linear-gradient(135deg, #fb9000, #ea580c);
}

[data-theme="dark"] .manager-card-inner {
    background: #1e243d;
    border-color: rgba(100, 116, 139, 0.5);
}

[data-theme="dark"] .manager-avatar {
    border-color: #475569;
}

[data-theme="dark"] .manager-card:hover .manager-avatar {
    border-color: rgba(251, 144, 0, 0.5);
}

[data-theme="dark"] .manager-online-indicator {
    background: #1e243d;
}

[data-theme="dark"] .manager-online-dot {
    box-shadow: 0 0 8px #22c55e;
}

[data-theme="dark"] .manager-info h3 {
    color: #ffffff;
}

[data-theme="dark"] .manager-card:hover .manager-info h3 {
    color: #fb9000;
}

[data-theme="dark"] .manager-role {
    background: linear-gradient(135deg, #fb9000, #ea580c);
    -webkit-background-clip: text;
    background-clip: text;
}

[data-theme="dark"] .manager-channel-switcher {
    background: #111428;
    border: 1px solid rgba(100, 116, 139, 0.5);
}

[data-theme="dark"] .manager-channel-btn {
    color: #94a3b8;
}

[data-theme="dark"] .manager-channel-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .manager-channel-btn.active {
    background: #475569;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .manager-qr-zone {
    background: rgba(17, 20, 40, 0.5);
    border-color: rgba(100, 116, 139, 0.5);
}

[data-theme="dark"] .manager-qr-glow.telegram { background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.1), transparent); }
[data-theme="dark"] .manager-qr-glow.whatsapp { background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.1), transparent); }
[data-theme="dark"] .manager-qr-glow.max { background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(168, 85, 247, 0.3), rgba(236, 72, 153, 0.3)); }

[data-theme="dark"] .manager-qr-code svg {
    color: #ffffff;
}

[data-theme="dark"] .manager-qr-hint {
    color: #94a3b8;
}

[data-theme="dark"] .manager-qr-hint-channel.telegram { color: #60a5fa; }
[data-theme="dark"] .manager-qr-hint-channel.whatsapp { color: #4ade80; }

[data-theme="dark"] .manager-phone {
    border-color: rgba(100, 116, 139, 0.5);
}

[data-theme="dark"] .manager-phone-number {
    color: #ffffff;
}

[data-theme="dark"] .manager-phone-number:hover {
    color: #fb9000;
}

[data-theme="dark"] .manager-modal-footer {
    background: #12162a;
    border-color: rgba(100, 116, 139, 0.5);
    color: #64748b;
}

[data-theme="dark"] .manager-footer-item {
    color: #94a3b8;
}

[data-theme="dark"] .manager-footer-item .pin-icon {
    color: #facc15;
}

[data-theme="dark"] .manager-footer-item .clock-icon {
    color: #60a5fa;
}

[data-theme="dark"] .manager-footer-copy {
    color: #475569;
}
