.book-carousel-8d55fdff {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    --book-aspect: 2/3;
    outline: none;
    overflow: visible;
}

.bc-scene {
    position: relative;
    width: 100%;
    aspect-ratio: var(--book-aspect);
    perspective: 2000px;
    display: flex;
    justify-content: center;
    margin: 10px 0;
}

.bc-book {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 600px;
    transform-style: preserve-3d;
    transition: transform 0.6s ease;
}

/* Desktop: 2-page spread, centered */
@media (min-width: 768px) {
    .book-carousel-8d55fdff {
        /* Container accommodates two pages wide */
        aspect-ratio: auto;
    }
    .bc-scene {
        /* The scene holds ONE page's width, but we move it so two pages fit */
        width: auto;
        transform: translateX(50%);
    }
}

.bc-page {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    cursor: pointer;
}

.bc-page-front, .bc-page-back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 2px 8px 8px 2px;
    box-shadow: inset 2px 0 10px rgba(0,0,0,0.1), 2px 2px 5px rgba(0,0,0,0.3);
}

.bc-page-back {
    transform: rotateY(180deg);
    border-radius: 8px 2px 2px 8px;
    box-shadow: inset -2px 0 10px rgba(0,0,0,0.1), -2px 2px 5px rgba(0,0,0,0.3);
}

.bc-page.flipped {
    transform: rotateY(-180deg);
}

/* Mobile */
@media (max-width: 767px) {
    .bc-scene {
        perspective: none;
    }
    .bc-page {
        transition: opacity 0.5s ease;
        opacity: 0;
        pointer-events: none;
        transform: none !important;
    }
    .bc-page.active-mobile {
        opacity: 1;
        pointer-events: auto;
    }
    .bc-page-back {
        display: none;
    }
}

/* Navigation Controls wrapper */
.bc-controls-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
    z-index: 10;
}

/* specific positional styling */
.nav-middle .bc-controls-wrapper {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}
.nav-middle .bc-nav-btn, .nav-middle .bc-reset-btn {
    pointer-events: auto;
}
.nav-middle .bc-prev { position: absolute; left: 10px; }
.nav-middle .bc-next { position: absolute; right: 10px; }
.nav-middle .bc-reset-btn { position: absolute; bottom: -50px; left: 50%; transform: translateX(-50%); }

.bc-nav-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s;
    background: rgba(0,0,0,0.5);
}

.bc-nav-btn:hover {
    opacity: 0.8;
}

.bc-nav-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.bc-reset-btn {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.3s;
}
.bc-reset-btn:hover {
    opacity: 0.8;
}

/* Zoom */
.bc-zoom-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.5);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.bc-zoom-btn svg {
    fill: #fff;
    width: 24px;
    height: 24px;
}
.bc-page-front:hover .bc-zoom-btn {
    opacity: 1;
}
.bc-zoom-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(0,0,0,0.8);
}

/* Lightbox */
.bc-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.admin-bar .bc-lightbox-overlay {
    top: var(--wp-admin--admin-bar--height, 32px);
    height: calc(100vh - var(--wp-admin--admin-bar--height, 32px));
}

@media screen and (max-width: 782px) {
    body.admin-bar .bc-lightbox-overlay {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

.bc-lightbox-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.bc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}