/* Flipbook Web View Stylesheet (Full Height & Spread View) */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    background-color: #0d1527;
    color: #ffffff;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

/* Flipbook Toolbar Sidebar (Lateral Derecho) */
.flipbook-toolbar {
    background-color: var(--color-primary-500);
    border-left: 1px solid var(--color-primary-500);
    padding: 20px 14px;
    width: 210px;
    min-width: 210px;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 20px;
    z-index: 100;
    position: relative;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.flipbook-toolbar__left,
.flipbook-toolbar__center {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

.flipbook-toolbar__right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    flex: 1;
}

.flipbook-btn {
    background-color: #28398e;
    color: #e2e8f0;
    border: 1px solid #28398e;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.flipbook-btn:hover {
    background-color: #24355a;
    color: #ffffff;
    border-color: #3b5080;
}

.flipbook-btn--icon {
    padding: 8px 10px;
}

button.flipbook-btn.imprimir {
    background-color: #ff9138;
    border: 1px solid #ff9138;

}

button.flipbook-btn.buscar {
    background-color: #fff;
    border: 1px solid #fff;
    color: #001456;
}

/* Bloque de Búsqueda Integrado en Barra Lateral */
.catalog-search-block {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.catalog-search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.catalog-search-icon {
    position: absolute;
    left: 8px;
    color: #94a3b8;
    font-size: 12px;
    pointer-events: none;
}

.catalog-search-box-input {
    width: 100%;
    background: #fff;
    border: 1px solid #334155;
    color: #001456;
    font-size: 11px;
    border-radius: 6px;
    padding: 6px 22px 6px 26px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.catalog-search-box-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.catalog-search-clear-btn {
    position: absolute;
    right: 6px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 15px;
    cursor: pointer;
    line-height: 1;
    padding: 0 3px;
}

.catalog-search-clear-btn:hover {
    color: #ffffff;
}

.catalog-search-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    width: 100%;
}

.catalog-search-btn-nav {
    background: #28398e;
    border: 1px solid #28398e;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 5px 6px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
    white-space: nowrap;
}

.catalog-search-btn-nav:hover:not(:disabled) {
    background: #28398e;
    border-color: #28398e;
    opacity: .8;
}

.catalog-search-btn-nav:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    border-color: #28398e;
    background: #28398e;
    color: #fff;
}

.catalog-search-counter {
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    padding: 2px 4px;
    text-align: center;
    min-width: 44px;
    white-space: nowrap;
}

.catalog-search-summary-area {
    background: rgba(11, 20, 51, 0.7);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 11px;
    color: #cbd5e1;
    min-height: 38px;
    display: none;
    flex-direction: column;
    justify-content: center;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.catalog-search-summary-area:hover {
    border-color: rgba(56, 189, 248, 0.4);
}

.catalog-search-placeholder-msg {
    color: #64748b;
    font-style: italic;
    font-size: 10px;
    text-align: center;
}

.catalog-search-active-card {
    display: flex;
    flex-direction: column;
    gap: 3px;

}

.catalog-search-card-ref {
    font-weight: 700;
    color: #ffffff;
    font-size: 11px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-search-card-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
    gap: 4px;
    color: #94a3b8;
}

.catalog-search-page-badge {
    background: #2563eb;
    color: #ffffff;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 9px;
    white-space: nowrap;
}

/* Resaltado del producto encontrado en la página */
.book-product-item--highlight {
    outline: 3px solid #ffcc00 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 16px rgba(255, 204, 0, 0.85) !important;
    background-color: rgba(255, 204, 0, 0.12) !important;
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
    animation: searchPulseAnim 1.2s infinite alternate !important;
    z-index: 10 !important;
}

.flipbook-toolbar__zoom-row {
    display: flex;
    gap: 6px;
    width: 100%;
}

.flipbook-toolbar__zoom-row .flipbook-btn {
    flex: 1;
    padding: 8px 0;
    justify-content: center;
}

/* Bloque Compra Directa B2B (Lateral Derecho) */
.b2b-direct-buy-card {
    background-color: #001456;
    border-radius: 8px;
    overflow: hidden;
    margin-top: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.b2b-direct-buy-card__top-bar {
    height: 5px;
    background-color: #ff9138;
    width: 100%;
}

.b2b-direct-buy-card__body {
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.b2b-direct-buy-card__title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 800;
    color: #ff9138;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    line-height: 1.3;
}

.b2b-direct-buy-card__text {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.5;
    color: #cbd5e1;
}

.b2b-direct-buy-card__btn {
    background-color: #ff9138;
    color: #001456;
    font-size: 12.5px;
    font-weight: 700;
    padding: 10px 10px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    display: block;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.b2b-direct-buy-card__btn:hover {
    background-color: #ffa554;
    color: #001456;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 145, 56, 0.35);
}

.flipbook-page-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    background-color: #001456;
    padding: 10px 10px;
    border-radius: 8px;
    border: 1px solid #1e2d4d;
    width: 100%;
    box-sizing: border-box;
}

.flipbook-page-nav__controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 6px;
}

.flipbook-page-nav__controls .flipbook-btn {
    flex: 1;
}

.flipbook-page-info {
    font-size: 12.5px;
    font-weight: 700;
    color: #cbd5e1;
    text-align: center;
    width: 100%;
    word-break: break-word;
}

/* Sidebar Lateral Izquierdo: Menú de Secciones */
.sections-sidebar-left {
    background-color: var(--color-primary-500);
    border-right: 1px solid #000a24;
    padding: 0;
    width: 235px;
    min-width: 235px;
    height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    z-index: 100;
    position: relative;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.sections-sidebar-header {
    background-color: var(--color-primary-500);
    padding: 18px 18px 14px;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.sections-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 14px 20px 14px;
    overflow-y: auto;
    flex: 1;
}

.sections-sidebar-list::-webkit-scrollbar {
    width: 4px;
}

.sections-sidebar-list::-webkit-scrollbar-track {
    background: transparent;
}

.sections-sidebar-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.sidebar-section-link {
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.24);
    padding: 4px 6px 4px 4px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.15s ease-in-out;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-section-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    margin-right: 6px;
    gap: 6px;
    display: flex;
}

.sidebar-section-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-bottom-color: transparent;
    text-decoration: none;
    border-radius: 6px;
    padding-left: 8px;
}

.sidebar-section-link.active {
    background-color: #ff9138;
    color: var(--color-primary-500);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    font-weight: 800;
    padding: 4px 12px;
    margin: 3px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Versión Móvil */
@media (max-width: 1399.98px) {
    .sidebar-section-link {
        padding: 8px 16px;
        font-size: 13px;

    }

    .sidebar-section-link--all .sidebar-section-title {
        font-size: 15px;
    }

    .sidebar-section-link.active {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Enlace Destacado: Catálogo Completo */
.sidebar-section-link--all {
    background: linear-gradient(135deg, rgba(255, 145, 56, 0.22) 0%, rgba(255, 180, 70, 0.12) 100%);
    border: 1px solid rgba(255, 145, 56, 0.6) !important;
    border-radius: 8px !important;
    padding: 7px 10px !important;
    margin-bottom: 10px;
    font-size: 11.5px;
    font-weight: 700;
    color: #ffd8a8 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.3px;
    transition: all 0.2s ease-in-out !important;

}

.sidebar-section-link--all .sidebar-section-title {
    font-size: 14px;


}

.sidebar-section-link--all .sidebar-all-icon {
    color: #ff9138;
    font-size: 13px;
    transition: color 0.2s ease;
}

.sidebar-section-link--all:hover:not(.active) {
    background: linear-gradient(135deg, rgba(255, 145, 56, 0.35) 0%, rgba(255, 180, 70, 0.22) 100%) !important;
    border-color: #ff9138 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 145, 56, 0.35);
}

.sidebar-section-link--all.active {
    background: linear-gradient(135deg, #ff9138 0%, #ff7714 100%) !important;
    color: #001456 !important;
    border-color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(255, 145, 56, 0.5);
    font-weight: 800;
}

.sidebar-section-link--all.active .sidebar-all-icon {
    color: #001456 !important;
}

.sidebar-section-all-badge {
    background-color: #ff9138;
    color: #001456;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    line-height: 1.2;
}

.sidebar-section-link--all.active .sidebar-section-all-badge {
    background-color: #001456;
    color: #ffffff;
}

.sidebar-section-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.sidebar-section-badge {
    background-color: var(--color-primary-500);
    color: #ffffff;
    min-width: 22px;
    height: 22px;
    padding: 0 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.sidebar-section-arrow {
    font-size: 13px;
    font-weight: 800;
    color: var(--color-primary-500);
    line-height: 1;
}

/* Main Viewport Stage - Maximized 100% available height */
.flipbook-viewport {
    flex: 1;
    width: calc(100vw - 420px);
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at center, #ffffff 0%, #f2f2f2 100%);
    overflow: hidden;
    padding: 10px;
    box-sizing: border-box;
}

/* Book Container */
.flipbook-container {
    height: calc(100vh - 20px) !important;
    min-height: calc(100vh - 20px) !important;
    width: 100%;

    position: relative;
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#flipbook,
.st-page-flip,
.st-page-flip-container,
.st-page-flip-stage {
    height: 100% !important;
    max-height: calc(100vh - 20px) !important;
}

/* Page Common Styles */
.page {
    background-color: #ffffff;
    color: #001456;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
    height: 100% !important;
}

.stf__item {
    top: 0 !important;
}

/* Cover Page */
.page-cover {
    background-color: #050a1a;
    color: #ffffff;
}

.page-cover-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 0px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.page-cover__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 20px;
}

.page-cover__subtitle {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.2;
}

.page-cover__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-cover__logo {
    height: 36px;
    width: auto;
}

.page-cover__brand-text {
    display: flex;
    flex-direction: column;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1.5px;
    line-height: 1;
}

.page-cover__arch {
    flex: 1;
    background-color: #0b1433;
    border-top-left-radius: 140px;
    padding: 50px 35px 30px 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    margin-left: 20px;
}

.page-cover__cat-num {
    font-size: 68px;
    font-weight: 900;
    line-height: 1;
    color: #ffffff;
}

.page-cover__cat-name {
    font-size: 42px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin-top: 6px;
}

.page-cover__desc {
    font-size: 14px;
    line-height: 1.55;
    color: #cbd5e1;
    max-width: 360px;
    align-self: flex-end;
}

/* Inner Page */
.page-inner {
    background-color: #ffffff;
    padding: 4px 10px 48px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    height: 100%;
}

.page-inner--left {
    border-right: 1px solid #cbd5e1;
    box-shadow: inset -18px 0 10px -10px rgba(0, 0, 0, 0.18);
}

.page-inner--right {
    box-shadow: inset 18px 0 10px -10px rgba(0, 0, 0, 0.18);
}

.book-page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.book-page-header__line {
    flex: 1;
    height: 2px;
    background-color: #001456;
}

.book-page-header__badge {
    background-color: #001456;
    color: #ffffff;
    padding: 6px 24px;
    border-radius: 0 0 20px 20px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.book-page-header__badge img {
    height: 22px;
}

/* 4x5 Product Grid inside Book Page */
.book-product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 0px 0;
    flex: 1;
    height: 100%;
    box-sizing: border-box;
    align-items: stretch;
    position: relative;
}

.book-product-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 4px 6px;
    border-right: 2px solid #001456;
    border-radius: 0;
    position: relative;
    background-color: transparent;
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.book-product-item:nth-child(4n) {
    border-right: none;
}

.book-product-item__img-box {
    width: 100%;
    flex: 1 1 auto;
    height: calc(100% - 70px);
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 0px;
    background-color: #ffffff;
    overflow: hidden;
}

.book-product-item__img-box img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.book-product-item__badge-novedad {
    position: absolute;
    top: 4px;
    right: 0px;
    background-color: var(--color-secondary-400);
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 4px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 2;
}

.book-product-item__meta {
    display: flex;
    align-items: flex-end;

    justify-content: space-between;
    margin-bottom: 4px;
    height: 17px;
    min-height: 17px;
    max-height: 17px;
    flex-shrink: 0;
    z-index: 9;
}

.caja-logo {
    display: flex;
    height: 25px;
    align-items: flex-end;
    justify-content: flex-end;
    width: 35px;
    max-width: 35px;
    padding-bottom: 2px;
}


.book-product-item__sku {
    font-size: 10px;
    font-weight: 700;
    color: #001456;
}

.book-product-item__brand {
    max-height: 25px;
    max-width: 35px;
    object-fit: contain;
}

.book-product-item__title {
    font-size: 9px;
    font-weight: 500;
    color: #001456;
    text-transform: uppercase;
    line-height: 1.1;
    height: 31px;
    min-height: 31px;
    max-height: 31px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.book-page-footer {
    text-align: center;
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

/* Fallback Spread View (Side-by-Side 2 Pages) */
.fallback-spread {
    display: flex;
    justify-content: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
    height: calc(100vh - 76px);
}

.fallback-spread .page {
    height: 100%;
}

/* Page Nav Arrow Overlay Buttons */
.nav-arrow-overlay {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background-color: rgba(7, 13, 28, 0.85);
    color: #ffffff !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    z-index: 95;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.nav-arrow-overlay i,
.nav-arrow-overlay .bi,
.flipbook-toolbar .bi {
    font-family: 'bootstrap-icons', sans-serif !important;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    display: inline-block;
    vertical-align: 0;
    -webkit-font-smoothing: antialiased;
}

.nav-arrow-overlay:hover {
    background-color: #001456;
    border-color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.nav-arrow-overlay--prev {
    left: 10px;
}

.nav-arrow-overlay--next {
    right: 10px;
}

/* Modal de Producto en Flipbook */
.book-product-modal__portal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.book-product-modal__portal.active {
    display: flex;
}

.book-product-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
}

.book-product-modal__dialog {
    position: relative;
    z-index: 10;
    background: #ffffff;
    color: #1e293b;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
}

.book-product-modal__header {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.book-product-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 400px;
}

.book-product-modal__close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.book-product-modal__close:hover {
    color: #0f172a;
}

.book-product-modal__body {
    padding: 20px;
}

.book-product-modal__preview {
    display: flex;
    gap: 16px;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.book-product-modal__img-box {
    width: 70px;
    height: 70px;
    min-width: 70px;
    background: #ffffff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #cbd5e1;
}

.book-product-modal__img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.book-product-modal__info {
    flex: 1;
    overflow: hidden;
}

.book-product-modal__sku {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0284c7;
    display: block;
    margin-bottom: 2px;
}

.book-product-modal__name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
}

.book-modal-option {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 14px;
    background: #ffffff;
}

.book-modal-option__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.book-modal-btn--view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 16px;
    background-color: #001456;
    color: #ffffff;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s;
    margin-top: 6px;
}

.book-modal-btn--view:hover {
    background-color: #00248c;
    color: #ffffff;
}

.book-modal-carts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.book-cart-slot-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #0f172a;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.book-cart-slot-btn:hover {
    background: #001456;
    color: #ffffff;
    border-color: #001456;
}

.book-cart-slot-btn:hover .text-primary,
.book-cart-slot-btn:hover .badge {
    color: #ffffff !important;
}

/* Print / PDF Wrapper (Hidden on screen, active on print/PDF) */
.print-pdf-wrapper {
    display: none;
}

.html2pdf__container .print-pdf-wrapper {
    display: block !important;
}

/* Print Rules */
@media print {

    .no-print,
    .mobile-hamburger-btn,
    .mobile-hamburger-btn--left,
    .mobile-hamburger-btn--right,
    #hamburgerLeft,
    #hamburgerRight,
    .sidebar-backdrop,
    .sidebar-close-btn,
    .sections-sidebar-left,
    .flipbook-toolbar,
    .flipbook-viewport,
    .flipbook-container,
    #flipbook,
    .mobile-page-viewer,
    .mobile-zoom-controls,
    .nav-arrow-overlay,
    .product-details-portal,
    .book-product-modal__portal {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
        pointer-events: none !important;
    }

    html,
    body {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #001456 !important;
        display: block !important;
        overflow: visible !important;
        position: static !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-pdf-wrapper {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        position: static !important;
    }

    @page {
        size: A4 portrait;
        margin: 0;
    }

    /* Print Portada A4 (Diseño de la Imagen 2) */
    .print-cover-page {
        page-break-after: always !important;
        break-after: page !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        background-color: #001456 !important;
        color: #ffffff !important;
        width: 100% !important;
        width: 210mm !important;
        max-width: 100% !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-height: 297mm !important;
        box-sizing: border-box !important;
        padding: 26mm 18mm 18mm 18mm !important;
        position: relative !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-cover-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        width: 100% !important;
        margin-bottom: 12mm !important;
        position: relative !important;
        z-index: 5 !important;
    }

    .print-cover-subtitle {
        font-size: 14pt !important;
        font-weight: 700 !important;
        letter-spacing: 2px !important;
        color: #ffffff !important;
        line-height: 1.2 !important;
    }

    .print-cover-brand img {
        height: 42px !important;
    }

    .print-cover-arch {
        background-color: #0b1433 !important;
        border-top-left-radius: 120px !important;
        padding: 28mm 20mm 20mm 20mm !important;
        margin-left: 10mm !important;
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        position: relative !important;
        z-index: 4 !important;
        box-sizing: border-box !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-cover-num {
        font-size: 80pt !important;
        font-weight: 900 !important;
        color: #ffffff !important;
        line-height: 1 !important;
    }

    .print-cover-title {
        font-size: 46pt !important;
        font-weight: 800 !important;
        color: #ffffff !important;
        line-height: 1.1 !important;
        margin-top: 4mm !important;
        word-break: break-word !important;
    }

    .print-cover-desc {
        font-size: 12pt !important;
        line-height: 1.6 !important;
        color: #cbd5e1 !important;
        max-width: 130mm !important;
        align-self: flex-end !important;
    }

    .print-cover-drill {
        position: absolute !important;
        top: 25mm !important;
        right: -10mm !important;
        width: 110mm !important;
        opacity: 0.85 !important;
        z-index: 2 !important;
    }

    .print-cover-screw {
        position: absolute !important;
        bottom: -5mm !important;
        right: -10mm !important;
        width: 120mm !important;
        opacity: 0.85 !important;
        z-index: 2 !important;
    }

    /* Print Páginas Interiores A4 (Diseño de la Imagen 1) */
    .print-product-page {
        page-break-after: always !important;
        break-after: page !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        width: 100% !important;
        width: 210mm !important;
        max-width: 100% !important;
        height: 297mm !important;
        min-height: 297mm !important;
        max-height: 297mm !important;
        box-sizing: border-box !important;
        padding: 10mm 12mm !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        overflow: hidden !important;
        background-color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-page-header {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 5mm;
        width: 100%;
    }

    .print-header-line {
        flex: 1;
        height: 3px;
        background-color: #001456 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-header-badge {
        background-color: #001456 !important;
        color: #ffffff;
        padding: 6px 30px;
        border-radius: 0 0 25px 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-header-badge img {
        height: 28px;
    }

    /* Cuadrícula de 4 Columnas con 3 Líneas Divisorias Verticales Continuas */
    .print-product-grid {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        grid-template-rows: repeat(5, 1fr) !important;
        gap: 0 !important;
        row-gap: 0 !important;
        column-gap: 0 !important;
        width: 100% !important;
        flex: 1 !important;
        height: 100% !important;
        position: relative !important;
        box-sizing: border-box !important;
        align-items: stretch !important;
    }

    .print-product-item {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        padding: 3mm 4mm !important;
        box-sizing: border-box !important;
        position: relative !important;
        border-right: 2px solid #001456 !important;
        height: 100% !important;
        min-height: 0 !important;
        background-color: transparent !important;
        overflow: hidden !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Quitar borde derecho al 4º elemento de cada fila para dejar exactamente 3 líneas divisorias continuas */
    .print-product-item:nth-child(4n) {
        border-right: none !important;
    }

    .print-product-img-box {
        width: 100%;
        height: 30mm;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        margin-bottom: 1.5mm;
    }

    .print-product-img-box img {
        max-height: 100%;
        max-width: 100%;
        object-fit: contain;
    }

    .print-badge-novedad {
        position: absolute;
        top: 0;
        right: 0;
        background-color: #001456 !important;
        color: #ffffff !important;
        font-size: 6.5pt;
        font-weight: 800;
        padding: 1px 4px;
        border-radius: 2px;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-product-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1mm;
    }

    .print-product-sku {
        font-size: 9pt;
        font-weight: 800;
        color: #001456;
    }

    .print-product-brand {
        max-height: 14px;
        max-width: 45px;
        object-fit: contain;
    }

    .print-product-title {
        font-size: 7pt;
        font-weight: 700;
        color: #001456;
        text-transform: uppercase;
        line-height: 1.2;
        height: 8.5mm;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }
}