/* DEBUG: Force flipbook overlay visible for troubleshooting */
.flipbook-overlay.open,
.flipbook-overlay[aria-hidden="false"] {
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 99999 !important;
    display: flex !important;
}

:root {
    --primary: #09405c;
    --secondary: #dba528;
    --tertiary: #6c888f;
    --accent: #efd5a3;
    --white: #f8f8f8;
    --black: #232323;

    --glass: rgba(248, 248, 248, .78);
    --glass-border: rgba(255, 255, 255, .55);

    --bg-card: rgba(255, 255, 255, .55);
    --bg-soft: rgba(248, 248, 248, .65);

    --line: rgba(9, 64, 92, .12);
    --line-2: rgba(9, 64, 92, .10);

    --shadow-xl: 0 25px 70px rgba(0, 0, 0, .25);
    --shadow-lg: 0 18px 55px rgba(0, 0, 0, .12);
    --shadow-md: 0 14px 40px rgba(0, 0, 0, .10);

    --radius: 18px;
    --radius-lg: 22px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    background: url(../images/background.jpg) no-repeat center center fixed;
    background-size: cover;
    color: var(--black);
}

.page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 28px;
}

.page::before {
    content: "";
    position: absolute;
    inset: -20%;
    background:
        linear-gradient(135deg, rgba(0, 0, 0, .04), transparent 60%),
        radial-gradient(circle at 80% 40%, rgba(9, 64, 92, .10), transparent 55%);
    pointer-events: none;
}

.content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: min(980px, 100%);
}

.logo {
    max-width: min(520px, 80%);
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .10));
}

.slogan {
    font-size: clamp(16px, 2.2vw, 22px);
    font-style: italic;
    color: rgba(0, 0, 0, .55);
    margin: 18px 0;
}

/* Buttons */
.btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease;
    box-shadow: 0 14px 40px rgba(9, 64, 92, .22);
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    opacity: .95;
}

.btn:active {
    transform: translateY(0);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1px solid rgba(9, 64, 92, .22);
    box-shadow: none;
}

/* Contact bar */
.contactbar {
    margin: 0 auto;
    width: min(980px, 100%);
    border-radius: var(--radius-lg);
    background: rgba(248, 248, 248, .60);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 14px;
}

.contactgrid {
    width: 100%;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 14px;
    align-items: stretch;
}

@media (max-width: 880px) {
    .contactgrid {
        grid-template-columns: 1fr;
    }
}

.contactcol,
.ctacol {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
}

.contactcol {
    text-align: left;
}

.contacttitle {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .3px;
    color: rgba(9, 64, 92, .92);
    margin-bottom: 10px;
}

.contactrow {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--line-2);
    background: var(--bg-soft);
}

.contactrow+.contactrow {
    margin-top: 10px;
}

.iconchip {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(219, 165, 40, .20), rgba(255, 255, 255, .8));
    border: 1px solid rgba(219, 165, 40, .35);
    color: rgba(9, 64, 92, .92);
    flex: 0 0 auto;
}

.contactlabel {
    font-size: 11px;
    font-weight: 900;
    color: rgba(9, 64, 92, .78);
    margin-bottom: 4px;
}

.contactvalue {
    font-size: 12.5px;
    font-weight: 700;
    color: rgba(0, 0, 0, .68);
    line-height: 1.35;
}

.contactvalue a {
    color: rgba(9, 64, 92, .92);
    text-decoration: none;
}

.contactvalue a:hover {
    text-decoration: underline;
}

/* CTA + socials */
.ctacol {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.btn.cta {
    width: 100%;
    padding: 13px 18px;
    position: relative;
    overflow: hidden;
}

.ctaGlow {
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 30% 30%, rgba(239, 213, 163, .65), rgba(219, 165, 40, .10), rgba(9, 64, 92, 0));
    transform: rotate(18deg);
    opacity: .9;
    pointer-events: none;
}

.socialwrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.social {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(248, 248, 248, .72);
    border: 1px solid rgba(9, 64, 92, .14);
    color: rgba(9, 64, 92, .92);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    text-decoration: none;
    font-weight: 900;
}

.social:hover {
    transform: translateY(-1px);
    border-color: rgba(219, 165, 40, .55);
    box-shadow: 0 12px 28px rgba(219, 165, 40, .18);
}

.socialnote {
    font-size: 12px;
    font-weight: 800;
    color: rgba(0, 0, 0, .55);
}

/* Products panel */
.panel {
    margin: 0 auto 2rem;
    width: min(980px, 100%);
    border-radius: var(--radius);
    background: rgba(248, 248, 248, .62);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    text-align: left;
}

