/* BC Gallery + CSP Layout (v4.6.2) — restored natural full-width editorial flow */
.bc-gallery { width: 100% !important; max-width: 100%; box-sizing: border-box; }

.bc-gallery--editorial {
    display: flex;
    gap: 0;
    width: 100% !important;
    position: relative;
}

/* LEFT: Main image — sticky on page scroll */
.bc-gallery__main {
    position: sticky;
    top: 0;
    width: 55%;
    height: 100vh;
    flex-shrink: 0;
    align-self: flex-start;
    overflow: hidden;
}
.bc-gallery__main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

/* RIGHT: Gallery — natural stacked images, no forced half-height blocks */
.bc-gallery__scroll {
    width: 45%;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.bc-gallery__scroll::-webkit-scrollbar { display: none; }
.bc-gallery__scroll-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top center;
    cursor: pointer;
    transition: opacity var(--bc-transition);
    display: block;
    flex: none;
    flex-shrink: 0;
}
.bc-gallery__scroll-img:hover { opacity: 0.9; }

/* Keep modifier classes harmless for compatibility */
.bc-gallery__scroll--single,
.bc-gallery__scroll--pair,
.bc-gallery__scroll--stack {
    overflow-y: auto;
}
.bc-gallery__scroll--single .bc-gallery__scroll-img,
.bc-gallery__scroll--pair .bc-gallery__scroll-img,
.bc-gallery__scroll--stack .bc-gallery__scroll-img {
    height: auto;
}

/* CSP info wrapper — fixed viewport height, internal scroll only */
.bc-csp-info-shell {
    position: sticky !important;
    top: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    align-self: flex-start;
    overflow: hidden !important;
}

.csp-info {
    width: 100%;
    height: 100% !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    display: flex;
    flex-direction: column;
}
.csp-info::-webkit-scrollbar { display: none; }

/* Optional manual gallery wrapper if needed in Elementor */
.csp-gallery {
    position: sticky;
    top: 0;
    align-self: flex-start;
}

/* Traditional */
.bc-gallery--traditional { width: 100% !important; }
.bc-gallery__traditional-main { width: 100%; }
.bc-gallery__traditional-main img { width: 100%; height: auto; object-fit: cover; display: block; }
.bc-gallery__thumbnails {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    overflow-x: auto;
}
.bc-gallery__thumb {
    width: 80px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--bc-transition);
}
.bc-gallery__thumb:hover,
.bc-gallery__thumb.active { border-color: var(--bc-primary); }

/* Mobile */
@media (max-width: 768px) {
    .bc-gallery--editorial {
        flex-direction: column;
    }
    .bc-gallery__main {
        position: relative;
        width: 100%;
        height: auto;
    }
    .bc-gallery__main-img {
        height: auto;
    }
    .bc-gallery__scroll {
        position: relative;
        width: 100%;
        height: auto;
        overflow-y: visible;
    }
    .bc-gallery__scroll-img,
    .bc-gallery__scroll--single .bc-gallery__scroll-img,
    .bc-gallery__scroll--pair .bc-gallery__scroll-img,
    .bc-gallery__scroll--stack .bc-gallery__scroll-img {
        height: auto;
    }
    .bc-csp-info-shell,
    .csp-gallery {
        position: relative;
        top: auto;
    }
    .csp-info {
        height: auto;
        overflow-y: visible;
        overscroll-behavior: auto;
    }
}
