/* Стили для страницы товара */
.product-page {
    margin: 2rem 0;
}

.product-content {
    display: grid;
    grid-template-columns: 28.75rem 1fr 18.75rem;
    gap: 2rem;
    margin-bottom: 3rem;
    position: relative;
}

/* Галерея изображений */
.product-gallery {
    display: flex;
    gap: 1rem;
}

/* Новые стили галереи в стиле Wildberries */
.product-gallery.wb-style {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    /* Не задаём ширину, чтобы вписалась в grid column */
}

/* Контейнер для миниатюр слева */
.wb-thumbnails-wrapper {
    display: flex;
    flex-direction: column;
    width: 64px; /* Уменьшили размер для компактности */
    height: 400px; /* Уменьшили высоту для трёхколоночной структуры */
    position: relative;
    flex-shrink: 0;
    gap: 6px; /* Отступы между элементами */
}

/* Кнопки навигации по миниатюрам */
.wb-thumb-nav {
    background: linear-gradient(135deg, var(--border-heading-color, #FFCF9D), #ffd5b8);
    border: 2px solid var(--border-heading-color, #FFCF9D);
    border-radius: 8px;
    width: 64px; /* Соответствует ширине wrapper */
    height: 32px; /* Увеличили для лучшей видимости */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--bg-color, #0A2647);
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(10, 38, 71, 0.1);
    font-weight: 600;
}

.wb-thumb-nav:hover {
    background: linear-gradient(135deg, var(--bg-color, #0A2647), var(--element-color-2, #144272));
    border-color: var(--bg-color, #0A2647);
    color: var(--border-heading-color, #FFCF9D);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(10, 38, 71, 0.2);
}

.wb-thumb-nav:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(10, 38, 71, 0.1);
}

.wb-thumb-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
    transform: none;
    box-shadow: none;
}

.wb-thumb-nav:disabled:hover {
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
    transform: none;
    box-shadow: none;
}

.wb-thumb-nav svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

/* Контейнер миниатюр с overflow */
.wb-thumbnails-container {
    flex: 1;
    overflow: hidden;
    /* margin убираем, используем gap в wrapper */
}

/* Трек с миниатюрами */
.wb-thumbnails-track {
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.3s ease;
}

/* Отдельная миниатюра */
.wb-thumbnail {
    width: 64px; /* Соответствует ширине wrapper */
    height: 64px;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
}

.wb-thumbnail:hover {
    border-color: var(--primary-peach);
}

.wb-thumbnail.active {
    border-color: var(--primary-peach);
    box-shadow: 0 0 0 1px var(--primary-peach);
}


.wb-thumbnail:focus:not(.active) {
    border-color: var(--bg-color, #0A2647);
}

.wb-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.wb-thumbnail:hover img {
    transform: scale(1.05);
}

/* Контейнер основного изображения */
.wb-main-image-container {
    flex: 1;
    max-width: 100%; /* Позволяем занимать всю доступную ширину в колонке */
}

.wb-main-image-wrapper {
    position: relative;
    width: 100%;
    height: 400px; /* Уменьшили высоту для компактности */
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
}

.wb-main-image-wrapper a {
    display: block;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

.wb-main-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background-color: #FFF;
}

.wb-main-image:hover {
    transform: scale(1.02);
}

.wb-main-image.loaded {
    opacity: 1;
}


/* Вертикальный Swiper слайдер превью */
.gallery-thumbs {
    display: none;
    width: 5rem;
    height: 30rem;
}

.thumbs-swiper {
    width: 100%;
    height: 100%;
}

.thumbs-swiper .swiper-wrapper {
    flex-direction: column;
}

.thumbs-swiper .swiper-slide {
    height: auto;
    margin-bottom: 0.5rem;
    background: #fff;
}

.thumb-item {
    width: 5rem;
    height: 5rem;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.thumb-item.active {
    border-color: var(--premium-green);
}

.thumb-item:hover {
    border-color: var(--premium-green);
    opacity: 0.8;
}

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

/* Показываем вертикальный слайдер на десктопе */
@media (min-width: 992px) {
    .product-gallery {
        display: flex;
        gap: 1rem;
    }
    
    .gallery-thumbs {
        display: flex;
    }
    
    /* Показываем Wildberries галерею на десктопе */
    .product-gallery.wb-style {
        display: flex;
    }
}

/* Мобильные стили для Wildberries галереи */
@media (max-width: 991px) {
    .product-gallery.wb-style {
        flex-direction: column; /* Изменяем направление на вертикальное */
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Скрываем миниатюры на мобильных */
    .wb-thumbnails-wrapper {
        display: none;
    }
    
    /* Основное изображение занимает всю ширину */
    .wb-main-image-container {
        width: 100%;
        max-width: 100%;
        position: relative;
        padding-bottom: 40px; /* Место для пагинации */
    }
    
    .wb-main-image-wrapper {
        width: 100%;
        max-width: 100%;
        height: 350px; /* Фиксированная высота для мобильных */
        border-radius: 12px;
        overflow: hidden;
        background: #f8f9fa;
    }
    
    /* Пагинация для wb-галереи на мобильных */
    .wb-gallery-pagination {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 8px;
        z-index: 10;
    }
    
    .wb-pagination-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: rgba(10, 38, 71, 0.5);
        cursor: pointer;
        transition: all 0.3s ease;
        border: none;
        padding: 0;
    }
    
    .wb-pagination-dot.active {
        background: var(--primary-peach);
        transform: scale(1.2);
        box-shadow: 0 0 0 3px rgba(255, 207, 157, 0.3);
    }
    
    .wb-pagination-dot:hover {
        background: var(--primary-peach);
        opacity: 0.8;
    }
}

/* Дополнительные стили для мобильных экранов */
@media (max-width: 767px) {
    .product-gallery.wb-style {
        width: 100%;
        margin: 0;
        padding: 0;
    }
    
    .wb-main-image-wrapper {
        height: 280px; /* Меньшая высота для мобильных */
    }
}

@media (max-width: 480px) {
    .wb-main-image-wrapper {
        height: 250px; /* Еще меньшая высота для очень маленьких экранов */
    }
    
    .wb-pagination-dot {
        width: 10px;
        height: 10px; /* Меньшие точки пагинации */
    }
}

/* Скрываем пагинацию на десктопе */
@media (min-width: 992px) {
    .wb-gallery-pagination {
        display: none;
    }
}

.gallery-thumbnails-container {
    display: flex;
    flex-direction: column;
    height: 25rem;
    width: 3.75rem;
    position: relative;
}

.gallery-thumbnails {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.thumbnails-track {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: transform 0.3s ease;
}

.thumb-nav-btn {
    background: #f5f5f5;
    border: 0.0625rem solid #ddd;
    border-radius: 0.375rem;
    width: 3.25rem;
    height: 1.5rem;
    display: none;
    cursor: pointer;
    font-size: 1.05rem;
    color: #666;
    transition: all 0.2s ease;
    z-index: 2;
}

.thumb-nav-btn:hover {
    background: #e9e9e9;
    border-color: #bbb;
}

.thumb-nav-btn:active {
    background: #ddd;
}

.thumbnail {
    width: 3.25rem;
    height: 3.25rem;
    border: 0.125rem solid transparent;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.thumbnail:hover {
    border-color: var(--primary-peach);
}

.thumbnail.active {
    border-color: var(--primary-peach);
}

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

.gallery-main {
    position: relative;
    flex: 1;
}

.main-image-container {
    width: 100%;
    max-width: 25rem;
    height: 25rem;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
}

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

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

/* Характеристики товара */
.product-specs {
    padding: 0 1rem;
}

.product-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1rem 0;
    line-height: 1.3;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    display: flex;
    gap: 0.125rem;
}

.star {
    color: #ddd;
    font-size: 1.2rem;
}

.star.filled {
    color: #ffa500;
}

.rating-text {
    font-size: 1.05rem;
    color: #666;
}

.product-short-desc {
    margin-bottom: 2rem;
    color: #666;
    line-height: 1.5;
}

/* Варианты товара */
.product-variants {
    margin-bottom: 2rem;
}

.product-variants h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #1a1a1a;
}

.variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
    gap: 0.5rem;
}

.variant-option {
    border: 0.0625rem solid #ddd;
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    background: white;
}

.variant-option:hover {
    border-color: var(--primary-peach);
    background: rgba(255, 207, 157, 0.25);
}

.variant-option.active {
    border-color: var(--primary-peach);
    background: rgba(255, 207, 157, 0.4);
    box-shadow: 0 0 0 0.125rem var(--primary-peach);
}

.variant-volume {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
}

.variant-price {
    display: block;
    font-size: 1.05rem;
    color: #666;
}

/* Таблица характеристик */
.specs-table {
    margin-top: 2rem;
}

.specs-table h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: #1a1a1a;
}

.specs-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 0.0625rem solid #eee;
}

.specs-table tr:not(:last-child) {
    border-bottom: 0.0625rem solid #f5f5f5;
}

.specs-table td {
    padding: 0.75rem;
    vertical-align: top;
}

.spec-name {
    font-weight: 500;
    color: #666;
    width: 40%;
}

.spec-value {
    color: #1a1a1a;
}

/* Блок покупки */
.product-purchase {
    background: white;
    border: 0.125rem solid var(--primary-peach);
    border-radius: 0.75rem;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 0.25rem 1rem rgba(10, 38, 71, 0.1);
}

.product-purchase.fixed {
    position: fixed;
    top: 1.25rem;
    right: 8rem;
    width: 18.75rem;
    z-index: 100;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.purchase-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Блок цены */
.price-block {
    position: relative;
    margin-bottom: 0;
}


.price-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
}

.price-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-brown);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.current-price {
    font-size: 2.7rem;
    font-weight: 800;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    line-height: 1;
    position: relative;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.current-price .currency {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-brown);
    opacity: 0.8;
}

.price-comparison {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.old-price {
    font-size: 1.35rem;
    color: #999;
    text-decoration: line-through;
    font-weight: 500;
    position: relative;
}

.old-price::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -0.125rem;
    right: -0.125rem;
    height: 0.125rem;
    background: #e74c3c;
    transform: translateY(-50%) rotate(-5deg);
    opacity: 0.8;
}

.savings-amount {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    text-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.2);
    box-shadow: 0 0.125rem 0.25rem rgba(231, 76, 60, 0.3);
}

.discount-badge {
    position: absolute;
    top: -0.125rem;
    right: -0.125rem;
    background: var(--primary-brown);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0 0.875rem 0 1rem;
    font-size: 1.05rem;
    font-weight: 700;
    z-index: 2;
}


/* Статус наличия */
.stock-status {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.in-stock {
    color: #28a745;
    font-weight: 500;
}

.out-of-stock {
    color: #dc3545;
    font-weight: 500;
}

/* Селектор количества */
.quantity-selector {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.quantity-selector label {
    display: block;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0;
    letter-spacing: 0.025em;
    white-space: nowrap;
}

.quantity-controls {
    display: inline-flex;
    align-items: stretch;
    background: white;
    border: 0.125rem solid var(--primary-peach);
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0.125rem 0.5rem rgba(255, 207, 157, 0.35);
    transition: all 0.3s ease;
}

.quantity-controls:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 0.25rem 0.75rem rgba(10, 38, 71, 0.2);
}

.qty-btn {
    background: var(--border-heading-color, #FFCF9D);
    border: none;
    border-radius: 0.5rem;
    padding: 0;
    cursor: pointer;
    font-size: 1.8rem;
    font-weight: 600;
    font-family: 'Roboto', 'Arial', sans-serif;
    color: var(--bg-color, #0A2647);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    line-height: 1;
    /* Тень убрана */
}

/* Кнопки количества на странице товара - без анимации */
.product-page .qty-btn,
.qty-btn {
    transition: none !important;
    transform: none !important;
    box-shadow: none !important;
}

.product-page .qty-btn:hover,
.qty-btn:hover {
    /* Анимация при наведении убрана по требованию */
    background: var(--border-heading-color, #FFCF9D) !important;
    color: var(--bg-color, #0A2647) !important;
    transform: none !important;
    box-shadow: none !important;
    border-color: var(--border-heading-color, #FFCF9D) !important;
}

.product-page .qty-btn:active,
.qty-btn:active {
    /* Анимация при клике убрана по требованию */
    background: var(--border-heading-color, #FFCF9D) !important;
    color: var(--bg-color, #0A2647) !important;
    transform: none !important;
    box-shadow: none !important;
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    /* Transform убран */
}

.qty-btn.minus {
    border-radius: 0.5rem 0 0 0.5rem;
}

.qty-btn.plus {
    border-radius: 0 0.5rem 0.5rem 0;
}


#quantity {
    border: none;
    background: transparent;
    padding: 0;
    width: 2.5rem;
    height: 2rem;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-blue);
    border-left: 0.0625rem solid rgba(255, 207, 157, 0.3);
    border-right: 0.0625rem solid rgba(255, 207, 157, 0.3);
    outline: none;
    transition: all 0.2s ease;
}

#quantity:focus {
    background: rgba(255, 207, 157, 0.25);
    color: var(--primary-blue);
}

#quantity::-webkit-outer-spin-button,
#quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#quantity[type=number] {
    -moz-appearance: textfield;
}

/* Анимация при изменении количества отключена */
.quantity-controls.updating {
    /* Анимация убрана по требованию */
}

/* Кнопки покупки */
.purchase-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Полная блокировка изменения размеров при hover для кнопок покупки */
.purchase-buttons .btn-add-to-cart,
.purchase-buttons .btn-buy-now,
.purchase-buttons .btn-notify {
    width: 100% !important;
    padding: 1rem 1.5rem !important;
    border: 2px solid transparent !important;
    border-radius: 1rem !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
    text-align: center !important;
    text-decoration: none !important;
    display: block !important;
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    min-height: 3.25rem !important;
    height: auto !important;
    box-sizing: border-box !important;
}

.purchase-buttons .btn-add-to-cart:hover {
    background: #fff !important;
    color: var(--bg-color) !important;
    border-color: var(--bg-color) !important;
    box-shadow: 0 4px 15px rgba(10, 38, 71, 0.2) !important;
    transform: none !important;
    padding: 1rem 1.5rem !important;
    border-width: 2px !important;
    min-height: 3.25rem !important;
    height: auto !important;
}

.purchase-buttons .btn-buy-now:hover {
    background: #fff !important;
    color: #0A2647 !important;
    border-color: #0A2647 !important;
    box-shadow: 0 4px 15px rgba(10, 38, 71, 0.2) !important;
    transform: none !important;
    padding: 1rem 1.5rem !important;
    border-width: 2px !important;
    min-height: 3.25rem !important;
    height: auto !important;
}

.purchase-buttons .btn-add-to-cart.in-cart:hover {
    background: var(--bg-color) !important;
    color: var(--border-heading-color) !important;
    box-shadow: 0 4px 15px rgba(10, 38, 71, 0.2) !important;
    transform: none !important;
    padding: 1rem 1.5rem !important;
    border-width: 2px !important;
    min-height: 3.25rem !important;
    height: auto !important;
}

/* Убрано - заменено на более специфичные правила выше */

.btn-add-to-cart {
    background: linear-gradient(135deg, var(--bg-color), var(--element-color-2));
    color: var(--border-heading-color);
    border-color: var(--bg-color);
}

.btn-add-to-cart:hover {
    /* Отключаем hover эффекты для предотвращения дергания */
}

.btn-add-to-cart.in-cart {
    background: #fff !important;
    border-color: var(--bg-color) !important;
    color: var(--bg-color) !important;
    cursor: pointer;
}

.btn-add-to-cart.in-cart:hover {
    /* Отключаем hover эффекты для предотвращения дергания */
}

.btn-buy-now {
    background: linear-gradient(135deg, #0A2647, #144272);
    color: #FFCF9D;
    border-color: #0A2647;
}

.btn-buy-now:hover {
    /* Отключаем hover эффекты для предотвращения дергания */
}

.btn-notify {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    border-color: #FF9800;
}

.btn-notify:hover {
    background: linear-gradient(135deg, #F57C00, #FF9800);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

/* Информация о доставке */
.delivery-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 0.0625rem solid #eee;
    margin-top: 0.5rem;
}

.delivery-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    color: #666;
}

.delivery-icon {
    width: 1rem;
    height: 1rem;
    color: #666;
    flex-shrink: 0;
}

/* Описание товара */
.product-description {
    margin: 3rem 0;
}

.product-description h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1.5rem 0;
}

.description-content {
    background: white;
    border: 0.0625rem solid #eee;
    border-radius: 0.75rem;
    padding: 2rem;
    line-height: 1.6;
    color: #444;
    height: auto;
    overflow: auto;
}

/* Похожие товары */
.related-products {
    margin: 3rem 0;
}

.related-products h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1.5rem 0;
}

.related-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr));
    gap: 1rem;
}

.related-products .product-card {
    background: white;
    border: 0.125rem solid var(--primary-peach);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 0.125rem 0.5rem rgba(10, 38, 71, 0.1);
}

.related-products .product-card:hover {
    box-shadow: 0 0.375rem 1.25rem rgba(10, 38, 71, 0.15);
    transform: translateY(-0.25rem);
    border-color: var(--primary-blue);
}

.related-products .product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-products .product-image {
    height: 9.375rem;
    overflow: hidden;
}

.related-products .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-products .product-info {
    padding: 0.75rem;
}

.related-products .product-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.related-products .product-link {
    text-decoration: none;
    color: var(--primary-blue);
    transition: color 0.2s ease;
}

.related-products .product-link:hover {
    color: var(--primary-brown);
    text-decoration: none;
}

.related-products .product-description {
    font-size: 1.05rem;
    color: #666;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-products .product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.related-products .product-price {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.btn-add-to-cart-mini {
    background: linear-gradient(135deg, var(--bg-color), var(--element-color-2));
    color: var(--border-heading-color);
    border: 2px solid var(--bg-color);
    border-radius: 0.75rem;
    padding: 0.4rem 0.8rem;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-add-to-cart-mini:hover {
    background: linear-gradient(135deg, var(--element-color-2), var(--bg-color));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-products .old-price {
    font-size: 1.05rem;
    color: #999;
    text-decoration: line-through;
    display: block;
    margin-top: 0.25rem;
}

/* Скрытие/показ галерей на разных устройствах */
.mobile-product-slider {
    display: none;
}

@media (min-width: 992px) {
    .mobile-product-slider {
        display: none !important;
    }
    
    .product-gallery {
        display: flex !important;
    }
}

.desktop-gallery {
    display: block;
}

/* Планшеты */
@media (max-width: 991px) {
    .product-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-gallery:not(.wb-style) {
        display: none;
    }
    
    .product-gallery.wb-style {
        display: flex !important;
    }
    
    .mobile-product-slider {
        display: none; /* Скрываем, так как используем wb-галерею */
    }
    
    .product-purchase {
        position: static;
        max-width: 300px;
        margin: 0 auto;
        padding: 18px;
        border-width: 1.5px;
        border-radius: 9px;
        box-shadow: 0 3px 12px rgba(10, 38, 71, 0.1);
    }
    
    .product-purchase.fixed {
        position: static;
        width: auto;
        right: auto;
        box-shadow: none;
        top: 15px;
    }
    
    /* Внутренние элементы product-purchase с пропорциональными размерами */
    .product-purchase .purchase-content {
        gap: 12px;
    }
    
    .product-purchase .price-block {
        margin-bottom: 0;
    }
    
    .product-purchase .price-label {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .product-purchase .current-price {
        font-size: 32px;
        margin-bottom: 6px;
        gap: 3px;
    }
    
    .product-purchase .current-price .currency {
        font-size: 21px;
    }
    
    .product-purchase .price-comparison {
        gap: 12px;
        margin-bottom: 9px;
    }
    
    .product-purchase .old-price {
        font-size: 16px;
    }
    
    .product-purchase .savings-amount {
        padding: 3px 9px;
        border-radius: 15px;
        font-size: 14px;
    }
    
    .product-purchase .discount-badge {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .product-purchase .stock-status {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .product-purchase .quantity-selector {
        gap: 9px;
    }
    
    .product-purchase .quantity-selector label {
        font-size: 14px;
    }
    
    .product-purchase .quantity-controls {
        border-width: 1.5px;
        border-radius: 9px;
        box-shadow: 0 1.5px 6px rgba(255, 207, 157, 0.35);
    }
    
    .product-purchase .qty-btn {
        width: 24px;
        height: 24px;
        font-size: 21px;
        border-radius: 6px;
    }
    
    .product-purchase .qty-btn.minus {
        border-radius: 6px 0 0 6px;
    }
    
    .product-purchase .qty-btn.plus {
        border-radius: 0 6px 6px 0;
    }
    
    .product-purchase #quantity {
        width: 30px;
        height: 24px;
        font-size: 14px;
    }
    
    .product-purchase .purchase-buttons {
        gap: 9px;
    }
    
    .product-purchase .purchase-buttons .btn-add-to-cart,
    .product-purchase .purchase-buttons .btn-buy-now,
    .product-purchase .purchase-buttons .btn-notify {
        padding: 12px 18px !important;
        border-width: 1.5px !important;
        border-radius: 12px !important;
        font-size: 14px !important;
        min-height: 39px !important;
        box-shadow: 0 3px 9px rgba(0, 0, 0, 0.1) !important;
    }
    
    .product-purchase .delivery-info {
        gap: 6px;
        padding-top: 9px;
        margin-top: 6px;
    }
    
    .product-purchase .delivery-item {
        gap: 6px;
        font-size: 14px;
    }
    
    .product-purchase .delivery-icon {
        width: 12px;
        height: 12px;
    }
    
    /* Стили для description-content с размерами в px (база 12px, коэффициент 0.75) */
    .description-content {
        padding: 24px;
        border-width: 1px;
        border-radius: 9px;
        font-size: 14px;
        line-height: 1.6;
    }
    
    .product-description-specs .description-content {
        padding: 0;
        border: none;
        font-size: 16px;
    }
    
    /* Стили для characteristic с размерами в px (база 12px) */
    .product-characteristics {
        padding: 24px;
        border-radius: 6px;
        margin-top: 36px;
    }
    
    .product-characteristics h2 {
        font-size: 21px;
        margin-bottom: 18px;
        padding-bottom: 6px;
        border-bottom-width: 1.5px;
    }
    
    .characteristics-table {
        gap: 12px;
    }
    
    .characteristic-row {
        padding: 12px;
        border-radius: 4.5px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        gap: 6px;
        flex-direction: column;
    }
    
    .characteristic-label {
        font-size: 14px;
        font-weight: 600;
        flex: none;
        margin-right: 0;
    }
    
    .characteristic-value {
        font-size: 14px;
        line-height: 1.5;
    }
    
    /* Стили для product-description */
    .product-description {
        margin: 36px 0;
    }
    
    .product-description h2 {
        font-size: 21px;
        margin-bottom: 18px;
    }
    
    /* Стили для product-description-specs */
    .product-description-specs {
        margin-top: 18px;
        padding: 18px;
        border-width: 1px;
        border-radius: 6px;
    }
    
    /* Стили для specs-link */
    .specs-link {
        margin-top: 12px;
    }
    
    .characteristics-anchor {
        padding: 9px 18px;
        border-radius: 24px;
        font-size: 14px;
        box-shadow: 0 1.5px 6px rgba(255, 207, 157, 0.3);
    }
    
    .characteristics-anchor:hover {
        box-shadow: 0 3px 9px rgba(255, 207, 157, 0.4);
    }
}

/* Мобильные устройства */
@media (max-width: 767px) {
    .product-page {
        margin: 0;
    }
    
    .product-content {
        gap: 1rem;
    }
    
    /* Мобильный слайдер для фото товара */
    .product-gallery:not(.wb-style) {
        display: block;
    }
    
    .product-gallery.wb-style {
        display: flex !important;
    }
    
    .gallery-thumbnails-container {
        display: none; /* Скрываем превью в мобильной версии */
    }
    
    .gallery-main {
        position: relative;
    }
    
    .main-image-container {
        width: 100%;
        height: 0;
        padding-bottom: 100%; /* Создает квадратный контейнер */
        position: relative;
        overflow: hidden;
        background: transparent;
    }
    
    .mobile-product-slider {
        display: none; /* Скрываем, используем wb-галерею вместо этого */
        background-color: #fff;
        position: relative;
    }
    
    .mobile-slider-wrapper {
        position: relative;
        width: 100%;
        height: 100%;
        overflow: hidden;
        border-radius: 0.75rem;
    }
    
    .mobile-slider-track {
        display: flex;
        width: 100%;
        height: 100%;
        transition: transform 0.3s ease;
    }
    
    .mobile-slide {
        flex: 0 0 100%;
        height: 100%;
    }
    
    .mobile-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .mobile-slider-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 207, 157, 0.9);
        border: none;
        border-radius: 50%;
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 10;
        color: var(--primary-blue);
        font-weight: bold;
        font-size: 1.35rem;
        box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.2);
    }
    
    .mobile-slider-nav:hover {
        background: var(--primary-peach);
    }
    
    .mobile-slider-prev {
        left: 0.625rem;
    }
    
    .mobile-slider-next {
        right: 0.625rem;
    }
    
    .mobile-slider-dots {
        position: absolute;
        bottom: 0.9375rem;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 0.5rem;
        z-index: 10;
    }
    
    .mobile-slider-dot {
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mobile-slider-dot.active {
        background: var(--primary-peach);
        transform: scale(1.2);
    }
    
    .desktop-gallery {
        display: none !important;
    }
    
    .product-title {
        font-size: 1.8rem;
    }
    
    .variants-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .specs-table td {
        padding: 0.5rem;
    }
    
    .spec-name {
        width: 50%;
    }
    
    .product-purchase {
        width: 100%;
        max-width: none;
        padding: 1rem;
        margin: 0;
    }
    
    .current-price {
        font-size: 1.8rem;
    }
    
    .purchase-buttons {
        gap: 0.5rem;
    }
    
    /* Мобильная адаптация для quantity-selector */
    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .quantity-controls {
        box-shadow: 0 0.125rem 0.375rem rgba(255, 207, 157, 0.35);
    }
    
    .qty-btn {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.2rem;
    }
    
    #quantity {
        width: 2.8125rem;
        height: 2.25rem;
        font-size: 1.05rem;
    }
    
    /* Адаптация price-block для мобильных */
    .price-block {
        margin-bottom: 0;
    }
    
    .current-price {
        font-size: 2.4rem;
    }
    
    .current-price .currency {
        font-size: 1.8rem;
    }
    
    .discount-badge {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }
    
    .description-content {
        padding: 1.5rem;
    }
    
    .related-products .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .thumbnail {
        width: 3rem;
        height: 3rem;
    }
    
    
    .product-title {
        font-size: 1.35rem;
    }
    
    .variants-grid {
        grid-template-columns: 1fr;
    }
    
    .variant-option {
        padding: 0.5rem;
    }
    
    .current-price {
        font-size: 1.8rem;
    }
    
    .related-products .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .btn-add-to-cart-mini {
        padding: 0.3rem 0.6rem;
        font-size: 1rem;
    }
    
    /* Адаптация quantity-selector для очень маленьких экранов */
    .quantity-selector {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .qty-btn {
        width: 2rem;
        height: 2rem;
        font-size: 1.05rem;
    }
    
    #quantity {
        width: 2.5rem;
        height: 2rem;
        font-size: 1rem;
    }
    
    .quantity-selector label {
        font-size: 0.95rem;
        margin-bottom: 0;
    }
    
    /* Адаптация price-block для очень маленьких экранов */
    .price-block {
        margin-bottom: 0;
    }
    
    .current-price {
        font-size: 2.1rem;
    }
    
    .current-price .currency {
        font-size: 1.35rem;
    }
    
    .price-label {
        font-size: 1rem;
    }
    
    .old-price {
        font-size: 1.2rem;
    }
    
    .savings-amount {
        font-size: 1rem;
        padding: 0.2rem 0.6rem;
    }
    
    .discount-badge {
        font-size: 1.05rem;
        padding: 0.35rem 0.7rem;
    }
}

/* Мобильные стили для слайдера товара */
@media (max-width: 991px) {
    .product-specs {
        padding: 0;
    }
    
    .product-title {
        display: none;
    }
    
    .page-title {
        display: none;
    }
    
    .mobile-product-title {
        display: block;
        font-size: 1.8rem;
        font-weight: 600;
        font-family: Novelist, serif;
        margin-bottom: 1rem;
        color: #1a1a1a;
        line-height: 1.3;
        background: transparent;
        padding: 0;
        margin-left: 0;
        margin-right: 0;
    }
    
    .mobile-product-slider {
        display: none; /* Скрываем, используем wb-галерею вместо этого */
        position: relative;
        z-index: 10;
        margin-bottom: 2rem;
    }
    
    .product-swiper {
        width: 100%;
        height: 300px;
        border-radius: 0.75rem;
        overflow: visible;
        padding-bottom: 30px;
    }
    
    .product-swiper .swiper-slide {
        height: 300px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
    }
    
    .product-swiper .swiper-slide img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }
    
    .product-swiper .swiper-pagination {
        position: absolute !important;
        bottom: -45px !important;
        left: 0 !important;
        width: 100% !important;
        text-align: center;
    }
    
    .product-swiper .swiper-pagination-bullet {
        background: rgba(10, 38, 71, 0.5) !important;
        opacity: 1 !important;
        width: 15px !important;
        height: 15px !important;
        margin: 0 5px !important;
        border-radius: 50% !important;
        transition: all 0.3s ease !important;
        display: inline-block !important;
    }
    
    .product-swiper .swiper-pagination-bullet-active {
        background: var(--primary-peach) !important;
        transform: scale(1.3) !important;
        box-shadow: 0 0 0 3px rgba(255, 207, 157, 0.3) !important;
    }
    
    .product-specs {
        display: flex;
        flex-direction: column;
        margin-top: 1rem;
        position: relative;
        z-index: 1;
    }
}

@media (min-width: 992px) {
    .mobile-product-title {
        display: none;
    }
}

/* Стили для характеристик товара */
.product-characteristics {
    margin-top: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

/* Стили для нового размещения описания в product-specs */
.product-description-specs {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
}

.product-description-specs .description-content {
    background: transparent;
    border: none;
    padding: 0;
    line-height: 1.6;
    color: #444;
}

/* Стили для ссылки на характеристики */
.specs-link {
    margin-top: 1rem;
    text-align: center;
}

.characteristics-anchor {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-peach), #ffd5b8);
    color: var(--primary-blue);
    text-decoration: none;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 207, 157, 0.3);
}

.characteristics-anchor:hover {
    background: linear-gradient(135deg, #ffd5b8, var(--primary-peach));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 207, 157, 0.4);
    text-decoration: none;
    color: var(--primary-blue);
}

.product-characteristics h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.characteristics-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.characteristic-row {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.characteristic-label {
    flex: 0 0 18rem;
    font-weight: 600;
    color: #495057;
    margin-right: 1.5rem;
}

.characteristic-value {
    flex: 1;
    color: #212529;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .characteristic-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .characteristic-label {
        flex: none;
        margin-right: 0;
        font-size: 1.05rem;
    }
    
    .characteristic-value {
        font-size: 1.05rem;
    }
}
