/*
 Theme Name: GeneratePress Child
 Template: generatepress
*/

/* --- 0. LOCAL FONTS SETUP (SELF-HOSTED) --- */

/* IBM Plex Sans - Regular (400) */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/IBMPlexSans-Regular.ttf') format('truetype');
}

/* IBM Plex Sans - Medium (500) */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('fonts/IBMPlexSans-Medium.ttf') format('truetype');
}

/* IBM Plex Sans - SemiBold (600) */
@font-face {
    font-family: 'IBM Plex Sans';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('fonts/IBMPlexSans-SemiBold.ttf') format('truetype');
}

/* Material Symbols Outlined (Icons) */
/* FIX: Используем правильное имя файла .otf и формат opentype */
@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 400;
    src: url('fonts/MaterialIconsOutlined-Regular.otf') format('opentype');
    font-display: swap;
    /* FIX: Добавил swap для Google PageSpeed */
    font-display: block;
}

/* Base Class for Icons */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* --- HERO OPTIMIZATION (MOBILE vs DESKTOP) --- */

/* Постер (Картинка) - видна по умолчанию */
.hero-poster-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    /* Накладываем друг на друга */
    top: 0;
    left: 0;
    z-index: 1;
    /* Картинка снизу */
}

/* Видео - по умолчанию прозрачное, пока не загрузится JS-ом */
.hero-loop-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    /* Чтобы держать высоту контейнера */
    z-index: 2;
    /* Видео сверху */
}

/* Контейнер Hero Media */
.hero-media-wrapper {
    width: 100%;
    max-width: 720px;
    aspect-ratio: 1 / 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    position: relative;
    /* Для абсолютного позиционирования картинки */
    overflow: hidden;
}

/* --- TYPOGRAPHY (GLOBAL OVERRIDE) --- */
body {
    font-family: 'IBM Plex Sans', sans-serif !important;
    font-size: 18px;
    /* BASE SIZE */
    line-height: 1.4;
    /* Base Line Height */
}

/* Base Headings */
h1,
.h1-style {
    font-size: 2.22em !important;
    /* ~40px */
}

h2,
.h2-style {
    font-size: 1.78em !important;
    /* ~32px */
}

h3,
.h3-style {
    font-size: 1.33em !important;
    /* ~24px */
}

/* Global Line Height Safety (All except H1) */
h2,
h3,
h4,
h5,
h6,
p,
li,
span,
div {
    line-height: 1.4 !important;
}

/* H1 Specific Line Height */
.entry-title {
    line-height: 1.2 !important;
}

/* Force Left Align & No Caps */
h1,
h2,
h3,
h4,
h5,
h6,
.entry-title,
th,
td,
.price-label,
.spec-label {
    text-transform: none !important;
    text-align: left !important;
}

/* Max Weight 500 */
h1,
h2,
h3,
h4,
h5,
h6,
.entry-title {
    font-weight: 500 !important;
    color: var(--white) !important;
}

/* --- STICKY HEADER --- */
.site-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 9999;
    border-bottom: 1px solid var(--blue);
    background-color: var(--base);
}

.inside-header {
    padding: 0.55em 1.1em !important;
    /* Converted to em (approx 10px 20px) */
    align-content: space-between !important;
}

/* --- FOOTER --- */
.site-footer {
    border-top: 1px solid var(--blue);
}

/* --- GLOBAL LAYOUT --- */
body.single-reactor,
body.post-type-archive-reactor {
    background-color: var(--base) !important;
}

.reactor-page-wrapper {
    background-color: var(--base);
    color: var(--white);
    min-height: 100vh;
    padding-bottom: 80px;
    /* Increased bottom padding for sticky button space */
    width: 100%;
}

.single-reactor .site.grid-container,
.single-reactor #content,
.post-type-archive-reactor .site.grid-container,
.post-type-archive-reactor #content {
    max-width: 100% !important;
    padding: 0 !important;
}

/* MAIN CONTAINER LOGIC - DESKTOP & TABLET DEFAULT (> 768px) */
.reactor-page-wrapper .grid-container {
    width: 100% !important;
    /* FORCE FULL WIDTH */
    max-width: 1366px !important;
    /* Reduced max-width as requested */
    margin-left: auto !important;
    margin-right: auto !important;
    /* FIX: 20px Padding for Desktop and Tablet */
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
}

/* 1. Breadcrumbs */
.reactor-breadcrumbs {
    font-size: 0.77em !important;
    /* ~14px */
}

.reactor-breadcrumbs a {
    color: var(--white) !important;
    text-decoration: none !important;
}

.reactor-breadcrumbs a:hover {
    color: var(--blue) !important;
}

.reactor-breadcrumbs .separator {
    margin: 0 0.44em;
    color: var(--white) !important;
}

/* 2. Titles */
h1.entry-title {
    color: var(--white) !important;
    margin-bottom: 0.55em !important;
    /* 10px -> em */
}