.panel-top {
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(9, 64, 92, .10);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.panel-title {
    font-size: 14px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: .2px;
}

.panel-hint {
    font-size: 12px;
    color: rgba(0, 0, 0, .55);
    font-weight: 600;
}

.tabs {
    display: flex;
    gap: 10px;
    padding: 12px 12px 14px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    border-bottom: 1px solid rgba(9, 64, 92, .10);
}

.tabs::-webkit-scrollbar {
    height: 8px;
}

.tabs::-webkit-scrollbar-thumb {
    background: rgba(9, 64, 92, .15);
    border-radius: 999px;
}

.tab {
    flex: 0 0 auto;
    border: 1px solid rgba(9, 64, 92, .16);
    background: rgba(255, 255, 255, .65);
    color: rgba(9, 64, 92, .92);
    border-radius: 999px;
    padding: 10px 12px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
    white-space: nowrap;
}

.tab:hover {
    transform: translateY(-1px);
}

.tab.active {
    background: linear-gradient(135deg, rgba(219, 165, 40, .22), rgba(255, 255, 255, .80));
    border-color: rgba(219, 165, 40, .55);
    box-shadow: 0 10px 30px rgba(219, 165, 40, .18);
}

.product {
    padding: 16px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 14px;
}

@media (max-width: 880px) {
    .product {
        grid-template-columns: 1fr;
    }
}

.product-card,
.gallery {
    border-radius: 16px;
    background: rgba(255, 255, 255, .70);
    border: 1px solid rgba(9, 64, 92, .12);
    padding: 14px;
}

.product-name {
    font-size: 16px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 8px;
    letter-spacing: .2px;
}

.product-desc {
    font-size: 13px;
    color: rgba(0, 0, 0, .64);
    line-height: 1.55;
    font-weight: 600;
}

.gallery-title {
    font-size: 13px;
    font-weight: 900;
    color: rgba(9, 64, 92, .85);
    margin-bottom: 10px;
}

.thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 520px) {
    .thumbs {
        grid-template-columns: repeat(2, 1fr);
    }
}

.thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    border: 1px solid rgba(9, 64, 92, .14);
    overflow: hidden;
    cursor: pointer;
    background: rgba(9, 64, 92, .06);
    position: relative;
    transition: transform .12s ease, box-shadow .12s ease;
}

.thumb:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(9, 64, 92, .16), transparent 55%);
    opacity: 0;
    transition: opacity .12s ease;
}

.thumb:hover::after {
    opacity: .75;
}

/* ===========================
   FULL OVERLAY LIGHTBOX VIEWER
   =========================== */

.lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
    background: rgba(0, 0, 0, .82);
    backdrop-filter: blur(10px);
}

.lb-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.lb-ui {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.lb-topbar {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
    background: linear-gradient(180deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .15));
}

.lb-title {
    color: rgba(255, 255, 255, .92);
    font-weight: 900;
    font-size: 13px;
    letter-spacing: .2px;
    max-width: 45vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lb-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lb-iconbtn {
    border: none;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .12);
    height: 40px;
    min-width: 40px;
    padding: 0 10px;
    border-radius: 12px;
    cursor: pointer;
    color: rgba(255, 255, 255, .92);
    font-weight: 900;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease, border-color .12s ease;
    text-decoration: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.lb-iconbtn:hover {
    transform: translateY(-1px);
    border-color: rgba(219, 165, 40, .55);
    box-shadow: 0 12px 28px rgba(219, 165, 40, .12);
}

.lb-iconbtn:active {
    transform: translateY(0);
}

.lb-closebtn {
    background: rgba(255, 255, 255, .16);
}

@media (max-width:520px) {
    .lb-title {
        max-width: 42vw;
        font-size: 12px;
    }

    .lb-iconbtn {
        height: 38px;
        min-width: 38px;
        border-radius: 12px;
        font-size: 12px;
    }
}

/* Stage */
.lb-stage {
    position: relative;
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: none;
    /* enables custom pan/zoom */
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-stage img {
    transform-origin: 50% 50%;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
    max-width: none;
    max-height: none;
}

.lb-nav {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 10px;
}

.lb-navbtn {
    pointer-events: auto;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .92);
    font-size: 22px;
    font-weight: 900;
    display: grid;
    place-items: center;
    transition: transform .12s ease, border-color .12s ease, opacity .12s ease;
}

.lb-navbtn:hover {
    transform: translateY(-1px);
    border-color: rgba(219, 165, 40, .55);
}

.lb-navbtn:active {
    transform: translateY(0);
}

.lb-hint {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, .45);
    color: rgba(255, 255, 255, .92);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 800;
    max-width: calc(100% - 24px);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}

