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

/* Main content - из design context: padding 50px 20px, gap 10px */
.product-main {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    align-items: center;
    padding: 0;
    width: 100%;
}

/* Wrapper - из design context: gap 60px, max-width 1400px */
.product-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3.75rem;
    align-items: flex-start;
    width: 100%;
    max-width: 87.5rem;
}

/* Breadcrumbs - из design context: font-size 16px, gap 7px, line-height 1, tracking -0.16px */
.product-breadcrumbs {
    display: flex;
    gap: 0.4375rem;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 0.7rem; 
    line-height: 1;
    letter-spacing: -0.01rem;
    color: #000000;
    max-width: 87.5rem;
    width: 100%;
}

.product-breadcrumbs p {
    margin: 0;
}

/* Product Container - из design context: gap 40px, justify-between, flex-wrap */
.product-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    align-items: flex-start;
    justify-content: space-between;
    max-width: 87.5rem;
    width: 100%;
}

/* Product Images - из design context: gap 15px */
.product-images {
    display: flex;
    gap: 0.9375rem;
    align-items: center;
}

/* Product Image Item - из design context: width 467px, height 610px, border-radius 7px */
.product-image-item {
    position: relative;
    width: 29.1875rem;
    height: 38.125rem;
    border-radius: 0.4375rem;
    overflow: hidden;
    flex-shrink: 0; /* Предотвращаем сжатие */
}

.product-img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center center !important;
}

/* Кликабельные изображения для галереи */
.product-gallery-item {
    cursor: pointer;
    position: relative;
}

/* Эффект затемнения при наведении через псевдоэлемент */
.product-gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
    border-radius: 0.4375rem;
}

.product-gallery-item:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

/* Изображение внутри галереи */
.product-gallery-item .product-img {
    transition: none; /* Убираем transition с изображения */
}

/* Скрытые элементы галереи */
.product-gallery-hidden-item {
    display: none !important;
}

/* More Photos Button - из design context: padding 10px, border 1px solid #efefef, border-radius 7px, bottom 30px, right 20px */
.product-more-photos {
    position: absolute;
    bottom: 3.75rem;
    right: 1.25rem;
    display: flex;
    gap: 0.625rem;
    align-items: center;
    justify-content: center;
    padding: 0.625rem;
    border: 1px solid #efefef;
    border-radius: 0.4375rem;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    color: #efefef;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-more-photos:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

/* Gallery Navigation */
/* Новые стрелки навигации галереи */
.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 10;
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 33px;
    height: 32px;
}

.gallery-arrow:hover {
    transform: translateY(-50%) scale(1.1);
}

.gallery-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.gallery-arrow-prev {
    left: 20px;
}

.gallery-arrow-next {
    right: 20px;
}

.gallery-arrow svg {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-current {
    font-weight: 500;
}

/* Gallery Transition Clone */
.gallery-transition-clone {
    pointer-events: none;
    z-index: 10;
}

/* Product Info - из design context: width 411px, gap 40px */
.product-info {
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 2.5rem;
    align-items: flex-start;
    width: 25.6875rem;
}

/* Product Details - из design context: gap 20px */
.product-details {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
    width: 100%;
}

/* Product Title - из design context: font-size 32px, font-weight 500, line-height 1 */
.product-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    line-height: 1;
    color: #000000;
    margin: 0;
    width: 100%;
}

/* Product Color - из design context: font-size 16px, line-height 1, color #7f7f7f */
.product-color {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    color: #7f7f7f;
    margin: 0;
}

/* Product Price - из design context: font-size 32px, line-height 1, color #2b2b2a */
.product-price {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
    line-height: 1;
    color: #2b2b2a;
    margin: 0;
    width: 100%;
} 

/* Product Sizes - из design context: width 278px, height 120px, gap 6px 11px (row column) */
.product-sizes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem 0.6875rem;
    align-items: flex-start;

}

