/* ============================================================================

   FTS V2 - Gallery: 3-image grid (1 large + 2 stacked), Lightbox, Video

   Matches premium travel booking design

   ============================================================================ */



.fts-v2-gallery-section {
    background: var(--v2-bg) !important;
    padding-bottom: 24px !important;
}


/* Hero mode (GetYourGuide-like media first) */
.fts-v2-hero-gallery {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

.fts-v2-hero-gallery .fts-v2-gallery-slider {
    display: block !important;
    border-radius: 12px !important;
}

.fts-v2-hero-gallery .fts-v2-gallery-slide {
    height: 520px !important;
}

.fts-v2-hero-gallery .fts-v2-gallery-slide img {
    object-fit: cover !important;
}

.fts-v2-hero-gallery .fts-v2-gallery-dots {
    display: flex !important;
    position: absolute !important;
    left: 50% !important;
    bottom: 14px !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 20 !important;
}

.fts-v2-hero-gallery-viewall {
    position: absolute !important;
    right: 40px !important;
    bottom: 18px !important;
    z-index: 22 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 10px 14px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    background: rgba(15, 23, 42, 0.55) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    backdrop-filter: blur(10px) !important;
}

.fts-v2-hero-gallery-viewall:hover { background: rgba(15, 23, 42, 0.68) !important; }
.fts-v2-hero-gallery-viewall:focus-visible { outline: 3px solid rgba(255, 255, 255, 0.9) !important; outline-offset: 2px !important; }

/* ==========================================================================
   Hero Gallery Grid — Airbnb-style (1 large left + 2x2 right) desktop only
   ========================================================================== */
.fts-v2-hero-gallery-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 420px !important;
    gap: 4px !important;
    height: 420px !important;
    border-radius: var(--v2-radius-md, 12px) !important;
    overflow: hidden !important;
}
.fts-v2-hgg-main {
    grid-row: 1 / -1 !important;
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
    height: 100% !important;
    max-height: 420px !important;
}
.fts-v2-hgg-main img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.4s ease !important;
}
.fts-v2-hgg-main:hover img { transform: scale(1.03) !important; }

.fts-v2-hgg-side-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr 1fr !important;
    gap: 4px !important;
    height: 420px !important;
    max-height: 420px !important;
    overflow: hidden !important;
}
.fts-v2-hgg-cell {
    position: relative !important;
    overflow: hidden !important;
    cursor: pointer !important;
    min-height: 0 !important;
    max-height: 100% !important;
}
.fts-v2-hgg-side-grid .fts-v2-hgg-cell {
    min-height: 0 !important;
}
.fts-v2-hgg-side-grid .fts-v2-hgg-cell img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    transition: transform 0.4s ease !important;
}
.fts-v2-hgg-side-grid .fts-v2-hgg-cell:hover img { transform: scale(1.05) !important; }

/* "View all" button inside the last grid cell */
.fts-v2-hgg-viewall {
    position: absolute !important;
    right: 10px !important;
    bottom: 10px !important;
}

/* Variant: <=2 side images → single column */
.fts-v2-hgg--cols1 .fts-v2-hgg-side-grid {
    grid-template-columns: 1fr !important;
}

/* Variant: 3 side images → 2 cols top, 1 full-width bottom */
.fts-v2-hgg--cols3 .fts-v2-hgg-side-grid .fts-v2-hgg-cell:last-child {
    grid-column: 1 / -1 !important;
}

/* When grid is active, hide the slider on desktop */
.fts-v2-hero-gallery:not(.fts-v2-hero-gallery--slider-only) .fts-v2-gallery-slider {
    display: none !important;
}
/* When only slider available (< 3 images), hide the grid markup */
.fts-v2-hero-gallery--slider-only .fts-v2-gallery-slider {
    display: block !important;
}

.fts-v2-gallery-slider {
    display: none !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: var(--v2-radius-lg) !important;
    background: #0b1220 !important;
    max-width: 100% !important;
    direction: ltr !important;
    /* pan-y blocked horizontal swipe on iOS; manipulation allows carousel + page scroll */
    touch-action: manipulation !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}
