/* Общие стили для страницы товара */
.single-product #content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
}

/* Стили для хлебных крошек */
.breadcrumbs-container {
    margin-bottom: 20px;
}

.woocommerce-breadcrumb {
    font-size: 13px !important;
    color: #666;
}

.woocommerce-breadcrumb a {
    color: #333;
}

/* Контейнер для основного содержимого товара */
.product-content-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
}

/* Стили для галереи товара */
.product-gallery-container {
    width: 70%;
    margin-right: 20px;
}

.product-gallery {
    width: 1060px;
    height: 788px;
    border-radius: 3px;
    border: 1px solid #ECECEC!important;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Настройка изображений в галерее */
.woocommerce-product-gallery {
    width: 100% !important;
}

.woocommerce-product-gallery__wrapper {
    height: 100%;
}

.woocommerce-product-gallery__image {
    width: 980px;
    height: 650px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woocommerce-product-gallery__image img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Стили для миниатюр */
.flex-control-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    padding: 0;
    list-style: none;
    position: relative;
}

/* Стили для миниатюр */
.flex-control-nav li {
    width: 60px!important;
    height: 60px;
    flex-shrink: 0;
}

.flex-control-nav li img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Стили для стрелок */
.thumbnail-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
}

.thumbnail-arrow.left {
    left: -35px;
}

.thumbnail-arrow.right {
    right: -35px;
}

/* Скрываем стрелки, если все миниатюры видны */
.flex-control-nav.no-scroll .thumbnail-arrow {
    display: none;
}

/* Стили для информации о товаре */
.product-info-container {
    width: 30%;
    padding-left: 30px;
}

.product-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.product-sku {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.product-price {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
}

/* Стили для кнопки добавления в корзину */
.single_add_to_cart_button {
    background-color: #4CAF50 !important;
    color: white !important;
    padding: 12px 20px !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    transition: background-color 0.3s ease !important;
}

.single_add_to_cart_button:hover {
    background-color: #45a049 !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .product-content-container {
        flex-direction: column;
    }

    .product-gallery-container,
    .product-info-container {
        width: 100%;
    }

    .product-gallery {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
    }

    .product-info-container {
        padding-left: 0;
        margin-top: 20px;
    }
}

/* Стили для информации о товаре */
.product-info-container {
    width: 30%;
    padding-left: 30px;
}

