/* ============================================
   LIGHTBOX MODERNE - Galerie d'images produit
   ============================================ */

.product-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.product-lightbox.active {
    opacity: 1;
    visibility: visible;
}

/* Overlay sombre */
.product-lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Conteneur principal */
.product-lightbox__content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 140px;
    box-sizing: border-box;
    z-index: 1;
}

/* Bouton fermer */
.product-lightbox__close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.product-lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* Boutons navigation */
.product-lightbox__prev,
.product-lightbox__next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.product-lightbox__prev {
    left: 20px;
}

.product-lightbox__next {
    right: 20px;
}

.product-lightbox__prev:hover,
.product-lightbox__next:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

/* Image principale */
.product-lightbox__main-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: min(90vw, 1400px);
    max-height: calc(100vh - 220px);
    margin-bottom: 20px;
    box-sizing: border-box;
}

.product-lightbox__main-image img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

/* Bande de miniatures */
.product-lightbox__thumbnails {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%;
    overflow-x: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.product-lightbox__thumbnails-track {
    display: flex;
    gap: 10px;
    padding: 5px;
}

.product-lightbox__thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}

.product-lightbox__thumbnail:hover {
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.product-lightbox__thumbnail.active {
    border-color: #21bdd0;
    border-width: 3px;
    box-shadow: 0 0 20px rgba(33, 189, 208, 0.5);
}

.product-lightbox__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-lightbox__prev,
    .product-lightbox__next {
        width: 50px;
        height: 50px;
        font-size: 32px;
    }
    
    .product-lightbox__content {
        padding: 60px 15px 120px;
    }
    
    .product-lightbox__main-image {
        max-width: 95vw;
        max-height: calc(100vh - 200px);
    }
}

@media (max-width: 720px) {
    .product-lightbox__close {
        width: 40px;
        height: 40px;
        font-size: 28px;
        top: 10px;
        right: 10px;
    }
    
    .product-lightbox__prev,
    .product-lightbox__next {
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .product-lightbox__prev {
        left: 10px;
    }
    
    .product-lightbox__next {
        right: 10px;
    }
    
    .product-lightbox__content {
        padding: 50px 10px 100px;
    }
    
    .product-lightbox__main-image {
        max-width: 98vw;
        max-height: calc(100vh - 160px);
    }
    
    .product-lightbox__thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .product-lightbox__thumbnails {
        bottom: 10px;
        max-width: 95%;
    }
}