.reactor-seo-title {
    color: var(--white) !important;
    font-size: 1.2em !important;
    /* Matches Core Specs size */
    font-weight: 400 !important;
    margin-bottom: 2.22em !important;
    /* 40px -> em */
    padding-left: 0 !important;
    width: 100% !important;
}

/* 3. Hero Grid Layout */
.reactor-hero-grid {
    display: grid;
    grid-template-columns: 55% 40%;
    gap: 5%;
    margin-bottom: 3.33em;
    /* 60px -> em */
    align-items: start;
}

/* --- FIX SINGLE PAGE MOBILE LAYOUT --- */
@media (max-width: 1024px) {
    .reactor-hero-grid {
        /* Переключаем сетку в 1 колонку */
        grid-template-columns: 100% !important;

        /* Добавляем отступ между галереей и таблицей */
        gap: 30px !important;
    }
}

/* --- GALLERY STYLES --- */
.reactor-gallery-area {
    display: flex;
    flex-direction: column;
    gap: 0.83em;
    /* 15px -> em */
    /* FIX: CSS Grid Blowout Prevention */
    min-width: 0;
    width: 100%;
}

.main-image-viewport {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    /* FIX: Ensure viewport never exceeds parent */
    max-width: 100%;
}

.main-image-viewport img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
}

/* Navigation Arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    font-size: 1.33em;
    /* 24px */
    padding: 0.83em;
    /* 15px */
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    z-index: 10;
    opacity: 0;
}

.main-image-viewport:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: var(--blue);
}

.gallery-nav.prev {
    left: 0;
}

.gallery-nav.next {
    right: 0;
}

/* Thumbnails */
.gallery-thumbs {
    display: flex;
    gap: 0.55em;
    /* 10px */
    overflow-x: auto;
    padding-bottom: 0.28em;
    /* 5px */
    scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.thumb-item {
    width: 5.55em;
    /* 100px approx */
    height: 5.55em;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
    border: 1px solid var(--opac);
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    background: #000;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-item:hover {
    opacity: 1;
}

.thumb-item.active {
    opacity: 1;
}

/* --- SPECS & INFO STYLES --- */
.dark-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.66em;
    /* 30px -> em */
}

.dark-specs-table th {
    padding: 0 0 0.83em 0;
    /* 15px -> em */
}

.dark-specs-table th h3 {
    color: var(--white);
    margin: 0;
    font-size: 1.33em;
}

.dark-specs-table td {
    padding: 0.44em 0;
    /* 8px -> em */
    font-size: 0.89em;
    /* ~16px on Desktop */
    background-image: linear-gradient(to right, var(--blue) 50%, rgba(255, 255, 255, 0) 0%);
    background-position: bottom;
    background-size: 6px 1px;
    background-repeat: repeat-x;
}

.dark-specs-table tr:last-child td {
    background-image: none;
}

.spec-label {
    color: var(--white);
    width: 50%;
    font-weight: 500 !important;
}

.spec-value {
    color: var(--white);
    font-weight: 500;
    text-align: right !important;
}

/* Price & CTA Box */
.reactor-action-box {
    padding: 0 !important;
    /* 25px -> em */
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.83em;
    /* 15px -> em */
}

.price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.price-label {
    font-size: 0.89em;
    color: var(--white);
    margin-bottom: 0.28em;
    /* 5px -> em */
}

.price-value {
    font-size: 1.33em;
    font-weight: 500;
    color: var(--white);
}

/* Default Button Style */
/* Default Button Style (Global Fix) */
.industrial-btn {
    background-color: var(--accent);
    color: var(--white);
    /* 2px border always */
    border: 2px solid var(--accent) !important;
    padding: 0.83em 1.66em;
    font-size: 1em;
    font-weight: 500;
    text-transform: uppercase !important;
    /* Force Font Family */
    font-family: 'IBM Plex Sans', sans-serif !important;
    text-decoration: none !important;
    /* No underline */
    transition: all 0.3s ease;
    width: auto;
    max-width: 300px;
    text-align: center !important;
    display: inline-block;
    /* Fix for links behaving like spans */
}

.industrial-btn:hover {
    background-color: var(--blue) !important;
    color: var(--white) !important;
    border-color: var(--white) !important;
    text-decoration: none !important;
}

/* Content & Description Header */
.description-header {
    color: var(--white);
    margin: 0 0 1em 0;
    font-size: 1.33em;
    /* Matches Core Specs H3 */
    font-weight: 500;
    /* Match TH weight */
}

.entry-content p {
    margin-bottom: 1.5em;
    font-size: 1em;
}

.neon-divider {
    display: none;
}

/* --- MODAL --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-window {
    background: var(--base);
    border: 1px solid var(--blue);
    padding: 2.22em;
    /* 40px -> em */
    width: 90%;
    max-width: 500px;
    position: relative;
    color: var(--white);
    text-align: left;
}

