/* Single Product CSS - стилизация WooCommerce под дизайн card.html */

/* Импорт базовых стилей из card.css */
@import url('card.css');

/* Переопределение WooCommerce классов под стили card.html */

/* Заголовок товара */
.summary h1.product_title {
    font-family: 'Cormorant', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

/* Цена товара */
.summary .price {
    margin: 0 0 20px 0;
}

.summary .price .amount,
.summary .price ins {
    color: #00e5b8;
    font-size: 1.8rem;
    font-weight: 700;
    text-decoration: none;
}

.summary .price del {
    color: #888;
    font-size: 1.4rem;
    text-decoration: line-through;
    opacity: 0.7;
    margin-right: 10px;
}

/* Краткое описание как блок СОСТАВ */
.woocommerce-product-details__short-description {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    position: relative;
}

.woocommerce-product-details__short-description::before {
    content: "СОСТАВ:";
    font-weight: 700;
    color: #00e5b8;
    display: block;
    margin-bottom: 8px;
}

/* Мета-информация */
.product_meta {
    margin: 20px 0;
}

.product_meta .posted_in {
    display: block;
    margin-bottom: 10px;
}

.product_meta .posted_in strong {
    color: #00e5b8;
}

.product_meta .tagged_as {
    display: block;
}

.product_meta .tagged_as strong {
    color: #00e5b8;
}

/* Форма добавления в корзину */
form.cart {
    margin: 30px 0;
    position: relative;
}

/* Кнопка добавления в корзину */
.add-to-cart-btn {
    width: 100%;
    background: #00e5b8;
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.add-to-cart-btn:hover {
    background: #00d4a3;
    transform: translateY(-2px);
}

/* Состояние "в корзине" */
.add-to-cart-btn.added-to-cart {
    background: #800080; /* фиолетовый из градиентов */
    color: #ffffff;
}

.add-to-cart-btn.added-to-cart:hover {
    background: #660066;
    transform: translateY(-2px);
}

/* Анимация при добавлении */
.add-to-cart-btn.adding {
    opacity: 0.7;
    pointer-events: none;
}

.add-to-cart-btn.adding::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для кнопок в каталоге */
.catalog-btn {
    display: inline-block;
    background-color: #00e5b8;
    color: #000;
    padding: 15px 30px;
    margin-top: 30px;
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
}

.catalog-btn:hover {
    background-color: #ffffff;
    box-shadow: 0 0 20px rgba(0, 229, 184, 0.8);
}

.catalog-btn.added-to-cart {
    background: linear-gradient(135deg, #800080, #9932cc);
    color: #ffffff;
}

.catalog-btn.added-to-cart:hover {
    background: linear-gradient(135deg, #660066, #7a2a9a);
    transform: translateY(-2px);
}

.catalog-btn.adding {
    opacity: 0.7;
    pointer-events: none;
}

.catalog-btn.adding::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Степпер количества */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.quantity-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #00e5b8;
}

.quantity-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    text-align: center;
    width: 80px;
    height: 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
}

.quantity-input:focus {
    outline: none;
    border-color: #00e5b8;
    box-shadow: 0 0 0 2px rgba(0, 229, 184, 0.2);
}

/* Галерея товара */
.product-images {
    position: relative;
}

.product-images img,
.woocommerce-product-gallery img {
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
}

.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper {
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.woocommerce-product-gallery .flex-viewport img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
    border-radius: 15px;
}

/* Миниатюры */
.woocommerce-product-gallery .flex-control-nav {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.woocommerce-product-gallery .flex-control-nav li {
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.woocommerce-product-gallery .flex-control-nav li.flex-active-slide {
    border-color: #00e5b8;
}

.woocommerce-product-gallery .flex-control-thumbs img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

/* Бейдж SALE */
.onsale {
    position: absolute;
    top: 24px;
    right: 24px;
    background: #00e5b8;
    color: #000;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    z-index: 10;
}

/* Табы */
.woocommerce-tabs {
    margin-top: 60px;
}

.woocommerce-tabs ul.tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    list-style: none; /* убираем круглые точки */
    padding: 0; /* убираем отступы по умолчанию */
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
    list-style: none; /* убираем круглые точки у li */
}

.woocommerce-tabs ul.tabs li a {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 15px 25px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
    color: #00e5b8;
    border-bottom-color: #00e5b8;
}

.woocommerce-tabs .panel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    color: #ffffff;
}

.woocommerce-tabs .panel h2 {
    color: #00e5b8;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.woocommerce-tabs .panel h3 {
    color: #00e5b8;
    font-size: 1.2rem;
    margin: 20px 0 10px 0;
}

.woocommerce-tabs .panel p {
    margin: 10px 0;
    line-height: 1.6;
}

/* Связанные товары */
.woocommerce .products {
    display: grid;
    gap: 30px;
    margin-top: 0;
    width: 100%; /* на всю ширину родителя */
}

.related.products ul.products {
    z-index: 9999;
}

/* Заголовок секции связанных товаров */
.woocommerce .products h2 {
    grid-column: 1 / -1; /* заголовок на всю ширину */
    margin-bottom: 30px;
    color: #00e5b8;
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.woocommerce .products .product {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.woocommerce .products .product:hover {
    transform: translateY(-5px);
    border-color: #00e5b8;
}

.woocommerce .products .product img {
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.woocommerce .products .product h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.woocommerce .products .product .price {
    color: #00e5b8;
    font-weight: 700;
    margin-bottom: 15px;
}

.woocommerce .products .product .button {
    background: #00e5b8;
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.woocommerce .products .product .button:hover {
    background: #00d4a3;
}

/* Секция доставки */
.delivery-section {
    position: relative;
    margin: 60px 0;
    padding: 40px 0;
}

.delivery-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.trava-background {
    width: 100%;
    height: 100%;
    background: url('../img/trava.png') center/cover no-repeat;
    opacity: 0.1;
}

.tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.tab {
    background: transparent;
    border: none;
    color: #ffffff;
    padding: 15px 25px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tab.active,
.tab:hover {
    color: #00e5b8;
    border-bottom-color: #00e5b8;
}

.tab-content {
    display: none;
}

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

.delivery-info {
    color: #ffffff;
}

.delivery-info h3 {
    color: #00e5b8;
    font-size: 1.2rem;
    margin: 20px 0 10px 0;
    font-weight: 700;
}

.delivery-info h3:first-child {
    margin-top: 0;
}

.delivery-info p {
    margin: 10px 0;
    line-height: 1.6;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .summary h1.product_title {
        font-size: 2rem;
    }
    
    .woocommerce-product-gallery .flex-viewport img {
        height: 400px;
    }
}

@media (max-width: 768px) {
    .summary h1.product_title {
        font-size: 1.8rem;
    }
    
    .woocommerce-product-gallery .flex-viewport img {
        height: 300px;
    }
    
    .woocommerce-product-gallery .flex-control-thumbs img {
        width: 60px;
        height: 60px;
    }
    
    .woocommerce-tabs ul.tabs {
        flex-direction: column;
        gap: 10px;
    }
    
    .woocommerce .products {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}