.fts-v2-gallery-slider-track {
    display: flex !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    will-change: transform !important;
    transition: transform 0.35s ease !important;
    backface-visibility: hidden !important;
}
.fts-v2-gallery-slide {
    position: relative !important;
    flex: 0 0 100% !important;
    min-width: 100% !important;
    height: 460px !important;
    background: #0b1220 !important;
    overflow: hidden !important;
    border-radius: 0 !important;
}
.fts-v2-gallery-slide img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}
.fts-v2-gallery-dots {
    display: none !important;
    justify-content: center !important;
    gap: 6px !important;
    margin-top: 10px !important;
    margin-bottom: 4px !important;
    direction: ltr !important;
}
.fts-v2-gallery-dot {
    width: 7px !important;
    height: 7px !important;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.2) !important;
}
.fts-v2-gallery-dot.active {
    background: var(--v2-primary) !important;
}


/* Grid Layout - 3 images: 1 large left, 2 stacked right */

.fts-v2-gallery-grid {

    display: grid !important;

    gap: 3px !important;

    border-radius: 12px !important;

    overflow: hidden !important;

}



.fts-v2-gallery-count-3 {

    grid-template-columns: 1.2fr 1fr !important;

    grid-template-rows: 1fr 1fr !important;

    height: 460px !important;

}

.fts-v2-gallery-count-2 {

    grid-template-columns: 1.2fr 1fr !important;

    grid-template-rows: 1fr !important;

    height: 400px !important;

}

.fts-v2-gallery-count-1 {

    grid-template-columns: 1fr !important;

    height: 420px !important;

}



/* Cells */

.fts-v2-gallery-cell {

    position: relative !important;

    overflow: hidden !important;

    cursor: pointer !important;

    font-size: 0 !important;

    line-height: 0 !important;

}



.fts-v2-gallery-main {

    grid-row: span 2 !important;

}



.fts-v2-root .fts-v2-gallery-cell img,

.fts-v2-gallery-cell img {

    display: block !important;

    width: 100% !important;

    height: 100% !important;

    max-width: none !important;

    object-fit: cover !important;

    transition: transform 0.4s ease !important;

}

.fts-v2-gallery-cell:hover img { transform: scale(1.03) !important; }



/* +N Photos Overlay */

.fts-v2-gallery-more {

    position: absolute !important;

    bottom: 16px !important;

    right: 16px !important;

    background: rgba(0,0,0,0.6) !important;

    backdrop-filter: blur(4px) !important;

    display: inline-flex !important;

    align-items: center !important;

    gap: 6px !important;

    color: #fff !important;

    font-weight: 600 !important;

    font-size: 14px !important;

    line-height: 1 !important;

    padding: 10px 16px !important;

    border-radius: var(--v2-radius-sm) !important;

    cursor: pointer !important;

    transition: background 0.2s !important;

}

.fts-v2-gallery-more:hover { background: rgba(0,0,0,0.8) !important; }



/* Show all photos link (mobile) */

