.product-slider {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.main-image-container {
    position: relative;
    overflow: hidden;
    background: #f8f8f8;
    margin-bottom: 10px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.main-image {
    display: block;
    height: 400px;
    width: 100%;
    object-fit: contain;
    opacity: 1;
    transition: opacity 0.4s ease;
    cursor: zoom-in;
}

.main-image.fade-out {
    opacity: 0;
}

.main-image.fade-in {
    opacity: 1;
}

.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-overlay.active {
    opacity: 1;
}

.fullscreen-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.fullscreen-overlay.active .fullscreen-image {
    transform: scale(1);
}

.fullscreen-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.fullscreen-close:hover {
    background: rgba(255, 30, 30, 0.7);
    transform: rotate(90deg);
}

/* Navigazione fullscreen */
.fullscreen-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    opacity: 0.7;
    transition: all 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.fullscreen-nav:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
}

.fullscreen-prev {
    left: 20px;
}

.fullscreen-next {
    right: 20px;
}

/* Adattamenti per mobile */
@media (max-width: 768px) {
    .fullscreen-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .fullscreen-nav {
        width: 40px;
        height: 40px;
    }

    .fullscreen-prev {
        left: 10px;
    }

    .fullscreen-next {
        right: 10px;
    }

    .main-image {
        height: 350px;
    }
}

/* Indicatore di caricamento */
.fullscreen-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Stile per le miniature */
.thumbnails-container {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 0;
    max-width: 100%;
    margin: 0 auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.thumbnails-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnails-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.thumbnails-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.thumbnail-item {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.thumbnail-item:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 123, 255, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.thumbnail-item.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3);
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Effetto zoom */
.zoom-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.zoom-lens {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background-color: rgba(220, 220, 220, 0.3);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: none;
    pointer-events: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Controlli slider principale */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0.7;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.slider-nav:hover {
    opacity: 1;
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: 15px;
}

.slider-next {
    right: 15px;
}

/* Indicatore slide */
.slide-indicator {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 20;
}