.lb-hint.show {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

    .lb-overlay,
    .lb-iconbtn,
    .lb-navbtn,
    .lb-hint {
        transition: none !important;
    }
}

/* Modal (smooth) */
.modal {
    position: fixed;
    inset: 0;
    z-index: 15000;
    padding: 18px;
    background: rgba(9, 64, 92, .22);
    backdrop-filter: blur(8px);

    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.modal.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;

    transform: translateY(14px) scale(.985);
    opacity: 0;
    transition: transform .18s ease, opacity .18s ease;
}

.modal.open .modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-card::before {
    content: "";
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(219, 165, 40, .70), rgba(9, 64, 92, .35), rgba(239, 213, 163, .70));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.modal-head {
    padding: 18px 20px 10px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.modal-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--primary);
}

.modal-sub {
    margin-top: 6px;
    font-size: 13px;
    color: rgba(0, 0, 0, .55);
    font-weight: 600;
}

.xbtn {
    border: none;
    background: rgba(255, 255, 255, .55);
    border: 1px solid rgba(9, 64, 92, .12);
    width: 38px;
    height: 38px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 18px;
    color: rgba(0, 0, 0, .6);
    display: grid;
    place-items: center;
}

.modal-body {
    padding: 10px 20px 18px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width:520px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.label {
    font-size: 12px;
    font-weight: 900;
    color: rgba(9, 64, 92, .80);
    letter-spacing: .2px;
}

.input {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(9, 64, 92, .18);
    background: rgba(255, 255, 255, .65);
    outline: none;
    font-size: 14px;
}

.input:focus {
    border-color: rgba(219, 165, 40, .65);
    box-shadow: 0 0 0 4px rgba(219, 165, 40, .18);
    background: rgba(255, 255, 255, .80);
}

textarea.input {
    resize: vertical;
    min-height: 110px;
}

.actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
}

.status {
    margin-top: 10px;
    font-size: 13px;
    min-height: 18px;
    color: rgba(0, 0, 0, .62);
    font-weight: 600;
}

.status.error {
    color: #b00020;
    font-weight: 800;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
    animation: spin .8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.success {
    display: none;
    padding: 22px 20px 26px;
    text-align: center;
}

.checkwrap {
    width: 74px;
    height: 74px;
    margin: 6px auto 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(239, 213, 163, .9), rgba(219, 165, 40, .55));
    box-shadow: 0 18px 45px rgba(219, 165, 40, .25);
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
}

.checkwrap::after {
    content: "";
    position: absolute;
    inset: -60%;
    background: conic-gradient(from 180deg, rgba(9, 64, 92, 0), rgba(9, 64, 92, .35), rgba(9, 64, 92, 0));
    animation: halo 1.1s ease-out 1;
}

@keyframes halo {
    from {
        transform: rotate(0deg);
        opacity: 0;
    }

    to {
        transform: rotate(280deg);
        opacity: 1;
    }
}

.check {
    width: 34px;
    height: 18px;
    border-left: 6px solid var(--primary);
    border-bottom: 6px solid var(--primary);
    transform: rotate(-45deg);
    animation: draw .35s ease-out .1s both;
}

@keyframes draw {
    from {
        transform: rotate(-45deg) scale(.5);
        opacity: 0;
    }

    to {
        transform: rotate(-45deg) scale(1);
        opacity: 1;
    }
}

.success h3 {
    color: var(--primary);
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 8px;
}

.success p {
    color: rgba(0, 0, 0, .62);
    line-height: 1.5;
    font-weight: 700;
    font-size: 14px;
}

.hp {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    height: 1px !important;
    width: 1px !important;
    overflow: hidden !important;
}

/* WhatsApp */
.wa-float {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    z-index: 22000;
    background: linear-gradient(135deg, rgba(219, 165, 40, .25), rgba(9, 64, 92, .95));
    border: 1px solid rgba(255, 255, 255, .35);
    box-shadow: 0 18px 55px rgba(0, 0, 0, .26);
    color: #fff;
    text-decoration: none;
    transition: transform .12s ease, opacity .12s ease;
}

.wa-float:hover {
    transform: translateY(-2px);
    opacity: .95;
}

.wa-ring {
    position: absolute;
    inset: -10px;
    border-radius: 24px;
    border: 2px solid rgba(219, 165, 40, .45);
    opacity: 0;
    animation: waPulse 1.6s ease-out infinite;
}

@keyframes waPulse {
    0% {
        transform: scale(.86);
        opacity: 0;
    }

    40% {
        opacity: .55;
    }

    100% {
        transform: scale(1.08);
        opacity: 0;
    }
}

