/* ===== PRODUCT PAGE STYLES ===== */

/* Product Page Layout */
.product-page {
    padding: 100px 0 60px 0;
}

.product-main {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
}

.product-title {
    font-size: 40px;
    font-weight: 400;
    color: var(--color-heading);
    margin: 0 0 30px 0;
    line-height: 1.2;
}

/* Product Gallery */
.product-gallery-wrapper {
    display: flex;
    gap: 10px;
    max-width: 100%;
    overflow: hidden;
}

.thumbnails-container {
    width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.thumbnail-nav {
    position: absolute;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    background: transparent;
    margin: 5px 0;
    z-index: 1;
    color: var(--color-white);
    padding: 0;
}

.thumbnail-up {
    top: 0;
}

.thumbnail-down {
    bottom: 0;
}

.thumbnail-nav:hover {
    background: #e9ecef;
    color: var(--color-hover);
}

.thumbnail-nav svg {
    width: 27px;
    height: 27px;
    transition: transform 0.3s ease;
}

.thumbnails-wrapper {
    flex: 1;
    overflow: hidden;
    width: 100%;
    max-height: 540px;
}

.thumbnails-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.3s ease;
}

.thumbnail-item {
    position: relative;
    width: 110px;
    height: 85px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    flex-shrink: 0;
}

.thumbnail-item.active {
    border-color: var(--color-hover);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-arrow {
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 8px solid var(--color-hover);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thumbnail-item.active .thumbnail-arrow {
    opacity: 1;
}

.main-image-container {
    flex: 1;
    position: relative;
}

.main-image-wrapper {
    position: relative;
    /* width: 825px; */
    height: 540px;
    overflow: hidden;
    background: #f5f5f5;
}

.main-image-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image-slide.active {
    opacity: 1;
}

.main-image-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

/* Gallery Navigation */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2;
    color: var(--color-white);
}

.main-image-container:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: var(--color-hover);
    /* Цвет при наведении */
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

.gallery-nav svg {
    width: 40px;
    height: 40px;
    transition: transform 0.3s ease;
}

/* Product Info */
.product-characteristics h3 {
    font-size: 20px;
    font-weight: 400;
    color: var(--color-heading);
    margin: 0 0 20px 0;
}

.characteristics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    margin-bottom: 30px;
}

/* 
.characteristic-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 20px;
    background-color: var(--color-characteristics);
} */

.characteristic-content {
    display: flex;
    align-items: center;
}

.characteristic-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.characteristic-icon img {
    width: 100%;
    height: 100%;
}

.characteristic-label {
    font-size: 14px;
    color: var(--color-inactive);
    margin-bottom: 2px;
}

.characteristic-value {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-heading);
    white-space: nowrap;
}

.characteristic-value sup {
    font-size: 12px;
    vertical-align: super;
}

/* Product Variations */
.product-variations {
    margin-bottom: 30px;
}

.variation-item {
    margin-bottom: 15px;
}

.variation-radio {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 5px 10px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.variation-radio:hover {
    border-color: var(--color-hover);
    background: #f8f9fa;
}

.variation-radio input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
    transition: border-color 0.3s ease;
}

.variation-radio input[type="radio"]:checked+.radio-custom {
    border-color: var(--color-hover);
}

.variation-radio input[type="radio"]:checked+.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--color-hover);
    border-radius: 50%;
}

.variation-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.variation-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-heading);
}

.variation-price {
    display: flex;
    flex-direction: column;
    text-align: right;
    white-space: nowrap;
}

.variation-price .current-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-heading, #2A2C2F);
}

.variation-price .old-price {
    font-size: 14px;
    color: var(--color-price-crossed, #AFB2B5);
    text-decoration: line-through;
    margin-left: 8px;
}

/* Product Что вы выбрали */
.selected-options-block {
    margin: 20px 0;
    padding: 10px;
    background-color: var(--color-characteristics);
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.selected-options-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--color-heading);
    margin: 0 0 15px 0;
}

