/* ==========================================================================
   PREMIUM DARK GLASS SYSTEM (PDGS)
   Librarte OS - Unified Global Architecture
   ========================================================================== */

:root {
    /* Core Colors */
    --ui-primary: #996633;
    --ui-secondary: #592B02;
    --ui-accent: #D9A441;

    /* System Status Colors */
    --ui-success: #27ae60;
    --ui-danger: #e74c3c;
    --ui-warning: #f39c12;
    --ui-info: #3498db;

    /* Layout & Geometry */
    --ui-radius: 20px;
    --ui-border: rgba(255, 255, 255, 0.12);
    --ui-border-highlight: rgba(255, 255, 255, 0.3);

    /* Backgrounds */
    --ui-bg-glass: rgba(15, 8, 4, 0.75);
    --ui-bg-panel: rgba(0, 0, 0, 0.4);

    /* Effects */
    --ui-shadow-soft: 0 15px 35px rgba(0, 0, 0, 0.6);
    --ui-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --ui-text-main: #FFFFFF;
    --ui-text-muted: rgba(255, 255, 255, 0.65);

    /* Specific */
    --lbr-glow: rgba(253, 224, 71, 0.15);
}

/* ==========================================================================
   1. BASE COMPONENTS
   ========================================================================== */
.cl-ui-card,
.cl-glass-panel {
    background: var(--ui-bg-glass);
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--ui-border);
    border-top: 1px solid var(--ui-border-highlight);
    border-radius: var(--ui-radius);
    padding: 2rem;
    box-shadow: var(--ui-shadow-soft);
    color: var(--ui-text-main);
}

/* ==========================================================================
   CORRECCIÓN GLOBAL DE BOTONES (Línea 60 aprox.)
   ========================================================================== */

.add-to-librero,
.cl-btn-primary {
    background: linear-gradient(135deg, var(--ui-accent), var(--ui-primary));
    color: #fff;
    font-weight: 700;
    border: none;
    padding: 12px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--ui-transition);
    
    /* --- FIX PROFESIONAL --- */
    display: flex;                /* Permite alinear contenido interno */
    align-items: center;          /* Centra verticalmente si hay 2 líneas */
    justify-content: center;      /* Centra horizontalmente */
    text-align: center;
    width: 100%;
    white-space: normal;          /* PERMITE EL SALTO DE LÍNEA */
    line-height: 1.1;             /* Altura de línea compacta para 2 líneas */
    word-break: break-word;       /* Rompe palabras si es extremo */
    min-height: 44px;             /* Tamaño mínimo para usabilidad móvil (UX) */
    box-shadow: 0 4px 15px rgba(217, 164, 65, 0.2);
}

.add-to-librero:hover,
.cl-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(217, 164, 65, 0.4);
}

.cl-btn-primary:disabled {
    background: var(--ui-bg-panel);
    color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
    cursor: not-allowed;
}

.cl-btn-large-cta {
    font-size: 1.1rem;
    padding: 15px 30px;
}

.cl-ui-input-group .cl-ui-label {
    color: var(--ui-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

.cl-ui-input-group .cl-ui-input,
.librarte-search-input,
#librarte-cat-filter,
#librarte-author-filter {
    width: 100%;
    background: var(--ui-bg-panel);
    color: var(--ui-text-main);
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    outline: none;
    transition: var(--ui-transition);
}

.cl-ui-input-group .cl-ui-input:focus,
.librarte-search-input:focus,
#librarte-cat-filter:focus,
#librarte-author-filter:focus {
    border-color: var(--ui-accent);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(217, 164, 65, 0.2);
}

select option {
    background: #1a0f0a;
    color: #fff;
}

/* ==========================================================================
   2. SHORTCODES (Catalog, Book, Promos, Favoritos)
   ========================================================================== */
.librarte-filters-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.librarte-search-input,
#librarte-cat-filter,
#librarte-author-filter {
    flex: 1;
    min-width: 200px;
}

.librarte-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.librarte-book-card {
    background: var(--ui-bg-panel);
    border: 1px solid var(--ui-border);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    transition: var(--ui-transition);
    position: relative;
}

.librarte-book-card:hover {
    transform: translateY(-8px);
    border-color: var(--ui-border-highlight);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.book-cover {
    height: 300px;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.6);
    position: relative;
}

