/* ==========================================================
   PRODUCT GALLERY
========================================================== */

.unio-product-gallery{
    width:100%;
}

/* ==========================================================
   MAIN SLIDER
========================================================== */

.unio-product-slider{
    position:relative;
    overflow:hidden;
    border-radius:12px;
    background:#f7f7f7;
}

.unio-product-slider .swiper-slide{
    display:flex;
    justify-content:center;
    align-items:center;
}

.unio-product-slider img{
    display:block;
    width:100%;
    aspect-ratio:1/1;
    object-fit:contain;
    cursor:pointer;
    user-select:none;
    height: 585px;
    max-height: calc(100vh - 250px);
    opacity:0;
}

/* ==========================================================
   IMAGE LOADING
========================================================== */

.unio-product-slider{
    position:relative;
    background:#f8f8f8;
    overflow:hidden;
}

.unio-product-slider::before{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(
        90deg,
        #f2f2f2 25%,
        #fafafa 50%,
        #f2f2f2 75%
    );
    background-size:200% 100%;
    animation:unioGalleryLoading 1.3s infinite;
}

.unio-product-slider.loaded::before{
    display:none;
}

@keyframes unioGalleryLoading{
    from{
        background-position:200% 0;
    }
    to{
        background-position:-200% 0;
    }
}

.unio-product-slider.loaded img{
    opacity:1;
}

.unio-gallery-prev,
.unio-gallery-next{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:42px;
    height:42px;
    border-radius:50%;
    background:rgba(255,255,255,.25);
    color: rgba(0,0,0,.5);
    border: 1px solid rgba(0,0,0,.25);
    display:flex;
    justify-content:center;
    align-items:center;
    cursor:pointer;
    z-index:20;
    transition:.25s;
    padding: 8px;
}

.unio-gallery-prev{
    left:16px;
}

.unio-gallery-next{
    right:16px;
}

.unio-gallery-prev:hover,
.unio-gallery-next:hover{
    background:#ffffff;
    color: #000000;
    border-color: #000000;
}

.unio-gallery-prev svg,
.unio-gallery-next svg{
    width:24px;
    height:24px;
}

.unio-gallery-prev svg path,
.unio-gallery-next svg path{
    stroke-width: 1!important;
}

.unio-gallery-lightbox{
    display:block;
    width:100%;
    text-decoration:none;
}



/* ==========================================================
   GALLERY LAYOUT (main image + vertical thumbs)
========================================================== */

.unio-product-gallery{
    display:flex;
    align-items:flex-start;
    gap:12px;
}

.unio-product-slider{
    order:2;
    flex:1;
    min-width:0; /* αποτρέπει overflow μέσα σε flex container */
}

.unio-product-thumbs{
    order:1;
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:0;
    width:74px;
    flex-shrink:0;
    max-height:585px; /* ίδιο ύψος με την κύρια εικόνα */
    overflow-y:auto;
    overflow-x:hidden;
    scrollbar-width:none;
}

.unio-product-thumbs::-webkit-scrollbar{
    display:none;
}

.unio-product-thumb{
    width:74px;
    height:74px!important;
    border-radius:8px!important;
    object-fit:cover;
    border:1px solid transparent!important;
    cursor:pointer;
    transition:.25s;
    flex-shrink:0;
}

.unio-product-thumb:hover{
    border-color:#dbdbdb;
}

.unio-product-thumb.active{
    border-color:#000000!important;
}

/* Mobile: επιστροφή σε οριζόντια thumbs κάτω από την εικόνα */
@media(max-width:767px){

    .unio-product-gallery{
        flex-direction:column;
    }

    .unio-product-slider{
        order:1;
    }

    .unio-product-thumbs{
        order:2;
        flex-direction:row;
        width:100%;
        max-height:none;
        overflow-x:auto;
        overflow-y:hidden;
        margin-top:16px;
    }

    .unio-gallery-prev,
    .unio-gallery-next{
        width:36px;
        height:36px;
    }

    .unio-product-thumb{
        width:60px;
        height:60px;
    }

}

