@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* CSS Variables Default Declarations */
#cb-catalog-root {
    --cb-primary-color: #5b21b6;
    --cb-secondary-color: #8b5cf6;
    --cb-bg-solid: #0f172a;
    --cb-font-family-title: 'Outfit', sans-serif;
    --cb-font-family-body: 'Inter', sans-serif;
}

/* Core Container */
.cb-catalog-container {
    font-family: var(--cb-font-family-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    background-color: var(--cb-bg-solid);
    color: #f1f5f9;
    padding-bottom: 10px;
}

@media (min-width: 1025px) {
    .cb-catalog-container {
        transition: padding-right 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .cb-catalog-container:has(.cb-catalog-customizer:not(.collapsed)) {
        padding-right: 380px;
    }
}

/* Background Patterns Design System */
.cb-catalog-container.cb-pattern-solid {
    background-color: var(--cb-bg-solid);
}

.cb-catalog-container.cb-pattern-dots {
    background-color: var(--cb-bg-solid);
    background-image: radial-gradient(var(--cb-secondary-color) 1px, transparent 0);
    background-size: 24px 24px;
    background-opacity: 0.15;
}

.cb-catalog-container.cb-pattern-lines {
    background-color: var(--cb-bg-solid);
    background-image: linear-gradient(45deg, var(--cb-secondary-color) 12%, transparent 12%, transparent 50%, var(--cb-secondary-color) 50%, var(--cb-secondary-color) 62%, transparent 62%, transparent);
    background-size: 20px 20px;
}

.cb-catalog-container.cb-pattern-grid {
    background-color: var(--cb-bg-solid);
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
}

.cb-catalog-container.cb-pattern-waves {
    background-color: var(--cb-bg-solid);
    background-image: radial-gradient(circle at 100% 150%, var(--cb-bg-solid) 24%, var(--cb-secondary-color) 25%, var(--cb-secondary-color) 28%, var(--cb-bg-solid) 29%, var(--cb-bg-solid) 36%, var(--cb-secondary-color) 36%, var(--cb-secondary-color) 40%, transparent 40%, transparent);
    background-size: 40px 40px;
}

/* Top Navigation Bar with Glassmorphism */
.cb-catalog-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(10px, 1.5vh, 15px) clamp(15px, 3vw, 40px);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 100;
}

.cb-catalog-title-text {
    font-family: var(--cb-font-family-title);
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(to right, #ffffff, var(--cb-secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cb-bar-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    margin-left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.cb-bar-btn:hover {
    background: var(--cb-primary-color);
    border-color: var(--cb-secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.cb-bar-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Customizer Sidebar (Translucent Drawer) */
.cb-catalog-customizer {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 200;
    padding: 30px;
    box-sizing: border-box;
    overflow-y: auto;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.cb-catalog-customizer.collapsed {
    transform: translateX(100%);
}

.cb-customizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 15px;
}

.cb-customizer-header h3 {
    font-family: var(--cb-font-family-title);
    font-weight: 600;
    font-size: 1.25rem;
    margin: 0;
    color: #fff;
}

.cb-close-customizer {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.cb-close-customizer:hover {
    color: #fff;
}

/* Customizer Form Elements */
.cb-form-group {
    margin-bottom: 18px;
}

.cb-form-group label {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 6px;
    font-weight: 500;
}

.cb-form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    box-sizing: border-box;
    outline: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.cb-form-input:focus {
    border-color: var(--cb-secondary-color);
    background: rgba(255, 255, 255, 0.08);
}

.cb-color-picker {
    width: 100%;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 2px;
    box-sizing: border-box;
}

/* Uploader Logo Styles */
.cb-logo-preview-wrapper {
    position: relative;
    margin-top: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.cb-logo-preview-wrapper.hidden {
    display: none !important;
}

#cb-logo-preview {
    max-height: 70px;
    max-width: 100%;
    border-radius: 4px;
}

.cb-remove-logo {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(239, 68, 68, 0.85);
    border: none;
    color: #fff;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Customizer Button and Spinner */
.cb-customizer-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--cb-primary-color), var(--cb-secondary-color));
    border: none;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s, opacity 0.3s;
}

.cb-customizer-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.cb-customizer-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.cb-spinner-icon {
    display: inline-block;
    animation: cb-spin 1s linear infinite;
    font-size: 1.1rem;
}

.cb-spinner-icon.hidden {
    display: none;
}

@keyframes cb-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Copy Link Container */
.cb-share-link-wrapper {
    margin-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
}

.cb-share-link-wrapper.hidden {
    display: none !important;
}

.cb-copy-input-group {
    display: flex;
    margin-top: 8px;
}

.cb-copy-input-group input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px 0 0 8px;
    color: #e2e8f0;
    padding: 10px;
    font-size: 0.8rem;
    outline: none;
}

.cb-copy-link-btn {
    background: var(--cb-secondary-color);
    border: none;
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-weight: 600;
}

.cb-share-success-msg {
    color: #10b981;
    font-size: 0.8rem;
    margin-top: 6px;
    opacity: 0;
    transition: opacity 0.3s;
}

.cb-share-success-msg.visible {
    opacity: 1;
}

/* ----------------------------------------
 * 5. 3D Book Layout
 * ---------------------------------------- */
.cb-catalog-viewport {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1600px;
    padding: 10px 10px;
    box-sizing: border-box;
}

/* Wrapper controls book dimensions; book and overlay fill it */
.cb-book-wrapper {
    --book-max-width: 1300px;
    --book-ratio: 1.4142;
    position: relative;
    width: min(94%, var(--book-max-width), calc((100vh - 160px) * var(--book-ratio)));
    aspect-ratio: var(--book-ratio);
}

.cb-book {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: transform 0.5s;
}

/* The Paper Sheet — empty visual shell for the 3D flip */
.cb-book-sheet {
    position: absolute;
    width: 50%;
    height: 100%;
    top: 0;
    right: 0;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
    z-index: 1;
    background: #ffffff;
    border-radius: 0 12px 12px 0;
    border-left: 1px solid rgba(0,0,0,0.1);
    box-shadow: inset 3px 0 20px rgba(0,0,0,0.08);
    backface-visibility: hidden;
}

.cb-book-sheet.flipped {
    transform: rotateY(-180deg);
}

/* Spine shadow on right-facing sheets */
.cb-book-sheet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 15px;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.1), transparent);
    z-index: 10;
    border-radius: 0 12px 12px 0;
}