/* ===========================
   Premium Viewer UI behaviors
   =========================== */

/* When UI is hidden, fade topbar + nav + hint, but keep stage active */
.lb-overlay.ui-hidden .lb-topbar,
.lb-overlay.ui-hidden .lb-nav,
.lb-overlay.ui-hidden .lb-hint {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
}

/* Smooth transform for topbar/nav when hiding */
.lb-topbar,
.lb-nav,
.lb-hint {
    transition: opacity .18s ease, transform .18s ease;
}

/* Keep nav centered; only topbar shifts slightly */
.lb-nav {
    transform: translateY(0);
}

/* Mobile-first: slightly larger tap targets feel premium */
@media (max-width: 520px) {
    .lb-navbtn {
        width: 52px;
        height: 52px;
        font-size: 24px;
    }
}

/* Optional: hide nav buttons on very small screens unless UI visible */
@media (max-width: 380px) {
    .lb-overlay.ui-hidden .lb-navbtn {
        opacity: 0 !important;
    }
}

/* ===========================
   PRODUCT CATALOG FLIPBOOK
   =========================== */

/* Catalog Panel Preview */
.catalog-panel {
    margin-bottom: 2rem;
}

.catalog-preview {
    padding: 16px;
}

.catalog-cover {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(9, 64, 92, 0.04), rgba(219, 165, 40, 0.08));
    border: 1px solid rgba(9, 64, 92, 0.12);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.catalog-cover:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(9, 64, 92, 0.15);
    border-color: rgba(219, 165, 40, 0.4);
}

.catalog-cover:focus-visible {
    outline: 3px solid rgba(219, 165, 40, 0.65);
    outline-offset: 2px;
}

.catalog-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), rgba(9, 64, 92, 0.85));
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(9, 64, 92, 0.25);
}

.catalog-info {
    flex: 1;
}

.catalog-title {
    font-size: 18px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 4px;
}

.catalog-subtitle {
    font-size: 13px;
    color: rgba(0, 0, 0, 0.55);
    font-weight: 600;
}

.catalog-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    font-size: 13px;
    font-weight: 800;
    box-shadow: 0 10px 28px rgba(9, 64, 92, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.catalog-cover:hover .catalog-btn {
    transform: translateX(4px);
    box-shadow: 0 12px 32px rgba(9, 64, 92, 0.25);
}

@media (max-width: 600px) {
    .catalog-cover {
        flex-direction: column;
        text-align: center;
    }

    .catalog-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Flipbook Overlay */
.flipbook-overlay {
    position: fixed;
    inset: 0;
    z-index: 25000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
}

.flipbook-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.flipbook-overlay[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
}

/* Flipbook Container */
.flipbook-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    margin: 0 auto;
}

/* Toolbar */
.flipbook-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.flipbook-toolbar-left,
.flipbook-toolbar-center,
.flipbook-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flipbook-toolbar-left {
    flex: 1;
}

.flipbook-toolbar-center {
    flex: 0 0 auto;
}

.flipbook-toolbar-right {
    flex: 1;
    justify-content: flex-end;
}

.flipbook-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 800;
    font-size: 14px;
}

.flipbook-title svg {
    opacity: 0.8;
}

.flipbook-page-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 700;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.flipbook-btn {
    border: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    text-decoration: none;
}

.flipbook-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.flipbook-btn:active {
    transform: scale(0.95);
}

.flipbook-close {
    background: rgba(255, 70, 70, 0.15);
    border-color: rgba(255, 70, 70, 0.25);
}

.flipbook-close:hover {
    background: rgba(255, 70, 70, 0.3);
    border-color: rgba(255, 70, 70, 0.4);
}

/* Flipbook Stage */
.flipbook-stage {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 2000px;
    perspective-origin: center center;
}

/* Loading State */
.flipbook-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
}

.flipbook-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: flipbookSpin 1s linear infinite;
}

@keyframes flipbookSpin {
    to {
        transform: rotate(360deg);
    }
}

.flipbook-loading-text {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
    font-size: 14px;
}

.flipbook-loading-progress {
    color: var(--secondary);
    font-weight: 800;
    font-size: 16px;
}

/* Error State */
.flipbook-error {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.7);
    z-index: 10;
}

.flipbook-error svg {
    opacity: 0.6;
}

.flipbook-error-text {
    font-weight: 700;
    font-size: 15px;
}

/* 3D Book Container */
.flipbook-book {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    padding: 0;
}

.flipbook-pages {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Single page mode (cover and back cover) */
.flipbook-pages.single-page {
    width: 50%;
    max-width: 50%;
}

/* Individual Page */
.flipbook-page {
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.645, 0.045, 0.355, 1);
    cursor: pointer;
    backface-visibility: hidden;
}