.fts-v2-gallery-show-all {

    display: none !important;

    align-items: center !important;

    justify-content: center !important;

    gap: 6px !important;

    padding: 10px 0 !important;

    font-size: 13px !important;

    font-weight: 600 !important;

    color: var(--v2-primary, #e8501e) !important;

    cursor: pointer !important;

}

@media (max-width: 992px) {
    .fts-v2-gallery-section { padding-bottom: 12px !important; }
    .fts-v2-gallery-slider {
        display: block !important;
        border-radius: 0 0 var(--v2-radius-md, 12px) var(--v2-radius-md, 12px) !important;
        overflow: hidden !important;
    }
    .fts-v2-gallery-grid { display: none !important; }
    .fts-v2-gallery-dots { display: flex !important; margin-top: 10px !important; margin-bottom: 14px !important; }
    .fts-v2-gallery-dot { width: 8px !important; height: 8px !important; }
    .fts-v2-gallery-slide {
        height: auto !important;
        aspect-ratio: 4 / 3 !important;
        min-height: 220px !important;
        max-height: 320px !important;
        border-radius: 0 !important;
        overflow: hidden !important;
    }
    .fts-v2-gallery-slide img {
        border-radius: 0 !important;
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }
    .fts-v2-gallery-show-all { display: none !important; }

    /* Full width, flush under header; radius only on bottom corners */
    .fts-v2-col-gallery {
        margin-top: 0 !important;
        margin-left: calc(-1 * var(--fts-container-pad, 16px)) !important;
        margin-right: calc(-1 * var(--fts-container-pad, 16px)) !important;
        width: calc(100% + 2 * var(--fts-container-pad, 16px)) !important;
        max-width: none !important;
        box-sizing: border-box !important;
        overflow: visible !important;
    }
    .fts-v2-hero-gallery {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }
    .fts-v2-hero-gallery .fts-v2-gallery-slider {
        display: block !important;
        border-radius: 0 0 var(--v2-radius-md, 12px) var(--v2-radius-md, 12px) !important;
        overflow: hidden !important;
        isolation: isolate !important;
    }
    .fts-v2-hero-gallery .fts-v2-gallery-slide,
    .fts-v2-hero-gallery .fts-v2-gallery-slide img {
        border-radius: 0 !important;
    }
    .fts-v2-hero-gallery .fts-v2-gallery-slide {
        height: auto !important;
        aspect-ratio: 4 / 3 !important;
        min-height: 240px !important;
        max-height: 340px !important;
    }
    .fts-v2-hero-gallery .fts-v2-gallery-dots {
        bottom: 12px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        z-index: 21 !important;
    }
    .fts-v2-hero-gallery-viewall {
        right: 12px !important;
        bottom: 12px !important;
        font-size: 12px !important;
        padding: 9px 12px !important;
        z-index: 22 !important;
    }
    .fts-v2-hero-gallery-grid { display: none !important; }
    .fts-v2-hero-gallery:not(.fts-v2-hero-gallery--slider-only) .fts-v2-gallery-slider { display: block !important; }
}



/* Video Play Button */

.fts-v2-video-play {

    position: absolute !important;

    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;

    background: rgba(0,0,0,0.2) !important;

    display: flex !important;

    justify-content: center !important;

    align-items: center !important;

    cursor: pointer !important;

}

.fts-v2-play-circle {

    width: 60px !important;

    height: 60px !important;

    background: var(--v2-primary) !important;

    border-radius: 50% !important;

    display: flex !important;

    justify-content: center !important;

    align-items: center !important;

    box-shadow: 0 4px 20px rgba(255,107,53,0.4) !important;

    transition: transform 0.3s !important;

}

.fts-v2-play-circle svg { margin-left: 2px !important; }

.fts-v2-video-play:hover .fts-v2-play-circle { transform: scale(1.1) !important; }



/* Lightbox */

.fts-v2-lightbox, .fts-v2-video-modal {

    display: none !important;

    position: fixed !important;

    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;

    background: rgba(15,17,21,0.95) !important;

    z-index: 999999 !important;

    flex-direction: column !important;

}

.fts-v2-lightbox.active, .fts-v2-video-modal.active { display: flex !important; }



.fts-v2-lb-close, .fts-v2-video-close {

    position: absolute !important; top: 16px !important; right: 20px !important;

    background: rgba(0,0,0,0.5) !important; border: 1px solid rgba(255,255,255,0.2) !important;

    color: #fff !important;

    cursor: pointer !important; z-index: 999 !important;

    width: 42px !important; height: 42px !important;

    min-width: 42px !important; min-height: 42px !important;

    border-radius: 50% !important;

    display: flex !important; align-items: center !important; justify-content: center !important;

    transition: background 0.2s !important;

    font-size: 20px !important; line-height: 1 !important;

    padding: 0 !important; margin: 0 !important;

    visibility: visible !important; opacity: 1 !important;

    -webkit-appearance: none !important; appearance: none !important;

    outline: none !important;

}

.fts-v2-lb-close svg, .fts-v2-video-close svg {

    width: 20px !important; height: 20px !important;

    display: block !important;

    stroke: #fff !important;

}

.fts-v2-lb-close:hover, .fts-v2-video-close:hover { background: rgba(0,0,0,0.7) !important; }



.fts-v2-lb-prev, .fts-v2-lb-next {

    position: absolute !important; top: 45% !important; transform: translateY(-50%) !important;

    background: rgba(0,0,0,0.5) !important; border: 1px solid rgba(255,255,255,0.2) !important;

    color: #fff !important; width: 48px !important; height: 48px !important;

    min-width: 48px !important; min-height: 48px !important;

    border-radius: 50% !important; cursor: pointer !important;

    z-index: 999 !important; display: flex !important;

    align-items: center !important; justify-content: center !important;

    transition: background 0.2s !important;

    padding: 0 !important; margin: 0 !important;

    visibility: visible !important; opacity: 1 !important;

    -webkit-appearance: none !important; appearance: none !important;

    outline: none !important;

}

.fts-v2-lb-prev svg, .fts-v2-lb-next svg {

    width: 24px !important; height: 24px !important;

    display: block !important;

    stroke: #fff !important;

}

.fts-v2-lb-prev { left: 16px !important; }

.fts-v2-lb-next { right: 16px !important; }

.fts-v2-lb-prev:hover, .fts-v2-lb-next:hover { background: rgba(0,0,0,0.7) !important; }



/* Stage — holds the main image */

.fts-v2-lb-stage {

    flex: 1 1 auto !important;

    display: flex !important;

    justify-content: center !important;

    align-items: center !important;

    padding: 54px 60px 8px !important;

    min-height: 0 !important;

    overflow: hidden !important;

}

#fts-v2-lb-img {

    display: block !important;

    max-width: 90vw !important;

    max-height: calc(100vh - 180px) !important;

    width: auto !important;

    height: auto !important;

    object-fit: contain !important;

    border-radius: 6px !important;

    user-select: none !important;

}



