.woo-category-slider-container {
    margin: 20px 0;
    padding: 0 15px;
    position: relative;
}

.woo-category-slider {
    position: relative;
}

.woo-category-slider .category-slide {
    padding: 0 10px;
}

.category-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.category-link:hover {
    transform: translateY(-5px);
}

.category-image {
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.category-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Высота и скругление для ПК */
@media (min-width: 769px) {
    .category-image {
        height: 350px;
        border-radius: var(--slider-border-radius, 30px);
    }
    .category-image img {
        border-radius: var(--slider-border-radius, 30px);
    }
}

/* Стили для кастомных стрелок */
.woo-category-slider .slick-prev.custom-arrow,
.woo-category-slider .slick-next.custom-arrow {
    z-index: 10;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    transform: translateY(-50%);
}

.woo-category-slider .slick-prev.custom-arrow:hover,
.woo-category-slider .slick-next.custom-arrow:hover {
    background: transparent;
}

/* Левая стрелка - вплотную к первому слайду */
.woo-category-slider .slick-prev.custom-arrow {
    left: -5px;
}

/* Правая стрелка - вплотную к последнему слайду */
.woo-category-slider .slick-next.custom-arrow {
    right: -5px;
}

.woo-category-slider .slick-prev.custom-arrow:before,
.woo-category-slider .slick-next.custom-arrow:before {
    display: none; /* Убираем стандартные стрелки */
}

.woo-category-slider .slick-prev.custom-arrow img,
.woo-category-slider .slick-next.custom-arrow img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.woo-category-slider .slick-prev.custom-arrow:hover img,
.woo-category-slider .slick-next.custom-arrow:hover img {
    transform: scale(1.15);
}

/* Точки пагинации - скрываем на мобильных */
.woo-category-slider .slick-dots {
    bottom: -30px;
}

/* Скрываем точки на мобильных устройствах */
@media (max-width: 768px) {
    .woo-category-slider .slick-dots {
        display: none !important;
    }
    
    /* Адаптивные стрелки для мобильных */
    .woo-category-slider .slick-prev.custom-arrow {
        left: -2px;
        width: 35px;
        height: 35px;
    }
    
    .woo-category-slider .slick-next.custom-arrow {
        right: -2px;
        width: 35px;
        height: 35px;
    }
}

.woo-category-slider .slick-dots li button:before {
    font-size: 10px;
}

@media (max-width: 768px) {
    .woo-category-slider-container {
        padding: 0 10px;
    }
    
    .category-slide {
        padding: 0 5px;
    }
}

@media (max-width: 480px) {
    .woo-category-slider .slick-prev.custom-arrow {
        left: 0;
        width: 30px;
        height: 30px;
    }
    
    .woo-category-slider .slick-next.custom-arrow {
        right: 0;
        width: 30px;
        height: 30px;
    }
    
    .category-slide {
        padding: 0 3px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 320px) {
    .woo-category-slider .slick-prev.custom-arrow {
        left: 2px;
        width: 25px;
        height: 25px;
    }
    
    .woo-category-slider .slick-next.custom-arrow {
        right: 2px;
        width: 25px;
        height: 25px;
    }
}

/* Стили для контроля видимости слайдера */
.woo-category-slider-container.show-on-desktop {
    display: block;
}

.woo-category-slider-container.show-on-mobile {
    display: none;
}

.woo-category-slider-container.show-on-desktop-only {
    display: block;
}

.woo-category-slider-container.show-on-mobile-only {
    display: none;
}

/* Показываем только на десктопе */
@media (min-width: 769px) {
    .woo-category-slider-container.show-on-desktop {
        display: block;
    }
    
    .woo-category-slider-container.show-on-mobile {
        display: none;
    }
    
    .woo-category-slider-container.show-on-desktop-only {
        display: block;
    }
    
    .woo-category-slider-container.show-on-mobile-only {
        display: none;
    }
}

/* Показываем только на мобильных */
@media (max-width: 768px) {
    .woo-category-slider-container.show-on-desktop {
        display: none;
    }
    
    .woo-category-slider-container.show-on-mobile {
        display: block;
    }
    
    .woo-category-slider-container.show-on-desktop-only {
        display: none;
    }
    
    .woo-category-slider-container.show-on-mobile-only {
        display: block;
    }
}

/* ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ DOUBLE LAYOUT */
.woo-category-slider-container.layout-double .double-slide {
    display: flex;
    flex-direction: column;
    gap: 25px; /* Фиксированное расстояние между рядами */
}

.woo-category-slider-container.layout-double .double-item {
    display: flex;
    flex-direction: column;
    height: auto;
}

.woo-category-slider-container.layout-double .double-item.empty-item {
    visibility: hidden;
    height: 0;
    min-height: 0;
}

/* Выравнивание изображений по верхнему краю в пределах своего ряда */
.woo-category-slider-container.layout-double .double-item .category-image {
    display: flex;
    align-items: flex-start; /* Выравнивание по верхнему краю */
    justify-content: center;
    margin-bottom: 8px;
}

.woo-category-slider-container.layout-double .double-item .category-image img {
    align-self: flex-start; /* Изображение прижимается к верху */
}

/* Фиксированная высота для области текста */
.woo-category-slider-container.layout-double .double-item .category-title {
    min-height: 60px; /* Фиксированная высота для 3 строк текста */
    display: flex;
    align-items: flex-start; /* Текст тоже по верху */
    justify-content: center;
}

.woo-category-slider-container.layout-double .double-item .category-title h3 {
    font-size: 14px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 3.9em; /* 3 строки * 1.3 line-height */
    margin: 0;
    width: 100%;
    text-align: center;
}

/* Адаптация для десктопа */
@media (min-width: 769px) {
    .woo-category-slider-container.layout-double .category-image {
        height: 160px; /* Фиксированная высота изображения */
    }
    
    .woo-category-slider-container.layout-double .double-slide {
        gap: 25px;
    }
    
    .woo-category-slider-container.layout-double .double-item .category-title {
        min-height: 60px;
    }
    
    .woo-category-slider-container.layout-double .double-item .category-title h3 {
        font-size: 14px;
    }
}

/* Адаптация для мобильных устройств - ЕДИНЫЙ РАЗМЕР */
@media (max-width: 768px) {
    /* Стили для SINGLE layout на мобильных */
    .woo-category-slider-container.layout-single .category-image {
        height: 200px;
        border-radius: 15px;
    }
    .woo-category-slider-container.layout-single .category-image img {
        border-radius: 15px;
    }
    
    .woo-category-slider-container.layout-single .category-title h3 {
        font-size: 14px;
    }
    
    /* Стили для DOUBLE layout на мобильных */
    .woo-category-slider-container.layout-double .category-image {
        height: 200px; /* Одинаково для всех мобильных */
        border-radius: 15px;
    }
    
    .woo-category-slider-container.layout-double .category-image img {
        border-radius: 15px;
    }
    
    .woo-category-slider-container.layout-double .double-slide {
        gap: 25px;
    }
    
    .woo-category-slider-container.layout-double .double-item .category-title {
        min-height: 50px;
    }
    
    .woo-category-slider-container.layout-double .double-item .category-title h3 {
        font-size: 14px;
        line-height: 1.3;
        max-height: 3.9em;
    }
}

/* Дополнительные медиа-запросы для очень маленьких экранов */
@media (max-width: 480px) {
    .woo-category-slider-container.layout-double .category-image {
        height: 180px; /* Немного уменьшаем для очень маленьких экранов */
    }
}

@media (max-width: 375px) {
    .woo-category-slider-container.layout-double .category-image {
        height: 160px; /* Для iPhone SE и подобных */
    }
    
    .woo-category-slider-container.layout-double .double-item .category-title h3 {
        font-size: 13px;
    }
}

/* Гарантируем, что обычный слайдер работает как раньше */
.woo-category-slider-container.layout-single .category-slide {
    padding: 0 10px;
}

.woo-category-slider-container.layout-single .category-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.woo-category-slider-container.layout-single .category-link:hover {
    transform: translateY(-5px);
}

.woo-category-slider-container.layout-single .category-image {
    position: relative;
    overflow: hidden;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.woo-category-slider-container.layout-single .category-image img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.woo-category-slider-container.layout-single .category-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: #333;
    text-decoration: underline;
}