.stom-foto-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.stom-foto-carousel .swiper-wrapper {
    align-items: stretch;
}

.stom-foto-carousel .swiper-slide {
    width: auto !important;
    height: var(--stom-carousel-height-desktop, 550px);
}

.stom-foto-carousel .stom-carousel-lightbox,
.stom-foto-carousel .stom-carousel-image-wrap {
    display: block;
    width: auto;
    height: var(--stom-carousel-height-desktop, 550px);
    border-radius: var(--stom-radius, 15px);
    overflow: hidden;
}

.stom-foto-carousel .stom-carousel-lightbox {
    cursor: zoom-in;
}

.stom-foto-carousel .stom-carousel-foto {
    display: block;
    width: auto;
    height: var(--stom-carousel-height-desktop, 550px);
    max-width: none;
    object-fit: contain;
    border-radius: var(--stom-radius, 15px);
    transition: opacity 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .stom-foto-carousel .stom-carousel-lightbox:hover .stom-carousel-foto {
        opacity: 0.9;
    }
}

.stom-foto-carousel .swiper-button-prev,
.stom-foto-carousel .swiper-button-next {
    width: var(--stom-arrow-size, 46px);
    height: var(--stom-arrow-size, 46px);
    margin-top: calc(var(--stom-arrow-size, 46px) / -2);
    border: 0;
    border-radius: 50%;
    background: var(--stom-arrow-bg, #ffffff);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.stom-foto-carousel .swiper-button-prev::after,
.stom-foto-carousel .swiper-button-next::after {
    font-size: calc(var(--stom-arrow-size, 46px) * 0.39);
    font-weight: 700;
    color: var(--stom-arrow-color, #222222);
}

.stom-foto-carousel .swiper-button-prev { left: 15px; }
.stom-foto-carousel .swiper-button-next { right: 15px; }

.stom-foto-carousel .swiper-pagination {
    position: relative;
    left: auto;
    bottom: auto;
    margin-top: 18px;
}

.stom-foto-carousel .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    opacity: 0.35;
    background: var(--stom-bullet-color, #222222);
}

.stom-foto-carousel .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--stom-bullet-active, #222222);
}

.stom-foto-carousel.stom-no-arrows .swiper-button-prev,
.stom-foto-carousel.stom-no-arrows .swiper-button-next,
.stom-foto-carousel.stom-no-pagination .swiper-pagination {
    display: none !important;
}

.glightbox-container .goverlay { background: rgba(0, 0, 0, 0.92); }
.glightbox-container .gslide-image img {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
}
.glightbox-container .gclose,
.glightbox-container .gnext,
.glightbox-container .gprev {
    background-color: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
}
.glightbox-container .gslide-description { background: rgba(0, 0, 0, 0.75); }
.glightbox-container .gdesc-inner { color: #fff; }

@media (max-width: 980px) {
    .stom-foto-carousel .swiper-slide,
    .stom-foto-carousel .stom-carousel-lightbox,
    .stom-foto-carousel .stom-carousel-image-wrap,
    .stom-foto-carousel .stom-carousel-foto {
        height: var(--stom-carousel-height-tablet, 450px);
    }
}

@media (max-width: 767px) {
    .stom-foto-carousel .swiper-slide,
    .stom-foto-carousel .stom-carousel-lightbox,
    .stom-foto-carousel .stom-carousel-image-wrap,
    .stom-foto-carousel .stom-carousel-foto {
        height: var(--stom-carousel-height-mobile, 350px);
    }
}


/* Lightbox fototitel: linksonder over de foto */
.glightbox-container .gslide-image {
    position: relative;
}

.glightbox-container .gslide-description {
    position: absolute !important;
    left: 0;
    bottom: 0;
    z-index: 10;
    width: auto !important;
    max-width: calc(100% - 32px);
    margin: 0 0 18px 18px !important;
    padding: 0 !important;
    background: transparent !important;
    pointer-events: none;
}

.glightbox-container .gslide-description .gdesc-inner {
    padding: 0 !important;
}

.glightbox-container .gslide-title {
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    background: transparent !important;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.85);
}

.glightbox-container .gslide-desc {
    color: #fff !important;
    background: transparent !important;
    text-transform: none !important;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.85);
}

@media (max-width: 767px) {
    .glightbox-container .gslide-description {
        max-width: calc(100% - 24px);
        margin: 0 0 14px 14px !important;
    }

    .glightbox-container .gslide-title {
        font-size: 16px;
    }
}


/* Fototitel op de slide */
.stom-foto-carousel .stom-carousel-lightbox,
.stom-foto-carousel .stom-carousel-image-wrap,
.stom-foto-carousel .stom-carousel-custom-link {
    position: relative;
}
.stom-foto-carousel .stom-carousel-slide-title {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 10px 14px;
    color: var(--stom-slide-title-color, #fff);
    background: var(--stom-slide-title-bg, rgba(0,0,0,.55));
    font-size: 16px;
    line-height: 1.35;
    text-align: center;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}
.stom-foto-carousel.stom-title-hover .stom-carousel-slide-title {
    opacity: 0;
    transform: translateY(100%);
}
@media (hover: hover) and (pointer: fine) {
    .stom-foto-carousel.stom-title-hover .swiper-slide:hover .stom-carousel-slide-title {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (hover: none), (pointer: coarse) {
    .stom-foto-carousel.stom-title-hover .stom-carousel-slide-title {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery layouts introduced in 1.4.0 */
.stom-foto-carousel.stom-display-masonry,
.stom-foto-carousel.stom-display-grid { width:100%; overflow:visible; }
.stom-foto-carousel.stom-display-masonry .swiper-wrapper { display:block; column-count:var(--stom-gallery-columns,4); column-gap:var(--stom-gallery-gap,6px); height:auto; transform:none!important; }
.stom-foto-carousel.stom-display-masonry .swiper-slide { display:block; width:100%!important; height:auto!important; margin:0 0 var(--stom-gallery-gap,6px)!important; break-inside:avoid; overflow:hidden; }
.stom-foto-carousel.stom-display-grid .swiper-wrapper { display:grid; grid-template-columns:repeat(var(--stom-gallery-columns,4),minmax(0,1fr)); gap:var(--stom-gallery-gap,6px); height:auto; transform:none!important; }
.stom-foto-carousel.stom-display-grid .swiper-slide { width:100%!important; height:auto!important; margin:0!important; min-width:0; overflow:hidden; }
.stom-foto-carousel.stom-display-masonry .stom-carousel-foto { display:block; width:100%; height:auto!important; max-height:none!important; object-fit:contain; }
.stom-foto-carousel.stom-display-grid .stom-carousel-foto { display:block; width:100%; height:100%!important; max-height:none!important; object-fit:cover; aspect-ratio:1/1; }
.stom-foto-carousel.stom-display-grid .swiper-slide > a, .stom-foto-carousel.stom-display-grid .swiper-slide > .stom-carousel-image-wrap { display:block; width:100%; aspect-ratio:1/1; overflow:hidden; }
@media(max-width:900px){ .stom-foto-carousel.stom-display-masonry .swiper-wrapper{column-count:3;} .stom-foto-carousel.stom-display-grid .swiper-wrapper{grid-template-columns:repeat(3,minmax(0,1fr));} }
@media(max-width:600px){ .stom-foto-carousel.stom-display-masonry .swiper-wrapper{column-count:2;} .stom-foto-carousel.stom-display-grid .swiper-wrapper{grid-template-columns:repeat(2,minmax(0,1fr));} }

/* 1.4.0 beta 2: release carousel-only fixed heights in masonry. */
.stom-foto-carousel.stom-display-masonry .swiper-slide > a,
.stom-foto-carousel.stom-display-masonry .swiper-slide > .stom-carousel-image-wrap {
    display:block; width:100%; height:auto !important; max-height:none !important;
    overflow:hidden; border-radius:var(--stom-radius,15px);
}
.stom-foto-carousel.stom-display-masonry .swiper-slide {
    float:none !important; padding:0 !important;
}
.stom-foto-carousel.stom-display-masonry .stom-carousel-foto {
    width:100% !important; height:auto !important; max-width:100% !important;
    max-height:none !important; aspect-ratio:auto !important;
}
.stom-foto-carousel.stom-display-grid .swiper-slide > a,
.stom-foto-carousel.stom-display-grid .swiper-slide > .stom-carousel-image-wrap {height:auto !important;}

/* Balanced masonry: JS places items in the shortest measured column. */
.stom-foto-carousel.stom-masonry-balanced .swiper-wrapper { display:grid!important; grid-template-columns:repeat(var(--stom-gallery-columns,4),minmax(0,1fr)); gap:var(--stom-gallery-gap,6px); column-count:auto!important; align-items:start; }
.stom-foto-carousel.stom-masonry-balanced .stom-balanced-column { display:flex; flex-direction:column; gap:var(--stom-gallery-gap,6px); min-width:0; }
.stom-foto-carousel.stom-masonry-balanced .swiper-slide { margin:0!important; }
@media(max-width:900px){.stom-foto-carousel.stom-masonry-balanced .swiper-wrapper{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:600px){.stom-foto-carousel.stom-masonry-balanced .swiper-wrapper{grid-template-columns:repeat(2,minmax(0,1fr));}}
