/* =========================================================
   FICHE PRODUIT
   Galerie photos
   ========================================================= */

.product-gallery {
    width: 100%;
}

.fclb_product_gallery {
    --fclb-gallery-thumb-size: 76px;
    --fclb-gallery-gap: 1rem;

    display: grid;
    grid-template-columns: var(--fclb-gallery-thumb-size) minmax(0, 1fr);
    grid-template-areas: "thumbs main";
    gap: var(--fclb-gallery-gap);
    width: 100%;
    min-width: 0;
}

.fclb_product_gallery--single {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main";
}

.fclb_product_gallery_main {
    grid-area: main;
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.fclb_product_gallery_slide {
    display: none;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--couleur-bordure);
    border-radius: 18px;
    background: var(--couleur-fond-bloc);
}

.fclb_product_gallery_slide.active {
    display: flex;
}

.fclb_product_gallery_image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 640px;
    margin: 0 auto;
    object-fit: contain;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
}

.fclb_product_gallery_image:focus-visible {
    outline: 3px solid var(--couleur-principale);
    outline-offset: -3px;
}

.fclb_product_gallery_thumbs {
    grid-area: thumbs;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    width: var(--fclb-gallery-thumb-size);
    min-width: 0;
    margin: 0;
    padding: 0;
}

.fclb_product_gallery_thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--fclb-gallery-thumb-size);
    aspect-ratio: 1 / 1;
    flex: 0 0 auto;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 12px;
    background: var(--couleur-fond-bloc);
    box-shadow: inset 0 0 0 1px var(--couleur-bordure);
    text-decoration: none;
    opacity: .72;
    transition: border-color .2s ease, opacity .2s ease, transform .2s ease;
}

.fclb_product_gallery_thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fclb_product_gallery_thumb:hover,
.fclb_product_gallery_thumb:focus {
    opacity: 1;
    transform: translateY(-1px);
}

.fclb_product_gallery_thumb.active {
    border-color: var(--couleur-principale);
    box-shadow: none;
    opacity: 1;
}


/* =========================================================
   FICHE PRODUIT
   Lightbox galerie
   ========================================================= */

body.fclb_gallery_lightbox_open {
    overflow: hidden;
}

.fclb_gallery_lightbox[hidden] {
    display: none !important;
}

.fclb_gallery_lightbox {
    position: fixed;
    inset: 0;
    z-index: 1090;

    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;

    width: 100%;
    height: 100dvh;
    min-height: 100vh;

    background: rgba(12, 20, 19, .96);
    color: #fff;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition: opacity .16s ease, visibility .16s ease;
}

.fclb_gallery_lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fclb_gallery_lightbox_toolbar {
    position: relative;
    z-index: 3;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;

    min-height: 68px;
    padding: .75rem 1rem;
}

.fclb_gallery_lightbox_counter {
    min-width: 4rem;
    font-size: .9rem;
    font-weight: 600;
    line-height: 1;
    opacity: .85;
}

.fclb_gallery_lightbox_actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.fclb_gallery_lightbox_action,
.fclb_gallery_lightbox_nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    border: 1px solid rgba(255, 255, 255, .22);

    background: rgba(255, 255, 255, .08);
    color: #fff;

    cursor: pointer;
    user-select: none;

    transition: background .18s ease, border-color .18s ease, opacity .18s ease,
                transform .18s ease;
}

.fclb_gallery_lightbox_action {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 1.45rem;
    line-height: 1;
}

.fclb_gallery_lightbox_close {
    margin-left: .25rem;
    font-size: 1.8rem;
    font-weight: 300;
}

.fclb_gallery_lightbox_action:hover,
.fclb_gallery_lightbox_action:focus-visible,
.fclb_gallery_lightbox_nav:hover,
.fclb_gallery_lightbox_nav:focus-visible {
    border-color: rgba(255, 255, 255, .45);
    background: rgba(255, 255, 255, .16);
    color: #fff;
    outline: 0;
}

.fclb_gallery_lightbox_action:active,
.fclb_gallery_lightbox_nav:active {
    transform: scale(.96);
}

.fclb_gallery_lightbox_action:disabled {
    opacity: .32;
    cursor: default;
}

.fclb_gallery_lightbox_stage {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) 68px;
    align-items: center;

    min-width: 0;
    min-height: 0;
    overflow: hidden;

    touch-action: none;
}