/* Footer — title, counter, thumbs */

.fts-v2-lb-footer {

    flex-shrink: 0 !important;

    text-align: center !important;

    padding: 10px 20px 18px !important;

}

.fts-v2-lb-title {

    color: #fff !important;

    font-size: 15px !important;

    font-weight: 600 !important;

    margin-bottom: 2px !important;

    font-family: var(--v2-font-heading, 'Outfit', sans-serif) !important;

}

.fts-v2-lb-counter {

    color: rgba(255,255,255,0.5) !important;

    font-size: 12px !important;

    font-weight: 500 !important;

    margin-bottom: 10px !important;

}

.fts-v2-lb-thumbs {

    display: flex !important;

    justify-content: center !important;

    gap: 6px !important;

    overflow-x: auto !important;

    scrollbar-width: none !important;

    padding: 0 10px !important;

}

.fts-v2-lb-thumbs::-webkit-scrollbar { display: none !important; }

.fts-v2-lb-thumb {

    width: 52px !important;

    height: 52px !important;

    border-radius: 6px !important;

    overflow: hidden !important;

    cursor: pointer !important;

    flex-shrink: 0 !important;

    border: 2px solid transparent !important;

    opacity: 0.5 !important;

    transition: opacity 0.2s, border-color 0.2s !important;

}

.fts-v2-lb-thumb.active {

    opacity: 1 !important;

    border-color: #fff !important;

}

.fts-v2-lb-thumb:hover { opacity: 0.85 !important; }

.fts-v2-lb-thumb img {

    width: 100% !important;

    height: 100% !important;

    object-fit: cover !important;

    display: block !important;

}



/* Mobile adjustments */

@media (max-width: 768px) {

    .fts-v2-lb-stage { padding: 50px 8px 6px !important; }

    #fts-v2-lb-img {
        max-width: 96vw !important;
        max-height: calc(100vh - 150px) !important;
    }

    .fts-v2-lb-prev {

        left: 6px !important;

        width: 38px !important; height: 38px !important;

        min-width: 38px !important; min-height: 38px !important;

    }

    .fts-v2-lb-next {

        right: 6px !important;

        width: 38px !important; height: 38px !important;

        min-width: 38px !important; min-height: 38px !important;

    }

    .fts-v2-lb-prev svg, .fts-v2-lb-next svg { width: 20px !important; height: 20px !important; }

    .fts-v2-lb-close {

        top: 10px !important; right: 10px !important;

        width: 36px !important; height: 36px !important;

        min-width: 36px !important; min-height: 36px !important;

    }

    .fts-v2-lb-close svg { width: 18px !important; height: 18px !important; }

    .fts-v2-lb-title { font-size: 14px !important; }

    .fts-v2-lb-thumb { width: 42px !important; height: 42px !important; }

    .fts-v2-lb-footer { padding: 6px 10px 12px !important; }

}

@media (max-width: 480px) {
    #fts-v2-lb-img {
        max-width: 98vw !important;
        max-height: calc(100vh - 130px) !important;
    }

    .fts-v2-lb-stage { padding: 46px 4px 4px !important; }

    .fts-v2-lb-footer { padding: 4px 8px 10px !important; }

    .fts-v2-lb-thumb { width: 38px !important; height: 38px !important; }

    .fts-v2-lb-title { font-size: 13px !important; }
}



/* Video Modal */

.fts-v2-video-wrap { width: 80% !important; max-width: 900px !important; aspect-ratio: 16/9 !important; }

.fts-v2-video-wrap iframe {

    width: 100% !important; height: 100% !important;

    border: none !important; border-radius: var(--v2-radius-md) !important;

}

