/* ==== POPULAR PRODUCTS CAROUSEL ==== */

.popular-products-section {
    padding: 60px 0;
    background: #fff;
}

.popular-products-section .container {
    padding: 0;
}

.products-section .popular-products-section {
    margin-top: 0;
    background-color: transparent;
}

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

.section-title {
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 400;
    color: var(--color-heading);
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.carousel-controls {
    display: flex;
    gap: 10px;
}

.carousel-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.carousel-btn:hover svg circle {
    stroke: var(--color-hover);
}

.carousel-btn:hover svg path {
    stroke: var(--color-hover);
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover svg circle,
.carousel-btn:disabled:hover svg path {
    stroke: #E5E5E5;
}

/* ПРОСТОЕ И НАДЁЖНОЕ РЕШЕНИЕ КАРУСЕЛИ */
.popular-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    /* Настройки устанавливаются через JavaScript */
    transition: transform 0.5s ease;
}

/* ==== PRODUCT CARD ==== */

.product-card {
    /* Размеры устанавливаются через JavaScript */
    background: #fff;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    box-sizing: border-box;
}

.product-card:hover .product-images-container {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-card-price span,
.product-card:hover .characteristic-item span,
.product-card:hover .product-card-title a {
    color: var(--color-hover);
    text-shadow: 0 0 1px var(--color-hover);
}

.product-card:hover .characteristic-item {
    background-color: #e7e5e5;
}

.product-card:hover .characteristic-item img {
    transform: scale(1.1);
    transition: transform 0.9s ease;
}

.product-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-images-container {
    position: relative;
    width: 100%;
    height: 100%;
}

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

.product-image.active {
    opacity: 1;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #e74c3c;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
}

.product-card-content {
    padding: 20px 0;
}

.product-card-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 500;
}

.product-card-title a {
    color: var(--color-heading);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-card-characteristics {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 2px;
    margin-bottom: 15px;
}

.characteristic-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--color-heading);
    width: 100%;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: var(--color-characteristics);
}

.characteristic-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.product-card-price-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.product-card-price {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-card-price .old-price {
    font-size: 14px;
    color: var(--color-price-crossed);
    text-decoration: line-through;
}

.product-card-price .current-price {
    font-size: 20px;
    font-weight: 500;
    color: var(--color-heading);
}

.product-card-aside {
    width: 45%;
}

.product-card-aside a {
    color: var(--color-white);
}

.product-card-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    border-radius: 6px;
    transition: all 0.3s ease;
}

/* Carousel Animation States */
.carousel-track.transitioning {
    transition: transform 0.5s ease;
}

.carousel-track:not(.transitioning) {
    transition: none;
}

/* АДАПТИВНЫЕ СТИЛИ - размеры управляются JavaScript */
@media (max-width: 1200px) {
    .section-title {
        font-size: 28px;
    }

    .characteristic-item {
        padding: 10px 15px;
    }
}

@media (max-width: 1024px) {
    .characteristic-item {
        gap: 5px;
        padding: 5px 10px;
    }
}

@media (max-width: 992px) {}

@media (max-width: 768px) {
    .popular-products-section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 24px;
    }

    .product-card-image {
        height: 200px;
    }

    .product-card-content {
        padding: 15px 0;
    }

    .characteristic-item {
        padding: 5px 10%;
    }
}

@media (max-width: 576px) {
    .product-card-image {
        height: 325px;
    }

    .section-header {
        margin-bottom: 30px;
    }
}

@media (max-width: 430px) {
    .product-card-image {
        height: 270px;
    }
}