/* ================================================
   Flipbook — Mega Fresh Carolina Specials Viewer
   Scoped so these rules ONLY affect the flipbook,
   NOT the rest of the page.
   ================================================ */

/* ── Flipbook outer wrapper ── */
.flipbook-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f4f4f4;
    padding: 20px 0;
    overflow: hidden;       /* prevent horizontal overflow on mid-size screens */
    width: 100%;
}

/* ── Flipbook container — fixed dimensions required by turn.js ── */
.flipbook {
    width: 1000px;
    height: 600px;
    max-width: 100%;
}

/* ── Page base styles ── */
.flipbook .page {
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.11);
    overflow: hidden;
}

/* ── Images inside flipbook pages ── */
.flipbook .page img,
.flipbook > div > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* ── Hard cover pages ── */
.flipbook .hard {
    background: var(--primary, #CC0000) !important;
    color: #fff;
    font-weight: bold;
    border: none;
}
.flipbook .hard small {
    font-style: italic;
    font-weight: lighter;
    opacity: 0.7;
    font-size: 14px;
}

/* ── Dual-page spread ── */
.page.spread-left,
.page.spread-right {
    background-image: url('../img/part5.jpeg');
    background-size: 200% 100%;
    background-repeat: no-repeat;
    background-position: left center;
    border: none;
}
.page.spread-right {
    background-position: right center;
}

/* ── Hide flipbook on mobile, show vertical gallery ── */
@media (max-width: 768px) {
    .flipbook-wrapper {
        display: none;
    }
}

/* ── Vertical gallery (mobile fallback) ── */
.vertical-gallery {
    display: none;  /* hidden on desktop */
}

@media (max-width: 768px) {
    .vertical-gallery {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 0 16px;
        width: 100%;
    }
    .vertical-gallery img {
        width: 100%;
        max-width: 480px;
        height: auto;
        object-fit: cover;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
}