.fclb_gallery_lightbox_prev {
    grid-column: 1;
    grid-row: 1;
}

.fclb_gallery_lightbox_image_wrap {
    grid-column: 2;
    grid-row: 1;
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    overflow: hidden;

    cursor: zoom-out;
}

.fclb_gallery_lightbox_image_wrap.is-zoomed {
    cursor: grab;
}

.fclb_gallery_lightbox_image_wrap.is-zoomed:active {
    cursor: grabbing;
}

.fclb_gallery_lightbox_image {
    display: block;

    width: auto;
    height: auto;
    max-width: calc(100vw - 170px);
    max-height: calc(100dvh - 145px);

    object-fit: contain;

    transform-origin: center center;
    will-change: transform;

    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;
}

.fclb_gallery_lightbox_next {
    grid-column: 3;
    grid-row: 1;
}

.fclb_gallery_lightbox_nav {
    position: relative;
    z-index: 2;

    width: 48px;
    height: 48px;
    margin: auto;

    border-radius: 50%;

    font-family: Arial, sans-serif;
    font-size: 2.3rem;
    font-weight: 300;
    line-height: 1;
}

.fclb_gallery_lightbox_hint {
    position: relative;
    z-index: 2;

    min-height: 42px;
    padding: .55rem 1rem .8rem;

    font-size: .78rem;
    line-height: 1.3;
    text-align: center;

    opacity: .62;
}


/* =========================================================
   RESPONSIVE GALERIE
   ========================================================= */

@media (max-width: 991.98px) {
    .fclb_product_gallery {
        --fclb-gallery-thumb-size: 68px;
    }

    .fclb_product_gallery_image {
        max-height: 560px;
    }
}

@media (max-width: 767.98px) {
    .fclb_product_gallery {
        --fclb-gallery-thumb-size: 62px;
        --fclb-gallery-gap: .75rem;

        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "main"
            "thumbs";
    }

    .fclb_product_gallery_slide {
        border-radius: 14px;
    }

    .fclb_product_gallery_image {
        max-height: none;
    }

    .fclb_product_gallery_thumbs {
        width: 100%;
        flex-direction: row;
        gap: .55rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding: .1rem 0 .35rem;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }

    .fclb_product_gallery_thumb {
        scroll-snap-align: start;
        border-radius: 10px;
    }

    .fclb_gallery_lightbox_toolbar {
        min-height: 58px;
        padding: .55rem .65rem;
    }

    .fclb_gallery_lightbox_action {
        width: 38px;
        height: 38px;
        font-size: 1.3rem;
    }

    .fclb_gallery_lightbox_close {
        font-size: 1.65rem;
    }

    .fclb_gallery_lightbox_stage {
        grid-template-columns: 46px minmax(0, 1fr) 46px;
    }

    .fclb_gallery_lightbox_nav {
        width: 38px;
        height: 38px;
        font-size: 1.9rem;
        border-color: rgba(255, 255, 255, .16);
        background: rgba(0, 0, 0, .18);
    }

    .fclb_gallery_lightbox_image {
        max-width: calc(100vw - 24px);
        max-height: calc(100dvh - 122px);
    }

    .fclb_gallery_lightbox_hint {
        min-height: 36px;
        padding: .4rem .75rem .65rem;
        font-size: .7rem;
    }
}

@media (max-width: 479.98px) {
    .fclb_gallery_lightbox_zoom_in,
    .fclb_gallery_lightbox_zoom_out {
        display: none;
    }

    .fclb_gallery_lightbox_stage {
        grid-template-columns: 40px minmax(0, 1fr) 40px;
    }

    .fclb_gallery_lightbox_nav {
        width: 34px;
        height: 34px;
        font-size: 1.75rem;
    }

    .fclb_gallery_lightbox_counter {
        min-width: 3rem;
        font-size: .8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fclb_gallery_lightbox,
    .fclb_gallery_lightbox_action,
    .fclb_gallery_lightbox_nav,
    .fclb_product_gallery_thumb {
        transition: none;
    }
}

/* =========================================================
   FICHE PRODUIT - PRIX
   ========================================================= */

.fclb_product_price {
    margin-bottom: 1.25rem;
}

.fclb_product_price_from {
    display: block;
    margin-bottom: .15rem;
    color: var(--couleur-texte-secondaire);
    font-size: .95rem;
    line-height: 1.3;
}

.fclb_product_price_line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .4rem .7rem;
}

