/* ========================================================= */
/* VISOR CATÁLOGO BATA - DISEÑO TIPO MOCKUP */
/* ========================================================= */

.catalogo-viewer-section {
    width: 100%;
    background: #ffffff;
    padding: 40px 0 70px;
}

.catalogo-viewer-wrapper {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
}

/* ========================================================= */
/* LOADING */
/* ========================================================= */

.flipbook-loading {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.flipbook-loader {
    width: 44px;
    height: 44px;
    border: 4px solid #e5e7eb;
    border-top-color: #cf1f2b;
    border-radius: 999px;
    animation: flipbookSpin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes flipbookSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================================= */
/* CONTENEDOR */
/* ========================================================= */

.flipbook-container {
    width: 100%;
    position: relative;
}

.flipbook-container.hidden {
    display: none;
}

/* ========================================================= */
/* STAGE PRINCIPAL */
/* ========================================================= */

.catalogo-stage {
    width: 100%;
    min-height: 680px;

    display: grid;
    grid-template-columns: 190px minmax(320px, 1fr) 190px;
    align-items: center;
    justify-items: center;
    gap: 28px;

    position: relative;
}

.catalogo-book-area {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;

    min-width: 0;
    position: relative;
    z-index: 2;
}

#flipbook {
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ========================================================= */
/* FLECHAS LATERALES */
/* ========================================================= */

.catalogo-side-arrow {
    width: 82px;
    height: 82px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1.6px dashed #cf1f2b;
    border-radius: 50%;
    background: #ffffff;
    color: #111827;

    cursor: pointer;
    font-size: 42px;
    line-height: 1;

    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    transition: all 0.24s ease;

    position: relative;
    z-index: 20;
}

.catalogo-side-arrow::before {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 50%;
    border: 1px dashed rgba(207, 31, 43, 0.35);
    opacity: 0;
    transition: all 0.24s ease;
}

.catalogo-side-arrow:hover {
    color: #cf1f2b;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.catalogo-side-arrow:hover::before {
    opacity: 1;
}

.catalogo-side-arrow:active {
    transform: translateY(0) scale(0.98);
}

/* ========================================================= */
/* PAGEFLIP */
/* ========================================================= */

.page {
    position: relative;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    overflow: visible;
    z-index: 10;
}

.page-content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
    z-index: 11;
}

.page-content canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.stf__parent {
    margin: 0 auto !important;
}

.stf__wrapper {
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

/* Sombras decorativas */
.stf__outerShadow,
.stf__innerShadow,
.stf__hardShadow,
.stf__hardInnerShadow {
    pointer-events: none !important;
}

/* Evita que capas internas roben clicks */
.stf__wrapper,
.stf__block {
    pointer-events: none;
}

.stf__item,
.stf__item .page,
.stf__item .page-content,
.stf__item .pdf-overlay-layer,
.stf__item .pdf-link-overlay {
    pointer-events: auto !important;
}

/* ========================================================= */
/* OVERLAY LINKS PDF */
/* ========================================================= */

.pdf-overlay-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 99998;
}

.page-content a.pdf-link-overlay {
    position: absolute;
    z-index: 99999 !important;

    display: block;
    cursor: pointer;
    pointer-events: auto !important;

    -webkit-tap-highlight-color: transparent;
}

.page-content a.pdf-link-overlay:hover {
    background: rgba(207, 31, 43, 0.08);
    border-radius: 2px;
}

/* ========================================================= */
/* CONTROLES INFERIORES */
/* ========================================================= */

.catalogo-bottom-controls {
    width: 100%;
    max-width: 1040px;
    margin: 34px auto 0;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    position: relative;
    z-index: 50;
}

.catalogo-page-pill {
    grid-column: 2;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 70px;
    padding: 12px 18px;

    border: 1px solid #eef0f4;
    border-radius: 999px;
    background: #ffffff;

    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
}

.page-jump-label {
    margin: 0;
    color: #111827;
    font-size: 15px;
    font-weight: 700;
}

.page-number-input {
    width: 62px;
    height: 48px;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    background: #ffffff;
    color: #111827;

    text-align: center;
    font-size: 16px;
    font-weight: 600;

    outline: none;
    transition: all 0.22s ease;
}

.page-number-input:focus {
    border-color: #cf1f2b;
    box-shadow: 0 0 0 4px rgba(207, 31, 43, 0.12);
}

.page-total-label {
    color: #111827;
    font-size: 15px;
    font-weight: 700;
}

.catalogo-go-btn {
    width: 46px;
    height: 46px;

    border: none;
    border-radius: 16px;
    background: #f3f4f6;
    color: #111827;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;
    font-size: 19px;

    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.22);
    transition: all 0.22s ease;
}

.catalogo-go-btn:hover {
    background: rgba(207, 31, 43, 0.10);
    color: #cf1f2b;
    transform: translateY(-2px);
}

.catalogo-go-btn:active {
    transform: translateY(0);
}

/* ========================================================= */
/* ACCIONES SECUNDARIAS */
/* ========================================================= */

.catalogo-secondary-actions {
    grid-column: 3;

    justify-self: end;

    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;

    position: relative;
}



.catalogo-action-icon {
    width: 42px;
    height: 42px;

    border-radius: 14px;
    background: #f3f4f6;
    color: #111827;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
}

/* ========================================================= */
/* AYUDA INFERIOR */
/* ========================================================= */

