/* Findzle Search - Galerie produit */

.fzl-v2-gallery {
    min-width: 0;
}

.fzl-v2-gallery__main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    overflow: hidden;
}

.fzl-v2-gallery__image-button {
    display: flex;
    width: 100%;
    height: 100%;
    min-height: 360px;
    padding: 0;
    border: 0;
    background: transparent;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.fzl-v2-gallery__image-button img,
.fzl-v2-gallery__main > img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: contain;
    user-select: none;
}

.fzl-v2-gallery__arrow,
.fzl-v2-lightbox__arrow {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 999px;
    background: rgba(17,24,39,.72);
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}

.fzl-v2-gallery__arrow:hover,
.fzl-v2-lightbox__arrow:hover {
    transform: scale(1.07);
    background: rgba(17,24,39,.9);
}

.fzl-v2-gallery__arrow--prev {
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.fzl-v2-gallery__arrow--prev:hover {
    transform: translateY(-50%) scale(1.07);
}

.fzl-v2-gallery__arrow--next {
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.fzl-v2-gallery__arrow--next:hover {
    transform: translateY(-50%) scale(1.07);
}

.fzl-v2-gallery__counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(17,24,39,.72);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.fzl-v2-gallery__thumbs,
.fzl-v2-lightbox__thumbs {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding: 10px 2px 4px;
    scrollbar-width: thin;
}

.fzl-v2-gallery__thumbs button,
.fzl-v2-lightbox__thumbs button {
    flex: 0 0 70px;
    width: 70px;
    height: 70px;
    padding: 3px;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 9px;
    background: var(--fzl-surface, #fff);
    cursor: pointer;
    opacity: .72;
    transition: opacity .15s ease, border-color .15s ease, transform .15s ease;
}

.fzl-v2-gallery__thumbs button:hover,
.fzl-v2-lightbox__thumbs button:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.fzl-v2-gallery__thumbs button.is-active,
.fzl-v2-lightbox__thumbs button.is-active {
    opacity: 1;
    border-color: var(--fzl-primary, #2563eb);
}

.fzl-v2-gallery__thumbs img,
.fzl-v2-lightbox__thumbs img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
}

/* Lightbox */
body.fzl-v2-lightbox-open {
    overflow: hidden;
}

.fzl-v2-lightbox[hidden] {
    display: none !important;
}

.fzl-v2-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.fzl-v2-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.84);
    backdrop-filter: blur(3px);
}

.fzl-v2-lightbox__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1180px, 96vw);
    max-height: 94vh;
    padding: 18px;
    border-radius: 16px;
    background: #111827;
    box-shadow: 0 24px 80px rgba(0,0,0,.45);
}

.fzl-v2-lightbox__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 8;
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 999px;
    background: rgba(0,0,0,.58);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.fzl-v2-lightbox__stage {
    position: relative;
    display: flex;
    min-height: min(70vh, 720px);
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    background: #05070b;
}

.fzl-v2-lightbox__zoom {
    position: relative;
    display: flex;
    width: 100%;
    height: min(70vh, 720px);
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
}

.fzl-v2-lightbox__zoom.is-zoomed {
    cursor: zoom-out;
}

.fzl-v2-lightbox__zoom img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1);
    transform-origin: 50% 50%;
    transition: transform .16s ease;
    user-select: none;
    pointer-events: none;
}

.fzl-v2-lightbox__zoom.is-zoomed img {
    transform: scale(2.35);
    transition: transform .08s ease;
}

.fzl-v2-lightbox__arrow--prev {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.fzl-v2-lightbox__arrow--prev:hover {
    transform: translateY(-50%) scale(1.07);
}

.fzl-v2-lightbox__arrow--next {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.fzl-v2-lightbox__arrow--next:hover {
    transform: translateY(-50%) scale(1.07);
}

.fzl-v2-lightbox__counter {
    position: absolute;
    right: 16px;
    bottom: 14px;
    z-index: 4;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(0,0,0,.66);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.fzl-v2-lightbox__thumbs {
    padding-top: 14px;
}

.fzl-v2-lightbox__thumbs button {
    flex-basis: 78px;
    width: 78px;
    height: 78px;
    background: #fff;
}

@media (max-width: 767px) {
    .fzl-v2-gallery__main,
    .fzl-v2-gallery__image-button {
        min-height: 280px;
    }

    .fzl-v2-gallery__arrow,
    .fzl-v2-lightbox__arrow {
        width: 38px;
        height: 38px;
        font-size: 27px;
    }

    .fzl-v2-gallery__thumbs button {
        flex-basis: 60px;
        width: 60px;
        height: 60px;
    }

    .fzl-v2-lightbox {
        padding: 8px;
    }

    .fzl-v2-lightbox__dialog {
        width: 100%;
        max-height: 98vh;
        padding: 10px;
    }

    .fzl-v2-lightbox__stage,
    .fzl-v2-lightbox__zoom {
        height: 72vh;
        min-height: 0;
    }

    .fzl-v2-lightbox__thumbs button {
        flex-basis: 64px;
        width: 64px;
        height: 64px;
    }
}