.flipbook-page.left {
    left: 0;
    transform-origin: right center;
}

.flipbook-page.right {
    left: 50%;
    transform-origin: left center;
}

/* Single page positioning */
.flipbook-pages.single-page .flipbook-page {
    width: 100%;
    position: relative;
    left: 0;
}

.flipbook-pages.single-page.single-right .flipbook-page.right {
    left: 0;
}

.flipbook-pages.single-page.single-left .flipbook-page.left {
    left: 0;
}

.flipbook-page-front,
.flipbook-page-back {
    position: absolute;
    inset: 0;
    background: transparent;
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(0, 0, 0, 0.2);
    backface-visibility: hidden;
}

.flipbook-page-back {
    transform: rotateY(180deg);
}

.flipbook-page canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent;
    border-radius: 4px;
}

/* Page flip effect */
.flipbook-page.flipping {
    z-index: 100;
}

.flipbook-page.right.flipping {
    transform: rotateY(-180deg);
}

.flipbook-page.left.flipping {
    transform: rotateY(180deg);
}

/* Book shadow and spine effect - only for two-page spreads */
.flipbook-pages::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 40px;
    transform: translateX(-50%);
    background: linear-gradient(90deg,
            rgba(0, 0, 0, 0.2) 0%,
            rgba(0, 0, 0, 0.08) 20%,
            transparent 50%,
            rgba(0, 0, 0, 0.08) 80%,
            rgba(0, 0, 0, 0.2) 100%);
    pointer-events: none;
    z-index: 50;
}

/* Hide spine for single page mode */
.flipbook-pages.single-page::before {
    display: none;
}

/* Page edge shadow effect */
.flipbook-page::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 20px;
    pointer-events: none;
    z-index: 10;
}

.flipbook-page.left::after {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.1), transparent);
}

.flipbook-page.right::after {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.1), transparent);
}

/* Hide edge shadows for single pages */
.flipbook-pages.single-page .flipbook-page::after {
    display: none;
}

/* Navigation Arrows */
.flipbook-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    z-index: 100;
    display: grid;
    place-items: center;
    transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
    backdrop-filter: blur(8px);
}

.flipbook-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.flipbook-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.flipbook-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.flipbook-nav:disabled:hover {
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
}

.flipbook-nav-prev {
    left: 20px;
}

.flipbook-nav-next {
    right: 20px;
}

/* Page Thumbnails */
.flipbook-thumbnails {
    padding: 12px 16px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    flex-shrink: 0;
    -webkit-overflow-scrolling: touch;
}

.flipbook-thumbs-inner {
    display: flex;
    gap: 10px;
    justify-content: center;
    min-width: min-content;
}

.flipbook-thumb {
    width: 60px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.1);
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    flex-shrink: 0;
}

.flipbook-thumb:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.flipbook-thumb.active {
    border-color: var(--secondary);
    box-shadow: 0 0 12px rgba(219, 165, 40, 0.4);
}

.flipbook-thumb canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.flipbook-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    font-weight: 700;
}

/* Zoom controls */
.flipbook-pages.zoomed {
    cursor: grab;
}

.flipbook-pages.zoomed:active {
    cursor: grabbing;
}

/* Responsive styles for mobile */
@media (max-width: 768px) {
    .flipbook-pages {
        width: 100%;
        height: 100%;
        max-width: 100%;
    }

    .flipbook-pages.single-page {
        width: 100%;
        max-width: 100%;
    }

    /* Single page view on mobile for all spreads */
    .flipbook-page {
        width: 100%;
        position: relative;
        left: 0 !important;
    }

    .flipbook-pages::before {
        display: none;
    }

    .flipbook-page::after {
        display: none;
    }

    .flipbook-nav {
        width: 44px;
        height: 44px;
    }

    .flipbook-nav-prev {
        left: 8px;
    }

    .flipbook-nav-next {
        right: 8px;
    }

    .flipbook-toolbar {
        padding: 10px 12px;
    }

    .flipbook-title span {
        display: none;
    }

    .flipbook-btn {
        width: 38px;
        height: 38px;
    }

    .flipbook-thumb {
        width: 45px;
        height: 60px;
    }

    .flipbook-thumbnails {
        padding: 8px 12px;
    }
}

/* Larger screens */
@media (min-width: 1200px) {
    .flipbook-pages {
        width: 100%;
        height: 100%;
    }

    .flipbook-pages.single-page {
        width: 50%;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .flipbook-page {
        transition: none;
    }

    .flipbook-spinner {
        animation: none;
    }
}
