/* ============================================================
   PRODUCT GALLERY - Stili estratti da style.css
   ============================================================ */

/* PRODUCT PAGE - Base */
.gallery-item {
    position: relative;
    background: #fff;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

/* Loader dots */
.loader-dots {
    position: absolute;
    display: flex;
    gap: 8px;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.loader-dots span {
    width: 12px;
    height: 12px;
    background: #333;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loader-dots span:nth-child(1) { animation-delay: -0.32s; }
.loader-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Lazy load immagini gallery */
.lazy-gallery {
    opacity: 0;
    transition: opacity 0.3s ease;
    width: 100%;
    display: block;
}

/* Layout prodotto */
.product-main-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Summary / sidebar prodotto */
.entry-summary {
    opacity: 1;
    transition: opacity 0.25s ease-in-out;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
    float: none !important;
    width: unset !important;
}

/* Lista gallery */
ul.product-gallery {
    list-style: none;
    padding: 0px;
}

ul.product-gallery li img {
    width: 100%;
    border-radius: 5px;
}

/* Controlli gallery (nascosti di default su desktop) */
.gallery-controls {
    display: none;
}

/* Video container */
.video-container-box {
    width: 100%;
    height: 100%;
}

.video-container-box video {
    width: 100%;
    height: 100%;
    position: absolute;
    object-fit: cover;
    z-index: 0;
}

/* ============================================================
   Desktop (min-width: 980px)
   ============================================================ */
@media (min-width: 980px) {

}

/* ============================================================
   Desktop large (min-width: 1030px)
   ============================================================ */
@media (min-width: 1030px) {

    .product-main-container {
        display: grid;
        grid-template-columns: 70% 30%;
    }
}

/* ============================================================
   Mobile (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* Summary sidebar su mobile */
    .entry-summary {
        padding: 0px;
        display: block;
        position: static;
        width: 100% !important;
        height: auto;
    }

    /* Wrapper gallery */
    .gallery-wrapper {
        position: relative;
        width: 100%;
        overflow: hidden;
        margin-bottom: 20px;
    }

    /* Scroll orizzontale */
    .product-gallery {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        gap: 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        margin-bottom: 5px;
    }

    .product-gallery::-webkit-scrollbar {
        display: none;
    }

    /* Singolo item */
    .gallery-item {
        flex: 0 0 100%;
        scroll-snap-align: center;
        scroll-snap-stop: always;
    }

    .gallery-item img {
        width: 100%;
        height: auto;
    }

    /* Controlli gallery */
    .gallery-controls {
        display: block;
    }

    /* Frecce di navigazione */
    .gallery-nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
    }

    .gallery-nav:active {
        transform: translateY(-50%) scale(0.95);
    }

    .gallery-nav.prev {
        left: 10px;
    }

    .gallery-nav.next {
        right: 10px;
    }

    .gallery-nav svg {
        width: 20px;
        height: 20px;
        fill: #333;
    }

    /* Dot indicators (thumbnail strip) */
    .gallery-dots {
        display: flex;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 15px;
        padding: 0px 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .gallery-dots::-webkit-scrollbar {
        display: none;
    }

    .dot {
        width: 60px;
        height: 60px;
        min-width: 60px;
        border: none;
        border-radius: 2px;
        padding: 0;
        cursor: pointer;
        transition: all 0.3s ease;
        overflow: hidden;
        background: #f0f0f0;
    }

    .dot img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .dot.active img {
        border: 1px solid #000;
    }

    /* Counter */
    .gallery-counter {
        text-align: center;
        margin-top: 10px;
        font-size: 14px;
        color: #666;
    }
}

.gallery-counter{ display: none;}