/* Size Button - из design context: padding 10px, border 1px solid black, border-radius 7px, font-size 16px */
.product-size-btn {
    display: flex;
    gap: 0.625rem;
    align-items: center;
    justify-content: center;
    padding: 0.625rem;
    border: 1px solid #000000;
    border-radius: 0.4375rem;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    color: #000000;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Активное состояние кнопки размера */
.product-size-btn.active,
.product-size-btn:hover {
    background: #2b2b2a !important;
    color: #ffffff !important;
    border-color: #2b2b2a !important;
}

/* Скрываем стандартную таблицу вариаций для размеров */
.variations tr:has(.hidden-size-select) {
    display: none !important;
}

/* Скрываем недоступные кнопки размеров */
.product-size-btn[disabled],
.product-size-btn:not(:visible) {
    display: none !important;
}



/* Скрываем недоступные опции в select */
.variations select option[disabled] {
    display: none !important;
}

/* Size Table Link - из design context: font-size 16px, line-height 1, underline, text-underline-offset 30% */
.product-size-table {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    color: #000000;
    text-decoration: underline;
    text-underline-offset: 30%;
}

/* Reset Variation Link */
.product-reset-variation {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    color: #7f7f7f;
    text-decoration: underline;
    text-underline-offset: 30%;
    margin-left: 15px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.product-reset-variation:hover {
    color: #000000;
}

/* Product Specifications - из design context: width 236px, gap 7px */
.product-specifications {
    display: flex;
    flex-direction: column;
    gap: 0.4375rem;
    align-items: flex-start;
    width: 14.75rem;
}

/* Spec Title - из design context: font-size 16px, line-height 1, color black */
.product-spec-title {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    color: #000000;
    margin: 0;
}

/* Spec Item - из design context: gap 14px, font-size 16px, color #7f7f7f */
.product-spec-item {
    display: flex;
    gap: 0.875rem;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    color: #7f7f7f;
}

.product-spec-item p {
    margin: 0; 
    width: 160px !important; 
    font-size:14px; 
}

/* Add to Cart Button - из design context: padding 20px 30px, background #2b2b2a, border-radius 7px, font-size 16px, color #efefef, font-weight 600 */
.product-add-to-cart,
.single_add_to_cart_button,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    display: flex;
    gap: 0.625rem;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.875rem;
    background: #2b2b2a !important;
    border: none !important;
    border-radius: 0.4375rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    color: #efefef !important;
    cursor: pointer;
    width: 100%;
}

/* WooCommerce form стили */
.woocommerce div.product form.cart {
    margin: 0;
}

.woocommerce div.product form.cart .quantity {
    display: none; /* Скрываем количество если не нужно */
}

/* Скрываем поле количества везде */
.product-add-to-cart-wrapper .quantity {
    display: none !important;
}

/* Скрываем поле количества в single_variation_wrap */
.single_variation_wrap .quantity {
    display: none !important;
}

/* Скрываем поле количества в woocommerce-variation-add-to-cart */
.woocommerce-variation-add-to-cart .quantity {
    display: none !important;
}

/* Скрываем таблицу вариаций внутри обертки кнопки */
.product-add-to-cart-wrapper .variations {
    display: none !important;
}

/* Стили для обертки вариаций */
.product-variations-wrapper {
    width: 100%;
    order: 2; /* После product-details (order: 1) */
}

.product-variations-wrapper .variations_form {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.product-variations-wrapper .variations {
    margin-bottom: 0.9375rem;
    order: 1;
}

/* Кнопки размеров */
.product-variations-wrapper .product-sizes {
    order: 2;
}

.product-variations-wrapper .reset_variations_alert {
    order: 3;
}

/* Порядок элементов внутри product-info */
.product-details {
    order: 0;
}

.product-details-bottom {
    margin: 30px 0px;
    order: 3;
}

.product-specifications {
    order: 4;
}

/* Показываем кнопку только в обертке add to cart */
.product-add-to-cart-wrapper {
    width: 100%;
    margin-top: 1.25rem;
    order:5; 
}

/* Стили для wrapper одиночной вариации */
.product-add-to-cart-wrapper .single_variation_wrap {
    width: 100%;
}

/* Скрываем информацию о вариации (цена уже показана выше) */
.product-add-to-cart-wrapper .woocommerce-variation {
    display: none !important;
}

/* Скрываем wrapper вариаций до выбора */
.product-add-to-cart-wrapper .single_variation_wrap {
    display: block !important; /* Всегда показываем wrapper */
}

.product-add-to-cart-wrapper .woocommerce-variation-add-to-cart {
    width: 100%;
}

.product-add-to-cart-wrapper .variations_button {
    width: 100%;
}

/* Стили для кнопки добавления в корзину */
.product-add-to-cart-wrapper .single_add_to_cart_button {
    width: 100%;
    padding: 0.9375rem 1.25rem;
    background: #2b2b2a;
    color: #ffffff;
    border: none;
    border-radius: 0.4375rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-add-to-cart-wrapper .single_add_to_cart_button:hover {
    background: #000000;
}

.product-add-to-cart-wrapper .single_add_to_cart_button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Убираем стандартные стили WooCommerce */
.woocommerce div.product .woocommerce-product-gallery {
    display: none; /* Скрываем стандартную галерею */
}

.woocommerce div.product .product_meta {
    display: none; /* Скрываем стандартные мета данные */
} 
.product-breadcrumbs a {
color:#000000; 
} 


/* ============================================
   RESPONSIVE - TABLET (768px - 1440px)
   ============================================ */
@media (min-width: 1341px) {
    /* Запрещаем перенос до 1340px */
    .product-container {
        flex-wrap: nowrap;
    }
}

@media (max-width: 1340px) and (min-width: 768px) {
    /* Tablet: одна картинка вместо двух */
    .product-images {
        display: flex;
        gap: 0.9375rem;
    }

    .product-image-item:first-child {
        display: none;
    }

    /* Убираем space-between когда одно фото */
    .product-container {
        justify-content: flex-start;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (360px - 768px)
   ============================================ */
@media (max-width: 767px) {
    /* Mobile: flex-direction column, flex 1 0 0, min-width 300px */
    .product-container {
        flex-direction: column;
    }

    .product-images {
        flex: 1 0 0;
        min-width: 18.75rem;
        width: 100%;
    }

    .product-image-item {
        flex: 1 0 0;
        width: 100%;
        min-width: 18.75rem;
    }

    .product-image-item:first-child {
        display: none;
    }

    .product-info {
        flex: 1 0 0;
        min-width: 18.75rem;
        width: 100%;
    } 
    /* Wrapper - из design context: gap 60px, max-width 1400px */
.product-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
    width: 100%;
    max-width: 87.5rem;
}
}

/* ============================================
   COLOR SWATCHES ON PRODUCT PAGE (Display only)
   ============================================ */

.product-color-swatches {
    margin-top: 20px;
    margin-bottom: 20px;
}

.product-color-swatches-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #000000;
    margin: 0 0 10px 0;
}

.product-color-swatches-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.product-color-swatch {
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    cursor: default;
    transition: border-color 0.2s ease;
}

.product-color-swatch:hover {
    border-color: #000000;
}

/* ============================================
   COLOR SWATCHES FOR VARIATION SELECTION
   ============================================ */

.color-swatches-wrapper {
    margin-bottom: 15px;
}

.color-swatches {
    display: inline-flex;
    gap: 0.375rem 0.6875rem; /* как у кнопок размеров */
    flex-wrap: wrap;
    align-items: center;
}

/* Стили для строки вариации (цвет) */
.variation-row {
    display: flex;
    align-items: center;
}

.variation-label {
    width: 80px;
    flex-shrink: 0;
}

/* Чип цвета: свотч + название, в одном стиле с кнопками размеров.
   !important на display — product-variations.js ставит inline-block инлайном */
.color-swatch {
    display: inline-flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid #000000;
    border-radius: 0.4375rem;
    background: transparent;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1;
    color: #000000;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.color-swatch-dot {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    flex-shrink: 0;
    /* внутренняя обводка, чтобы белый и светлые цвета читались на любом фоне */
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.color-swatch:hover,
.color-swatch.selected {
    background: #2b2b2a;
    border-color: #2b2b2a;
    color: #ffffff;
}

.color-swatch:hover .color-swatch-dot,
.color-swatch.selected .color-swatch-dot {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.color-swatch:focus-visible {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* На тач-устройствах убираем hover-заливку, чтобы не «залипала» после тапа */
@media (hover: none) {
    .color-swatch:hover:not(.selected) {
        background: transparent;
        border-color: #000000;
        color: #000000;
    }
    /* Тач-зона не меньше 44px */
    .color-swatch {
        padding: 0.8125rem 0.875rem;
    }
}

/* ============================================
   SEO BLOCKS: ОПИСАНИЕ ТОВАРА + FAQ
   ============================================ */

.product-description-section,
.product-faq-section {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 50rem;
}

.product-section-title {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    line-height: 1;
    color: #000000;
    margin: 0;
}

.product-description-content {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    color: #2b2b2a;
}

.product-description-content p {
    margin: 0 0 0.75rem;
}

.product-description-content p:last-child {
    margin-bottom: 0;
}

.product-faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    width: 100%;
}

.product-faq-item {
    border: 1px solid #efefef;
    border-radius: 0.4375rem;
    background: #ffffff;
}

.product-faq-item summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.125rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.3;
    color: #000000;
    cursor: pointer;
}

.product-faq-item summary::-webkit-details-marker {
    display: none;
}

.product-faq-item summary::after {
    content: '+';
    flex-shrink: 0;
    font-size: 1.375rem;
    font-weight: 400;
    line-height: 1;
    color: #7f7f7f;
    transition: transform 0.2s ease;
}

.product-faq-item[open] summary::after {
    transform: rotate(45deg);
}

.product-faq-answer {
    padding: 0 1.25rem 1.125rem;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    color: #7f7f7f;
}

.product-faq-answer p {
    margin: 0 0 0.5rem;
}

.product-faq-answer p:last-child {
    margin-bottom: 0;
}