.modal-close {
    position: absolute;
    top: 0.83em;
    right: 1.11em;
    /* 15px 20px -> em */
    font-size: 1.66em;
    /* 30px */
    cursor: pointer;
    color: var(--opac);
}

.modal-title {
    margin-bottom: 1.38em;
    text-align: center !important;
}

#quoteModal .forminator-label {
    color: var(--white) !important;
}

#quoteModal .forminator-input {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--white) !important;
    border: 1px solid var(--blue) !important;
}

#quoteModal .forminator-textarea {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--white) !important;
    border: 1px solid var(--blue) !important;
}

#quoteModal .forminator-button-submit {
    background-color: var(--blue) !important;
    width: 100%;
}

/* --- ARCHIVE PAGE STYLES --- */

/* FIX: Global Backgrounds for Archive */
body.archive,
body.blog,
.archive .site,
.archive .site-content,
.archive .page-header,
.archive .site-header {
    background-color: var(--base) !important;
}

/* Page Header (Title Area) Fix */
.archive .page-header {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin-bottom: 1.2em !important;
}

.archive .page-header h1 {
    color: var(--white);
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 2.22em;
    /* ~40px */
}

/* Main Archive Grid (Filters + Content) */
.reactor-archive-main {
    display: grid;
    grid-template-columns: 280px 1fr;
    /* 280px for Filter Sidebar, rest for content */
    gap: 3.33em;
    margin-top: 1em;
}

/* Filter Sidebar Styles */

.archive-sidebar h3 {
    color: var(--white);
    margin-top: 0;
    margin-bottom: 1em;
    font-size: 1.2em;
    border-bottom: 1px solid var(--blue);
    padding-bottom: 0.5em;
}

.archive-sidebar .sidebar-title {
    display: none !important;
}

/* Grid of Product Cards */
.reactor-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns on desktop */
    gap: 20px;
}

/* Individual Product Card */
.reactor-preview-card {
    background-color: var(--base);
    /* Pure Dark Base */
    border: 1px solid var(--blue);
    /* Blue Border */
    text-decoration: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
}

.reactor-preview-card:hover {
    border: 1px solid var(--white);
    /* Blue Border */
    transform: translateY(-2px);
}

.reactor-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-image-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #000;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.reactor-preview-card:hover .card-image-wrapper img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Typography Balance (USER SETTINGS) */
.card-title {
    font-size: 1em !important;
    /* Reduced size */
    color: var(--white) !important;
    margin: 0 0 1em 0 !important;
    line-height: 1.3 !important;
    font-weight: 500 !important;
    /* Thinner */
}

/* Specs List - ALL WHITE TEXT */
.card-specs {
    list-style: none;
    padding: 0;
    margin: 0 0 1em 0;
    flex-grow: 1;
}

.card-specs li {
    font-size: 0.9em !important;
    color: var(--white) !important;
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 4px;
    /* Чуть увеличил отступ до линии */

    /* Рисуем пунктир градиентом: 3px цвет + 3px прозрачность = 6px total width */
    background-image: linear-gradient(to right, var(--blue) 50%, rgba(255, 255, 255, 0) 0%) !important;
    background-position: bottom;
    background-size: 6px 1px;
    /* 6px ширина паттерна (3px штрих / 3px пробел), 1px высота */
    background-repeat: repeat-x;
}

.card-specs li span {
    font-weight: 400;
    color: var(--white) !important;
}

.card-specs li strong {
    color: var(--white) !important;
    font-weight: 500 !important;
    text-align: right;
}

.card-specs li:last-child {
    border-bottom: none;
}

/* Button Styling (USER SETTINGS - DARK BG) */
.card-cta-wrapper {
    margin-top: auto;
}

.card-cta-wrapper .industrial-btn {
    width: 100%;
    max-width: none;
    padding: 8px 0 !important;
    font-size: 1em !important;
    font-weight: 500 !important;
    text-transform: uppercase;

    background-color: var(--base) !important;
    /* Dark Background */
    color: var(--white) !important;
    /* WHITE Text */
    border: 2px solid var(--white) !important;

    transition: all 0.3s ease;
    text-align: center;
}

.reactor-preview-card:hover .card-cta-wrapper .industrial-btn {
    background-color: var(--blue) !important;
    /* Blue on Hover */
    border-color: var(--white) !important;
    color: var(--white) !important;
}

/* --- ADAPTATION FOR LAPTOPS, TABLETS (< 1366px) --- */
@media (max-width: 1366px) {
    .reactor-page-wrapper .grid-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* --- TABLET SPECIFIC (Max 1024px) --- */
@media (max-width: 1024px) {

    /* 1. SINGLE PAGE: Чиним сетку (Галерея сверху, Спеки снизу) */
    .reactor-hero-grid {
        grid-template-columns: 100% !important;
        gap: 30px !important;
        margin-bottom: 2em;
    }

    /* 2. Global: Шрифт в таблицах */
    .dark-specs-table td {
        font-size: 14px;
    }

    /* 3. ARCHIVE: Планшетная сетка */
    .reactor-archive-main {
        grid-template-columns: 1fr;
        /* Сайдбар сверху */
        gap: 1em;
    }

    .reactor-archive-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 карточки в ряд */
        gap: 20px;
    }
}

