
/* Основная секция */
.popular-products-section {
    padding: 60px 0;
    background: white;
}

.popular-products-container {
    max-width: 1248px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #00a085, #00b7b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 400;
}

/* Контейнер для прокрутки товаров */
.products-scroll-container {
    position: relative;
    margin-bottom: 40px;
}

.products-wrapper {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0 20px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.products-wrapper::-webkit-scrollbar {
    display: none;
}

/* Компактная карточка товара */
.product-card {
    min-width: 245px;  /* Вместо 280px */
    max-width: 245px;  /* Вместо 280px */
    flex: 0 0 245px;   /* Добавьте эту строку */
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 184, 148, 0.1);
    flex-shrink: 0;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.15);
    border-color: #00b894;
}

/* Ссылка карточки */
.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* Контейнер изображения с фиксированной высотой */
.product-image-container {
    position: relative;
    height: 200px;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

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

/* Информация о товаре */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 160px;
}

.product-content {
    flex: 1;
    margin-bottom: 15px;
}

.product-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #00b894;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #00b894, #00cec9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-description {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Футер карточки с ценой */
.product-footer {
    margin-top: auto;
}

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

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(90deg, #00a085, #00b7b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Навигационные кнопки */
.scroll-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 2;
}

.scroll-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    border: 2px solid #00b894;
    color: #00b894;
    font-size: 1.2rem;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-btn:hover {
    background: #00b894;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 184, 148, 0.3);
}

.scroll-btn:active {
    transform: scale(0.95);
}

#scrollLeft {
    margin-left: -22px;
}

#scrollRight {
    margin-right: -22px;
}

/* Кнопка каталога */
.catalog-button-container {
    text-align: center;
}


/* Адаптивность для планшетов */
@media (max-width: 768px) {
    .popular-products-section {
        padding: 40px 0;
    }

    .popular-products-container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .products-wrapper {
        gap: 15px;
        padding: 10px 0 15px 0;
    }

    .product-card {
        min-width: 220px;  /* Вместо 250px */
        max-width: 220px;
    }

    .product-image-container {
        height: 180px;
    }

    .product-info {
        padding: 15px;
        height: 140px;
    }

    .product-title {
        font-size: 1rem;
    }

    .product-description {
        font-size: 0.8rem;
    }

    .current-price {
        font-size: 1.1rem;
    }

    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    #scrollLeft {
        margin-left: -20px;
    }

    #scrollRight {
        margin-right: -20px;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 480px) {
    .popular-products-section {
        padding: 30px 0;
    }

    .popular-products-container {
        padding: 0 10px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 25px;
    }

    .products-wrapper {
        gap: 12px;
        padding: 5px 0 10px 0;
    }

    .product-card {
        min-width: 200px;  /* Вместо 220px */
        max-width: 200px;
    }

    .product-image-container {
        height: 160px;
    }

    .product-info {
        padding: 12px;
        height: 120px;
    }

    .product-category {
        font-size: 0.7rem;
        margin-bottom: 6px;
    }

    .product-title {
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    .product-description {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
    }

    .current-price {
        font-size: 1rem;
    }

    .scroll-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        border-width: 1px;
    }

    #scrollLeft {
        margin-left: -17px;
    }

    #scrollRight {
        margin-right: -17px;
    }

    .catalog-button {
        padding: 12px 25px;
        font-size: 0.9rem;
        gap: 8px;
    }

    .catalog-button i {
        font-size: 1rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 320px) {
    .product-card {
        min-width: 200px;
        max-width: 200px;
    }

    .product-image-container {
        height: 140px;
    }

    .product-info {
        padding: 10px;
        height: 100px;
    }

    .scroll-btn {
        display: none;
    }
}
