/* ==========================================
   ИНВЕРСНЫЙ КОНТЕНТ САЙТА (ТЕМНАЯ ТЕМА)
   Загружается только если тема включена
   ========================================== */

/* Общий текст, заголовки и разделители */
body.inverse-site .entry, 
body.inverse-site .page-content { color: #e0e0e0 !important; }
body.inverse-site .entry p a, body.inverse-site .entry li a, body.inverse-site .product-short-desc a, body.inverse-site .entry table a { color: #ffffff !important; text-decoration: underline !important; font-weight: 500 !important; }
body.inverse-site .entry p a:hover, body.inverse-site .entry li a:hover, body.inverse-site .product-short-desc a:hover, body.inverse-site .entry table a:hover { color: #ffffff !important; text-decoration: none !important; }
body.inverse-site h1, body.inverse-site h2, body.inverse-site h3 { color: #ffffff !important; border-bottom-color: #333 !important; }
body.inverse-site hr { border-top-color: #333 !important; }

/* Хлебные крошки */
body.inverse-site .breadcrumbs { border-bottom-color: #333; }
body.inverse-site .breadcrumbs a { color: #e0e0e0 !important; } 
body.inverse-site .breadcrumbs a:hover { color: #ffffff !important; }
body.inverse-site .breadcrumbs span { color: #666; }

/* Карточки статей, товаров, рекомендаций и анонсов (Сетка) */
body.inverse-site .card-item:not(.custom-vcard), body.inverse-site .related-card, body.inverse-site .anons-mini-card {
    background-color: var(--inv-bg-solid, #080808) !important; border: 2px solid #080808 !important; padding: 2px !important; position: relative; overflow: hidden; border-radius: 0 !important; box-sizing: border-box !important; transition: box-shadow 0.3s ease, transform 0.3s ease;
}
body.inverse-site .card-item.custom-vcard { border: none !important; background-color: transparent !important; padding: 0 !important; }
body.inverse-site .card-item.custom-vcard::before, body.inverse-site .card-item.custom-vcard::after { display: none !important; }
body.inverse-site .card-item.custom-vcard > * { position: absolute !important; }

@keyframes border-spin-cards { 100% { transform: rotate(360deg); } }

body.inverse-site .card-item:not(.custom-vcard)::before, body.inverse-site .related-card::before, body.inverse-site .anons-mini-card::before {
    content: ''; position: absolute; top: -100%; left: -100%; width: 300%; height: 300%; background: conic-gradient(from 225deg, transparent 0%, rgba(255,255,255,0.9) 10%, transparent 20%, transparent 50%, rgba(255,255,255,0.9) 60%, transparent 70%); animation: border-spin-cards 7s linear infinite; opacity: 1 !important; z-index: 1; pointer-events: none; 
}
body.inverse-site .card-item:not(.custom-vcard)::after, body.inverse-site .related-card::after, body.inverse-site .anons-mini-card::after {
    content: ''; position: absolute; top: 2px; left: 2px; right: 2px; bottom: 2px; background-color: var(--inv-bg-solid, #080808) !important; background-image: radial-gradient(circle 250px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.05) 0%, transparent 100%), radial-gradient(circle, rgba(255,255,255,0.015) 3px, transparent 3.5px) !important; background-size: 100vw 100vh, 10px 10px !important; background-attachment: fixed, scroll !important; z-index: 2; pointer-events: none;
}
body.inverse-site .card-item:not(.custom-vcard) > *, body.inverse-site .related-card > *, body.inverse-site .anons-mini-card > * { position: relative; z-index: 3; background-color: transparent !important; }
body.inverse-site .card-image, body.inverse-site .related-card-img, body.inverse-site .anons-image-wrap { background-color: transparent !important; border-radius: 0 !important; }
body.inverse-site .card-item:not(.custom-vcard):hover, body.inverse-site .related-card:hover, body.inverse-site .anons-mini-card:hover {
    box-shadow: 0 0 25px var(--inv-glow-strong, rgba(255,255,255,0.2)) !important; transform: translateY(-3px);
}
body.inverse-site .card-info h3, body.inverse-site .card-item.product-card .card-info h3, body.inverse-site .related-card-info h3, body.inverse-site .anons-info { color: #ffffff !important; border-bottom-color: #333 !important; }
body.inverse-site .card-desc { color: #bbb !important; }
body.inverse-site .product-price, body.inverse-site .related-card-price { color: #ffffff !important; }
body.inverse-site .product-price span, body.inverse-site .related-card-price span { color: #999 !important; }

/* Страница самого товара (внутренняя) */
body.inverse-site .product-card-info h1 { color: #ffffff !important; border-bottom-color: #333 !important; }
body.inverse-site .product-short-desc { color: #ccc !important; }
body.inverse-site .product-main-price { color: #ffffff !important; border-top-color: #333 !important; }
body.inverse-site .product-main-price .price-label { color: #999 !important; }

/* Рекомендации */
body.inverse-site .related-section { border-top-color: #333 !important; }
body.inverse-site .related-title { color: #ffffff !important; border-bottom-color: #333 !important; }
body.inverse-site .rel-nav { background-color: #222 !important; border-color: #444 !important; color: #fff !important; z-index: 10 !important; }
body.inverse-site .rel-nav:hover { background-color: var(--main-color) !important; border-color: var(--main-color) !important; }

/* Таблицы (Инверсный режим) */
body.inverse-site .entry table:not(.cart-table) { 
    background-color: transparent !important; 
    border-collapse: collapse !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important; 
    box-shadow: none !important; 
}

/* ЖЕСТКО УБИВАЕМ БЕЛЫЙ ФОН СО СТРОК (TR), который лезет из основного style.css */
body.inverse-site .entry table:not(.cart-table) tbody tr,
body.inverse-site .entry table:not(.cart-table) tbody tr:nth-child(even),
body.inverse-site .entry table:not(.cart-table) tbody tr:nth-child(odd) {
    background-color: transparent !important;
}

/* Белые линии и белые надписи для ячеек */
body.inverse-site .entry table:not(.cart-table) th, 
body.inverse-site .entry table:not(.cart-table) td { 
    border: 1px solid rgba(255, 255, 255, 0.2) !important; 
    color: #ffffff !important; 
    background-color: transparent !important; 
}

/* Шапка таблицы (первая строка) */
body.inverse-site .entry table:not(.cart-table) th, 
body.inverse-site .entry table:not(.cart-table) thead td, 
body.inverse-site .entry table:not(.cart-table) tr:first-child td { 
    background-color: rgba(255, 255, 255, 0.1) !important; 
    color: #ffffff !important;
}

/* Аккуратная светлая зебра для четных строк (задаем ячейкам) */
body.inverse-site .entry table:not(.cart-table) tbody tr:nth-child(even) td {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Эффект наведения для темной темы (только для ПК) */
@media (min-width: 1001px) {
    body.inverse-site .entry table:not(.cart-table) tbody tr:hover td {
        background-color: rgba(255, 255, 255, 0.15) !important;
        transition: background-color 0.3s ease;
    }
}

/* Кнопки */
body.inverse-site .buy-btn { background-color: #ffffff !important; color: #000000 !important; border: 1px solid #ffffff !important; font-weight: 600 !important; }
body.inverse-site .buy-btn:hover { background-color: #cccccc !important; border-color: #cccccc !important; }
body.inverse-site .entry a[href="/"], body.inverse-site .entry a[style*="border"] { color: #fff !important; border-color: var(--main-color) !important; background-color: var(--main-color) !important; }
body.inverse-site .entry a[href="/"]:hover, body.inverse-site .entry a[style*="border"]:hover { filter: brightness(0.9) !important; }

/* Корзина */
body.inverse-site div[style*="font-size: 24px"][style*="color: #333"], body.inverse-site span[style*="color: #041a28"], body.inverse-site .cart-total, body.inverse-site .cart-total span { color: #ffffff !important; }
body.inverse-site #order-form-section, body.inverse-site #order-form-section label, body.inverse-site #order-form-section div, body.inverse-site #order-form-section p, body.inverse-site #order-form-section h2, body.inverse-site #order-form-section h3 { color: #333333 !important; }
body.inverse-site #order-form-section a { color: #333333 !important; text-decoration: underline !important; }
body.inverse-site #order-form-section span[style*="color: red"], body.inverse-site #order-form-section span[style*="color:red"] { color: red !important; }
body.inverse-site #order-form-section input[type="text"], body.inverse-site #order-form-section input[type="email"], body.inverse-site #order-form-section input[type="tel"], body.inverse-site #order-form-section textarea { background-color: #ffffff !important; color: #333333 !important; border: 1px solid #cccccc !important; }
body.inverse-site #order-form-section input::placeholder, body.inverse-site #order-form-section textarea::placeholder { color: #999999 !important; }
body.inverse-site #order-form-section button, body.inverse-site #order-form-section .btn, body.inverse-site #order-form-section input[type="submit"], body.inverse-site #order-form-section input[type="button"] { background-color: var(--main-color) !important; color: #ffffff !important; border: none !important; font-weight: 600 !important; }
body.inverse-site #order-form-section button:hover, body.inverse-site #order-form-section .btn:hover { filter: brightness(0.9) !important; }

/* Глобальный фикс размеров заголовков */
body.inverse-site .card-item h3, body.inverse-site .card-item.product-card .card-info h3, body.inverse-site .related-card-info h3, body.inverse-site .anons-info { font-size: 22px !important; }
@media (max-width: 1000px) { body.inverse-site .card-item h3, body.inverse-site .card-item.product-card .card-info h3, body.inverse-site .related-card-info h3, body.inverse-site .anons-info { font-size: 17px !important; } }

/* Кнопка MAX */
body.inverse-site .max-float-btn { background-color: #ffffff !important; box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2) !important; }
body.inverse-site .max-float-btn::before, body.inverse-site .max-float-btn::after { border-color: rgba(255, 255, 255, 0.8) !important; }
body.inverse-site .max-float-btn img { filter: brightness(0) !important; }

/* Формы обратной связи */
body.inverse-site div[style*="color: #333"][style*="margin-bottom: 25px"] { color: #e0e0e0 !important; }
body.inverse-site .feedback-ajax-form label, body.inverse-site .feedback-ajax-form label span { color: #e0e0e0 !important; }
body.inverse-site .feedback-ajax-form label span[style*="color: #b91313"] { color: #ff4d4d !important; }
body.inverse-site .feedback-ajax-form a { color: #ffffff !important; }
body.inverse-site .feedback-ajax-form input[type="text"], body.inverse-site .feedback-ajax-form input[type="email"], body.inverse-site .feedback-ajax-form input[type="tel"], body.inverse-site .feedback-ajax-form textarea, body.inverse-site .feedback-ajax-form select { background-color: #ffffff !important; color: #333333 !important; border: 1px solid #cccccc !important; }
body.inverse-site .feedback-ajax-form input::placeholder, body.inverse-site .feedback-ajax-form textarea::placeholder { color: #999999 !important; }

/* =======================================================
   НОВЫЕ ПРАВКИ: ГАЛЕРЕЯ (Лайтбокс) И ВИДЕО МОДУЛЬ
   ======================================================= */

/* Лайтбокс в инверсной теме (Фон, подпись, закрыть) */
body.inverse-site .lightbox { background-color: rgba(10, 15, 25, 0.9) !important; }
body.inverse-site .lightbox-caption { color: #ffffff !important; }
body.inverse-site .close-lightbox { color: #ffffff !important; }
body.inverse-site .close-lightbox:hover { color: #e74c3c !important; }

/* Видеомодуль в инверсной теме */
body.inverse-site .vl-default-mode .vl-main-title, body.inverse-site .vl-default-mode .vl-item-title { color: #ffffff !important; }
body.inverse-site .vl-default-mode .vl-item-desc { color: rgba(255, 255, 255, 0.6) !important; }
body.inverse-site .vl-item:hover .vl-video-frame { box-shadow: 0 0 25px var(--inv-glow-strong, rgba(255,255,255,0.2)) !important; }

/* ==========================================
   СТИЛИ ИНВЕРСНОЙ ГАЛЕРЕИ
   ========================================== */
/* Убираем черный фон и рамку вокруг всей коробки галереи */
body.inverse-site .gallery-section-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
/* Заголовок галереи делаем белым */
body.inverse-site .gallery-main-title {
    color: #ffffff !important;
}

/* Анимированные бегающие линии для превьюшек */
@keyframes border-spin-gal { 100% { transform: rotate(360deg); } }

body.inverse-site .content-gallery-item {
    background-color: var(--inv-bg-solid, #080808) !important;
    border: 2px solid #080808 !important;
    padding: 2px !important;
    position: relative;
    overflow: hidden;
    border-radius: 0 !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Бегающий градиент */
body.inverse-site .content-gallery-item::before {
    content: ''; position: absolute; top: -100%; left: -100%; width: 300%; height: 300%;
    background: conic-gradient(from 225deg, transparent 0%, rgba(255,255,255,0.9) 10%, transparent 20%, transparent 50%, rgba(255,255,255,0.9) 60%, transparent 70%);
    animation: border-spin-gal 7s linear infinite; opacity: 1 !important; z-index: 1; pointer-events: none; 
}
/* Темная сердцевина */
body.inverse-site .content-gallery-item::after {
    content: ''; position: absolute; top: 2px; left: 2px; right: 2px; bottom: 2px;
    background-color: var(--inv-bg-solid, #080808) !important; z-index: 2; pointer-events: none;
}
/* Сама картинка */
body.inverse-site .content-gallery-item > * {
    position: relative; z-index: 3; background-color: transparent !important;
}
/* Неоновая подсветка при наведении */
body.inverse-site .content-gallery-item:hover {
    box-shadow: 0 0 25px var(--inv-glow-strong, rgba(255,255,255,0.2)) !important; transform: translateY(-3px);
}

/* ==========================================
   АУДИО ПЛЕЕР (ИНВЕРСНАЯ ВЕРСИЯ)
   ========================================== */
body.inverse-site .plyr--audio {
    --plyr-audio-controls-background: var(--inv-bg-solid, #1a1a1a) !important;
    --plyr-audio-control-color: #e0e0e0 !important;
    --plyr-color-main: var(--main-color) !important; 
    filter: brightness(1.2); 
}
body.inverse-site .song-item {
    background-color: var(--inv-bg-solid, #080808) !important;
    border-color: #333 !important;
}
body.inverse-site .song-item h4 {
    color: #ffffff !important;
    font-size: 22px !important;
    font-weight: 400 !important;
}
body.inverse-site .song-item .song-desc {
    color: #aaaaaa !important;
    font-size: 18px !important;
    font-weight: 300 !important;
}
body.inverse-site .song-item::after {
    background: linear-gradient(90deg, transparent, rgba(200, 200, 200, 0.4), transparent);
}
body.inverse-site .song-item.is-playing::after {
    background: #ffffff !important; /* Белая шкала в темной теме для контраста */
}