/* --- MOBILE SPECIFIC (Up to 768px) --- */
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }

    /* Общие отступы контейнера */
    .reactor-page-wrapper .grid-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .site-logo {
        max-width: 80% !important;
    }

    .inside-header {
        padding: 0.55em 0 0.55em 1.1em !important;
        /* Converted to em (approx 10px 20px) */
        align-content: space-between !important;
    }

    /* === 1. SINGLE PAGE RESTORATION (ВНУТРЕННЯЯ СТРАНИЦА) === */

    /* Шрифты заголовков */
    h1,
    .entry-title {
        font-size: 2em !important;
    }

    .reactor-seo-title {
        font-size: 1.1em !important;
        margin-bottom: 1.5em;
    }

    /* Прайс в строку (над кнопкой) */
    .price-wrapper {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        border-top: 1px dotted var(--blue) !important;
        border-bottom: none !important;
        padding-top: 1em !important;
        padding-bottom: 0.5em !important;
        /* Место до кнопки */
        color: var(--white) !important;
    }

    .price-label {
        margin-bottom: 0;
        font-weight: 500;
        font-size: 14px !important;
    }

    .price-value {
        font-size: 1.4em !important;
    }

    /* ЛИПКАЯ КНОПКА (Возвращаем!) */
    .sticky-btn-container {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background-color: var(--base);
        border-top: 1px solid var(--blue);
        padding: 16px;
        z-index: 99999;
        box-sizing: border-box;
    }

    .sticky-btn-container .industrial-btn {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    /* Отступ снизу страницы, чтобы кнопка не перекрывала контент */
    /* Компенсация высоты кнопки: ТОЛЬКО для страницы товара (Single), где есть кнопка */
    body.single-reactor .site-footer {
        padding-bottom: 80px !important;
    }

    /* На архиве и других страницах футер обычный */
    body:not(.single-reactor) .site-footer {
        padding-bottom: 0 !important;
    }

    /* У обертки контента отступ убираем везде, чтобы не дублировать */
    .reactor-page-wrapper {
        padding-bottom: 20px !important;
    }


    /* === 2. ARCHIVE CARD REDESIGN (АРХИВ - НОВЫЙ ДИЗАЙН) === */

    .reactor-archive-grid {
        grid-template-columns: 1fr !important;
        /* 1 колонка */
    }

    /* Карточка без паддингов */
    .reactor-card-link {
        display: grid !important;
        grid-template-columns: 1fr 80px !important;
        grid-template-rows: auto auto auto;
        grid-template-areas: "title image" "specs specs" "cta cta";
        gap: 0 !important;
        padding: 0 !important;
        height: auto !important;
    }

    .card-content {
        display: contents;
    }

    /* Тайтл */
    .card-title {
        grid-area: title;
        margin: 0 !important;
        padding: 12px !important;
        font-size: 1.1em !important;
        align-self: center;
        text-align: left;
    }

    /* Картинка справа 80px */
    .card-image-wrapper {
        grid-area: image;
        width: 80px !important;
        height: 80px !important;
        margin: 0 !important;
        border-bottom: none !important;
    }

    .card-image-wrapper img {
        transform: none !important;
    }

    /* Спеки (Линия на всю ширину) */
    .card-specs {
        grid-area: specs;
        margin: 0 !important;
        border-top: 1px solid var(--blue) !important;
        padding: 12px 12px 0 12px !important;
    }

    /* Кнопка */
    .card-cta-wrapper {
        grid-area: cta;
        margin-top: 0;
        padding: 12px 12px 12px 12px !important;
    }
}

/* --- FULL SPECS TABLE --- */

.reactor-specs-wrapper {
    border: 1px solid var(--blue);
    background-color: var(--base);
    width: 100%;
    margin-bottom: 3em;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.reactor-specs-scroll {
    overflow-x: auto;
    width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--blue) var(--base);
    margin: 0;
    padding: 0;
}

.full-specs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 900px;
    font-size: 0.89em;
    color: var(--white);
    table-layout: fixed;
    margin: 0 !important;
}

/* Сброс стилей ячеек */
.full-specs-table th,
.full-specs-table td {
    padding: 0.8em 1em;
    text-align: center;
    vertical-align: middle;
    position: relative;
    border: none;
}

/* === STICKY COLUMN (ЛЕВАЯ КОЛОНКА) === */
.full-specs-table th:first-child,
.full-specs-table td:first-child {
    width: 180px;
    min-width: 180px;
    text-align: left;
    font-weight: 500;

    position: sticky;
    left: 0;
    z-index: 20;

    background-color: transparent !important;
    background-image: none !important;
}

