
/* MAIN */
.vtx-gallery-main {
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.vtx-gallery{
    width:100%;
}
.vtx-gallery-main-wrapper{
    position:relative;
    border:1px solid #ddd;
    border-radius:12px;
    overflow:hidden;
    background:#fff;
}
.vtx-gallery-main{
    position:relative;
    cursor:pointer;
    overflow: hidden;
}
.vtx-gallery-item{
    display:none;
    aspect-ratio:1/1;
    width: 100%;
    /* Thêm transition mượt mà cho slider chính */
    transition: transform 0.3s ease-out;
}
.vtx-gallery-item.active{
    display:block;
}
.vtx-gallery-item img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

/* MAIN ARROWS */
.vtx-gallery-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width: 35px;
    height: 35px;
    border:none;
    border-radius:50%;
    background:rgb(221 221 221);
    cursor:pointer;
    z-index:10;
    font-size: 16px;
    display:flex;
    align-items:center;
    justify-content:center;
    opacity:0;
    visibility:hidden;
    transition:all .25s ease;
    margin:0;
}
.vtx-gallery-main-wrapper:hover .vtx-gallery-arrow{
    opacity:1;
    visibility:visible;
}
.vtx-gallery-arrow:hover{
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    transform:translateY(-50%) scale(1.05);
}
.vtx-gallery-arrow.prev{ left:5px; }
.vtx-gallery-arrow.next{ right:5px; }

/* THUMB */
.vtx-gallery-thumbs-wrapper{
    position:relative;
    margin-top:14px;
    padding:0 36px;
}
.vtx-gallery-thumbs{
    display:flex;
    gap:10px;
    overflow:hidden;
    scroll-behavior:smooth;
    user-select:none;
    cursor:grab;
    -ms-overflow-style:none;
    scrollbar-width:none;
}
.vtx-gallery-thumbs::-webkit-scrollbar{ display:none; }
.vtx-gallery-thumbs.dragging{
    cursor:grabbing;
    scroll-behavior:auto;
}
.vtx-gallery-thumb{
    width:72px;
    min-width:72px;
    height:72px;
    border-radius:8px;
    overflow:hidden;
    border:2px solid transparent;
    cursor:pointer;
    position:relative;
    flex-shrink:0;
    background:#fff;
}
.vtx-gallery-thumb.active{ border-color:#0056ad; }
.vtx-gallery-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

/* THUMB ARROWS */
.vtx-thumb-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:28px;
    height:28px;
    border:none;
    border-radius:50%;
    background:#ddd;
    z-index:5;
    cursor:pointer;
    font-size:14px;
    display:flex;
    align-items:center;
    justify-content:center;
}
.vtx-thumb-arrow.prev{ left:0; }
.vtx-thumb-arrow.next{ right:0; }

/* VIDEO */
.vtx-gallery-video{ position:relative; }
.vtx-play-icon{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:60px;
    color:#fff;
    background:rgba(0,0,0,.2);
}
.vtx-thumb-play{
    position:absolute;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    background:rgba(0,0,0,.3);
    font-size:24px;
}

/* LIGHTBOX */
.vtx-lightbox{
    position:fixed;
    inset:0;
    background:rgb(0 0 0 / 77%);
    z-index:999999;
    display:none;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    padding:20px;
}
.vtx-lightbox.active{ display:flex; }
.vtx-lightbox-content{
    width:100%;
    max-width:900px;
    max-height:80vh;
    display:flex;
    align-items:center;
    justify-content:center;
}
.vtx-lightbox-content img,
.vtx-lightbox-content iframe{
    max-width:100%;
    max-height:80vh;
    border-radius:10px;
}
.vtx-lightbox iframe{
    width:100%;
    aspect-ratio:16/9;
}
.vtx-lightbox-close{
    position:absolute;
    top:20px;
    right:20px;
    width:50px;
    height:50px;
    border:none;
    border-radius:50%;
    background:rgba(255,255,255,.15);
    color:#fff;
    font-size:24px;
    cursor:pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vtx-lightbox-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:50px;
    height:50px;
    border:none;
    border-radius:50%;
    background:rgba(255,255,255,.15);
    color:#fff;
    font-size:26px;
    cursor:pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vtx-lightbox-arrow.prev{ left:20px; }
.vtx-lightbox-arrow.next{ right:20px; }
.vtx-lightbox-thumbs{
    display:flex;
    gap:10px;
    margin-top:20px;
    overflow:auto;
    max-width:100%;
}
.vtx-lightbox-thumb{
    width:70px;
    min-width:70px;
    height:70px;
    border-radius:8px;
    overflow:hidden;
    border:2px solid transparent;
    cursor:pointer;
}
.vtx-lightbox-thumb.active{ border-color:#0d6efd; }
.vtx-lightbox-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
}

/* MOBILE */
@media(max-width:768px){
    .vtx-gallery-thumb{
        width:60px;
        min-width:60px;
        height:60px;
    }
    .vtx-gallery-arrow{
        opacity:1;
        visibility:visible;
        width:36px;
        height:36px;
        font-size:18px;
    }
    .vtx-lightbox-arrow{
        display: none; /* Ẩn arrow lightbox trên mobile theo style cũ của bạn */
    }
    .vtx-lightbox-close{
        width:42px;
        height:42px;
        margin: 0;
    }
    .vtx-gallery-thumbs-wrapper{
        padding:0 28px;
    }
}
