/* ============ FAZZIONE PRODUCT GALLERY ============ */
.fz-pv-widget { width: 100%; box-sizing: border-box; }
.fz-pv-widget *,
.fz-pv-widget *::before,
.fz-pv-widget *::after { box-sizing: border-box; }

.fz-pv-notice {
    padding: 24px;
    background: #f5f5f5;
    border: 1px dashed #ccc;
    text-align: center;
    color: #666;
    border-radius: 8px;
}

/* ============ LAYOUTS COM MINIATURAS ============ */
.fz-pv-gallery {
    display: flex;
    width: 100%;
}
.fz-pv-pos-vertical_left  { flex-direction: row; }
.fz-pv-pos-vertical_right { flex-direction: row-reverse; }
.fz-pv-pos-horizontal     { flex-direction: column-reverse; }

.fz-pv-thumbs {
    display: flex;
    overflow: auto;
    scrollbar-width: thin;
    flex-shrink: 0;
}
.fz-pv-thumbs::-webkit-scrollbar { width: 6px; height: 6px; }
.fz-pv-thumbs::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 3px; }

.fz-pv-pos-vertical_left .fz-pv-thumbs,
.fz-pv-pos-vertical_right .fz-pv-thumbs {
    flex-direction: column;
    max-height: 600px;
}
.fz-pv-pos-horizontal .fz-pv-thumbs {
    flex-direction: row;
}

.fz-pv-thumb {
    flex-shrink: 0;
    background: none;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color .25s ease, transform .25s ease, opacity .25s ease;
    opacity: 0.7;
}
.fz-pv-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.fz-pv-thumb:hover { opacity: 1; transform: scale(1.02); }
.fz-pv-thumb.active {
    border-color: #2BC4D9;
    opacity: 1;
}

.fz-pv-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.65);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.fz-pv-play-icon svg { fill: #fff; }
.fz-pv-play-large {
    width: 64px;
    height: 64px;
}

.fz-pv-main-wrap {
    flex: 1;
    min-width: 0;
}
.fz-pv-main {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background: #f5f5f5;
}
.fz-pv-main img,
.fz-pv-main iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
}

/* ============ GRID & STACKED ============ */
.fz-pv-grid {
    display: grid;
    width: 100%;
}
.fz-pv-grid-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    background: #f5f5f5;
}
.fz-pv-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.fz-pv-grid-item:hover img { transform: scale(1.06); }
.fz-pv-video-thumb {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ============ SLIDER ============ */
.fz-pv-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
}
.fz-pv-slider-track {
    display: flex;
    transition: transform .4s ease;
    width: 100%;
}
.fz-pv-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 600px;
    background: #f5f5f5;
    position: relative;
}
.fz-pv-slide img,
.fz-pv-slide iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
}
.fz-pv-slide-video {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
}
.fz-pv-slide-video img {
    pointer-events: none;
}

.fz-pv-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.92);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0A4A5C;
    transition: background .2s ease, transform .2s ease;
}
.fz-pv-prev { left: 14px; }
.fz-pv-next { right: 14px; }
.fz-pv-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }

.fz-pv-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}
.fz-pv-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .25s ease, transform .25s ease;
}
.fz-pv-dot:hover { transform: scale(1.2); }
.fz-pv-dot.active { background: #fff; }

/* ============ LIGHTBOX (grade + stacked) ============ */
.fz-pv-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.fz-pv-lightbox.open { display: flex; }
.fz-pv-lightbox-content {
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fz-pv-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}
.fz-pv-lightbox iframe {
    width: 90vw;
    max-width: 960px;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 4px;
}
.fz-pv-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 44px;
    height: 44px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .fz-pv-main,
    .fz-pv-slide { height: 500px; }
}

@media (max-width: 768px) {
    .fz-pv-pos-vertical_left,
    .fz-pv-pos-vertical_right {
        flex-direction: column-reverse;
    }
    .fz-pv-pos-vertical_left .fz-pv-thumbs,
    .fz-pv-pos-vertical_right .fz-pv-thumbs {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
    }
    .fz-pv-main,
    .fz-pv-slide { height: 420px; }
    .fz-pv-arrow { width: 38px; height: 38px; font-size: 22px; }
}

@media (max-width: 480px) {
    .fz-pv-main,
    .fz-pv-slide { height: 360px; }
    .fz-pv-play-large { width: 50px; height: 50px; }
}