/* === СЛОЙ ФОНА (::before) === */
.full-specs-table th:first-child::before,
.full-specs-table td:first-child::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -1px;
    width: calc(100% + 2px);

    background-color: var(--base);

    /* Пунктирная линия по умолчанию */
    background-image: linear-gradient(to right, var(--blue) 50%, rgba(255, 255, 255, 0) 0%);
    background-position: bottom;
    background-size: 6px 1px;
    background-repeat: repeat-x;

    z-index: -1;
}

/* FIX: Убираем дублирующую границу и фон у заголовка первой колонки */
.full-specs-table thead th:first-child::before {
    background-image: none;
    border-bottom: none;
    /* БЫЛО: 1px solid... СТАЛО: none. Граница берется от родителя */
}

/* Убираем линию у последней ячейки первой колонки */
.full-specs-table tbody tr:last-child td:first-child::before {
    background-image: none;
}

/* Сплошная вертикальная линия справа от первой колонки */
.full-specs-table th:first-child::after,
.full-specs-table td:first-child::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: var(--blue);
    z-index: 21;
}

/* === ОСТАЛЬНАЯ СЕТКА (GRID) === */

/* Шапка - сплошная линия */
.full-specs-table thead th {
    border-bottom: 1px solid var(--blue);
    font-weight: 500;
    font-size: 1em;
}

/* Горизонтальный пунктир (Тело таблицы) */
.full-specs-table tbody td {
    background-image: linear-gradient(to right, var(--blue) 50%, rgba(255, 255, 255, 0) 0%);
    background-position: bottom;
    background-size: 6px 1px;
    background-repeat: repeat-x;
}

.full-specs-table tbody tr:last-child td {
    background-image: none;
}

/* Вертикальный пунктир */
.full-specs-table th:not(:first-child):not(:last-child)::after,
.full-specs-table td:not(:first-child):not(:last-child)::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background-image: linear-gradient(to bottom, var(--blue) 50%, rgba(255, 255, 255, 0) 0%);
    background-size: 1px 6px;
    background-repeat: repeat-y;
    z-index: 1;
}

/* === СПИСКИ === */
ul.spec-detail-list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: left;
    line-height: 1.5;
}

ul.spec-detail-list li {
    margin-bottom: 0.5em;
    position: relative;
    padding-left: 12px;
}

ul.spec-detail-list li:last-child {
    margin-bottom: 0;
}

ul.spec-detail-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    background-color: var(--blue);
}

ul.spec-detail-list strong {
    color: var(--white);
    font-weight: 500;
}

/* Выравнивание */
.full-specs-table td.align-left {
    text-align: left;
}

.full-specs-table td.align-top {
    vertical-align: top;
}

/* --- FILTER EVERYTHING DARK MODE STYLES (FINAL NO-BTN) --- */