.catalogo-gesture-help {
    width: min(820px, 100%);
    margin: 38px auto 0;

    display: flex;
    align-items: center;
    gap: 22px;

    padding: 22px 34px;
    border-radius: 24px;
    background: #f8fafc;

    color: #1f2937;

    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.catalogo-gesture-help .gesture-icon {
    width: 66px;
    min-width: 66px;
    height: 66px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #111827;
    font-size: 38px;
}

.catalogo-gesture-help strong {
    display: block;
    margin-bottom: 6px;

    color: #111827;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.catalogo-gesture-help p {
    margin: 0;

    color: #334155;
    font-size: 14px;
    line-height: 1.5;
}

/* ========================================================= */
/* RESPONSIVE */
/* ========================================================= */

@media (max-width: 1199px) {
    .catalogo-stage {
        grid-template-columns: 120px minmax(320px, 1fr) 120px;
        gap: 18px;
        min-height: 620px;
    }

    .catalogo-side-arrow {
        width: 68px;
        height: 68px;
        font-size: 34px;
    }
}

@media (max-width: 991px) {
    .catalogo-viewer-wrapper {
        padding: 0 18px;
    }

    .catalogo-stage {
        grid-template-columns: 1fr;
        gap: 22px;
        min-height: auto;
    }

    .catalogo-side-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);

        width: 58px;
        height: 58px;
        font-size: 28px;

        background: rgba(255, 255, 255, 0.94);
        z-index: 80;
    }

    .catalogo-side-arrow:hover {
        transform: translateY(-50%) scale(1.03);
    }

    .catalogo-side-arrow-left {
        left: 4px;
    }

    .catalogo-side-arrow-right {
        right: 4px;
    }

    /* =========================
       CONTROLES INFERIORES MÓVIL
       ========================= */
    .catalogo-bottom-controls {
        max-width: 100%;
        margin: 26px auto 0;

        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 14px;
    }

    .catalogo-page-pill {
        grid-column: auto;
        flex: 1 1 auto;
        max-width: 360px;
        min-width: 0;
        margin: 0;
    }

    .catalogo-secondary-actions {
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        align-self: center;
    }

    .catalogo-direct-actions {
        gap: 10px;
        padding: 8px 12px;
    }

    .catalogo-direct-action {
        width: 54px;
        height: 54px;
    }

    
}

@media (max-width: 576px) {
    .catalogo-viewer-section {
        padding: 22px 0 42px;
    }

    .catalogo-viewer-wrapper {
        padding: 0 10px;
    }

    .catalogo-side-arrow {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    /* =========================
       FILTRO + 3 PUNTOS EN FILA
       ========================= */
    .catalogo-bottom-controls {
        width: 100%;
        gap: 10px;
        align-items: center;
        justify-content: center;
    }

    .catalogo-page-pill {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
        min-height: 64px;
        padding: 10px 12px;
        gap: 8px;
        border-radius: 999px;
    }

    .page-jump-label,
    .page-total-label {
        font-size: 13px;
    }

    .page-number-input {
        width: 56px;
        height: 44px;
        font-size: 15px;
    }

    .catalogo-go-btn {
        width: 42px;
        height: 42px;
        border-radius: 14px;
    }

    .catalogo-secondary-actions {
        flex: 0 0 auto;
        width: auto;
    }

    .catalogo-direct-actions {
        gap: 8px;
        padding: 8px 10px;
    }

    .catalogo-direct-action {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .catalogo-action-icon {
        width: 36px;
        height: 36px;
    }

    .catalogo-hover-label {
        display: none;
    }

    .catalogo-gesture-help {
        padding: 18px;
        gap: 14px;
        align-items: flex-start;
    }

    .catalogo-gesture-help .gesture-icon {
        width: 44px;
        min-width: 44px;
        height: 44px;
        font-size: 28px;
    }

    .catalogo-gesture-help p {
        font-size: 13px;
    }
}



.catalogo-svg-icon {
    width: 30px;
    height: 30px;
    display: block;
    color: currentColor;
    pointer-events: none;
}

.catalogo-side-arrow .catalogo-svg-icon {
    width: 38px;
    height: 38px;
}

.catalogo-svg-icon-sm {
    width: 19px;
    height: 19px;
}

.catalogo-svg-icon-dots {
    width: 25px;
    height: 25px;
}

.catalogo-svg-icon-hand {
    width: 42px;
    height: 42px;
}

.catalogo-action-icon .catalogo-svg-icon {
    width: 18px;
    height: 18px;
}

@media (max-width: 576px) {
    .catalogo-side-arrow .catalogo-svg-icon {
        width: 28px;
        height: 28px;
    }

    .catalogo-svg-icon-dots {
        height: 30px;
    }

    .catalogo-svg-icon-hand {
        width: 34px;
        height: 34px;
    }
}


/* ========================================================= */
/* ACCIONES SECUNDARIAS DIRECTAS */
/* ========================================================= */

.catalogo-secondary-actions {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.catalogo-direct-actions {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border: 1px solid #edf0f4;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
}

.catalogo-direct-action-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalogo-direct-action {
    width: 58px;
    height: 58px;
    border: none;
    border-radius: 18px;
    background: #ffffff;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.22s ease;
}

.catalogo-direct-action:hover {
    background: #f8fafc;
    color: #cf1f2b;
    transform: translateY(-2px);
}

.catalogo-direct-action:active {
    transform: translateY(0);
}

.catalogo-action-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #f3f4f6;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.22s ease;
}

.catalogo-direct-action:hover .catalogo-action-icon {
    background: rgba(207, 31, 43, 0.10);
    color: #cf1f2b;
}

.catalogo-hover-label {
    position: absolute;
    top: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    white-space: nowrap;
    color: #111827;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    visibility: hidden;
    transition: all 0.22s ease;
    pointer-events: none;
}

.catalogo-direct-action-wrap:hover .catalogo-hover-label {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}