/* .wc-block-components-address-form__country.wc-block-components-country-input,
.wc-block-components-address-form__country.wc-block-components-country-input * {
    height: 0 !important;
    width: 0 !important;
    opacity: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: none !important;
} */

/* fieldset#billing-fields {
    display: none !important;
} */

@media (min-width: 768px) {
    .woocommerce-products-header {
        margin-bottom: 1rem;
    }
}
/* products-list */
.woocommerce ul.products {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}
.woocommerce ul.products::after, 
.woocommerce ul.products::before, 
.woocommerce-page ul.products::after, 
.woocommerce-page ul.products::before {
    content: none !important;
}
.woocommerce ul.products li.product {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.woocommerce ul.products li.product a.woocommerce-loop-product__link {
    flex-grow: 1;
    border-radius: 3px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    flex-grow: 1;
}
.woocommerce a.button {
    border-radius: 3px !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    position: relative;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
}

.woocommerce ul.products li.product .product-description-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    background-image: linear-gradient(200deg, rgba(255, 255, 255, 0.95), rgb(219 186 179));
    border: 1px solid #f0e6e6;
    color: #865d5d;
    padding: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 5;    
    flex-direction: column;
    font-size: .85em;
    line-height: 1.4;
}

/* Добавление декоративных элементов */
.woocommerce ul.products li.product .product-description-overlay .product-description-overlay-title::before,
.woocommerce ul.products li.product .product-description-overlay .product-description-overlay-title::after {
    content: '❈';
    display: inline-block;
    margin: 0 8px;
    color: #c9ada7;
    animation: rotate-symbol 3s infinite alternate ease-in-out;
}

.woocommerce ul.products li.product .product-description-text {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 10;
    -webkit-box-orient: vertical;
    max-height: 100%;
}

/* .woocommerce ul.products li.product .woocommerce-loop-product__link:hover .product-description-overlay {
    opacity: 1;
} */
/* products-list end */

/* Карусель изображений товара */
.product-image-carousel {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-images {
    position: relative;
    width: 100%;
    height: auto;
    cursor: grab;
}

.carousel-images:active {
    cursor: grabbing;
}

.carousel-slide {
    display: none;
    width: 100%;
    height: auto;
}

.carousel-slide.active {
    display: block;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Точки навигации */
.carousel-dots {
    display: flex;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    flex-wrap: wrap;
    gap: 8px;    
    border-radius: 10px;
    background-color: #fff;
    padding: 6px 7px;
    margin: 0;
    box-shadow: 0 0 6px 0 #ffffff;
    /* Защита от случайных кликов - блокируем всплытие событий */
    z-index: 15;
    pointer-events: auto;
}

/* Дополнительная защита - блокируем клики в области точек, кроме самих точек */
.carousel-dots::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
}

.carousel-dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    
    /* Увеличиваем область клика через отступы */
    padding: 6px;
    margin: -4px;
    
    /* Гарантируем что клики обрабатываются */
    pointer-events: auto;
    z-index: 16;
}

/* Визуальная точка через псевдоэлемент */
.carousel-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: inherit;
    transition: inherit;
}

.carousel-dot:hover::before {
    background-color: rgba(255, 255, 255, 0.8);
    transform: translate(-50%, -50%) scale(1.2);
}

.carousel-dot.active::before {
    background-color: #865d5d;
    border-color: #865d5d;
    transform: translate(-50%, -50%) scale(1.3);
}

