.modal-content {
    border-radius: 16px;
    border: none;
}
.thumbnail {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0; /* Empêche le rétrécissement des miniatures */
}
.thumbnail:hover, .thumbnail.active {
    transform: scale(1.05);
    border-color: #0d6efd !important;
}
.cursor-pointer {
    cursor: pointer;
}
.product-gallery-vertical {
    height: 400px;
    position: relative;
}
.gallery-thumbnails-vertical {
    height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.gallery-thumbnails-vertical::-webkit-scrollbar {
    width: 4px;
}
.gallery-thumbnails-vertical::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 2px;
}

/* Styles pour la galerie horizontale (mobile) */
.product-gallery-horizontal {
    position: relative;
    align-items: center;
}
.gallery-thumbnails-horizontal {
    overflow-x: auto;
    scrollbar-width: thin;
    padding: 5px 0;
}
.gallery-thumbnails-horizontal::-webkit-scrollbar {
    height: 4px;
}
.gallery-thumbnails-horizontal::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 2px;
}
.gallery-nav {
    position: relative;
    z-index: 10;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.gallery-nav-up {
    top: -15px;
}
.gallery-nav-down {
    bottom: -15px;
}
.gallery-nav-left, .gallery-nav-right {
    position: static;
    transform: none;
}

/* Ajustements pour mobile */
@media (max-width: 767.98px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    .modal-content {
        border-radius: 12px;
    }
    .gallery-thumbnails-horizontal {
        max-width: 250px;
    }
    .thumbnail img {
        width: 60px;
        height: 60px;
        object-fit: cover;
    }
}

.quantity-input-group {
    width: auto;
}
.quantity-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: #dee2e6;
}
.quantity-input {
    height: 38px;
    border-left: none;
    border-right: none;
    padding: 0;
    font-weight: 500;
}
.quantity-input:focus {
    box-shadow: none;
    border-color: #dee2e6;
}