.fclb_product_price_value {
    color: var(--couleur-accent);
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.1;
}

.fclb_product_price_unit {
    color: var(--couleur-texte-secondaire);
    font-size: .9rem;
}

.fclb_product_price_old {
    color: var(--couleur-texte-secondaire);
    font-size: 1.15rem;
}

.fclb_product_price_badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: .2rem .65rem;

    border-radius: 999px;

    background: var(--couleur-accent-doux);
    color: var(--couleur-accent);

    font-size: .78rem;
    font-weight: 700;
}

/* =========================================================
   FICHE PRODUIT - CHOIX
   Variantes et options
   ========================================================= */

.fclb_product_choice {
    margin-bottom: 1.4rem;
}

.fclb_product_choice_title {
    margin-bottom: .65rem;
    color: var(--couleur-texte);
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.3;
}

.fclb_product_choice_select {
    min-height: 48px;
    border: 1px solid var(--couleur-bordure);
    border-radius: 10px;
    background-color: var(--couleur-fond-bloc);
    color: var(--couleur-texte);
    box-shadow: none;
}

.fclb_product_choice_select:focus {
    border-color: var(--couleur-principale);
    box-shadow: 0 0 0 3px var(--couleur-accent-doux);
}

.fclb_product_choice_list {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
}

.fclb_product_choice_label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;

    min-height: 44px;
    padding: .65rem 1rem;

    border: 1px solid var(--couleur-bordure);
    border-radius: 10px;

    background: var(--couleur-fond-bloc);
    color: var(--couleur-texte);

    font-size: .9rem;
    font-weight: 600;
    line-height: 1.2;

    cursor: pointer;

    transition:
            border-color .18s ease,
            background .18s ease,
            color .18s ease;
}

.fclb_product_choice_label:hover {
    border-color: var(--couleur-principale);
}

.fclb_product_choice_input:checked + .fclb_product_choice_label {
    border-color: var(--couleur-principale);
    background: var(--couleur-accent-doux);
    color: var(--couleur-principale-foncee);
}

.fclb_product_choice_input:disabled + .fclb_product_choice_label {
    opacity: .45;
    cursor: not-allowed;
}

.fclb_product_choice_price {
    color: var(--couleur-texte-secondaire);
    font-size: .85em;
    font-weight: 500;
}

/* =========================================================
   FICHE PRODUIT - AJOUT AU PANIER
   ========================================================= */

.fclb_product_add {
    display: flex;
    align-items: stretch;
    gap: .75rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

.fclb_product_quantity {
    flex: 0 0 90px;
    width: 90px;
    min-height: 52px;

    border: 1px solid var(--couleur-bordure);
    border-radius: 12px;

    background: var(--couleur-fond-bloc);
    color: var(--couleur-texte);

    font-size: 1rem;
    font-weight: 600;
    text-align: center;

    box-shadow: none;
}

.fclb_product_quantity:focus {
    border-color: var(--couleur-accent);
    box-shadow: 0 0 0 3px var(--couleur-accent-doux);
}

.fclb_product_add_button {
    flex: 1 1 auto;

    min-height: 52px;
    padding: .75rem 1.4rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .65rem;

    border: 1px solid var(--couleur-accent);
    border-radius: 12px;

    background: var(--couleur-accent);
    color: var(--couleur-texte-accent);

    font-size: 1rem;
    font-weight: 700;

    transition: filter .18s ease, transform .18s ease;
}

.fclb_product_add_button svg {
    width: 21px;
    height: 21px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fclb_product_add_button:hover,
.fclb_product_add_button:focus {
    background: var(--couleur-accent);
    border-color: var(--couleur-accent);
    color: var(--couleur-texte-accent);
    filter: brightness(.92);
}

.fclb_product_add_button:active {
    transform: translateY(1px);
}

@media (max-width: 479.98px) {
    .fclb_product_add {
        gap: .5rem;
    }

    .fclb_product_quantity {
        flex-basis: 76px;
        width: 76px;
    }

    .fclb_product_add_button {
        padding-left: .8rem;
        padding-right: .8rem;
    }
}