/*
 * Стили карточки продукции — reduktor-na-donu.ru
 * v2.0
 */

/* ===== ОСНОВА ===== */
.product-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    color: #1a1a1a;
    line-height: 1.6;
}

.product-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== ХЛЕБНЫЕ КРОШКИ ===== */
.product-breadcrumbs {
    background: #f5f7fa;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 0;
    font-size: 13px;
}

.product-breadcrumbs a {
    color: #2b6cb0;
    text-decoration: none;
}

.product-breadcrumbs a:hover {
    text-decoration: underline;
}

.bc-sep {
    color: #a0aec0;
    margin: 0 6px;
}

.bc-current {
    color: #718096;
}

/* ===== ВЕРХНЯЯ СЕКЦИЯ (ГЕРОЙ) ===== */
.product-hero {
    padding: 24px 0 20px;
}

.product-hero__grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 32px;
    align-items: start;
}

.product-hero__gallery {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-hero__main-img {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 0.85;
    cursor: zoom-in;
    position: relative;
}

.product-hero__main-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.product-hero__zoom-hint {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.product-hero__main-img:hover .product-hero__zoom-hint {
    opacity: 1;
}

.product-hero__thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-hero__thumb {
    width: 72px;
    height: 62px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
    flex-shrink: 0;
}

.product-hero__thumb:hover {
    border-color: #a0aec0;
}

.product-hero__thumb--active {
    border-color: #4299e1;
}

.product-hero__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.product-hero__no-image {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    color: #a0aec0;
    font-size: 18px;
}

/* GLightbox кастомизация */
.goverlay {
    background: rgba(0, 0, 0, 0.92) !important;
}

.glightbox-clean .gclose,
.glightbox-clean .gnext,
.glightbox-clean .gprev {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 50% !important;
    width: 44px !important;
    height: 44px !important;
}

.glightbox-clean .gclose:hover,
.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

.glightbox-clean .gslide-image img {
    border-radius: 8px;
}

.product-hero__title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3;
    color: #1a202c;
}

.product-hero__desc {
    font-size: 15px;
    color: #4a5568;
    margin: 0 0 16px;
    line-height: 1.5;
}

/* Ключевые параметры в правой колонке */
.product-hero__specs {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.product-hero__specs-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #718096;
    margin: 0 0 8px;
}

.product-hero__specs-table,
.product-hero__specs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.product-hero__specs-list li {
    font-size: 13px;
    color: #2d3748;
    padding: 5px 0;
    padding-left: 14px;
    position: relative;
    line-height: 1.4;
    border-bottom: 1px solid #edf2f7;
}

.product-hero__specs-list li:last-child {
    border-bottom: none;
}

.product-hero__specs-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #4299e1;
}

/* Кнопки */
.product-hero__actions {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    line-height: 1;
}

.product-btn--primary {
    background: #2b6cb0;
    color: #fff;
    border-color: #2b6cb0;
}

.product-btn--primary:hover {
    background: #2c5282;
    border-color: #2c5282;
    color: #fff;
}

.product-btn--outline {
    background: transparent;
    color: #2b6cb0;
    border-color: #2b6cb0;
}

.product-btn--outline:hover {
    background: #2b6cb0;
    color: #fff;
}

.product-btn--sm {
    padding: 8px 20px;
    font-size: 14px;
}

/* Категория */
.product-hero__category {
    font-size: 13px;
    color: #718096;
}

.product-hero__category-label {
    margin-right: 4px;
}

.product-hero__category-link {
    color: #2b6cb0;
    text-decoration: none;
}

.product-hero__category-link:hover {
    text-decoration: underline;
}


/* ===== ТАБЫ ===== */
.product-tabs {
    padding: 0 0 32px;
}

/* Обёртка для градиент-подсказки при overflow */
.product-tabs__nav-wrap {
    position: relative;
}

/* Градиент справа — намёк что табы прокручиваются */
.product-tabs__nav-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 2px; /* не перекрываем border-bottom navа */
    width: 40px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1;
}

/* Класс ставится JS-ом когда есть overflow */
.product-tabs__nav-wrap--has-overflow::after {
    opacity: 1;
}

/* Когда юзер доскроллил до конца — градиент скрывается */
.product-tabs__nav-wrap--scrolled-end::after {
    opacity: 0;
}

.product-tabs__nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.product-tabs__nav::-webkit-scrollbar {
    display: none;
}

.product-tabs__btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #a0aec0;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.product-tabs__btn:hover {
    color: #718096;
}

.product-tabs__btn--active {
    color: #4299e1;
    border-bottom-color: #4299e1;
}

.product-tabs__panel {
    display: none;
    padding: 24px 0;
}

.product-tabs__panel--active {
    display: block;
}

.product-tabs__content {
    font-size: 15px;
    line-height: 1.7;
    color: #2d3748;
}

.product-tabs__content h2,
.product-tabs__content h3,
.product-tabs__content h4 {
    color: #1a202c;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.product-tabs__content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 12px 0;
}

.product-tabs__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.product-tabs__content table th,
.product-tabs__content table td {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    text-align: left;
}

.product-tabs__content table th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
}

.product-tabs__content table tr:hover {
    background: #f7fafc;
}

