/* =========================
   BASE
========================= */

.dancho-gallery{
    max-width:650px;
    display:flex;
    gap:12px;
    align-items:stretch;
}

/* =========================
   MAIN GALLERY
========================= */

.dancho-main{
    height:400px;
    max-height:70vh;
    position:relative;
    flex:1;
}

@media (max-width:768px){
    .dancho-main{
        height:320px;
    }
}

.dancho-main .swiper-slide{
    width:100%!important;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
}

/* =========================
   IMAGES
========================= */

.dancho-main img{
    max-width:100%;
    max-height:100%;
    width:auto;
    height:auto;
    object-fit:contain;
    display:block;
}

/* =========================
   VIDEO
========================= */

.dancho-main .video-wrap,
.dancho-fs-main .video-wrap{
    position:relative;
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
}

.video-thumb{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}

.video-play{
    position:absolute;
    inset:0;
    margin:auto;
    width:64px;
    height:64px;
    border-radius:999px;
    background:rgba(0,0,0,.55);
    color:#fff;
    border:0;
    font-size:28px;
    cursor:pointer;
}

.is-video.is-playing .video-thumb,
.is-video.is-playing .video-play{
    display:none!important;
}

.dancho-main iframe,
.dancho-fs-main iframe{
    width:100%!important;
    height:100%!important;
    border:0;
}

/* =========================
   THUMBNAILS DESKTOP
========================= */

.dancho-thumbs{
    order:-1;
    width:60px;
    height:400px;     /* SAME as .dancho-main */

    position:relative;
    flex-shrink:0;

    padding:14px 0;
    box-sizing:border-box;
    overflow:hidden;
}

.dancho-thumbs .swiper-wrapper{
    flex-direction:column;
}

.dancho-thumbs .swiper-slide{
    height:60px;
    padding:2px 0;
    box-sizing:border-box;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;
    opacity:.6;

    border:1px solid #ddd;
    border-radius:3px;
    background:#fff;
}

.dancho-thumbs .swiper-slide-thumb-active{
    border:2px solid #111;
    opacity:1;
}

.dancho-thumbs img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}

/* =========================
   THUMB ARROWS
========================= */

.dancho-thumbs-prev,
.dancho-thumbs-next{
    position:absolute;
    left:0;
    right:0;
    height:14px;
    border:0;
    background:transparent;
    cursor:pointer;
    z-index:6;

    display:flex;
    align-items:center;
    justify-content:center;
}

.dancho-thumbs-prev{ top:0; }
.dancho-thumbs-next{ bottom:0; }

.thumb-arrow{
    width:12px;
    height:8px;
    position:relative;
}

/* up arrow */

.thumb-up::before{
    content:'';
    position:absolute;
    left:0;
    right:0;
    margin:auto;
    border-left:6px solid transparent;
    border-right:6px solid transparent;
    border-bottom:6px solid #444;
}

/* down arrow */

.thumb-down::before{
    content:'';
    position:absolute;
    left:0;
    right:0;
    margin:auto;
    border-left:6px solid transparent;
    border-right:6px solid transparent;
    border-top:6px solid #444;
}

/* hide arrows when scrolling not possible */

.dancho-thumbs-prev.swiper-button-disabled,
.dancho-thumbs-next.swiper-button-disabled{
    opacity:0;
    pointer-events:none;
}

/* =========================
   VIDEO ICON ON THUMB
========================= */

.dancho-thumbs .swiper-slide.is-video{
    position:relative;
}

.dancho-thumbs .swiper-slide.is-video::after{
    content:'▶';
    position:absolute;
    width:16px;
    height:16px;
    border-radius:50%;
    background:rgba(0,0,0,.6);
    color:#fff;
    font-size:10px;
    line-height:16px;
    text-align:center;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
}

/* =========================
   MAIN ARROWS
========================= */

.dancho-main-prev,
.dancho-main-next{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    font-size:42px;
    color:#111;
    z-index:5;
    cursor:pointer;
}

.dancho-main-prev{ left:6px; }
.dancho-main-next{ right:6px; }

/* =========================
   FULLSCREEN
========================= */

.dancho-fs{
    position:fixed;
    inset:0;
    z-index:9999;
}

.dancho-fs[hidden]{
    display:none;
}

.dancho-fs-backdrop{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.9);
}

.dancho-fs-inner{
    position:relative;
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
}

.dancho-fs-main{
    width:100%;
    height:100%;
}

.dancho-fs-main .swiper-slide{
    display:flex;
    align-items:center;
    justify-content:center;
}

.dancho-fs-close{
    position:absolute;
    top:16px;
    right:16px;
    width:44px;
    height:44px;
    background:rgba(0,0,0,.6);
    color:#fff;
    border:0;
    font-size:22px;
    cursor:pointer;
    z-index:10001;
}

.dancho-fs-prev,
.dancho-fs-next{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    font-size:56px;
    color:#fff;
    z-index:10001;
    cursor:pointer;
}

.dancho-fs-prev{ left:10px; }
.dancho-fs-next{ right:10px; }

.dancho-fs-dots{
    position:absolute;
    bottom:18px;
    left:0;
    right:0;
    text-align:center;
    z-index:10001;
}

/* =========================
   MOBILE
========================= */

@media (max-width:768px){

    .dancho-gallery{
        flex-direction:row;   /* keep thumbnails left */
        gap:8px;
    }

    .dancho-main{
        height:320px;
    }

    .dancho-thumbs{
        width:40px;           /* slightly slimmer for mobile */
        height:320px;         /* match main image height */
        padding:10px 0;
    }

    .dancho-thumbs .swiper-slide{
        height:34px;
    }

}