/**
 * Products Carousel Styles
 * Стили для карусели товаров "Специально для вас"
 */

/* Секция карусели */
.products-carousel-section {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #2549d8 0%, #1e3cb8 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.view-all-link {
    color: #2549d8;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #1e3cb8;
    gap: 12px;
}

/* Контейнер Swiper */
.products-swiper {
    padding: 20px 5px 60px 5px !important;
    margin: 0 -5px;
}

.swiper-slide {
    height: auto;
    display: flex;
}

.products-swiper .swiper-slide {
    width: 330px !important;
    flex-shrink: 0;
}

/* Карточка товара в карусели */
.carousel-product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.carousel-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Изображение товара */
.carousel-product-image {
    position: relative;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: #f8f9fa;
}

.carousel-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.carousel-product-card:hover .carousel-product-image img {
    transform: scale(1.05);
}

/* Бейджи */
.carousel-product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    z-index: 2;
}

.carousel-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.carousel-badge.badge-sale {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%);
    color: white;
}

.carousel-badge.badge-new {
    background: linear-gradient(135deg, #26de81 0%, #20bf6b 100%);
    color: white;
}

.carousel-badge.badge-hit {
    background: linear-gradient(135deg, #fed330 0%, #f7b731 100%);
    color: #1a1a1a;
}

.carousel-badge.badge-delivery {
    background: linear-gradient(135deg, #45aaf2 0%, #2e86de 100%);
    color: white;
}

/* Кнопки действий (избранное, сравнение) */
.carousel-product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 3;
}

.carousel-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.carousel-action-btn:hover {
    background: #2549d8;
    color: white;
    transform: scale(1.1);
}

/* Информация о товаре */
.carousel-product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carousel-product-sku {
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 8px;
}

.carousel-product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.carousel-rating-stars {
    display: flex;
    gap: 2px;
}

.carousel-star {
    color: #fed330;
    font-size: 0.875rem;
}

.carousel-star.empty {
    color: #ddd;
}

.carousel-rating-text {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.carousel-product-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6rem; /* 2 строки по 1.4 line-height */
    max-height: 2.6rem;
}

/* Статус наличия */
.carousel-product-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: #26de81;
    margin-bottom: 12px;
}

.carousel-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #26de81;
}

/* Цена */
.carousel-product-price {
    margin-bottom: 16px;
}

.carousel-price-wrapper {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.carousel-current-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
}

.carousel-old-price {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
}

.carousel-discount-percent {
    padding: 4px 8px;
    background: #ffe8e8;
    color: #ff4757;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Кнопка "В корзину" */
.carousel-add-to-cart {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #2549d8 0%, #1e3cb8 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.carousel-add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 73, 216, 0.3);
}

.carousel-add-to-cart:active {
    transform: translateY(0);
}

/* Навигация Swiper */
.swiper-button-next,
.swiper-button-prev {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
    font-weight: 700;
    color: #2549d8;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: #2549d8;
    box-shadow: 0 6px 16px rgba(37, 73, 216, 0.3);
}

.swiper-button-next:hover:after,
.swiper-button-prev:hover:after {
    color: white;
}

/* Пагинация Swiper */
.swiper-pagination {
    bottom: 20px !important;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ddd;
    opacity: 1;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: #2549d8;
    width: 32px;
    border-radius: 5px;
}

/* Адаптивность */
@media (max-width: 991px) {
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 575px) {
    .products-carousel-section {
        padding: 40px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .carousel-product-title {
        font-size: 0.875rem;
    }
    
    .carousel-current-price {
        font-size: 1.25rem;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 16px;
    }
}

