/**
 * Sélecteur de saveurs des packs variables (page produit).
 * Cf. assets/js/variable-pack.js et functions/functions.variable-pack.php.
 * Breakpoint mobile projet : max-width 767px.
 */

.bs_variable_packs {
    --bs-vp-green: #2F6F4F;
    --bs-vp-green-dark: #234F39;
    --bs-vp-grey: #D9DCD9;
    --bs-vp-border: #E4E6E4;
    --bs-vp-bg-soft: #F3F6F3;

    margin: 16px 0 24px;
    font-family: inherit;
}

/* -------------------------------------------------------- Bandeau complet -- */

.bs-vp-complete {
    display: none;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid #BFE0CF;
    border-radius: 16px;
    background: var(--bs-vp-bg-soft);
    color: var(--bs-vp-green-dark);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 15px;
    line-height: 20px;
}

.bs-vp-complete.is-visible {
    display: flex;
    animation: bs-vp-complete-in .2s ease;
}

.bs-vp-complete i {
    color: var(--bs-vp-green);
    font-size: 18px;
}

@keyframes bs-vp-complete-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Pulse + flash (une fois) du bouton « Ajouter au panier » à la complétion. */
.bs-vp-pulse {
    animation: bs-vp-pulse .7s ease-in-out;
}

@keyframes bs-vp-pulse {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.06); background-color: #2F6F4F; }
    70%  { background-color: #2F6F4F; }
    100% { transform: scale(1); }
}

/* ----------------------------------------------------------------- Groupe -- */

.bs-vp-group {
    border: 1px solid var(--bs-vp-border);
    border-radius: 16px;
    padding: 18px 20px 16px;
    margin-bottom: 16px;
}

.bs-vp-group__title {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    margin: 0 0 14px;
    color: #1D1D1D;
}

/* ------------------------------------------------------------------ Cubes -- */

.bs-vp-cubes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.bs-vp-cube {
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 7px;
    padding: 0;
    background: var(--bs-vp-grey);
    cursor: default;
    transition: background-color .15s ease, transform .15s ease;
}

.bs-vp-cube.is-filled {
    background: var(--bs-vp-green);
    cursor: pointer;
}

.bs-vp-cube.is-active {
    background: var(--bs-cream);
    border: 2px solid var(--bs-vp-green);
}

.bs-vp-cube.is-filled:hover {
    transform: scale(1.06);
}

/* -------------------------------------------------------------- Carrousel -- */

.bs-vp-carousel {
    position: relative;
    padding: 0 45px;
}

.bs-vp-lists {
    position: relative;
}

/* Une seule liste (celle du choix actif) est visible à la fois. */
.bs-vp-products {
    list-style: none;
    margin: 0;
    padding: 4px 2px;
    display: none;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
}

.bs-vp-products.is-visible {
    display: flex;
}

.bs-vp-products::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.bs-vp-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    border: 1px solid var(--bs-vp-border);
    border-radius: 50%;
    background: var(--bs-border);
    color: #555;
    font-size: 20px;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Icône Font Awesome centrée par le flex du bouton. */
.bs-vp-arrow i {
    line-height: 1;
    font-size: 14px;
}

.bs-vp-arrow:hover {
    background: var(--bs-vp-bg-soft);
}

.bs-vp-arrow--prev {
    left: 0;
}

.bs-vp-arrow--next {
    right: 0;
}

/* ------------------------------------------------------------ Carte produit -- */
/* Carte en LIGNE : image à gauche, (badge + stepper) à droite ; nom sous la carte. */

.bs-vp-product {
    flex: 0 0 auto;
    width: 200px;
}

.bs-vp-product.bs-vp-hidden {
    display: none;
}

.bs-vp-product__card {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--bs-cream);
    border-radius: 14px;
    padding: 10px 14px;
    background: var(--bs-cream);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.bs-vp-product__card:hover {
    border-color: #000;
}

/* Produit utilisé quelque part dans le pack (compteur global > 0). */
.bs-vp-product.is-selected .bs-vp-product__card {
    border-color: #BFE0CF;
}

/* Produit sélectionné pour le CHOIX ACTIF (mise en évidence forte). */
.bs-vp-product.is-current .bs-vp-product__card {
    border-color: var(--bs-vp-green-dark);
    box-shadow: 0 0 0 1px var(--bs-vp-green-dark) inset;
}

.bs-vp-product__media {
    flex: 0 0 70px;
    width: 70px;
}

.bs-vp-product__media img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.bs-vp-product__info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 0;
}

.bs-vp-product__badge {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 100%;
    color: #1F1F1F;
    text-align: left;
}

.bs-vp-product__title {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 100%;
    color: #1F1F1F;
    margin: 8px 4px 0;
    text-align: left;
}

/* ----------------------------------------------------------- Stepper / + -- */

.bs-vp-product__qty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    height: 34px;
    padding: 0 8px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #FFF;
    transition: border-color .15s ease;
}

.bs-vp-product__card:hover  .bs-vp-product__qty {
    border-color: var(--bs-vp-border);
}

/* À 0 (produit non sélectionné) : pastille avec « + » centré. */
.bs-vp-product:not(.is-selected) .bs-vp-product__qty {
    justify-content: center;
}

.bs-vp-qty__minus,
.bs-vp-qty__plus {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #333;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

.bs-vp-qty__minus:hover,
.bs-vp-qty__plus:hover {
    background: var(--bs-vp-bg-soft);
}

.bs-vp-qty__plus:disabled {
    color: #BBB;
    cursor: not-allowed;
    background: transparent;
}

.bs-vp-qty__value {
    min-width: 18px;
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

/* À 0 (produit non sélectionné) : on n'affiche que le « + ». */
.bs-vp-product:not(.is-selected) .bs-vp-qty__minus,
.bs-vp-product:not(.is-selected) .bs-vp-qty__value {
    display: none;
}

.bs-vp-product:not(.is-selected) .bs-vp-qty__plus{
    width: 100%;
}

/* --------------------------------------------------------------- Recherche -- */

.bs-vp-search {
    position: relative;
    margin-top: 16px;
    padding-top: 14px;
}

.bs-vp-search .bs-vp-search__input {
    width: 100%;
    height: 40px;
    border: 0;
    border-bottom: 1px solid #000000;
    padding: 0 34px 0 4px;
    background: transparent;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #1F1F1F;
    box-shadow: none;
}

.bs-vp-search .bs-vp-search__input:focus {
    background: transparent;
}

.bs-vp-search__icon {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    pointer-events: none;
}

.bs-vp-search__icon svg {
    display: block;
    width: 20px;
    height: 20px;
}

/* ------------------------------------------- Bouton ajout panier incomplet -- */

.single_add_to_cart_button.bs-vp-incomplete {
    opacity: .55;
    cursor: not-allowed;
}

/* ------------------------------------------------------------- Mobile 767 -- */

@media (max-width: 767px) {

    .bs-vp-group {
        padding: 14px 12px 12px;
        border-radius: 14px;
    }

    .bs-vp-carousel {
        padding: 0 30px;
    }

    .bs-vp-arrow {
        width: 28px;
        height: 28px;
        font-size: 17px;
    }

    .bs-vp-product {
        width: 210px;
    }

    .bs-vp-cube {
        width: 22px;
        height: 22px;
        border-radius: 6px;
    }
}