/* -----------------------------------------------
   Content Overlay — flat layer on top of the 3D book
   ----------------------------------------------- */
.cb-content-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    pointer-events: none;
    z-index: 1000;
}

.cb-page-face {
    width: 50%;
    height: 100%;
    position: relative;
    overflow: hidden;
    pointer-events: auto;
}

.cb-page-left {
    background: #fff;
}

.cb-page-right {
    background: #fff;
}

/* Scale wrapper inside each overlay face — holds A4-sized content, scaled by JS */
.cb-page-scale-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 794px;
    height: 1123px;
    transform-origin: top left;
    overflow: hidden;
    background: #fff;
}

/* Hidden content pool */
#cb-page-content-pool .cb-pool-face {
    width: 794px;
    height: 1123px;
    overflow: hidden;
}

/* Catalog Card Container styles inside faces */
.cb-catalog-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: clamp(15px, 4%, 40px) clamp(20px, 5%, 50px);
    box-sizing: border-box;
    background: #fff;
    color: #334155;
    position: relative;
}

.cb-logo-hidden {
    display: none !important;
}

.cb-card-title {
    font-family: var(--cb-font-family-title);
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 15px 0;
    font-size: 1.75rem;
    line-height: 1.2;
}

.cb-card-body {
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    overflow-y: auto;
}

/* Scrollbar design for card body and details */
.cb-card-body::-webkit-scrollbar,
.cb-product-desc::-webkit-scrollbar {
    width: 4px;
}
.cb-card-body::-webkit-scrollbar-track,
.cb-product-desc::-webkit-scrollbar-track {
    background: transparent;
}
.cb-card-body::-webkit-scrollbar-thumb,
.cb-product-desc::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 4px;
}

.cb-card-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cb-distributor-info-badge {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--cb-primary-color);
}