.book-details {
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-details h3 {
    font-size: 1.1rem;
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.book-details h3 a {
    color: var(--ui-text-main);
    text-decoration: none;
    transition: var(--ui-transition);
}

.book-details h3 a:hover {
    color: var(--ui-accent);
}

.book-author {
    color: var(--ui-text-muted);
    font-size: 0.85rem;
    margin: 0 0 10px 0;
}

.price {
    color: var(--ui-accent);
    font-weight: 800;
    font-size: 1.2rem;
    margin: auto 0 15px 0;
}

.book-info-columns {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
}

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

.single-book-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}

.single-book-author {
    color: var(--ui-text-muted);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.single-book-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.meta-item {
    background: rgba(217, 164, 65, 0.1);
    border: 1px solid rgba(217, 164, 65, 0.3);
    padding: 6px 14px;
    border-radius: 50px;
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.meta-label {
    color: var(--ui-text-muted);
    font-size: 0.85rem;
}

.meta-value {
    color: var(--ui-accent);
    font-weight: 700;
    font-size: 0.9rem;
}

.single-book-description h3 {
    color: #fff;
    border-bottom: 1px solid var(--ui-border);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.single-book-description .content {
    color: var(--ui-text-muted);
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.price-tag-large {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-bottom: 1rem;
}

.price-tag-large .currency {
    color: var(--ui-text-muted);
    font-size: 1.2rem;
    font-weight: 600;
}

.price-tag-large .amount {
    color: var(--ui-accent);
    font-size: 2.5rem;
    font-weight: 900;
}

.librarte-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.librarte-category-card {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    border: 1px solid var(--ui-border);
    height: 200px;
}

.category-cover {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.librarte-category-card:hover .category-cover {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.category-overlay h3 {
    color: #fff;
    margin: 0 0 5px 0;
    font-size: 1.4rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

.category-overlay .book-count {
    color: var(--ui-accent);
    font-weight: 600;
    font-size: 0.9rem;
}

.badget.promo {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #e11d48;
    color: #fff;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.4);
    z-index: 10;
}

.favoritos-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.favoritos-icon-pulse {
    width: 50px;
    height: 50px;
    background: rgba(217, 164, 65, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    animation: clPulse 2s infinite;
    border: 1px solid rgba(217, 164, 65, 0.3);
}

.favoritos-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 5px 0;
}

.favoritos-subtitle {
    color: var(--ui-text-muted);
    margin: 0;
    font-size: 0.95rem;
}

.favoritos-ver-todo {
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.favoritos-ver-todo:hover {
    color: #fff;
}

.librarte-favoritos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 2rem;
    padding: 1.5rem 2rem;
}

/* ==========================================================================
   3. QUIZ COMPONENTS
   ========================================================================== */
.librarte-quiz-wrapper-scoped {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--ui-text-main);
    background-color: #050301;
    background-image: linear-gradient(to bottom, rgba(5, 3, 1, 0.85), rgba(15, 10, 5, 0.98)),
        url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border-radius: 16px;
    min-height: 80vh;
}

.librarte-quiz-wrapper-scoped * {
    box-sizing: border-box;
}

.librarte-quiz-wrapper {
    width: 100%;
    max-width: 750px;
    perspective: 1000px;
}

.quiz-screen {
    display: none;
    animation: floatUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
}

.quiz-screen.active {
    display: block;
}

.quiz-emoji {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 15px rgba(217, 164, 65, 0.3));
}

.quiz-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: 0.5px;
}

.quiz-desc {
    color: var(--ui-text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.quiz-question-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.quiz-progress-wrap {
    margin-bottom: 2.5rem;
    text-align: left;
}

.quiz-progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ui-accent), #FFE58F);
    width: 0%;
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(217, 164, 65, 0.6);
}

.quiz-step-text {
    color: var(--ui-accent);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.quiz-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

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

.quiz-option-card {
    background: var(--ui-bg-panel);
    border: 1px solid var(--ui-border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: var(--ui-transition);
    text-align: left;
}

.quiz-option-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.quiz-option-card.selected {
    background: rgba(217, 164, 65, 0.1);
    border-color: var(--ui-accent);
    box-shadow: inset 0 0 0 1px var(--ui-accent), 0 5px 15px rgba(217, 164, 65, 0.15);
}

.quiz-option-icon {
    font-size: 1.6rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: var(--ui-transition);
}

.quiz-option-card.selected .quiz-option-icon {
    background: var(--ui-accent);
    color: #000;
    text-shadow: none;
}

.quiz-option-label {
    font-weight: 600;
    font-size: 1rem;
    color: #fff;
}

.quiz-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.btn-prev {
    background: transparent;
    color: var(--ui-text-muted);
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--ui-transition);
}

.btn-prev:hover {
    color: #fff;
}

.profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 2rem;
}

.profile-badge {
    background: rgba(217, 164, 65, 0.15);
    border: 1px solid rgba(217, 164, 65, 0.3);
    color: var(--ui-accent);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
}

.books-preview {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 2rem;
    text-align: left;
}

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

.book-mini-card {
    background: var(--ui-bg-panel);
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.book-mini-cover {
    width: 50px;
    height: 75px;
    background: #333;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.book-mini-info h4 {
    font-size: 0.95rem;
    margin: 0 0 4px 0;
    color: #fff;
}

.book-mini-info span {
    font-size: 0.8rem;
    color: var(--ui-accent);
    font-weight: 600;
}

/* ==========================================================================
   4. CAROUSEL COMPONENTS
   ========================================================================== */
.lbr-categories-wrapper {
    background-color: #020617;
    color: #f8fafc;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    margin: 0;
    overflow-x: hidden;
    position: relative;
}

.lbr-categories-section {
    width: 100%;
    position: relative;
    padding: 40px 0 50px;
    background-image: linear-gradient(to bottom, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.9)), url('http://clublibrarte.com/wp-content/uploads/2026/04/libros.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lbr-section-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 50;
}

.lbr-section-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #fef3c7;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
    margin-bottom: 6px;
    line-height: 1.2;
}

.lbr-spotlight {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    background: radial-gradient(circle 450px at 50% 50%, var(--lbr-glow) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.9) 100%);
}

[id^="fireflies-canvas"] {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

/* Carousel Utility Overrides (replace Tailwind utilities) */
.lbr-categories-section .text-amber-100\/60 {
    color: rgba(254, 243, 199, 0.6);
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}
.lbr-categories-section .text-center { text-align: center; }
.lbr-categories-section .mt-12 { margin-top: 2rem; }
.lbr-categories-section .z-50 { z-index: 50; }
.lbr-categories-section .relative { position: relative; }
.lbr-categories-section .text-slate-500 {
    color: rgba(100, 116, 139, 0.7);
}
.lbr-categories-section .text-sm { font-size: 0.8rem; }
.lbr-categories-section .uppercase { text-transform: uppercase; }
.lbr-categories-section .tracking-widest { letter-spacing: 0.15em; }

.lbr-shelf-scene {
    position: relative;
    width: 100%;
    padding: 20px 0;
    z-index: 20;
    cursor: grab;
    user-select: none;
}

.lbr-shelf-scene:active {
    cursor: grabbing;
}

.lbr-track-container {
    width: 100%;
    display: flex;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.lbr-track {
    display: flex;
    gap: 40px;
    padding: 40px 100px;
    will-change: transform;
    animation: autoMove 60s linear infinite;
}

.lbr-track.paused {
    animation-play-state: paused !important;
}

.lbr-item {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: brightness(0.65) saturate(0.8);
    cursor: pointer;
    text-decoration: none;
}

.lbr-item:hover {
    transform: scale(1.05) translateY(-8px);
    filter: brightness(1.2) saturate(1.1);
    z-index: 30;
}

.lbr-item-cover {
    width: 180px;
    height: 270px;
    border-radius: 2px 8px 8px 2px;
    position: relative;
    box-shadow: 20px 20px 40px rgba(0, 0, 0, 0.9);
    background-size: cover;
    background-position: center;
    border-left: 5px solid rgba(255, 255, 255, 0.05);
}

.lbr-item-name {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fef3c7;
    margin-top: 20px;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.gemini-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(12px);
}

.gemini-card {
    background: #111827;
    border: 1px solid #fbbf24;
    border-radius: 20px;
    max-width: 650px;
    width: 100%;
    padding: 40px;
    box-shadow: 0 0 60px rgba(251, 191, 36, 0.15);
    position: relative;
}

/* Gemini Modal — Tailwind Utility Overrides */
.gemini-card .absolute { position: absolute; }
.gemini-card .top-6 { top: 1.5rem; }
.gemini-card .right-6 { right: 1.5rem; }
.gemini-card .text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.gemini-card .font-bold { font-weight: 700; }
.gemini-card .font-black { font-weight: 900; }
.gemini-card .text-amber-200 { color: #fde68a; }
.gemini-card .text-amber-950 { color: #451a03; }
.gemini-card .text-slate-300 { color: #cbd5e1; }
.gemini-card .text-slate-200 { color: #e2e8f0; }
.gemini-card .text-slate-500 { color: #64748b; }
.gemini-card .text-white { color: #fff; }
.gemini-card .text-lg { font-size: 1.125rem; }
.gemini-card .text-center { text-align: center; }
.gemini-card .mb-6 { margin-bottom: 1.5rem; }
.gemini-card .mb-4 { margin-bottom: 1rem; }
.gemini-card .mt-6 { margin-top: 1.5rem; }
.gemini-card .mt-8 { margin-top: 2rem; }
.gemini-card .pt-6 { padding-top: 1.5rem; }
.gemini-card .p-4 { padding: 1rem; }
.gemini-card .py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.gemini-card .w-full { width: 100%; }
.gemini-card .w-8 { width: 2rem; }
.gemini-card .h-8 { height: 2rem; }
.gemini-card .inline-block { display: inline-block; }
.gemini-card .italic { font-style: italic; }
.gemini-card .uppercase { text-transform: uppercase; }
.gemini-card .leading-relaxed { line-height: 1.625; }
.gemini-card .tracking-tighter { letter-spacing: -0.05em; }
.gemini-card .rounded-xl { border-radius: 0.75rem; }
.gemini-card .rounded-full { border-radius: 9999px; }
.gemini-card .bg-slate-950 { background: #020617; }
.gemini-card .bg-amber-500 { background: #f59e0b; }
.gemini-card .border { border-width: 1px; }
.gemini-card .border-4 { border-width: 4px; }
.gemini-card .border-slate-800 { border-color: #1e293b; }
.gemini-card .border-t { border-top: 1px solid #1e293b; }
.gemini-card .hidden { display: none; }
.gemini-card textarea {
    width: 100%;
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 0.75rem;
    padding: 1rem;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.2s;
}
.gemini-card textarea:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
    outline: none;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.gemini-card .animate-spin { animation: spin 1s linear infinite; }

.lbr-btn-ai {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    color: #451a03;
    font-weight: 800;
    padding: 14px 32px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.lbr-btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(217, 119, 6, 0.5);
}

/* ==========================================================================
   5. USER & DASHBOARD COMPONENTS
   ========================================================================== */
.librarte-tabs .tab-btn.active {
    opacity: 1 !important;
    border-bottom-color: var(--ui-accent, #D9A441) !important;
    color: #fff !important;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--ui-border);
    padding-bottom: 20px;
}

.dashboard-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dash-tab-btn {
    background: transparent;
    color: var(--ui-text-muted);
    border: 1px solid var(--ui-border);
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--ui-transition);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.dash-tab-btn.active {
    background: rgba(217, 164, 65, 0.1);
    border-color: var(--ui-accent);
    color: var(--ui-accent);
}

.dash-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.dash-tab-content.active {
    display: block;
}

.order-card {
    background: var(--ui-bg-panel);
    border: 1px solid var(--ui-border);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.order-card-header {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--ui-border-highlight);
    border-radius: 12px;
}

/* ==========================================================================
   6. ANIMATIONS
   ========================================================================== */
@keyframes clPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(217, 164, 65, 0.4)
    }

    70% {
        box-shadow: 0 0 0 15px rgba(217, 164, 65, 0)
    }

    100% {
        box-shadow: 0 0 0 0 rgba(217, 164, 65, 0)
    }
}

@keyframes floatUp {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes autoMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ==========================================================================
   7. CHECKOUT COMPONENTS
   ========================================================================== */
.cl-ui-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ui-accent);
    color: #fff;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: var(--ui-transition);
    text-decoration: none;
    width: 100%;
    font-size: 1rem;
}

.cl-ui-btn-secondary {
    background: rgba(255, 255, 255, 0.8);
    color: var(--ui-text-main);
    border: 1px solid var(--ui-border);
}

.librarte-cart-trigger {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: var(--ui-bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--ui-border);
    border-radius: 999px;
    color: var(--ui-text-main);
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: var(--ui-transition);
    cursor: pointer;
}

.cl-cart-badge {
    background: var(--ui-accent);
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 0px 8px;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 99px;
    box-shadow: 0 2px 5px rgba(153, 102, 51, 0.3);
}

.cl-ui-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.cl-ui-table th {
    text-align: left;
    padding: 1rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ui-text-muted);
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
}

.cl-ui-table td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--ui-text-main);
}

.cl-remove-item {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ui-transition);
}

.cl-remove-item:hover {
    background: #ef4444;
    color: white;
}

.cl-cart-modal-overlay {
    backdrop-filter: blur(12px);
    background: rgba(5, 3, 1, 0.65) !important;
}

.cl-cart-modal-content {
    background: rgba(15, 8, 4, 0.92) !important;
    backdrop-filter: blur(24px) saturate(120%);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-top: 1px solid rgba(255,255,255,0.2) !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.05) !important;
    color: #fff;
    max-width: 420px;
    width: 92%;
    margin: 6vh auto;
    overflow: hidden;
}
.cl-cart-modal-content .cl-close-btn {
    color: rgba(255,255,255,0.4) !important;
    font-size: 1.5rem !important;
    transition: color 0.2s;
    background: none !important;
    border: none !important;
}
.cl-cart-modal-content .cl-close-btn:hover { color: #fff !important; }
.cl-cart-modal-content .cl-ui-heading { color: #fff !important; font-weight: 700; font-size: 1.3rem; }

.cl-cart-item {
    background: rgba(255,255,255,0.04) !important;
    border-radius: 12px !important;
    padding: 14px 16px !important;
    margin-bottom: 10px !important;
    border: 1px solid rgba(255,255,255,0.06) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: all 0.2s;
}
.cl-cart-item:hover { background: rgba(255,255,255,0.07) !important; border-color: rgba(255,255,255,0.12) !important; }
.cl-cart-item h4 { color: #fff !important; margin: 0 0 4px !important; font-size: 0.95rem !important; font-weight: 600; }
.cl-cart-item .price { color: var(--ui-accent, #D9A441) !important; font-weight: 700 !important; font-size: 0.9rem !important; }

.cl-btn-checkout {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #D9A441, #996633) !important;
    color: #fff !important;
    font-weight: 700 !important;
    padding: 14px 1.5rem !important;
    border-radius: 12px !important;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none !important;
    width: 100%;
    font-size: 1rem !important;
    box-shadow: 0 4px 15px rgba(217,164,65,0.25);
    text-align: center;
    box-sizing: border-box;
}
.cl-btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(217,164,65,0.4);
    background: linear-gradient(135deg, #c4932e, #7a4f22) !important;
    color: #fff !important;
}

.checkout-container-pro {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--ui-text-main);
    background-color: #050301;
    background-image: linear-gradient(to bottom, rgba(5, 3, 1, 0.88), rgba(15, 10, 5, 0.96)), url('https://images.unsplash.com/photo-1507842217343-583bb7270b66?ixlib=rb-1.2.1&auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 60px 20px;
    min-height: 100vh;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    border-radius: 0;
    box-sizing: border-box;
}

.checkout-container-pro .checkout-inner {
    max-width: 1150px;
    margin: 0 auto;
}

.checkout-container-pro .cl-ui-grid {
    display: grid;
    gap: 2rem;
}

@media(min-width: 992px) {
    .checkout-container-pro .cl-checkout-layout {
        grid-template-columns: 1.3fr 0.7fr;
    }
}

.checkout-container-pro .cl-ui-card {
    background: var(--ui-bg-glass);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ui-border);
    border-top: 1px solid var(--ui-border-highlight);
    border-radius: var(--ui-radius);
    padding: 2.5rem;
    box-shadow: var(--ui-shadow-soft);
}

.checkout-container-pro .cl-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--ui-border);
}

.checkout-container-pro .cl-step-number {
    background: var(--ui-accent);
    color: var(--ui-secondary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}

.checkout-container-pro .cl-ui-heading {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    color: #fff;
}

.checkout-container-pro .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media(max-width: 600px) {
    .checkout-container-pro .form-row {
        grid-template-columns: 1fr;
    }
}

.checkout-container-pro .cl-ui-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ui-text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.checkout-container-pro .cl-ui-input,
.checkout-container-pro .cl-ui-select,
.checkout-container-pro textarea.cl-ui-input {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--ui-bg-panel);
    color: var(--ui-text-main);
    font-size: 1rem;
    transition: var(--ui-transition);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

.checkout-container-pro .cl-ui-input:focus,
.checkout-container-pro .cl-ui-select:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--ui-accent);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(217, 164, 65, 0.2);
}

.checkout-container-pro .cl-ui-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.checkout-container-pro .delivery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.checkout-container-pro .cl-ui-radio-card {
    display: flex;
    align-items: flex-start;
    padding: 1.25rem;
    border-radius: 14px;
    border: 1px solid var(--ui-border);
    background: var(--ui-bg-panel);
    cursor: pointer;
    transition: var(--ui-transition);
}

.checkout-container-pro .cl-ui-radio-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.checkout-container-pro .cl-ui-radio-card input[type="radio"] {
    margin-right: 12px;
    margin-top: 4px;
    accent-color: var(--ui-accent);
    transform: scale(1.2);
}

.checkout-container-pro .cl-ui-radio-content h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: #fff;
}

.checkout-container-pro .cl-ui-radio-content p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--ui-text-muted);
    line-height: 1.4;
}

.checkout-container-pro .payment-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.checkout-container-pro .btn-payment {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    border-radius: 16px;
    border: 2px solid transparent;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--ui-transition);
    color: #fff;
    gap: 10px;
    background: var(--ui-bg-panel);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.checkout-container-pro .btn-payment svg,
.checkout-container-pro .btn-payment i {
    width: 28px;
    height: 28px;
    font-size: 1.6rem;
}

.checkout-container-pro .btn-payment.zelle:hover,
.checkout-container-pro .btn-payment.zelle.active {
    background: #741bdf;
    border-color: #9d50ff;
}

.checkout-container-pro .btn-payment.binance:hover,
.checkout-container-pro .btn-payment.binance.active {
    background: #FCD535;
    color: #1e293b;
    border-color: #ffe675;
}

.checkout-container-pro .btn-payment.binance.active svg path {
    fill: #1e293b !important;
}

.checkout-container-pro .btn-payment.pagomovil:hover,
.checkout-container-pro .btn-payment.pagomovil.active {
    background: #D32F2F;
    border-color: #ff5252;
}

.checkout-container-pro .btn-payment.efectivo:hover,
.checkout-container-pro .btn-payment.efectivo.active {
    background: #10B981;
    border-color: #34d399;
}

.checkout-container-pro .btn-payment.active {
    transform: scale(0.97);
    box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.3);
}

.checkout-container-pro #payment-details-container {
    background: var(--ui-bg-panel);
    border-left: 4px solid var(--ui-accent);
    padding: 1.25rem;
    border-radius: 0 12px 12px 0;
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.6;
    display: none;
    margin-bottom: 1.5rem;
}

.checkout-container-pro .custom-file-upload-wrapper {
    display: none;
    margin-top: 1.5rem;
}

.checkout-container-pro .custom-file-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 1.25rem;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--ui-text-muted);
    cursor: pointer;
    transition: var(--ui-transition);
    text-align: center;
    font-size: 0.95rem;
}

.checkout-container-pro .custom-file-upload:hover {
    border-color: var(--ui-accent);
    color: #fff;
    background: rgba(217, 164, 65, 0.05);
}

.checkout-container-pro .custom-file-upload.has-file {
    border-style: solid;
    border-color: #25D366;
    color: #25D366;
    background: rgba(37, 211, 102, 0.05);
}

.checkout-container-pro input[type="file"] {
    display: none;
}

.checkout-container-pro .sidebar-wrapper {
    height: 100%;
    position: relative;
}

.checkout-container-pro .sidebar-sticky {
    position: sticky;
    top: 40px;
}

.checkout-container-pro .order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}

.checkout-container-pro .order-item-info strong {
    display: block;
    color: #fff;
    font-size: 1.05rem;
    margin-bottom: 4px;
    font-weight: 600;
}

.checkout-container-pro .order-item-info span {
    color: var(--ui-text-muted);
    font-size: 0.85rem;
}

.checkout-container-pro .order-item-price {
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
}

.checkout-container-pro .order-total-box {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.checkout-container-pro .summary-row {
    display: flex;
    justify-content: space-between;
    color: var(--ui-text-muted);
    font-size: 0.95rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.5rem;
}

.checkout-container-pro .promo-row {
    color: var(--ui-accent);
    font-weight: 600;
    display: none;
    justify-content: space-between;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

.checkout-container-pro .price-strikethrough {
    text-decoration: line-through;
    opacity: 0.5;
    font-size: 0.9rem;
    margin-right: 8px;
    font-weight: 400;
}

.checkout-container-pro .total-display-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-container-pro .total-display-row .total-label {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.checkout-container-pro .total-display-row .total-amount {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.checkout-container-pro .total-display-row .total-currency {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ui-text-muted);
}

.checkout-container-pro .rate-info {
    font-size: 0.8rem;
    color: var(--ui-text-muted);
    text-align: right;
    margin-top: 0.5rem;
}

.checkout-container-pro .btn-whatsapp-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 1.25rem;
    border-radius: 99px;
    border: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.4);
    background: var(--ui-bg-panel);
    cursor: not-allowed;
    transition: var(--ui-transition);
    margin-top: 1.5rem;
}

.checkout-container-pro .btn-whatsapp-submit.ready {
    background: #25D366;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.25);
}

.checkout-container-pro .btn-whatsapp-submit.ready:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
}

/* ==========================================================================
   8. DISPATCH COMPONENTS
   ========================================================================== */
.librarte-agent-panel {
    max-width: 800px;
    margin: 20px auto;
}

.agent-header {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ui-border);
    margin-bottom: 20px;
}

.agent-header h2 {
    margin: 0;
    color: var(--ui-accent, #D9A441);
}

.agent-orders {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.agent-order-card {
    padding: 20px;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.order-card-header strong {
    color: #fff;
}

.order-card-details p {
    margin: 4px 0;
    font-size: 14px;
    color: var(--ui-text-muted);
}

.order-card-details strong {
    color: rgba(255, 255, 255, 0.8);
}

.order-card-items {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    color: var(--ui-text-muted);
}

.order-card-actions {
    margin-top: 15px;
}

.dispatch-action {
    cursor: pointer;
}

/* ==========================================================================
   9. COMMUNITY COMPONENTS
   ========================================================================== */
.librarte-community .mini-book-card:hover img {
    transform: scale(1.05);
    border-color: var(--ui-accent);
}

@media (max-width: 768px) {
    .librarte-community .community-sections {
        grid-template-columns: 1fr !important;
    }

    .librarte-community .recommendations-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ==========================================================================
   10. BANNER COMPONENTS
   ========================================================================== */
.librarte-banners-inline {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.librarte-banner-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    border-radius: 12px;
    align-items: center;
    transition: box-shadow 0.3s;
}

.librarte-banner-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.15);
}

.banner-image img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.banner-body h3 {
    margin: 0 0 5px;
}

.banner-text {
    font-size: 14px;
    color: var(--ui-text-muted, rgba(255, 255, 255, 0.5));
}

.banner-text p {
    margin: 0;
}

.banner-cta {
    display: inline-block;
    padding: 8px 20px;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
    transition: opacity 0.3s;
}

.banner-cta:hover {
    opacity: 0.85;
    color: #fff;
}

.librarte-bar-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    color: #fff;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.bar-cta {
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 15px;
    border-radius: 15px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: background 0.3s;
}

.bar-cta:hover {
    background: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.banner-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.banner-close:hover {
    opacity: 1;
}

.librarte-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.librarte-popup {
    max-width: 450px;
    width: 100%;
    padding: 30px;
    text-align: center;
    position: relative;
}

.librarte-popup .popup-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #999;
    font-size: 24px;
}

.popup-img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.librarte-popup h3 {
    color: var(--ui-accent, #D9A441);
    margin: 0 0 10px;
    font-size: 22px;
}

.popup-body {
    font-size: 14px;
    color: var(--ui-text-muted, rgba(255, 255, 255, 0.5));
}

.popup-body p {
    margin: 5px 0;
}

.librarte-slide-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(15, 8, 4, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4);
    z-index: 99998;
    max-width: 300px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.librarte-slide-banner .banner-close {
    position: absolute;
    top: 5px;
    right: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.slide-text {
    font-size: 13px;
    color: var(--ui-text-muted, rgba(255, 255, 255, 0.5));
    margin: 5px 0;
}

.slide-text p {
    margin: 0;
}

.slide-cta {
    display: block;
    margin-top: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

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

    .librarte-slide-banner {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* ==========================================================================
   11. REPORT COMPONENTS
   ========================================================================== */
.librarte-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.librarte-report-card {
    background: rgba(15, 8, 4, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    border-top: 4px solid #D9A441;
}

.librarte-report-card h3 {
    margin: 0 0 5px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.librarte-report-card .big-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    margin: 8px 0;
}

.librarte-report-card .sub {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.chart-bar-container {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 120px;
    margin-top: 15px;
    padding: 0 5px;
}

.chart-bar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.chart-bar {
    width: 100%;
    min-height: 4px;
    border-radius: 4px 4px 0 0;
    transition: height 0.3s;
}

.chart-bar-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
}

.chart-bar-value {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
}

.report-table-scroll {
    max-height: 400px;
    overflow-y: auto;
}

.report-table-scroll table {
    width: 100%;
}

.highlight-row td {
    font-weight: 700;
}

.change-positive {
    color: #27ae60 !important;
}

.change-negative {
    color: #e74c3c !important;
}

/* Dark glass containers for charts and tables */
.librarte-dark-panel {
    background: rgba(15, 8, 4, 0.85);
    backdrop-filter: blur(16px);
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* Dark progress bars */
.librarte-bar-track {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    height: 24px;
}

.librarte-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #D9A441, #996633);
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding-left: 8px;
}

.librarte-bar-fill span {
    color: #fff;
    font-size: 11px;
    font-weight: bold;
}

/* (Admin dark table/tab styles moved to scoped body.librarte-admin in librarte-club.php) */


/* ==========================================================================
   12. CATEGORIES DYNAMIC BG COMPONENTS
   ========================================================================== */
.cl-mystic-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.5s ease;
    background-color: #020617;
    background-image: linear-gradient(to bottom, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.98));
    overflow: hidden;
}

.cl-mystic-spotlight {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

body.cl-dynamic-bg-active {
    color: #f8fafc !important;
}

body.cl-dynamic-bg-active .librarte-book-card,
body.cl-dynamic-bg-active .cl-glass-panel,
body.cl-dynamic-bg-active .cl-ui-card {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

body.cl-dynamic-bg-active .librarte-book-card .book-details h3 a,
body.cl-dynamic-bg-active .cl-glass-panel h1,
body.cl-dynamic-bg-active .cl-glass-panel h2,
body.cl-dynamic-bg-active .cl-glass-panel h3,
body.cl-dynamic-bg-active .cl-ui-card h1,
body.cl-dynamic-bg-active .cl-ui-card h2,
body.cl-dynamic-bg-active .cl-ui-card h3 {
    color: #f8fafc !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.cl-dynamic-bg-active .book-author,
body.cl-dynamic-bg-active .librarte-results-count {
    color: #cbd5e1 !important;
}

body.cl-dynamic-bg-active .price {
    color: #fbbf24 !important;
}

body.cl-dynamic-bg-active .librarte-search-input,
body.cl-dynamic-bg-active .librarte-filters select {
    background: rgba(15, 23, 42, 0.8) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

body.cl-dynamic-bg-active .filter-tag {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #f8fafc !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   13. METABOX COMPONENTS
   ========================================================================== */
.librarte-metabox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
    background: #1a1208;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(217, 164, 65, 0.15);
}

.librarte-metabox-grid .full-width {
    grid-column: 1 / -1;
}

.librarte-metabox-grid label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.librarte-metabox-grid .description {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    margin-top: 4px;
}

.librarte-metabox-grid input[type="text"],
.librarte-metabox-grid input[type="number"],
.librarte-metabox-grid textarea,
.librarte-metabox-grid select {
    background: rgba(0, 0, 0, 0.4) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.librarte-metabox-grid input:focus,
.librarte-metabox-grid textarea:focus,
.librarte-metabox-grid select:focus {
    border-color: #D9A441 !important;
    box-shadow: 0 0 0 2px rgba(217, 164, 65, 0.2) !important;
    outline: none !important;
}

.librarte-metabox-grid select option {
    background: #1a0f0a;
    color: #fff;
}

/* ==========================================================================
   14. BIBLIOTECA — UNIVERSAL DARK BACKGROUND
   Applied directly on the container so it works whether loaded via
   archive-libro.php OR via Elementor shortcode on a regular page.
   ========================================================================== */
.librarte-catalog-container {
    position: relative;
    z-index: 1;
    padding: 40px 20px;
    max-width: 1280px;
    margin: 0 auto;
}

.librarte-catalog-container::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://clublibrarte.com/wp-content/uploads/2026/05/vintage-books-on-bookshelves-in-old-library-educa-2026-03-19-21-44-44-utc-scaled.jpg');
    background-size: cover;
    background-position: center;
    z-index: -2;
    pointer-events: none;
}

.librarte-catalog-container::after {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(180deg, rgba(10,5,2,0.82) 0%, rgba(5,3,1,0.88) 40%, rgba(3,1,0,0.93) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Override light text/bg for dark context */
.librarte-catalog-container .librarte-results-count,
.librarte-catalog-container .librarte-results-count p {
    color: rgba(255,255,255,0.5) !important;
    font-size: 0.85rem;
}

.librarte-catalog-container .librarte-filters.cl-ui-card {
    background: rgba(15,8,4,0.65) !important;
    backdrop-filter: blur(16px) !important;
    border-color: rgba(255,255,255,0.1) !important;
}

.librarte-catalog-container .librarte-search-input,
.librarte-catalog-container .librarte-filters select {
    background: rgba(255,255,255,0.07) !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}

.librarte-catalog-container .librarte-search-input::placeholder {
    color: rgba(255,255,255,0.4);
}

.librarte-catalog-container .librarte-search-input:focus,
.librarte-catalog-container .librarte-filters select:focus {
    border-color: #D9A441 !important;
    box-shadow: 0 0 0 3px rgba(217,164,65,0.15) !important;
}

/* Book card overrides for dark */
.librarte-catalog-container .librarte-book-card {
    background: rgba(15,8,4,0.7) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.librarte-catalog-container .librarte-book-card .book-details h3 a {
    color: #fef3c7 !important;
}

.librarte-catalog-container .librarte-book-card .book-author {
    color: rgba(255,255,255,0.55) !important;
}

.librarte-catalog-container .librarte-book-card .price {
    color: #D9A441 !important;
    font-weight: 700;
}

/* Pagination for dark bg */
.librarte-catalog-container .librarte-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2.5rem;
}

.librarte-catalog-container .librarte-pagination .page-numbers {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.65);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.librarte-catalog-container .librarte-pagination .page-numbers.current,
.librarte-catalog-container .librarte-pagination .page-numbers:hover {
    background: linear-gradient(135deg, #D9A441, #996633);
    color: #fff;
    border-color: transparent;
}

.librarte-catalog-container .librarte-pagination .page-numbers.dots {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.3);
}

/* ==========================================================================
   15. COMPREHENSIVE MOBILE RESPONSIVE
   ========================================================================== */

/* --- Tablet (<=768px) --- */
@media (max-width: 768px) {

    /* Catalog Grid */
    .librarte-books-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Filters */
    .librarte-filters-row {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .librarte-search-input,
    .librarte-filters select {
        width: 100% !important;
        flex: none !important;
        font-size: 14px !important;
    }

    .librarte-catalog-container {
        padding: 20px 12px;
    }

    /* Carousel */
    .lbr-categories-section {
        padding: 24px 0 30px !important;
    }

    .lbr-section-title {
        font-size: 1.8rem !important;
    }

    .lbr-track {
        gap: 20px !important;
        padding: 20px 40px !important;
    }

    .lbr-item {
        flex: 0 0 130px !important;
    }

    .lbr-item-cover {
        width: 130px !important;
        height: 195px !important;
    }

    .lbr-item-name {
        font-size: 0.85rem !important;
        margin-top: 10px !important;
    }

    .lbr-btn-ai {
        padding: 10px 20px !important;
        font-size: 0.85rem !important;
    }

    /* Single Book Template */
    .lbs-hero-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        text-align: center;
    }

    .lbs-cover-col {
        max-width: 220px;
        margin: 0 auto;
    }

    .lbs-title {
        font-size: 1.6rem !important;
    }

    .lbs-meta-strip {
        flex-direction: column !important;
        gap: 8px !important;
        padding: 16px !important;
    }

    .lbs-meta-item {
        font-size: 0.8rem !important;
    }

    .lbs-content-body {
        padding: 24px 16px !important;
        font-size: 0.95rem !important;
    }

    .lbs-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .lbs-btn {
        width: 100% !important;
        text-align: center;
    }

    /* User Dashboard */
    .librarte-tabs .tab-btn {
        font-size: 0.75rem !important;
        padding: 8px 10px !important;
    }

    .dashboard-tabs {
        gap: 6px !important;
    }

    .dash-tab-btn {
        padding: 8px 12px !important;
        font-size: 0.8rem !important;
    }

    .cl-ui-card,
    .cl-glass-panel {
        padding: 1rem !important;
        border-radius: 14px !important;
    }

    /* Quiz */
    .quiz-options-grid {
        grid-template-columns: 1fr !important;
    }

    /* Cart table */
    .cl-ui-table th,
    .cl-ui-table td {
        padding: 0.75rem 0.5rem !important;
        font-size: 0.8rem !important;
    }

    /* Gemini Modal */
    .gemini-card {
        padding: 24px 16px !important;
        max-width: 95vw !important;
    }

    .gemini-card .text-3xl {
        font-size: 1.3rem !important;
    }

    /* Related books slider */
    .lbs-related-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    /* Discovery slider */
    .librarte-descubre-track .librarte-book-card {
        flex: 0 0 160px !important;
    }

    /* Metabox grid */
    .librarte-metabox-grid {
        grid-template-columns: 1fr !important;
    }
}

/* --- Phone (<=480px) --- */
@media (max-width: 480px) {

    /* Catalog Grid - single column on tiny screens */
    .librarte-books-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .librarte-book-card .book-details {
        padding: 8px !important;
    }

    .librarte-book-card .book-details h3 {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }

    .librarte-book-card .book-details h3 a {
        font-size: 0.8rem !important;
    }

    .librarte-book-card .book-author {
        font-size: 0.7rem !important;
    }

    .librarte-book-card .price {
        font-size: 0.85rem !important;
    }

    /* Carousel */
    .lbr-section-title {
        font-size: 1.4rem !important;
    }

    .lbr-track {
        gap: 14px !important;
        padding: 12px 20px !important;
    }

    .lbr-item {
        flex: 0 0 100px !important;
    }

    .lbr-item-cover {
        width: 100px !important;
        height: 150px !important;
        box-shadow: 10px 10px 20px rgba(0,0,0,0.7) !important;
    }

    .lbr-item-name {
        font-size: 0.7rem !important;
        margin-top: 6px !important;
    }

    .lbr-btn-ai {
        padding: 8px 16px !important;
        font-size: 0.75rem !important;
        gap: 6px !important;
    }

    .lbr-btn-ai svg {
        width: 16px !important;
        height: 16px !important;
    }

    /* Single book */
    .lbs-title {
        font-size: 1.3rem !important;
    }

    .lbs-author {
        font-size: 0.9rem !important;
    }

    .lbs-price-amount {
        font-size: 1.8rem !important;
    }

    /* Pagination */
    .librarte-catalog-container .librarte-pagination .page-numbers {
        padding: 6px 10px !important;
        font-size: 0.8rem !important;
    }

    /* General */
    .single-book-title {
        font-size: 1.5rem !important;
    }

    .single-book-author {
        font-size: 1rem !important;
    }

    .meta-item {
        padding: 4px 10px !important;
        font-size: 0.75rem !important;
    }

    /* Discovery */
    .librarte-descubre-track .librarte-book-card {
        flex: 0 0 140px !important;
    }

    /* User tabs */
    .librarte-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .librarte-tabs .tab-btn {
        font-size: 0.7rem !important;
        padding: 6px 8px !important;
        white-space: nowrap;
    }

    /* Order cards */
    .order-card-header {
        font-size: 0.85rem !important;
    }

    .order-status-badge {
        font-size: 0.7rem !important;
        padding: 3px 8px !important;
    }
}

/* ==========================================================================
   AJUSTES RESPONSIVE (Media Queries)
   ========================================================================== */

/* Tablet y Móvil Estándar */
@media (max-width: 768px) {
    .add-to-librero {
        padding: 8px 12px !important;  /* Padding más pequeño */
        font-size: 10px !important;    /* Tamaño de fuente reducido */
        letter-spacing: 0px !important; /* Eliminamos tracking para ganar espacio */
        text-transform: uppercase;
    }
}

/* Teléfonos muy pequeños (iPhone SE, etc.) */
@media (max-width: 400px) {
    .add-to-librero {
        font-size: 9px !important;
        padding: 6px 8px !important;
        min-height: 38px;
    }
}