/* Colonne de droite (bloc bons plans + listing) : autoriser le flex item à
   rétrécir pour qu'il reste à droite de la left-column au lieu de passer dessous. */
.divioseo-catdeals-col {
    min-width: 0;
}

.divioseo-catdeals {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #fbfbfb;
}

.divioseo-catdeals__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.divioseo-catdeals__title {
    margin: 0;
    font-size: 15px !important;
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-style: normal;
    line-height: 22px;
    text-transform: uppercase;
    color: var(--color-secondary) !important;
}

/* Flèches de navigation : masquées tant qu'il n'y a pas de débordement
   (ajout de la classe has-overflow par le JS du module). */
.divioseo-catdeals__nav {
    display: none;
    flex: 0 0 auto;
    gap: 0.5rem;
}

.divioseo-catdeals.has-overflow .divioseo-catdeals__nav {
    display: flex;
}

.divioseo-catdeals__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    background: #fff;
    color: var(--color-secondary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.divioseo-catdeals__arrow:hover:not(:disabled) {
    background: var(--color-secondary);
    color: #fff;
}

.divioseo-catdeals__arrow:disabled {
    opacity: 0.4;
    cursor: default;
}

/* Slider CSS (scroll-snap) : 4 produits visibles, défilement piloté par les
   flèches. Aucun style inline. */
.divioseo-catdeals__carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    /* Scrollbar masquée : la navigation se fait aux flèches. */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.divioseo-catdeals__carousel::-webkit-scrollbar {
    display: none;
}

.divioseo-catdeals__item {
    /* 4 visibles : 4 colonnes + 3 gouttières de 16px */
    flex: 0 0 calc((100% - 3 * 16px) / 4);
    scroll-snap-align: start;
}

.divioseo-catdeals__item .product-miniature {
    width: 100%;
    height: 100%;
    margin: 0;
}

/* Mobile : 2 produits visibles */
@media (max-width: 767.98px) {
    .divioseo-catdeals__item {
        flex-basis: calc((100% - 16px) / 2);
    }
}