/* Product Card Format */
.cb-product-sku {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.cb-product-image-container {
    flex: 1 1 auto;
    min-height: 70px;
    height: 35%;
    max-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
}

.cb-product-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.cb-product-card:hover .cb-product-image {
    transform: scale(1.04);
}

.cb-product-details {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cb-product-title {
    font-family: var(--cb-font-family-title);
    font-weight: 600;
    font-size: 1.25rem;
    color: #0f172a;
    margin: 0 0 4px 0;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cb-product-price {
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.cb-product-desc {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
    overflow-y: auto;
    flex-shrink: 1;
    min-height: 0;
}

.cb-btn-view-product {
    display: block;
    width: 100%;
    color: #fff !important;
    text-align: center;
    text-decoration: none !important;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.cb-btn-view-product:hover {
    filter: brightness(0.92);
}

/* ----------------------------------------
 * 6. Book Navigation Controls Styling
 * ---------------------------------------- */
.cb-book-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-top: 10px;
}

.cb-control-btn {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.cb-control-btn:hover:not(:disabled) {
    background: var(--cb-primary-color);
    border-color: var(--cb-secondary-color);
}

.cb-control-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cb-control-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.cb-page-indicator-text {
    font-size: 0.95rem;
    color: #94a3b8;
    font-weight: 500;
}

#cb-current-sheet, #cb-total-sheets {
    color: #fff;
    font-weight: 700;
}

/* ----------------------------------------
 * 7. Mobile Layout Customizations
 * ---------------------------------------- */
@media (max-width: 900px) {
    .cb-book-wrapper {
        --book-max-width: 500px;
        --book-ratio: 0.7071; /* Single A4 page aspect ratio */
        width: min(92%, var(--book-max-width), calc((100vh - 160px) * var(--book-ratio)));
        aspect-ratio: var(--book-ratio);
    }

    .cb-book-sheet {
        width: 100%;
        left: 0;
        right: auto;
        transform-origin: left center;
    }

    .cb-book-sheet.flipped {
        transform: rotateY(-180deg);
    }

    .cb-catalog-top-bar {
        padding: 12px 20px;
    }
}

@media (max-width: 500px) {
    .cb-catalog-card {
        padding: 15px 20px;
    }

    .cb-product-image-container {
        height: 25vh;
        min-height: 120px;
        max-height: 180px;
        margin: 10px 0;
    }
    
    .cb-card-title {
        font-size: 1.4rem;
    }
}

/* ----------------------------------------
 * 8. Print Layout Stylesheet
 * ---------------------------------------- */
@media print {
    body > *:not(#cb-catalog-root),
    header, footer, sidebar, #header, #footer, #sidebar, .site-header, .site-footer, .widget-area, .nav-menu {
        display: none !important;
    }

    body, html {
        background: #ffffff !important;
        color: #000000 !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 12pt !important;
    }

    .cb-catalog-top-bar,
    .cb-catalog-customizer,
    .cb-book-controls {
        display: none !important;
        visibility: hidden !important;
    }

    .cb-catalog-container {
        background: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: auto !important;
        position: static !important;
    }

    .cb-catalog-viewport {
        display: none !important;
    }

    /* Show the hidden pool as individual print pages */
    #cb-page-content-pool {
        position: static !important;
        left: auto !important;
        top: auto !important;
        visibility: visible !important;
        width: 100% !important;
    }

    .cb-pool-face {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        min-height: 100vh !important;
        transform: none !important;
        overflow: visible !important;
        page-break-after: always !important;
        break-after: page !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        box-sizing: border-box !important;
        background: #ffffff !important;
        margin-bottom: 20px !important;
    }

    .cb-btn-view-product {
        display: none !important;
    }
}

/* ----------------------------------------
 * 9. Grid and Multi-Product Layout Styles
 * ---------------------------------------- */
.cb-products-page-card {
    padding: clamp(10px, 2.5vh, 20px) clamp(15px, 3vw, 25px) !important;
}

.cb-products-grid {
    display: grid;
    gap: 15px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    align-items: stretch;
    justify-content: stretch;
}

.cb-products-grid.cb-grid-cols-1 {
    grid-template-columns: 1fr;
}

.cb-products-grid.cb-grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.cb-products-grid.cb-grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Adjust row constraints based on grid size */
.cb-products-grid.cb-items-count-2 {
    grid-template-rows: repeat(2, 1fr);
}
.cb-products-grid.cb-items-count-4 {
    grid-template-rows: repeat(2, 1fr);
}
.cb-products-grid.cb-items-count-6 {
    grid-template-rows: repeat(3, 1fr);
}

/* Dynamic Grid Product Card */
.cb-grid-product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
    transition: transform 0.25s, box-shadow 0.25s;
    height: 100%;
    box-sizing: border-box;
}

.cb-grid-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.cb-grid-product-image-container {
    flex: 1 1 auto;
    height: 35%;
    max-height: 80px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.cb-grid-product-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.cb-grid-product-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    overflow: hidden;
}

.cb-grid-product-title {
    font-family: var(--cb-font-family-title);
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cb-grid-product-price {
    font-weight: 700;
    font-size: 0.8rem;
    margin-top: 2px;
}

.cb-grid-product-sku {
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 500;
}

.cb-grid-product-footer {
    margin-top: 6px;
}

.cb-grid-btn-view-product {
    display: block;
    text-align: center;
    color: #ffffff !important;
    text-decoration: none !important;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s;
}

.cb-grid-btn-view-product:hover {
    filter: brightness(0.92);
}

/* Adjustments for print view of grid */
@media print {
    .cb-products-grid {
        gap: 20px !important;
    }
    .cb-grid-product-card {
        border: 1px solid #e2e8f0 !important;
        box-shadow: none !important;
    }
    .cb-grid-btn-view-product {
        display: none !important;
    }
}

/* -----------------------------------------------
   PDF Button Spinner Animation
   ----------------------------------------------- */
@keyframes cb-rotate {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.cb-spin {
    display: inline-block;
    animation: cb-rotate 0.8s linear infinite;
    vertical-align: middle;
}

/* -----------------------------------------------
   Page Selector Styling
   ----------------------------------------------- */
#cb-goto-page-select:hover, #cb-goto-page-select:focus {
    border-color: var(--cb-secondary-color);
}

/* ===============================================
   Loading Screen (Embla Carousel) — full-screen overlay
   =============================================== */
.cb-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--cb-bg-solid, #0f172a);
    overflow: hidden;
    transition: opacity 0.6s ease;
}

.cb-loading-overlay--hidden {
    opacity: 0;
    pointer-events: none;
}

/* The carousel takes up most of the screen */
.cb-loading-embla {
    width: min(80vw, 900px);
    overflow: hidden;
}

.cb-loading-viewport {
    overflow: hidden;
    width: 100%;
}

.cb-loading-container {
    display: flex;
    touch-action: pan-y pinch-zoom;
}

.cb-loading-slide {
    flex: 0 0 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: min(60vh, 480px);
}

.cb-loading-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Brand / overlay text */
.cb-loading-text {
    margin-top: 24px;
    font-family: var(--cb-font-family-title, 'Outfit', sans-serif);
    font-weight: 700;
    font-size: clamp(1.4rem, 4vw, 2.4rem);
    color: #fff;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

/* Spinner below the carousel */
.cb-loading-spinner {
    margin-top: 20px;
    color: var(--cb-secondary-color, #8b5cf6);
    font-size: 38px;
    line-height: 1;
}

.cb-loading-spinner .cb-spinner-icon {
    display: inline-block;
    animation: cb-spin 1s linear infinite;
}

/* PDF loading percentage below the spinner */
.cb-loading-percent {
    margin-top: 12px;
    font-family: var(--cb-font-family-title, 'Outfit', sans-serif);
    font-weight: 700;
    font-size: clamp(1.1rem, 3.5vw, 1.8rem);
    color: #fff;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    min-height: 1.2em;
}

/* No-embla graceful fallback: show a simple static pulse instead of moving slides */
.cb-loading-overlay--noembla .cb-loading-slide {
    animation: cb-fade-pulse 2s ease-in-out infinite;
}

@keyframes cb-fade-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* ===== Fade style (crossfade) ===== */
.cb-loading-embla--fade .cb-loading-slide {
    flex: 0 0 100%;
}
.cb-loading-embla--fade .cb-loading-slide img,
.cb-loading-embla--fade .cb-loading-slide {
    transition: opacity 0.9s ease;
}

/* ===== Slide / Loop ===== */
.cb-loading-embla--slide .cb-loading-slide {
    flex: 0 0 100%;
}

/* ===== Ken Burns + fade ===== */
.cb-loading-embla--kenburns .cb-loading-slide {
    flex: 0 0 100%;
}
.cb-loading-embla--kenburns .cb-loading-slide img {
    animation: cb-kenburns var(--cb-ls-zoom-dur, 14s) ease-in-out infinite alternate;
    will-change: transform;
}

@keyframes cb-kenburns {
    from { transform: scale(1) translate(0, 0); }
    to   { transform: scale(calc(1 + var(--cb-ls-zoom, 15) / 100)) translate(1.5%, -1.5%); }
}

/* ===== Slides-per-view (multi) ===== */
.cb-loading-embla--multislide .cb-loading-slide {
    flex: 0 0 calc(100% / var(--cb-ls-per-view, 2));
    min-width: 0;
    margin-right: 16px;
    height: min(50vh, 380px);
}
@media (max-width: 640px) {
    .cb-loading-embla--multislide .cb-loading-slide {
        flex: 0 0 calc(100% / 1.4);
    }
}

/* ===== Cover flow / parallax ===== */
.cb-loading-embla--coverflow .cb-loading-slide {
    flex: 0 0 calc(100% / var(--cb-ls-cover-visible, 3));
    min-width: 0;
    height: min(55vh, 420px);
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.cb-loading-embla--coverflow .cb-loading-slide img {
    transform: perspective(900px) rotateY(0deg);
    transition: transform 0.3s ease;
}
@media (max-width: 640px) {
    .cb-loading-embla--coverflow .cb-loading-slide {
        flex: 0 0 80%;
    }
}

/* Print: hide loading overlay */
@media print {
    .cb-loading-overlay {
        display: none !important;
        visibility: hidden !important;
    }
}

/* End of file */
