/* ===== СТРАНИЦА ТОВАРА ===== */
.news-single {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.product-page {
    width: 100%;
    padding: 30px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e1e1e;
    line-height: 1.5;
}

.product-card {
    background: #fff;
    padding: 30px;
}

/* Заголовок товара */
.product-card h1 {
    font-size: var(--font-head1);
    color: #1e1e1e;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 36px;
    margin: 0 0 36px;
}

/* Верхняя часть: галерея + тех. инфо */
.product-top {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
}

.product-gallery {
    flex: 1;
    min-width: 0;
}

.product-tech-info {
    flex: 1;
    border-left: 2px solid #e9ecef;
    padding-left: 30px;
}

.tech-title {
    font-size: var(--font-head3);
    margin: 0 0 20px;
    color: #1e1e1e;
    font-weight: 600;
}

.tech-list {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}

.tech-list li {
    margin-bottom: 12px;
    line-height: 1.5;
    color: #333;
}

.tech-label {
    font-weight: 600;
    color: #495057;
    margin-right: 5px;
}

.certificates-item {
    display: flex;
    align-items: flex-start;
}

.certificates-list {
    list-style: disc;
    margin: 0;
    padding-left: 20px;
}

.certificates-list li {
    margin-bottom: 5px;
}

/* Кнопка "Задать вопрос" */
.btn-question {
    display: block;
    width: fit-content;
    margin-left: auto;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: var(--font-button);
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
}

.btn-question:hover {
    background: var(--primary-dark);
}

/* .btn-question:active {
    transform: scale(0.98);
} */

/* Слайдер галереи */
.gallery-main {
    position: relative;
}

.gallery-top {
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-top .swiper-slide {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.gallery-top .swiper-slide img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.gallery-thumbs {
    box-sizing: border-box;
    padding: 0;
}

.gallery-thumbs .swiper-slide {
    width: auto !important;
    height: 80px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    opacity: 0.6;
    cursor: pointer;
    transition: opacity 0.2s, border-color 0.2s;
    background: #fff;
}

.gallery-thumbs .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--primary-color);
}

.gallery-thumbs .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Стрелки Swiper */
.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.8);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
}

/* Нижняя часть */
.product-bottom {
    margin-top: 40px;
}

.section-title {
    font-size: var(--font-head2);
    margin: 0 0 20px;
    color: #1e1e1e;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
}

.product-full-name {
    font-size: var(--font-head3);
    font-weight: 500;
    margin-bottom: 20px;
    color: #2c3e50;
}

.product-description {
    line-height: 1.7;
    color: #333;
    margin-bottom: 40px;
}

.product-description p {
    margin: 1em 0;
}

/* Вкладки */
.product-tabs {
    margin-top: 30px;
}

.product-tabs-nav {
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 0;
    font-size: var(--font-button);
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.tab-btn:hover {
    color: #E02E7A;
}

.tab-btn.active {
    color: #E02E7A;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: #E02E7A;
    border-radius: 3px 3px 0 0;
}

.product-tabs-content {
    position: relative;
    transition: min-height 0.3s ease;
}

.tab-pane {
    display: none;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-sizing: border-box;
}

.tab-pane.active {
    display: block;
    opacity: 1;
}

/* Чертёж */
.drawing-figure {
    margin: 0 0 20px 0;
}

.drawing-figure:last-child {
    margin-bottom: 0;
}

.drawing-figure img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.no-content {
    color: #999;
    font-style: italic;
    padding: 20px 0;
}

/* Таблица характеристик */
.product-specs-table-wrapper {
    overflow-x: auto;
    margin-bottom: 30px;
}

.product-specs-table-wrapper:last-child {
    margin-bottom: 0;
}

.product-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-small);
    border: 1px solid #dee2e6;
}

.product-specs-table th,
.product-specs-table td {
    border: 1px solid #dee2e6;
    padding: 10px 12px;
    vertical-align: top;
    text-align: center;
}

.product-specs-table th {
    background: #f1f3f5;
    font-weight: 600;
}

.product-specs-table td[colspan] {
    background: #f8f9fa;
    font-weight: 500;
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: fadeIn 0.25s ease;
}

.lightbox-overlay img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    transition: transform 0.2s;
}

.lightbox-overlay img:hover {
    transform: scale(1.01);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 36px;
    font-weight: 300;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 10001;
}

.lightbox-close:hover {
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== АДАПТИВ ===== */
@media (max-width: 992px) {
    .product-top {
        gap: 20px;
    }

    .product-tech-info {
        padding-left: 20px;
    }

    .gallery-thumbs .swiper-slide {
        height: 70px;
    }
}

@media (max-width: 768px) {
    .product-page {
        padding: 15px 10px;
    }

    .product-card {
        padding: 15px;
    }

    .product-top {
        flex-direction: column;
        gap: 30px;
    }

    .product-tech-info {
        border-left: none;
        padding-left: 0;
        border-top: 2px solid #e9ecef;
        padding-top: 20px;
    }

    .gallery-top .swiper-slide img {
        max-height: 300px;
    }

    .gallery-thumbs .swiper-slide {
        height: 60px;
    }

    .product-tabs-nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .tab-btn {
        padding: 10px 0;
    }
}

@media (max-width: 480px) {
    .gallery-thumbs .swiper-slide {
        height: 50px;
    }

    .btn-question {
        width: 100%;
        padding: 14px;
    }
}

/* Адаптивная таблица характеристик – мобильная версия (предыдущая версия. Если внедрять, то требуется доработать.) */
/* @media (max-width: 767px) {
    .product-specs-table-wrapper {
        overflow-x: visible;
    }
    .product-specs-table.responsive-ready {
        display: block;
        border: none;
    }
    .product-specs-table.responsive-ready thead {
        display: none;
    }
    .product-specs-table.responsive-ready tbody {
        display: block;
    }
    .product-specs-table.responsive-ready tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 12px;
        background: #fff;
    }
    .product-specs-table.responsive-ready td {
        display: flex;
        align-items: baseline;
        padding: 6px 4px;
        border: none;
        border-bottom: 1px dashed #e9ecef;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        flex-wrap: wrap;
    }
    .product-specs-table.responsive-ready td:last-child {
        border-bottom: none;
    }
    .product-specs-table.responsive-ready td[data-label]::before {
        content: attr(data-label);
        font-weight: 600;
        color: #495057;
        margin-right: 10px;
        min-width: 0;
        flex-shrink: 1;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
    }

    .product-specs-table.responsive-ready td[colspan] {
        display: block;
        text-align: center;
        font-weight: 600;
        background: #f8f9fa;
        border-radius: 6px;
        padding: 10px;
        margin-bottom: 10px;
    }
    .product-specs-table.responsive-ready td[colspan]::before {
        display: none;
    }
} */

/* Адаптивная таблица характеристик – мобильная версия */
@media (max-width: 767px) {
    .product-specs-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        text-align: center; /* центрирует таблицу, если она помещается */
    }

    .product-specs-table {
        display: inline-table; /* позволяет корректно скроллить к началу, если не помещается */
        width: auto;
    }

    .product-specs-table th,
    .product-specs-table td {
        white-space: nowrap;
    }
}