/* Стили для загрузки товаров в секции "Хиты продаж" */

/* Состояния загрузки */
.products-loader,
.products-empty,
.products-error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    width: 100%;
    font-size: 18px;
    color: #343E4A;
    padding: 40px 20px;
}

.products-loader {
    position: relative;
}

.products-loader::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin-left: 15px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #20247A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.products-error {
    color: #e74c3c;
}

.products-empty {
    color: #7f8c8d;
}

/* Плавное появление слайдера после инициализации */
.hero-hits .products-slider:not(.swiper-loaded) .swiper-slide {
    opacity: 0;
}

/* .hero-hits .products-slider.swiper-loaded .swiper-slide {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
} */

/* Скрываем навигацию и пагинацию до загрузки */
.hero-hits .products-slider:not(.swiper-loaded) .products-slider_navigation,
.hero-hits .products-slider:not(.swiper-loaded) .products-slider_pagination {
    opacity: 0;
    pointer-events: none;
}

.hero-hits .products-slider.swiper-loaded .products-slider_navigation,
.hero-hits .products-slider.swiper-loaded .products-slider_pagination {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}