/* 1. Сброс контейнера */
.wpc-filters-section {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* 2. Заголовки (Маленькие, без линии) */
.wpc-filter-header {
    background: transparent !important;
    border-bottom: none !important;
    /* Убрана линия */
    margin-bottom: 8px !important;
    padding-bottom: 0 !important;
}

.wpc-filter-title {
    color: var(--white) !important;
    font-family: 'IBM Plex Sans', sans-serif !important;
    font-weight: 500 !important;
    font-size: .9em !important;
    /* Уменьшенный шрифт */
    text-transform: none !important;
    padding: 0 !important;
}

/* 3. Поле ПОИСКА (Иконка справа + Белая) */
.wpc-filters-widget-content .wpc-search-field {
    background-color: var(--base) !important;
    border: 2px solid var(--blue) !important;
    color: var(--white) !important;
    border-radius: 0 !important;
    font-family: 'IBM Plex Sans', sans-serif !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.wpc-filters-widget-content .wpc-search-field:focus {
    border: 2px solid var(--white) !important;
    border-radius: 0 !important;
}

/* Цвет плейсхолдера (исправил опечатку whaite -> white) */
.wpc-filters-widget-content .wpc-search-field::placeholder {
    color: var(--white) !important;
    opacity: 0.8 !important;
}

/* 4. Поля ВВОДА ЦИФР (50/50 + Gap 12px) */
.wpc-filters-range-inputs {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    gap: 12px !important;
    /* Отступ между полями */
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 15px !important;
}

/* Скрываем разделитель (тире) */
.wpc-filters-range-inputs .wpc-filter-range-separator {
    display: none !important;
}

/* Сами инпуты */
.wpc-filters-range-inputs input {
    width: 100% !important;
    /* Растягиваем */
    max-width: none !important;
    min-width: 0 !important;
    background: transparent !important;
    border: 2px solid var(--blue) !important;
    color: var(--white) !important;
    font-family: 'IBM Plex Sans', sans-serif !important;
    border-radius: 0 !important;
    text-align: start !important;
    padding: 6px 12px !important;
    height: auto !important;
}

.wpc-filters-range-inputs input:focus {
    border: 2px solid var(--white) !important;
}

/* 5. Слайдер (Полоска) */
.wpc-filters-range-wrapper .ui-widget-content {
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    height: 4px !important;
    margin-top: 5px !important;
}

.wpc-filters-range-wrapper .ui-slider-range {
    background: var(--blue) !important;
}

.wpc-filters-range-inputs .ui-slider-horizontal {
    height: 2px;
    background: var(--blue) !important;
}

.wpc-filters-range-inputs .ui-slider-horizontal .ui-slider-range {
    background-color: var(--white) !important;
}

/* FIX SLIDER HANDLE - ULTIMATE */
div.wpc-filters-range-slider-control .ui-slider-handle.ui-state-default,
div.wpc-filters-range-slider-control .ui-slider-handle {
    background: var(--blue) !important;
    background-color: var(--blue) !important;
    border: 2px solid var(--white) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Ховер состояние */
div.wpc-filters-range-slider-control .ui-slider-handle:hover {
    background: var(--white) !important;
    border-color: var(--white) !important;
}

/* 6. Чекбоксы и Списки */
.wpc-filter-content ul li a,
.wpc-filter-content ul li label {
    color: var(--white) !important;
    text-decoration: none !important;
    font-weight: 400 !important;
    font-size: 1em !important;
    line-height: 1.4 !important;
    transition: color 0.3s;
    display: flex !important;
    align-items: center !important;
}

.wpc-filter-content ul li a:hover,
.wpc-filter-content ul li label:hover {
    color: var(--blue) !important;
}

/* Кастомный чекбокс */
.wpc-filters-section input[type="checkbox"],
.wpc-filters-section input[type="radio"] {
    background-color: transparent !important;
    border: 2px solid var(--white) !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    /* Чтобы не сплющивало */
    border-radius: 0 !important;
    margin-right: 10px !important;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.wpc-filters-section input[type="checkbox"]:checked {
    background-color: var(--blue) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white' width='14px' height='14px'%3E%3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.wpc-filter-count {
    color: var(--opac) !important;
    font-size: 0.9em;
    margin-left: 5px;
}

/* 7. Скрываем ссылку Edit */
.wpc-edit-filter-set {
    display: none !important;
}

.wp-block-button__link {
    border-radius: 0 !important;
}

.my-hero-title {
    font-size: 4em !important;
}

@media (max-width: 768px) {
    .my-hero-title {
        font-size: 2.4em !important;
    }
}

/* --- HOMEPAGE HERO (CLEAN) --- */

.home-hero-section {
    padding: 80px 0;
    background-color: var(--base);
    overflow: hidden;
}

/* GRID LAYOUT */
.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    /* STRETCH: Чтобы левая колонка была той же высоты, что и видео */
    align-items: stretch;
}

/* Левая колонка - Flex с разбросом по высоте */
.hero-col-left {
    display: flex;
    flex-direction: column;
    /* Это прижмет H1 к верху, а Box к низу */
    justify-content: space-between;
}

/* TYPOGRAPHY */
.hero-title {
    font-size: 3.5em !important;
    line-height: 1.1;
    color: var(--white);
    /* Отступ снизу не нужен, так как работает space-between, но оставим для страховки на малых экранах */
    margin-bottom: 20px;
    font-weight: 500;
    margin-top: -5px;
    /* Визуальная компенсация line-height, чтобы идеально по верху видео */
}

/* DASHED BOX STYLE */
.hero-dashed-box {
    border: 1px dashed var(--blue);
    /* Оставляем 1px dashed как стандарт, либо меняем на border-image если нужен кастом */
    padding: 30px;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 0;
}

.hero-description {
    color: var(--white);
    font-size: 1em;
}

/* BUTTONS HOME SPECIFIC */
.hero-btn-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.industrial-btn.btn-filled {
    background-color: var(--accent);
    border: 2px solid var(--accent) !important;
    color: var(--white);
}

.industrial-btn.btn-filled:hover {
    background-color: var(--blue) !important;
    border-color: var(--white) !important;
}

.industrial-btn.btn-outline {
    background-color: transparent;
    border: 2px solid var(--blue) !important;
    color: var(--white);
}

.industrial-btn.btn-outline:hover {
    background-color: var(--blue) !important;
    border-color: var(--white) !important;
}

/* MEDIA (VIDEO) */
.hero-media-wrapper {
    width: 100%;
    max-width: 720px;
    aspect-ratio: 1 / 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.hero-loop-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- MOBILE ADAPTATION (< 1024px) --- */
@media (max-width: 1024px) {
    .home-hero-section {
        padding: 40px 0;
    }

    .hero-grid {
        display: flex;
        flex-direction: column;
        gap: 30px;
        align-items: center;
        /* Сброс stretch */
    }

    .hero-col-left {
        display: contents;
        /* Важно: отменяем Flex контейнер, чтобы сработал Order */
    }

    .hero-title {
        order: 1;
        font-size: 2.2em !important;
        width: 100%;
        margin-top: 0;
    }

    .hero-col-right {
        order: 2;
        width: 100%;
    }

    .hero-media-wrapper {
        margin-left: 0;
        max-width: 100%;
    }

    .hero-dashed-box {
        order: 3;
        width: 100%;
        padding: 20px;
    }

    .hero-btn-group .industrial-btn {
        width: 100%;
        max-width: none;
    }
}

/* --- HEADER NAV BUTTON --- */

/* Пункт меню */

.main-navigation .main-nav ul li.my-nav-item a {
    background-color: var(--base) !important;
    border: 2px solid var(--opac) !important;
    color: var(--white) !important;
    line-height: 1 !important;
    /* Сброс высоты строки темы */
    padding: 10px 8px !important;
    margin-left: 16px;
    /* Отступ от остальных ссылок */
    transition: all 0.3s ease;
    font-weight: 500;
}

/* Ховер эффект */
.main-navigation .main-nav ul li.my-nav-item a:hover {
    background-color: var(--base) !important;
    border-bottom-color: var(--blue) !important;
}

/* Убираем фон при наведении, который дает тема по умолчанию */
.main-navigation .main-nav ul li.my-nav-item:hover>a {
    background-color: var(--accent);
    color: var(--white);
}

/* Адаптация для мобильного меню (чтобы кнопка не прилипала) */
@media (max-width: 768px) {
    .main-navigation .main-nav ul li.my-nav-item a {
        display: inline-block;
        margin: 10px 0 10px 20px;
        text-align: center;
    }
}

/* Превращаем пункт меню в кнопку */
.main-navigation .main-nav ul li.my-nav-btn a {
    background-color: transparent;
    border: 2px solid var(--accent) !important;
    color: var(--white) !important;
    line-height: 1 !important;
    /* Сброс высоты строки темы */
    padding: 10px 16px !important;
    margin-left: 16px;
    /* Отступ от остальных ссылок */
    border-radius: 0;
    transition: all 0.3s ease;
    font-weight: 500;
}

/* Ховер эффект */
.main-navigation .main-nav ul li.my-nav-btn a:hover {
    background-color: var(--accent) !important;
    color: var(--white) !important;
}

/* Убираем фон при наведении, который дает тема по умолчанию */
.main-navigation .main-nav ul li.my-nav-btn:hover>a {
    background-color: var(--accent);
    color: var(--white);
}

/* Адаптация для мобильного меню (чтобы кнопка не прилипала) */
@media (max-width: 768px) {
    .main-navigation .main-nav ul li.my-nav-btn a {
        display: inline-block;
        margin: 10px 0 10px 20px;
        text-align: center;
    }
}

/* --- PRODUCT CENTER SECTION (LEFT ALIGN + DASHED) --- */

.product-center-section {
    padding: 80px 0;
    background-color: var(--base);
    border-bottom: 1px solid rgba(0, 191, 255, 0.1);
}

/* Header: Left Align & Full Opacity */
.center-header {
    text-align: left !important;
    /* Force Left */
    max-width: 100%;
    margin: 0 0 60px 0;
}

.sub-label {
    color: var(--blue);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

.center-header h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.center-header p {
    color: var(--white) !important;
    opacity: 1 !important;
    /* 100% Opacity */
    font-size: 1em;
    max-width: 800px;
    /* Ограничим ширину строки для читаемости, но выравнивание левое */
}

/* Grid System */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* === UPDATED CARD DESIGN (Full Image Top) === */

.solution-card {
    display: flex;
    flex-direction: column;
    background-color: var(--base) !important;
    /* Changed to Solid Border for cleaner look with images */
    border: 1px solid var(--blue) !important;
    padding: 0 !important;
    /* NO PADDING ON CONTAINER */
    text-decoration: none;
    transition: all 0.3s ease;
    height: 100%;
    overflow: hidden;
    /* Contains image */
}

.solution-card:hover {
    border-color: var(--white) !important;
}

/* Image Wrapper (Top Area) */
.solution-img-wrapper {
    position: relative;
    width: 100%;
    /* Aspect Ratio 16:9 or 4:3 works well. Let's use 3:2 for good balance */
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.solution-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.solution-card:hover .solution-img-wrapper img {
    transform: scale(1.05);
}

/* Icon Overlay (Positioned on top of image, bottom left) */
.solution-img-wrapper .icon-box {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background: var(--accent) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    /* Optional: Add a slight overlap visual if desired, but square is industrial */
}

/* Material Icons in Card */
.solution-img-wrapper .icon-box .material-symbols-outlined {
    font-size: 36px;
    color: var(--white);
    line-height: 1;
}

/* Content Area (Below Image) */
.solution-content {
    padding: 30px 25px 25px 25px;
    /* Top padding ensures visual separation */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: var(--base);
}

/* Title Row (Flex for Arrow alignment) */
.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.solution-card h3 {
    font-size: 1.2em;
    color: var(--white);
    margin: 0;
    font-weight: 500;
    text-align: left !important;
    line-height: 1.3;
}

/* Arrow Styling */
.card-arrow svg {
    width: 24px;
    height: 24px;
    fill: var(--blue);
    /* Blue Arrow by default */
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.solution-card:hover .card-arrow svg {
    fill: var(--white);
    /* White on hover */
    transform: translateX(5px);
}

/* Description Text */
.solution-card p {
    font-size: 0.9em;
    color: var(--white) !important;
    margin: 0;
    line-height: 1.3;
    text-align: left !important;
}

/* Responsive */
@media (max-width: 1200px) {
    .solutions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .center-header h2 {
        font-size: 2em;
    }
}

@media (max-width: 500px) {
    .solutions-grid {
        grid-template-columns: 1fr;
    }
}

/* --- HOME CONTACT SECTION --- */
.home-contact-section {
    padding: 80px 0;
    background-color: var(--base);
    border-top: 1px solid rgba(0, 191, 255, 0.1);
    /* Separator */
}

/* New Grid Layout for Contact Section */
.home-contact-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    /* Left Form (Wider), Right Info (Narrower) */
    gap: 60px;
    align-items: start;
}

/* Left: Form Wrapper */
.contact-form-wrapper {
    width: 100%;
}

/* Right: Contact Info Wrapper (CLEAN STYLE UPDATE) */
.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    /* Reduced gap slightly */
    /* REMOVED: background, border, padding */
    padding: 0;
    background: transparent;
    border: none;
    margin-top: 10px;
    /* Align slightly with form top */
}

/* Individual Contact Item */
.contact-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Tighter gap */
}

.contact-item h5 {
    color: var(--blue);
    font-size: 0.9em;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Icons for headers */
.contact-item h5 svg {
    width: 20px;
    height: 20px;
    fill: var(--blue);
}

.contact-item p,
.contact-item a {
    color: var(--white);
    font-size: 1em;
    margin: 0;
    text-decoration: none;
    transition: color 0.3s;
    line-height: 1.5;
}

.contact-item a:hover {
    color: var(--blue);
}

/* Social Buttons Grid */
.contact-socials {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 5px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.2);
    font-weight: 500;
}

.social-btn:hover {
    border-color: var(--blue);
    background: rgba(0, 191, 255, 0.1);
    color: var(--white);
    transform: translateX(5px);
}


.social-btn svg {
    width: 24px;
    height: 24px;
    fill: var(--white);
}

.social-btn:hover svg {
    fill: var(--blue);
}

/* --- ABOUT US SECTION --- */
.about-section {
    padding: 80px 0 0 0;
    background-color: var(--base);
    border-top: 1px solid rgba(0, 191, 255, 0.1);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 60px;
    align-items: stretch;
    margin-bottom: 30px;
    /* Reduced distance to gallery */
}

.about-content-inner p {
    color: var(--white);
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 20px;
}

.about-content-inner p:last-child {
    margin-bottom: 0;
}

.about-section .hero-dashed-box h2.section-title {
    margin-top: 0;
    margin-bottom: 0;
}

.about-section .hero-dashed-box {
    height: 100%;
}

.about-featured-image {
    width: 100%;
    height: 100%;
}

.about-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid var(--blue);
}

/* Marquee Gallery Styling (Running String) */
.about-marquee {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    padding: 40px 0;
    /* Edge fade effect */
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-content {
    display: flex;
    gap: 30px;
    width: max-content;
    animation: marquee-scroll 60s linear infinite;
    /* Slower, more premium */
}

.marquee-content img {
    height: 240px;
    width: auto;
    object-fit: cover;
    border: 1px solid var(--blue);
    display: block;
    flex-shrink: 0;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-33.3333%);
        /* Matches the triple set in PHP */
    }
}

/* Pause on hover */
.about-marquee:hover .marquee-content {
    animation-play-state: paused;
}

/* Response adaptation */
@media (max-width: 1024px) {
    .about-section {
        padding: 60px 0;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .marquee-content img {
        height: 180px;
    }
}

@media (max-width: 768px) {
    .about-content-inner p {
        font-size: .9em;
    }

    .about-marquee {
        padding: 20px 0;
    }

    .marquee-content {
        gap: 15px;
    }

    .marquee-content img {
        height: 130px;
    }
}

/* --- MOBILE CONTACT GRID (< 1024px) --- */
@media (max-width: 1024px) {
    .home-contact-grid {
        grid-template-columns: 1fr;
        /* Stack vertically */
        gap: 50px;
    }

    /* Order: Form First (Default), Info Second */
    .contact-info-wrapper {
        padding: 0;
        /* Reset padding */
    }
}

.section-footer-cta {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}