/* BoostPanier - styles carrousel.
   Pensé pour coexister avec les thèmes Classic (PS 8) et Hummingbird (PS 9).
   Ne redéfinit pas les couleurs/typos du thème : on hérite. */

.bp-carousel {
    margin: 1.5rem 0;
    --bp-cols: 4;
    --bp-gap: 1rem;
}

.bp-carousel__title {
    font-size: 1.25rem;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.bp-carousel__wrapper {
    position: relative;
    display: flex;
    align-items: stretch;
}

.bp-carousel__viewport {
    overflow: hidden;
    flex: 1 1 auto;
    width: 100%;
}

.bp-carousel__track {
    display: flex;
    gap: var(--bp-gap);
    list-style: none;
    margin: 0;
    padding: 0;
    transition: transform 350ms ease;
    will-change: transform;
}

.bp-carousel__slide {
    flex: 0 0 calc((100% - (var(--bp-cols) - 1) * var(--bp-gap)) / var(--bp-cols));
    box-sizing: border-box;
    min-width: 0;
}

.bp-carousel__nav {
    flex: 0 0 auto;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
    color: inherit;
    padding: 0;
    margin: 0 0.25rem;
    transition: background 150ms ease, border-color 150ms ease;
}

.bp-carousel__nav:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.35);
}

.bp-carousel__nav[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
}

.bp-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.bp-carousel__dots button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: background 150ms ease, transform 150ms ease;
}

.bp-carousel__dots button.is-active {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.3);
}

/* Carte produit */
.bp-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    padding: 0.75rem;
    transition: box-shadow 150ms ease, border-color 150ms ease;
}

.bp-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

.bp-card__media {
    display: block;
    line-height: 0;
    margin-bottom: 0.5rem;
}

.bp-card__media img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.bp-card__title {
    font-size: 0.9rem;
    margin: 0 0 0.35rem 0;
    line-height: 1.3;
    min-height: 2.4em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bp-card__title a {
    color: inherit;
    text-decoration: none;
}

.bp-card__title a:hover {
    text-decoration: underline;
}

.bp-card__price {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.bp-card__stock {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.bp-card__stock--in  { color: #2e7d32; }
.bp-card__stock--out { color: #c62828; }

.bp-card__actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
}

.bp-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.75rem;
    border: 0;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 150ms ease;
    width: 100%;
    text-align: center;
}

.bp-card__btn--add {
    background: #215A22;
    color: #fff;
}

.bp-card__btn--quickview {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.35);
}

.bp-card__btn--view {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.35);
}

.bp-card__btn:hover {
    opacity: 0.9;
}

.bp-card__btn .material-icons {
    font-size: 1.05rem;
}

.bp-add-to-cart-form {
    margin: 0;
}

/* Breakpoints */
@media (max-width: 1199px) {
    .bp-carousel { --bp-cols: var(--bp-cols-tablet, 3); }
}
@media (max-width: 767px) {
    .bp-carousel { --bp-cols: var(--bp-cols-mobile, 1); }
}
@media (min-width: 1200px) {
    .bp-carousel { --bp-cols: var(--bp-cols-desktop, 4); }
}

/* Popup d'ajout au panier (hook displayCartModalFooter)
 * - Classic : le hook est rendu dans .modal-content, hors .modal-body →
 *   pleine largeur native. On ajoute juste un séparateur + du padding horizontal
 *   (le .modal-body a 1rem de padding, on s'aligne pour la cohérence).
 * - Hummingbird : le hook est dans .modal-footer qui est en flex ; on force
 *   notre wrapper à prendre toute la ligne (flex-basis:100%).
 */
#blockcart-modal .modal-content > .bp-carousel,
#blockcart-modal .modal-footer .bp-carousel,
.blockcart-modal .modal-footer .bp-carousel {
    flex-basis: 100%;
    width: 100%;
    margin: 0;
    padding: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

#blockcart-modal .modal-footer,
.blockcart-modal .modal-footer {
    flex-wrap: wrap;
}

.modal .bp-carousel__title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
