/* ============================================
   2MFBY — Product Gallery + Lightbox
   Galerie 3 photos + zoom lightbox
   ============================================ */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PRODUCT GALLERY — Grille 1 grande + 2 petites
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.product-gallery {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    grid-template-rows: 200px 200px;
    gap: 8px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: var(--space-8);
    cursor: pointer;
}

.product-gallery__main {
    grid-row: 1 / 3;
    position: relative;
    overflow: hidden;
}

.product-gallery__thumb {
    position: relative;
    overflow: hidden;
}

.product-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.3s ease;
    filter: brightness(0.88);
}

.product-gallery__main:hover .product-gallery__img,
.product-gallery__thumb:hover .product-gallery__img {
    transform: scale(1.05);
    filter: brightness(1);
}

/* Overlay "Voir toutes les photos" sur la dernière miniature */
.product-gallery__thumb--last::after {
    content: '📸 Voir les photos';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.03em;
    backdrop-filter: blur(2px);
    transition: background 0.2s;
}

.product-gallery__thumb--last:hover::after {
    background: rgba(200, 137, 110, 0.55);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LIGHTBOX
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    animation: lb-fadeIn 0.2s ease;
}

#lightbox.is-open {
    display: flex;
}

@keyframes lb-fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.lightbox__inner {
    position: relative;
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    gap: 24px;
}

.lightbox__img {
    max-width: 80vw;
    max-height: 82vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8);
    animation: lb-zoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lb-zoomIn {
    from {
        transform: scale(0.93);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

.lightbox__close {
    position: fixed;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1;
}

.lightbox__close:hover {
    background: rgba(200, 137, 110, 0.35);
}

.lightbox__nav {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    user-select: none;
}

.lightbox__nav:hover {
    background: rgba(200, 137, 110, 0.3);
    color: #fff;
}

.lightbox__caption {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 16px;
    border-radius: 20px;
    white-space: nowrap;
    backdrop-filter: blur(6px);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   GALLERY WIDGET — Mini strip dans booking widget
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.widget-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: var(--space-4);
    border-radius: 10px;
    overflow: hidden;
}

.widget-gallery__img {
    width: 100%;
    height: 62px;
    object-fit: cover;
    display: block;
    transition: filter 0.2s;
    filter: brightness(0.82);
}

.widget-gallery__img:hover {
    filter: brightness(1);
    cursor: pointer;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 768px) {
    .product-gallery {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 160px 130px;
    }

    .product-gallery__main {
        grid-column: 1 / 3;
        grid-row: 1 / 2;
    }

    .lightbox__img {
        max-width: 95vw;
        max-height: 70vh;
    }

    .lightbox__nav {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .lightbox__inner {
        gap: 12px;
    }
}