/* Убираем стандартное оформление точки, оставляем только псевдоэлемент */
.carousel-dot {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .woocommerce ul.products {
        gap: 10px;
    }
    
    /* Увеличиваем область клика для мобильных устройств */
    .carousel-dot {
        padding: 15px;
        margin: -12px;
    }
    
    .carousel-dot::before {
        width: 10px;
        height: 10px;
    }
    
    .carousel-dot.active::before {
        transform: translate(-50%, -50%) scale(1.2);
    }
    
    .carousel-dot:hover::before {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Стили для одного изображения */
.product-single-image {
    width: 100%;
    height: auto;
}

.product-single-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Placeholder для товаров без изображений */
.product-image-placeholder {
    width: 100%;
    height: auto;
}

.product-image-placeholder img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Анимация при переключении слайдов */
.carousel-slide {
    transition: opacity 0.3s ease-in-out;
}

.carousel-slide:not(.active) {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide.active {
    opacity: 1;
    position: relative;
}

/* Стили для улучшения UX */
.product-image-carousel:hover .carousel-dots {
    opacity: 1;
}

.carousel-dots {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

/* Предотвращение выделения текста при свайпах */
.product-image-carousel {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Курсор для интерактивных элементов */
.carousel-images {
    cursor: grab;
}

.carousel-images:active {
    cursor: grabbing;
}
/* Конец стилей карусели */

/* Современная иконка распродажи */
.woocommerce span.onsale {
    position: absolute !important;
    top: 8px !important;
    right: auto !important;
    left: 0 !important;
    z-index: 10 !important;
    
    /* Сброс стандартных стилей */
    min-width: auto !important;
    min-height: auto !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    
    /* Новая стилизация */
    background: linear-gradient(135deg, #ff4757 0%, #ff3742 50%, #ff2f37 100%) !important;
    color: white !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    font-family: 'Arial', sans-serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    
    /* Форма флажка */
    clip-path: polygon(0 0, 100% 0, 85% 50%, 100% 100%, 0 100%) !important;
    padding: 6px 12px 6px 8px !important;
    
    /* Тень и эффекты */
    box-shadow: 
        0 2px 8px rgba(255, 71, 87, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    
    /* Анимация */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: translateX(0) !important;
}

/* Эффекты при наведении */
.woocommerce span.onsale:hover {
    transform: translateX(-2px) scale(1.05) !important;
    box-shadow: 
        0 4px 15px rgba(255, 71, 87, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

/* Альтернативная современная стилизация - круглая */
.woocommerce span.onsale.modern-circle {
    clip-path: none !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 9px !important;
    line-height: 1 !important;
    
    /* Градиент */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    
    /* Пульсация */
    animation: pulse-sale 2s infinite !important;
}

@keyframes pulse-sale {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* Стилизация под неон */
.woocommerce span.onsale.neon-style {
    clip-path: none !important;
    border-radius: 6px !important;
    background: #000 !important;
    color: #00ff88 !important;
    border: 2px solid #00ff88 !important;
    font-size: 9px !important;
    padding: 4px 8px !important;
    text-shadow: 0 0 5px #00ff88 !important;
    box-shadow: 
        0 0 5px #00ff88,
        0 0 10px #00ff88,
        0 0 15px #00ff88,
        inset 0 0 5px rgba(0, 255, 136, 0.2) !important;
    animation: neon-glow 1.5s ease-in-out infinite alternate !important;
}

@keyframes neon-glow {
    from {
        box-shadow: 
            0 0 5px #00ff88,
            0 0 10px #00ff88,
            0 0 15px #00ff88,
            inset 0 0 5px rgba(0, 255, 136, 0.2);
    }
    to {
        box-shadow: 
            0 0 10px #00ff88,
            0 0 20px #00ff88,
            0 0 30px #00ff88,
            inset 0 0 10px rgba(0, 255, 136, 0.4);
    }
}

/* Стилизация под минимализм */
.woocommerce span.onsale.minimal-style {
    clip-path: none !important;
    border-radius: 2px !important;
    background: #f34646 !important;
    color: white !important;
    font-size: 8px !important;
    font-weight: 500 !important;
    padding: 3px 6px !important;
    letter-spacing: 1px !important;
    box-shadow: none !important;
    border: none !important;
}

/* Стилизация под премиум */
.woocommerce span.onsale.premium-style {
    clip-path: polygon(0 0, 100% 0, 90% 50%, 100% 100%, 0 100%) !important;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 50%, #ffd700 100%) !important;
    color: #333 !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    padding: 5px 13px 5px 6px !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8) !important;
    box-shadow: 
        0 3px 10px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .woocommerce span.onsale {
        top: 4px !important;
        font-size: 8px !important;
        padding: 4px 8px 4px 6px !important;
    }
    
    .woocommerce span.onsale.modern-circle {
        width: 35px !important;
        height: 35px !important;
        font-size: 7px !important;
    }
}

/* Конец стилей современной иконки распродажи */

/* Эффекты при наведении мыши на карусель */
.product-image-carousel.carousel-hovering .carousel-images {
    cursor: pointer;
}

.product-image-carousel.carousel-hovering .carousel-dots {
    opacity: 1;
}

/* Плавный переход при hover-переключении */
.product-image-carousel.carousel-hovering .carousel-slide {
    transition: opacity 0.15s ease-out;
}

/* Индикатор зон наведения (опционально, для отладки) */
.product-image-carousel.carousel-hovering .carousel-images::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.1) 75%,
        transparent 75%,
        transparent 100%
    );
    opacity: 0;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
}

/* Показываем индикатор зон при наведении (можно убрать в продакшене) */
.product-image-carousel.carousel-hovering:hover .carousel-images::before {
    opacity: 0.3;
}

/* Адаптация для товаров с разным количеством изображений */
.product-image-carousel[data-slides="2"].carousel-hovering .carousel-images::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 50%,
        transparent 100%
    );
}

.product-image-carousel[data-slides="3"].carousel-hovering .carousel-images::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 33.33%,
        transparent 33.33%,
        transparent 66.66%,
        rgba(255, 255, 255, 0.1) 66.66%,
        transparent 100%
    );
}

.product-image-carousel[data-slides="4"].carousel-hovering .carousel-images::before {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 50%,
        transparent 75%,
        rgba(255, 255, 255, 0.1) 75%,
        transparent 100%
    );
}

/* Улучшенные точки при наведении */
.product-image-carousel.carousel-hovering .carousel-dot::before {
    transition: all 0.15s ease-out;
}
