/* Swiper Overrides */
.catalog-page__slider {
    position: relative;
    padding: 20px 0;
}

.categories-slider {
    overflow: hidden;
    position: relative;
}

.categories-slider__wrapper {
    display: flex;
}

.categories-slider__slide {
    flex-shrink: 0;
    width: 247.4px;
    margin-right: 16px;
    height: auto;
}

/* Карточка категории */
.item-categories {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #ffffff;
    width: 100%;
    height: 120px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.item-categories:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Активная карточка */
.item-categories.active {
    border: 2px solid #2271b1;
}

/* Изображение как фон */
.item-categories__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    border-radius: 10px;
}

.item-categories__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.item-categories:hover .item-categories__img img {
    transform: scale(1.08);
}

/* Затемнение фона для читаемости текста */
.item-categories__img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    z-index: 1;
}

/* Тело карточки (текст поверх картинки) */
.item-categories__body {
    height: 100%;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    row-gap: 5px;
    position: relative;
    z-index: 2;
}

/* Название категории */
.item-categories__name {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* Подпись (текст кнопки) */
.item-categories__label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Если нет картинки - показываем заглушку */
.item-categories.no-image .item-categories__img {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.item-categories.no-image .item-categories__img::after {
    background: rgba(0, 0, 0, 0.3);
}

/* Navigation кнопки */
.categories-slider__prev,
.categories-slider__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.categories-slider__prev:hover,
.categories-slider__next:hover {
    background: #f8fafc;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-50%) scale(1.05);
}

.categories-slider__prev.swiper-button-disabled,
.categories-slider__next.swiper-button-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.categories-slider__prev {
    left: -22px;
}

.categories-slider__next {
    right: -22px;
}

.categories-slider__prev svg,
.categories-slider__next svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #333;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Сообщение если нет категорий */
.wcs-empty-message {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    color: #666;
}

/* Responsive */
@media (max-width: 1200px) {
    .categories-slider__prev {
        left: 4px;
    }
    .categories-slider__next {
        right: 4px;
    }
}

@media (max-width: 992px) {
    .categories-slider__slide {
        width: 210px;
        margin-right: 14px;
    }
    .item-categories {
        height: 110px;
    }
}

@media (max-width: 768px) {
    .categories-slider__prev,
    .categories-slider__next {
        width: 36px;
        height: 36px;
    }
    .categories-slider__prev svg,
    .categories-slider__next svg {
        width: 16px;
        height: 16px;
    }
    .categories-slider__slide {
        width: 180px;
        margin-right: 12px;
    }
    .item-categories {
        height: 100px;
    }
    .item-categories__name {
        font-size: 14px;
    }
    .item-categories__label {
        font-size: 12px;
        padding: 3px 10px;
    }
}

@media (max-width: 576px) {
    .categories-slider__prev,
    .categories-slider__next {
        display: none;
    }
    .categories-slider__slide {
        width: 160px;
        margin-right: 10px;
    }
    .item-categories {
        height: 90px;
        border-radius: 8px;
    }
    .item-categories__body {
        padding: 10px 12px;
    }
    .item-categories__name {
        font-size: 13px;
    }
    .item-categories__label {
        font-size: 11px;
        padding: 2px 8px;
    }
}