/* ============================================
   СТРАНИЦА ТОВАРА В СТИЛЕ WILDBERRIES
   ============================================ */

/* Основной контейнер */
.single-product-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Контейнер товара */
.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

/* ============================================
   ГАЛЕРЕЯ ИЗОБРАЖЕНИЙ (ЛЕВАЯ КОЛОНКА)
   ============================================ */

.product-gallery-wrapper {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Главное изображение */
.main-product-image {
    width: fit-content;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 16px;
    overflow: hidden;
    padding: 0 !important;
    display: inline-block;
    margin: 0 auto;
}

.main-product-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 16px !important;
    background: transparent !important;
    padding: 0 !important;
    display: block;
}

/* Принудительное закругление для всех изображений товара на странице товара */
.woocommerce div.product .woocommerce-product-gallery__image img,
.woocommerce div.product .woocommerce-product-gallery__wrapper img,
.woocommerce div.product .product-gallery img,
.woocommerce div.product .main-product-image img,
.woocommerce div.product img.attachment-woocommerce_single,
.woocommerce div.product img.attachment-woocommerce_thumbnail,
.woocommerce div.product .product-images img,
.woocommerce div.product .product-gallery-wrapper img {
    border-radius: 16px !important;
    object-fit: cover !important;
    overflow: hidden !important;
}

/* Миниатюры */
.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.thumb-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    padding: 5px;
}

.thumb-item:hover {
    border-color: #e8732e;
}

.thumb-item.active {
    border-color: #e8732e;
}

.thumb-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
}

/* ============================================
   ИНФОРМАЦИЯ О ТОВАРЕ (ПРАВАЯ КОЛОНКА)
   ============================================ */

.product-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Название товара */
.product-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

/* Рейтинг */
.product-rating-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-rating-wrapper .star-rating {
    color: #ffa800;
}

.product-rating-wrapper .woocommerce-review-link {
    color: #e8732e;
    text-decoration: none;
}

.product-rating-wrapper .woocommerce-review-link:hover {
    text-decoration: underline;
}

/* Цена */
.product-price-wrapper {
    margin: 15px 0;
}

.product-price-wrapper .price {
    display: flex;
    align-items: baseline;
    gap: 15px;
    font-size: 36px;
    font-weight: 700;
    color: #e8732e;
}

.product-price-wrapper .price del {
    font-size: 24px;
    color: #999;
    text-decoration: line-through;
}

.product-price-wrapper .price ins {
    text-decoration: none;
    color: #e8732e;
}

/* Статус наличия */
.product-stock-wrapper {
    padding: 12px 20px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    display: inline-block;
    width: fit-content;
    margin-top: 20px;
}

.in-stock {
    color: #10b981;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.out-of-stock {
    color: #ef4444;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Краткое описание */
.product-short-description {
    color: #fff;
    font-size: 16px;
    line-height: 1.6;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Форма добавления в корзину */
.product-add-to-cart-wrapper {
    margin: 20px 0;
}

.product-actions-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.product-add-to-cart-wrapper .cart {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}


/* Кнопка избранного на странице товара */
.wb-favorite-btn {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 26px;
    flex-shrink: 0;
}

.wb-favorite-btn:hover {
    color: #e8732e;
    transform: scale(1.2);
}

.wb-favorite-btn.active {
    color: #e8732e !important;
}

.wb-favorite-btn.active i {
    font-weight: 900;
}

.product-add-to-cart-wrapper .quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-add-to-cart-wrapper .quantity input {
    width: 80px;
    padding: 15px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.product-add-to-cart-wrapper .single_add_to_cart_button {
    flex: 1;
    background: #e8732e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 18px 40px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
}

.product-add-to-cart-wrapper .single_add_to_cart_button:hover {
    background: #d16525 !important;
    box-shadow: 0 0 20px rgba(232, 115, 46, 0.6) !important;
}

.product-add-to-cart-wrapper .single_add_to_cart_button::before {
    content: '\f07a';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* Кнопка "Купить сейчас" */
.product-buy-now-wrapper {
    margin: 10px 0;
}

.buy-now-button {
    width: 100%;
    background: transparent !important;
    color: #fff !important;
    border: 2px solid #e8732e !important;
    border-radius: 8px !important;
    padding: 18px 40px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    text-decoration: none !important;
}

.buy-now-button:hover {
    background: #e8732e !important;
    box-shadow: 0 0 20px rgba(232, 115, 46, 0.6) !important;
}

/* Мета информация */
.product-meta-wrapper {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.product-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: #fff;
    font-size: 14px;
}

.product-meta-item .meta-label {
    font-weight: 600;
    color: #999;
}

.product-meta-item a {
    color: #e8732e;
    text-decoration: none;
}

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

/* ============================================
   ВКЛАДКИ (ОПИСАНИЕ, ХАРАКТЕРИСТИКИ, ОТЗЫВЫ)
   ============================================ */

.product-tabs-wrapper {
    margin: 60px 0;
}

.woocommerce-tabs {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
}

/* Навигация вкладок */
.woocommerce-tabs ul.tabs {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0 0 30px 0;
    padding: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
    padding: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 15px 25px;
    color: #999;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.woocommerce-tabs ul.tabs li a:hover {
    color: #e8732e;
}

.woocommerce-tabs ul.tabs li.active a {
    color: #e8732e;
    border-bottom-color: #e8732e;
}

/* Контент вкладок */
.woocommerce-tabs .panel {
    color: #fff;
    line-height: 1.8;
}

.woocommerce-tabs .panel h2 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 20px;
}

.woocommerce-tabs .panel p {
    color: #fff;
    font-size: 16px;
    margin-bottom: 15px;
}

/* Таблица характеристик */
.woocommerce-tabs table.shop_attributes {
    width: 100%;
    border: none;
}

.woocommerce-tabs table.shop_attributes th,
.woocommerce-tabs table.shop_attributes td {
    padding: 15px 20px;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.woocommerce-tabs table.shop_attributes th {
    background: rgba(255, 255, 255, 0.05);
    color: #999;
    font-weight: 600;
    width: 30%;
}

.woocommerce-tabs table.shop_attributes td {
    color: #fff;
}

/* Отзывы */
.woocommerce-tabs #reviews {
    color: #fff;
}

.woocommerce-tabs #reviews .comment-text {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.woocommerce-tabs #reviews .star-rating {
    color: #ffa800;
}

/* ============================================
   БЛОК ОПИСАНИЯ ТОВАРА
   ============================================ */

.product-description-wrapper {
    margin: 60px 0;
    padding: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.product-description-wrapper h2 {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.product-description-wrapper .product-description {
    color: #fff;
    font-size: 16px;
    line-height: 1.8;
}

.product-description-wrapper .product-description p {
    margin-bottom: 15px;
}

/* ============================================
   ПОХОЖИЕ ТОВАРЫ
   ============================================ */

.related-products-wrapper {
    margin: 60px 0;
}

.related-products-wrapper h2 {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
}

.related-products-wrapper .products {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */

@media (max-width: 1200px) {
    .product-container {
        gap: 40px;
    }
    
    .related-products-wrapper .products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-gallery-wrapper {
        position: static;
    }
    
    .related-products-wrapper .products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .single-product-main {
        padding: 20px 15px;
    }
    
    .product-title {
        font-size: 24px;
    }
    
    .product-price-wrapper .price {
        font-size: 28px;
    }
    
    .product-thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .related-products-wrapper .products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-add-to-cart-wrapper .cart {
        flex-direction: column;
    }
    
    .product-thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .related-products-wrapper .products {
        grid-template-columns: 1fr;
    }
}

