/* Galerie d'images produit */
.product-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(35px, 1fr)); /* Desktop */
    gap: 6px;
	margin-top: 15px;
    margin-bottom: 15px;
    max-width: 100%;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 1;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail:hover {
    border-color: #FF9900;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
}

.thumbnail.active {
    border-color: #FF9900;
    box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.2);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

/* Mobile : vignettes plus petites */
@media (max-width: 768px) {
    .product-thumbnails {
        grid-template-columns: repeat(auto-fit, minmax(25px, 1fr)); /* 25px sur mobile */
        gap: 5px;
        margin-bottom: 12px;
    }
}

/* Tablettes : taille intermédiaire */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-thumbnails {
        grid-template-columns: repeat(auto-fit, minmax(30px, 1fr)); /* 30px sur tablette */
    }
}

/* Animation de changement d'image */
#main-product-image {
    transition: opacity 0.3s ease;
}

#main-product-image.changing {
    opacity: 0.5;
}

/* Assurer que le conteneur parent ne déborde pas */
.product-image {
    max-width: 100%;
    overflow: visible;
}