.selected-options-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.selected-option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.selected-option-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.selected-option-name {
    font-size: 15px;
    font-weight: 400;
    color: var(--color-heading);
}

.selected-option-price {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-button-primary);
}

.selected-option-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    margin-left: 0;
    transition: color 0.3s ease;
}

.selected-option-remove:hover {
    color: #c82333;
}

/* Product Price */
.product-price {
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 700;
}

.price-label {
    font-size: 18px;
    font-weight: 400;
    color: var(--color-heading);
}

.current-price {
    font-size: 28px;
    color: var(--color-heading);
}

.price-old-label {
    font-size: 14px;
    color: var(--color-price-crossed);
    font-weight: 500;
}

.old-price {
    color: var(--color-price-crossed);
    text-decoration: line-through;
    /* margin-left: 10px; */
    font-size: 14px;
    font-weight: 500;
}

/* Product Actions */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.action-buttons-row {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 15px 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 1;
}

.btn-secondary {
    background: #f39c12;
    color: white;
}

.btn-secondary:hover {
    background: #e67e22;
    transform: translateY(-2px);
}

.btn-print {
    background: transparent;
    color: #666;
    border: 1px solid #ddd;
    width: 100%;
}

.btn-print:hover {
    background: #f8f9fa;
    color: var(--color-heading);
}

.btn-print img {
    width: 16px;
    height: 16px;
}

/* Product Tabs */
.product-left-panel {
    min-width: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.product-left-panel .product-tabs {}

.product-tabs-container {
    margin-top: 60px;
    width: 100%;
    overflow: hidden;
}

.tabs-navigation {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    /* Убираем скроллбар на десктопе для красоты */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    /* Плавная прокрутка */
    scroll-behavior: smooth;
    /* Предотвращаем перенос кнопок табов на новую строку */
    white-space: nowrap;
    padding-bottom: 3px;
    margin-bottom: 25px;
}

/* Стилизация скроллбара для WebKit браузеров (Chrome, Safari) */
.tabs-navigation::-webkit-scrollbar {
    height: 4px;
}

.tabs-navigation::-webkit-scrollbar-track {
    background: transparent;
}

.tabs-navigation::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.tabs-navigation::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

.tab-button {
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--color-inactive);
    cursor: pointer;
    border-bottom: 3px solid #EDEDED;
    transition: all 0.3s ease;
    /* ВАЖНО: предотвращаем сжатие кнопок */
    flex-shrink: 0;
    /* Убираем перенос текста */
    white-space: nowrap;
    /* Минимальная ширина для читаемости */
    min-width: fit-content;
}

.tab-button:hover {
    color: var(--color-hover);
}

.tab-button.active {
    color: var(--color-hover);
    border-bottom: 3px solid var(--color-hover);
}

.tab-content {
    display: none;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.tab-content.active {
    display: block;
}

.tab-content-inner {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-heading);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Equipment Table */
.equipment-data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.equipment-data-table th,
.equipment-data-table td {
    border: 1px solid #e9ecef;
    padding: 12px 15px;
    text-align: left;
    vertical-align: top;
}

.equipment-data-table th {
    background: var(--color-hover);
    color: white;
    font-weight: 600;
}

.equipment-data-table th:first-child {
    width: 30%;
}

.equipment-name {
    font-weight: 500;
    color: var(--color-heading);
}

.equipment-description {
    color: #666;
    line-height: 1.5;
}

/* Additional Options */
.additional-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 5px 15px;
    transition: all 0.3s ease;
}

.option-item:hover {
    border-color: var(--color-hover);
    background: #f8f9fa;
}

.option-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.option-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.option-checkbox input[type="checkbox"]:checked+.checkbox-custom {
    background: var(--color-hover);
    border-color: var(--color-hover);
}

.option-checkbox input[type="checkbox"]:checked+.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.option-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.option-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-heading);
}

