body {
    background-color: #f8f9fa;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    padding: 20px;
}

.products-section {
    padding: 15px;
    background-color: #fff;
    margin: 10px auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 1200px;
}

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

.section-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.view-all-btn {
    color: #f68b1e;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.view-all-btn:hover {
    text-decoration: underline;
}

.products-container {
    position: relative;
}

.products-scroll {
    display: flex;
    gap: 12px;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 5px 0;
}

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

/* ========== PRODUCT CARD ========== */
.product-card {
    background: #fff;
    border-radius: 10px;
    padding: 0;
    margin: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

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

/* ========== IMAGE CONTAINER ========== */
.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    overflow: hidden;
    background-color: #f0f0f0;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border-radius: 10px 10px 0 0;
}

.product-image a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    margin: 0;
    padding: 0;
    position: relative;
}

.product-image img {
    width: 100% !important;
    height: 100% !important;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover !important;
    object-position: center center;
    display: block;
    transition: transform 0.3s ease;
    margin: 0;
    padding: 0;
    border-radius: 10px 10px 0 0;
}

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

/* ========== CONTENU DE LA CARTE ========== */
.product-card .test {
    padding: 10px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 13px;
    height: 36px;
    min-height: 36px;
    max-height: 36px;
    overflow: hidden;
    margin-bottom: 6px;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.product-price {
    font-weight: bold;
    color: #f68b1e;
    font-size: 16px;
    margin-top: auto;
}

/* ========== BOUTON FAVORI ========== */
.btn-favori {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
    padding: 0;
}

.btn-favori:hover {
    background: #fff;
    transform: scale(1.1);
}

.btn-favori i {
    font-size: 16px;
    color: #e74c3c;
}

/* ========== CAROUSEL CONTROLS ========== */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background 0.2s;
}

.carousel-control.prev {
    left: -20px;
}

.carousel-control.next {
    right: -20px;
}

.carousel-control:hover {
    background: #f8f9fa;
}

.carousel-control.hidden {
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s linear;
}

/* ========== MODE VOIR PLUS (GRILLE) ========== */
.show-all .products-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    overflow-x: hidden;
    scroll-snap-type: none;
    gap: 15px;
}

.show-all .carousel-control, .show-all .view-all-btn {
    display: none;
}

/* ========== BADGE PROMO ========== */
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4444;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    z-index: 5;
}

/* ========== MEDIA QUERIES ========== */
@media (max-width: 992px) {
    .product-card {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
    }
    .product-image {
        height: 180px;
        min-height: 180px;
        max-height: 180px;
    }
}

@media (max-width: 576px) {
    .product-card {
        width: 160px;
        min-width: 160px;
        max-width: 160px;
    }
    .section-title {
        font-size: 18px;
    }
    .product-image {
        height: 160px;
        min-height: 160px;
        max-height: 160px;
    }
    .product-card .test {
        padding: 8px;
    }
    .product-name {
        font-size: 12px;
        height: 32px;
        min-height: 32px;
        max-height: 32px;
    }
    .products-section {
        padding: 10px;
        margin: 5px auto;
    }
    .products-scroll {
        gap: 10px;
    }
}
