.soves-detail-gallery {
    /* The gallery never decides its column's width: the thumbnail strip scrolls inside it. */
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    display: grid;
    gap: 14px;
}

.soves-detail-gallery__main {
    position: relative;
    min-height: 430px;
    border-radius: 8px;
    overflow: hidden;
    background: #eef3f9;
}

.soves-detail-gallery__main [data-gallery-main] {
    width: 100%;
    height: 430px;
    display: block;
    object-fit: cover;
    cursor: zoom-in;
    touch-action: pan-y;
    transition: opacity 160ms ease;
}

.soves-detail-gallery.is-gallery-changing [data-gallery-main] {
    opacity: 0.28;
}

.soves-detail-gallery__main button {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: var(--soves-text, #172033);
    transform: translateY(-50%);
    cursor: pointer;
}

.soves-detail-gallery__main button:hover,
.soves-detail-gallery__main button:focus-visible,
.soves-detail-gallery__main a:hover,
.soves-detail-gallery__main a:focus-visible {
    background: var(--soves-primary, var(--soves-brand-primary));
    color: #ffffff;
    outline: 0;
}

.soves-detail-gallery__main button:first-of-type {
    left: 14px;
}

.soves-detail-gallery__main button:last-of-type {
    right: 14px;
}

.soves-detail-gallery__main a {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    border-radius: 999px;
    background: #ffffff;
    color: var(--soves-text, #172033);
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.soves-detail-gallery__thumbs-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    user-select: none;
    touch-action: pan-x;
}

.soves-detail-gallery__thumbs-viewport::-webkit-scrollbar {
    display: none;
}

.soves-detail-gallery__thumbs-viewport.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.soves-detail-gallery__thumbs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 30px) / 4);
    gap: 10px;
}

.soves-detail-gallery__thumbs button {
    height: 88px;
    border: 2px solid transparent;
    border-radius: 7px;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    cursor: pointer;
}

.soves-detail-gallery__thumbs button.is-active {
    border-color: var(--soves-primary, var(--soves-brand-primary));
}

.soves-detail-gallery__thumbs img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.soves-detail-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(6px);
}

.soves-detail-lightbox[hidden] {
    display: none;
}

.soves-detail-lightbox img {
    max-width: min(1100px, 94vw);
    max-height: 88vh;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.soves-detail-lightbox__nav,
.soves-detail-lightbox [data-lightbox-close] {
    -webkit-appearance: none;
    appearance: none;
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    color: #ffffff;
    cursor: pointer;
}

.soves-detail-lightbox__nav {
    top: 50%;
    width: 48px;
    height: 48px;
    transform: translateY(-50%);
}

.soves-detail-lightbox__nav.is-prev {
    left: 28px;
}

.soves-detail-lightbox__nav.is-next {
    right: 28px;
}

.soves-detail-lightbox [data-lightbox-close] {
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    padding: 0 0 3px;
    font-size: 31px;
    line-height: 1;
    font-weight: 300;
}

.soves-detail-lightbox__nav:hover,
.soves-detail-lightbox__nav:focus-visible,
.soves-detail-lightbox [data-lightbox-close]:hover,
.soves-detail-lightbox [data-lightbox-close]:focus-visible {
    border-color: var(--soves-primary, var(--soves-brand-primary));
    background: var(--soves-primary, var(--soves-brand-primary));
    color: #ffffff;
    outline: 0;
}

.soves-detail-lightbox-open {
    overflow: hidden;
}

@media (max-width: 767px) {
    .soves-detail-gallery__main,
    .soves-detail-gallery__main [data-gallery-main] {
        min-height: 260px;
        height: 260px;
    }

    .soves-detail-gallery__thumbs {
        grid-auto-columns: calc((100% - 10px) / 2);
    }

    .soves-detail-lightbox {
        padding: 18px;
    }

    .soves-detail-lightbox__nav.is-prev {
        left: 12px;
    }

    .soves-detail-lightbox__nav.is-next {
        right: 12px;
    }

    .soves-detail-lightbox [data-lightbox-close] {
        top: 12px;
        right: 12px;
    }
}

/* Pages with a photo mosaic and no hero banner sit on white, so the site menu (white text) needs a dark colour there. */
body:has(.soves-bk-photos) .elementor-location-header .elementor-nav-menu--main > ul > li > a.elementor-item,
body:has(.soves-bk-photos) .elementor-location-header .elementor-nav-menu--main > ul > li > a.elementor-item:hover {
    color: #12233d !important;
}

.soves-photo-top-wrap {
    /* No hero banner on these pages, so clear the fixed site header. */
    padding-top: 130px;
}

/* Top of a product page (tours, events, packages, outbound hotels), laid out like the inbound hotel page: breadcrumb and a photo mosaic. */
.soves-photo-top {
    margin-bottom: 20px;
}

.soves-photo-top .soves-bk-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #6b6b6b;
}

.soves-photo-top .soves-bk-breadcrumb a {
    color: #0071c2;
    text-decoration: none;
}

.soves-photo-top .soves-bk-breadcrumb a:hover {
    text-decoration: underline;
}

.soves-photo-top .soves-bk-breadcrumb strong {
    font-weight: 500;
    color: #1a1a1a;
}

.soves-photo-top .soves-bk-photos {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.soves-photo-top .soves-bk-photos__top {
    height: clamp(240px, 36vw, 460px);
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 8px;
}

.soves-photo-top .soves-bk-photos__top:has(.soves-bk-photos__big:only-child) {
    grid-template-columns: minmax(0, 1fr);
}

.soves-photo-top .soves-bk-photos__big,
.soves-photo-top .soves-bk-photos__side button,
.soves-photo-top .soves-bk-photos__strip button {
    position: relative;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: #e8ecf0;
    cursor: pointer;
}

.soves-photo-top .soves-bk-photos__big {
    min-height: 0;
}

.soves-photo-top .soves-bk-photos__side {
    height: 100%;
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    min-height: 0;
}

.soves-photo-top .soves-bk-photos__strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.soves-photo-top .soves-bk-photos__strip button {
    aspect-ratio: 1 / 0.8;
}

.soves-photo-top .soves-bk-photos img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.soves-photo-top .soves-bk-photos__more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .soves-photo-top .soves-bk-photos__top {
        height: clamp(200px, 56vw, 340px);
    }

    .soves-photo-top .soves-bk-photos__strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .soves-photo-top .soves-bk-photos__strip button:nth-child(n+4) {
        display: none;
    }
}

/* Sold out: a big red SOLD OUT stamp across the photo (cards, widgets and the detail page gallery). */
.soves-hotel-card.is-sold-out .soves-hotel-card__media::after,
.soves-trending-card.is-sold-out .soves-trending-card__media::after,
.soves-is-sold-out .soves-detail-gallery__main::after,
.soves-is-sold-out .soves-bk-photos__big::after {
    content: "SOLD OUT";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    transform: translate(-50%, -50%) rotate(-12deg);
    padding: .08em .4em;
    border: .09em solid #d31f2a;
    border-radius: .18em;
    background: rgba(255, 255, 255, .82);
    color: #d31f2a;
    font-size: clamp(1.7rem, 7vw, 2.9rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
    pointer-events: none;
}

.soves-is-sold-out .soves-detail-gallery__main::after,
.soves-is-sold-out .soves-bk-photos__big::after {
    font-size: clamp(2.4rem, 9vw, 5rem);
}

.soves-is-sold-out .soves-detail-gallery__main [data-gallery-main],
.soves-is-sold-out .soves-bk-photos__big [data-gallery-main] {
    filter: grayscale(.85);
}