.option-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-hover);
    white-space: nowrap;
}

/* Delivery Content */
.delivery-content {
    text-align: center;
    padding: 40px 20px;
}

.delivery-link {
    display: inline-block;
    background: var(--color-hover);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.delivery-link:hover {
    background: #065a2b;
    transform: translateY(-2px);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001;
}

.lightbox-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.lightbox-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.lightbox-slide.active {
    display: block;
}

.lightbox-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 5px;
}

.lightbox-next {
    right: 5px;
}

.lightbox-nav img {
    width: 20px;
    height: 20px;
    filter: invert(1);
}

/* Popap estimate */
.product-info-item {
    display: flex !important;
    flex-direction: column;
}

.estimate-popup-title {
    font-size: clamp(18px, 4vw, 44px);
    font-weight: 400;
    color: var(--color-white);
    text-align: center;
    margin: 0 0 30px 0;
    line-height: 1.2;
    text-align: left;
}

.product-title-popup {
    font-size: 20px;
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

.product-price-popup {
    font-size: 15px;
    font-weight: 400;
    color: var(--color-price-crossed);
    display: block;
    margin: 0 0 12px 5px;
}

.product-material-popup {
    font-size: 15px;
    font-weight: 400;
    color: var(--color-price-crossed);
    margin-left: 5px;
}

.product-options-popup {
    font-size: 15px;
    font-weight: 400;
    color: var(--color-price-crossed);
    margin-left: 5px;
}

.selected-option-right {
    white-space: nowrap;
}

.selected-product-info {
    background-color: var(--color-button-primary-hover);
    padding: 10px;
    border-radius: 6px;
    color: white;
}

/* Responsive gallery sizing */
@media (max-width: 1440px) {
    .main-image-wrapper {
        width: 100%;
    }

    .tab-button {
        padding: 15px 20px;
        font-size: 1.1vw;
    }
}

@media (max-width: 1366px) {
    .thumbnails-container {
        width: 100px;
    }

    .thumbnail-item {
        width: 100px;
    }

    .thumbnails-wrapper {
        max-height: 520px;
    }

    .main-image-wrapper {
        width: 100%;
        height: 520px;
    }

    .product-main {
        gap: 20px;
    }

}

@media (max-width: 1200px) {
    .thumbnails-wrapper {
        max-height: 435px;
    }

    .thumbnail-item {
        height: 70px;
    }

    .main-image-wrapper {
        width: 100%;
        height: 435px;
        /* aspect-ratio: 825/540; */
    }

    .tab-button {
        padding: 10px 15px;
    }

    .characteristic-icon {
        width: 20px;
        height: 20px;
    }

    .variation-price .old-price {
        font-size: 12px;
    }

    .variation-price .current-price {
        font-size: 14px;
    }

    .variation-name {
        font-size: 13px;
    }

    .variation-radio {
        gap: 8px;
    }

    .characteristic-label {
        font-size: 13px;
    }

    .characteristic-value {
        font-size: 14px;
    }

    .btn {
        font-size: 13px;
    }
}

@media (max-width: 1024px) {
    .product-main {
        gap: 15px;
    }

    .main-image-wrapper {
        width: 100%;
        height: 385px;
    }

    .thumbnails-wrapper {
        max-height: 385px;
    }

    .thumbnails-container {
        width: 90px;
    }

    .thumbnail-item {
        width: 90px;
    }

    .characteristic-label {
        font-size: 12px;
    }

    .characteristic-value {
        font-size: 13px;
    }

    .variation-name {
        font-size: 12px;
    }

    .variation-radio {
        padding: 3px 10px;
    }

    .variation-price .old-price {
        font-size: 11px;
    }

    .variation-price .current-price {
        font-size: 12px;
    }

    .btn {
        font-size: 12px;
        padding: 10px;
    }

    .tab-content-inner {
        font-size: 15px;
    }
}

@media (max-width: 992px) {
    .product-title {
        font-size: 35px;
    }

    .tab-button {
        padding: 10px;
    }

    .main-image-wrapper {
        width: 100%;
        height: 350px;
    }

    .thumbnails-wrapper {
        max-height: 350px;
    }

    .thumbnails-container {
        width: 85px;
    }

    .thumbnail-item {
        width: 85px;
    }
}

@media (max-width: 912px) {
    .main-image-wrapper {
        width: 100%;
        height: 325px;
    }

    .thumbnails-wrapper {
        max-height: 325px;
    }

    .thumbnails-container {
        width: 80px;
    }

    .thumbnail-item {
        width: 80px;
    }

    .thumbnail-item {
        height: 60px;
    }

    .characteristic-label {
        font-size: 11px;
    }

    .characteristic-value {
        font-size: 12px;
    }

    .variation-name {
        font-size: 11px;
    }

    .btn {
        font-size: 11px;
    }

    .tab-content-inner {
        font-size: 14px;
    }
}

@media screen and (max-width: 820px) {
    .tab-button {
        padding: 5px;
    }

    .main-image-wrapper {
        width: 100%;
        height: 290px;
    }

    .thumbnails-wrapper {
        max-height: 290px;
    }

    .thumbnails-container {
        width: 70px;
    }

    .thumbnail-item {
        width: 70px;
    }

    .thumbnail-item {
        height: 50px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .breadcrumb-separator {
        margin: 0 5px;
    }

    .breadcrumbs {
        margin-bottom: 10px;
    }

    .product-title {
        margin-bottom: 10px;
    }

    .product-page {
        padding: 80px 0 60px 0;
    }

    .product-main {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .product-gallery-wrapper {
        flex-direction: column;
    }

    .main-image-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
    }

    .thumbnails-container {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        margin-top: 15px;
        max-height: none;
        order: 1;
    }

    .thumbnails-wrapper {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .thumbnails-list {
        flex-direction: row;
        min-width: max-content;
    }

    .thumbnail-item {
        width: 85px;
        height: 65px;
    }

    .thumbnail-arrow {
        top: -8px;
        right: 50%;
        transform: translateX(50%) rotate(90deg);
    }

    .thumbnail-up {
        left: 5px;
        transform: rotate(270deg);
        top: 13px;
    }

    .thumbnail-down {
        right: 5px;
        transform: rotate(270deg);
        bottom: 12px;
    }

    .product-info {
        padding-left: 0;
    }

    .product-title {
        font-size: 24px;
    }

    .tabs-navigation {
        overflow-x: auto;
        white-space: nowrap;
    }

    .tab-button {
        padding: 10px;
        font-size: 12px;
    }

    .selected-options-block {
        margin: 10px 0;
    }

    .selected-options-title {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .selected-option-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .selected-option-name {
        font-size: 14px;
    }

    .selected-option-price {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .breadcrumb-item a {
        font-size: 14px;
    }

    .characteristics-grid {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .action-buttons-row {
        flex-direction: column;
    }

    .option-name {
        font-size: 14px;
    }

    .option-price {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .product-page {
        padding: 60px 0 60px 0;
    }

    .breadcrumb-item a {
        font-size: 2.4vw;
        white-space: nowrap;
    }

    .breadcrumbs-list {
        font-size: 2.4vw;
    }

    .product-main {
        margin-bottom: 0px;
    }

    .product-tabs-container {
        margin-top: 20px;
    }

    .product-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        padding: 10px 15px;
        border-top: 1px solid #e9ecef;
        z-index: 100;
    }

    .product-content {
        padding-bottom: 120px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .product-actions {
        gap: 10px;
    }

    .action-buttons-row {
        gap: 10px;
    }
}

@media screen and (max-width: 430px) {
    .product-characteristics h3 {
        margin: 0 0 10px 0;
    }

    .characteristic-label {
        font-size: 13px;
    }
}

@media screen and (max-width: 375px) {}