.product-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.product-sku {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.product-price-container {
    margin-top: 40px; /* Добавляем отступ сверху */
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 0px; /* Добавляем отступ между элементами внутри контейнера */
}

.price-label {
    font-size: 13px;
    color: #999999;
    margin-bottom: 5px;
}

.price-regular {
    font-size: 26px;
    font-weight: bold;
    color: #333;
}

.price-old {
    font-size: 13px;
    color: #888888;
    text-decoration: line-through;
    margin-bottom: 5px;
}

.price-new {
    font-size: 26px;
    font-weight: bold;
    color: #333;
}

.add-to-cart-container {
    display: flex;
    justify-content: space-between;
    gap: 10px; /* Устанавливаем расстояние между элементами в 20px */
    margin-bottom: 0px; /* Добавляем отступ снизу */
}

.quantity-selector {
    position: relative;
    width: 50%;
    height: 48px;
    box-sizing: border-box;
    border: 1px solid rgb(236, 236, 236);
    border-radius: 3px;
    background: rgb(248, 248, 248);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.quantity-selector input[type="number"] {
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
    width: 40px;
    border: none;
    background: transparent;
    text-align: center;
    color: rgb(51, 51, 51);
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 48px; /* Изменено для выравнивания по вертикали */
    letter-spacing: 0%;
    margin: 0;
    padding: 0;
    height: 100%; /* Добавлено для заполнения всей высоты родителя */
}

.quantity-selector input[type="button"] {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #1D7656;
    font-family: Montserrat, sans-serif;
}

.single_add_to_cart_button {
    position: relative;
width: 50% !important; /* Устанавливаем ширину кнопки */
    height: 48.63px !important; /* Устанавливаем высоту кнопки */
    box-sizing: border-box;
    border: 1px solid rgb(29, 118, 86);
    border-radius: 5px;
    background: #1D7656!important;
    color: white;
    cursor: pointer;
    font-weight: bold;
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    line-height: 16px;
    text-align: center;
    text-transform: uppercase;
}

.single_add_to_cart_button:hover {
    background: #166549!important;
}

.buy-one-click {
    position: relative;
    width: 100%;
    height: 45px;
    box-sizing: border-box;
    border: 1px solid rgba(29, 119, 86, 0.35);
    border-radius: 5px;
    background: transparent;
    color: rgb(29, 118, 86);
    font-family: Montserrat, sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 15.71px;
    letter-spacing: 0.8px;
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
}


.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center; /* Изменено с flex-end на center */
    z-index: 1000;
}

.popup {
    background-color: white;
    width: 390px;
    height: 500px;
    border-radius: 4px;
    padding: 20px;
    position: relative;
    opacity: 0; /* Начальная прозрачность */
    transform: translateY(50px); /* Начальное положение ниже центра */
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.popup.active {
    opacity: 1;
    transform: translateY(0);
}

.close-popup {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.popup h4 {
    margin-top: 0;
}

/* Ваши существующие стили остаются без изменений */

/* Адаптивные стили */
@media (max-width: 1024px) {
    /* Стили для планшетов */
    .single-product #content {
        max-width: 100%;
        padding: 15px;
    }

    .product-content-container {
        flex-direction: column;
    }

    .product-gallery-container,
    .product-info-container {
        width: 100%;
        padding-left: 0;
    }

    .product-gallery {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3;
    }

    .woocommerce-product-gallery__image {
        width: 100%;
        height: auto;
    }

    .product-info-container {
        margin-top: 30px;
    }
}

@media (max-width: 768px) {
    /* Стили для мобильных устройств */
        .product-info-container {
        width: 100%!important;
        padding-left: 0;
        margin-top: 20px;
    }
    .single-product #content {
        padding: 10px;
    }

    .product-title {
        font-size: 20px;
    }

    .product-sku {
        font-size: 12px;
    }

    .product-price-container {
        margin-top: 20px;
    }

    .price-regular,
    .price-new {
        font-size: 22px;
    }

    .add-to-cart-container {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0px;
}

    .quantity-selector,
    .single_add_to_cart_button {
        width: 50%;
    }

    .buy-one-click {
        margin-top: 0px;
    }

    .popup {
        width: 90%;
        height: auto;
        max-height: 80vh;
        overflow-y: auto;
    }

}

/*Вкладки*/
.woocommerce-tabs ul.tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    position: relative;
    display: flex;
    gap: 10px;
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    width: 125px;
    height: 48.7px;
    box-sizing: border-box;
    border: 1px solid rgb(236, 236, 236);
    border-radius: 3px;
    background: rgb(250, 250, 250);
    color: rgb(102, 102, 102);
    font-family: Montserrat, sans-serif;
    font-size: 11px;
    font-weight: 400!important;
    line-height: 48.7px; /* Центрирование текста по вертикали */
    letter-spacing: 0.8px;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}

.woocommerce-js div.product .woocommerce-tabs ul.tabs {
    gap: 0px;
}

.woocommerce-tabs ul.tabs li.active a {
    color: rgb(51, 51, 51);
    background: #ffffff;
    border-color: rgb(236, 236, 236);
}

.woocommerce-tabs ul.tabs li a:hover {
    color: rgb(51, 51, 51);
}

.woocommerce-tabs .panel {
    margin: 0;
    padding: 20px;
    border: 1px solid rgb(236, 236, 236);
    border-radius: 3px;
}

/* Стили для мобильных устройств */
@media (max-width: 768px) {
    .woocommerce-tabs ul.tabs {
        flex-direction: column;
    }

    .woocommerce-tabs ul.tabs li a {
        width: 100%;
    }
}

.woocommerce-js div.product .woocommerce-tabs .panel {
    padding: 20px;
}