.product-tabs__content ul,
.product-tabs__content ol {
    padding-left: 20px;
}

.product-tabs__content li {
    margin-bottom: 4px;
}


/* ===== ДОКУМЕНТАЦИЯ ===== */
.product-docs__card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 24px;
    max-width: 500px;
}

.product-docs__icon {
    color: #2b6cb0;
    flex-shrink: 0;
}

.product-docs__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-docs__text strong {
    font-size: 15px;
    color: #2d3748;
    word-break: break-all;
}

.product-docs__size {
    font-size: 13px;
    color: #718096;
}


/* ===== МОДАЛКА ЗАЯВКИ ===== */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.product-modal--open {
    display: flex;
}

.product-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.product-modal__dialog {
    position: relative;
    background: #fff;
    border-radius: 10px;
    max-width: 420px;
    width: 90%;
    overflow: hidden;
    animation: modalIn 0.25s ease-out;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.product-modal__header {
    background: #2b6cb0;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-modal__title {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.product-modal__close {
    background: none;
    border: none;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.2s;
}

.product-modal__close:hover {
    color: #fff;
}

.product-modal__body {
    padding: 16px 24px 24px;
}

/* CF7 форма — чистые поля с разделителями */
.product-modal__body .wpcf7-form {
    display: block;
}

.product-modal__body .wpcf7-form p {
    margin: 0;
    padding: 0;
    display: contents;
}

.product-modal__body .wpcf7-form br {
    display: none;
}

.product-modal__body .cf7-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    padding: 0;
}

.product-modal__body .cf7-row:last-of-type {
    border-bottom: none;
}

.product-modal__body .cf7-row .cf7-label {
    min-width: 100px;
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    white-space: nowrap;
    padding: 12px 16px 12px 0;
    flex-shrink: 0;
}

.product-modal__body .cf7-row .cf7-field {
    flex: 1;
}

.product-modal__body .cf7-row--msg {
    align-items: flex-start;
    border-bottom: none;
}

.product-modal__body .cf7-row--msg .cf7-label {
    padding-top: 14px;
}

.product-modal__body .wpcf7-form input[type="text"],
.product-modal__body .wpcf7-form input[type="email"],
.product-modal__body .wpcf7-form input[type="tel"] {
    width: 100%;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: #1a202c;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.product-modal__body .wpcf7-form textarea {
    width: 100%;
    padding: 10px 0;
    border: none;
    background: transparent;
    color: #1a202c;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    min-height: 56px;
    resize: none;
    font-family: inherit;
}

.product-modal__body .wpcf7-form input::placeholder,
.product-modal__body .wpcf7-form textarea::placeholder {
    color: #a0aec0;
}

.product-modal__body .cf7-submit-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.product-modal__body .wpcf7-form input[type="submit"] {
    background: #2b6cb0;
    color: #fff;
    border: none;
    padding: 10px 32px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.product-modal__body .wpcf7-form input[type="submit"]:hover {
    background: #2c5282;
}

.product-modal__body .wpcf7-response-output {
    font-size: 13px;
    margin-top: 8px;
}

.product-modal__body .wpcf7-not-valid-tip {
    font-size: 12px;
    color: #e53e3e;
    margin-top: 2px;
}



/* ===== СМОТРИТЕ ТАКЖЕ ===== */
.product-related {
    padding: 48px 0;
    background: #f7fafc;
}

.product-related__title {
    font-size: 24px;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 24px;
}

.product-related__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-related__card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}

.product-related__card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.product-related__img {
    aspect-ratio: 1 / 0.75;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
}

.product-related__img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.product-related__no-img {
    color: #a0aec0;
    font-size: 14px;
}

.product-related__name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    padding: 12px 14px 4px;
    line-height: 1.3;
}

.product-related__cat {
    font-size: 12px;
    color: #718096;
    padding: 0 14px 12px;
    display: block;
}


/* ===== АДАПТИВ ===== */
@media (max-width: 960px) {
    .product-hero__grid {
        grid-template-columns: 1fr 1fr;
    }

    .product-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .product-hero__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-hero__gallery {
        max-width: 100%;
    }

    .product-hero__thumb {
        width: 60px;
        height: 52px;
    }

    .product-hero__title {
        font-size: 22px;
    }

    .product-hero__actions {
        flex-direction: column;
    }

    .product-btn {
        width: 100%;
        text-align: center;
    }

    .product-tabs__btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .product-related__grid {
        grid-template-columns: 1fr;
    }

    .product-docs__card {
        flex-direction: column;
        text-align: center;
    }

    .product-modal__dialog {
        width: 95%;
    }

    .product-modal__body {
        padding: 12px 16px 16px;
    }

    .product-modal__body .cf7-row {
        flex-direction: column;
        align-items: stretch;
        border-bottom: 1px solid #edf2f7;
        padding-bottom: 8px;
        margin-bottom: 4px;
    }

    .product-modal__body .cf7-row .cf7-label {
        min-width: auto;
        padding: 6px 0 2px;
        font-size: 13px;
    }

    .product-modal__body .cf7-submit-row {
        justify-content: stretch;
    }

    .product-modal__body .wpcf7-form input[type="submit"] {
        width: 100%;
    }

    .product-modal__title {
        font-size: 16px;
    }
}
