/* Librarte Club Base Styles */

/* ==========================================================================
   LIBRARTE CLUB - MODERN GLASS THEME
   ========================================================================== */

:root {
    --cl-primary: #996633;
    --cl-secondary: #592B02;
    --cl-accent: #D9A441;
    --cl-text-main: #333333;
    --cl-text-light: #666666;
    --cl-glass-bg: rgba(255, 255, 255, 0.65);
    --cl-glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --cl-glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    --cl-card-radius: 20px;
}

/* Background Mesh Gradient */
body {
    background-color: #fafafa;
    background-image:
        radial-gradient(circle at 15% 10%, rgba(153, 102, 51, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(89, 43, 2, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
}

.librarte-catalog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Glass Panel Utility */
.cl-glass-panel {
    background: var(--cl-glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: var(--cl-glass-border);
    box-shadow: var(--cl-glass-shadow);
    border-radius: var(--cl-card-radius);
}

/* Filters Bar */
.librarte-filters {
    margin-bottom: 40px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.librarte-filters-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.librarte-search-input,
.librarte-filters select {
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid rgba(153, 102, 51, 0.2);
    background: rgba(255, 255, 255, 0.8);
    color: var(--cl-text-main);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    flex: 1;
}

.librarte-search-input:focus,
.librarte-filters select:focus {
    border-color: var(--cl-primary);
    box-shadow: 0 0 0 3px rgba(153, 102, 51, 0.1);
    background: #fff;
}

.librarte-search-btn {
    padding: 12px 30px;
    border-radius: 50px;
    background: var(--cl-primary);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.librarte-search-btn:hover {
    background: var(--cl-secondary);
    transform: translateY(-2px);
}

/* Active Filters Tags */
.librarte-active-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    font-size: 13px;
    margin-top: 5px;
}

.filter-tag {
    background: rgba(153, 102, 51, 0.1);
    color: var(--cl-primary);
    padding: 5px 12px;
    border-radius: 20px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.filter-tag:hover {
    background: rgba(153, 102, 51, 0.2);
    color: var(--cl-secondary);
}

.clear-all {
    color: var(--cl-text-light);
    text-decoration: underline;
    font-size: 12px;
}

/* Results Count */
.librarte-results-count {
    margin-bottom: 20px;
    color: var(--cl-text-light);
    font-size: 14px;
    font-weight: 500;
}

/* Book Grid */
.librarte-books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
}

/* Book Card Glass Style */
.librarte-book-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--cl-card-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
}

.librarte-book-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(89, 43, 2, 0.15);
    border-color: rgba(153, 102, 51, 0.3);
}

.book-cover-link {
    display: block;
    overflow: hidden;
    border-radius: var(--cl-card-radius) var(--cl-card-radius) 0 0;
}

.book-cover {
    height: 320px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #eee;
    transition: transform 0.5s ease;
}

.librarte-book-card:hover .book-cover {
    transform: scale(1.05);
}

/* Badges */
.badget {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #732C02;
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    font-weight: bold;
}

.book-details {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.book-details h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.3;
}

.book-details h3 a {
    color: var(--cl-text-main);
    text-decoration: none;
    transition: color 0.2s;
}

.book-details h3 a:hover {
    color: var(--cl-primary);
}

.book-author {
    color: var(--cl-text-light);
    font-size: 14px;
    margin-bottom: 15px;
    font-style: italic;
}

.price {
    font-weight: 700;
    color: var(--cl-primary);
    font-size: 17px;
    margin-top: auto;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.add-to-librero {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--cl-primary), var(--cl-secondary));
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(153, 102, 51, 0.3);
}

.add-to-librero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(153, 102, 51, 0.4);
    background: linear-gradient(135deg, var(--cl-secondary), var(--cl-primary));
}

/* Category Cards */
.librarte-category-card {
    display: block;
    height: 220px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.category-cover {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.librarte-category-card:hover .category-cover {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.1) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    transition: background 0.3s ease;
}

.librarte-category-card:hover .category-overlay {
    background: linear-gradient(to top, rgba(89, 43, 2, 0.9) 0%, rgba(153, 102, 51, 0.2) 70%, transparent 100%);
}

.category-overlay h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.category-overlay .book-count {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 5px;
    font-weight: 500;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.librarte-category-card:hover h3,
.librarte-category-card:hover .book-count {
    transform: translateY(-5px);
}

/* Loader */
.cl-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(153, 102, 51, 0.1);
    border-left-color: var(--cl-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Pagination */
.librarte-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.librarte-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 15px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(153, 102, 51, 0.2);
    border-radius: 8px;
    color: var(--cl-text-main);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.librarte-pagination .page-numbers.current,
.librarte-pagination .page-numbers:hover {
    background: var(--cl-primary);
    color: #fff;
    border-color: var(--cl-primary);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(153, 102, 51, 0.3);
}

/* Auth / Netflix Style */
.librarte-auth-container {
    max-width: 400px;
    margin: 40px auto;
    background: #0D0D0D;
    color: #fff;
    padding: 40px;
    border-radius: 5px;
}

.librarte-auth-container input {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    background: #333;
    border: none;
    color: #fff;
    border-radius: 4px;
}

.librarte-auth-container button {
    width: 100%;
    padding: 12px;
    background: #E50914;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

/* ==========================================================================
   SINGLE BOOK PAGE
   ========================================================================== */
.librarte-single-book-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.librarte-book-main {
    padding: 40px;
    margin-bottom: 40px;
}

.book-info-columns {
    display: flex;
    gap: 60px;
    align-items: flex-start;
}

.book-cover-column {
    flex: 0 0 320px;
    position: relative;
    z-index: 10;
}

.book-details-column {
    flex: 1;
}

/* 3D Book Cover */
.book-3d-wrapper {
    perspective: 1000px;
    padding: 20px;
    /* Space for swing */
}

.book-cover-3d {
    width: 100%;
    height: 480px;
    background-size: cover;
    background-position: center;
    border-radius: 5px 15px 15px 5px;
    box-shadow: 20px 20px 50px rgba(0, 0, 0, 0.3);
    transform-style: preserve-3d;
    transform: rotateY(-20deg);
    /* Initial tilt */
    transition: transform 0.1s ease-out;
    /* Smooth follow */
    position: relative;
}

.book-cover-3d::before {
    /* Spine visual */
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 99%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.4), rgba(0, 0, 0, 0.1));
    transform: translateZ(1px);
    /* Slight lift */
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.book-sheen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 5px 15px 15px 5px;
}

/* Typography & Details */
.single-book-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 10px;
    color: var(--cl-secondary);
}

.single-book-author {
    font-size: 1.2rem;
    color: var(--cl-text-light);
    margin-bottom: 30px;
    font-style: italic;
}

.single-book-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.meta-item {
    background: rgba(153, 102, 51, 0.1);
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 14px;
    color: var(--cl-primary);
    display: flex;
    gap: 5px;
}

.meta-label {
    font-weight: 700;
    opacity: 0.8;
}

.single-book-description h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--cl-primary);
    border-bottom: 2px solid rgba(153, 102, 51, 0.2);
    padding-bottom: 10px;
    display: inline-block;
}

.single-book-description .content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--cl-text-main);
    margin-bottom: 40px;
}

.single-book-actions {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(153, 102, 51, 0.2);
}

.price-tag-large {
    font-size: 2.5rem;
    color: var(--cl-primary);
    font-weight: 800;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.price-tag-large .currency {
    font-size: 1rem;
    opacity: 0.6;
    font-weight: 600;
}

.cl-btn-large-cta {
    background: linear-gradient(135deg, var(--cl-primary), var(--cl-secondary));
    color: #fff;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(153, 102, 51, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cl-btn-large-cta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px rgba(153, 102, 51, 0.5);
}

/* Reviews Styling */
.librarte-reviews-section {
    padding: 40px;
    margin-bottom: 40px;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(153, 102, 51, 0.1);
    padding-bottom: 20px;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--cl-primary);
}

.average-rating .stars .cl-star {
    color: #f5c518;
}

.average-rating .stars .cl-star.empty {
    color: #e1e1e1;
}

.librarte-review-item {
    padding: 20px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.review-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--cl-text-light);
}

.review-author {
    font-weight: 700;
    color: var(--cl-secondary);
}

.review-content {
    font-size: 1rem;
    line-height: 1.6;
}

/* Spoiler UI */
.spoiler-alert {
    background: rgba(240, 50, 50, 0.05);
    border: 1px solid rgba(240, 50, 50, 0.2);
    padding: 15px;
    border-radius: 8px;
    color: #c0392b;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
}

.toggle-spoiler {
    background: transparent;
    border: 1px solid #c0392b;
    color: #c0392b;
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

.toggle-spoiler:hover {
    background: #c0392b;
    color: #fff;
}

/* Form Fields */
.librarte-review-fields {
    margin: 20px 0;
    display: flex;
    gap: 30px;
    align-items: center;
    background: rgba(153, 102, 51, 0.05);
    padding: 15px;
    border-radius: 10px;
    flex-wrap: wrap;
}

.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    font-size: 1.5rem;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 2px;
}

.star-rating-input input:checked~label,
.star-rating-input label:hover,
.star-rating-input label:hover~label {
    color: #f5c518;
}

.spoiler-input {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

/* Mobile */
@media (max-width: 768px) {
    .book-info-columns {
        flex-direction: column;
    }

    .book-cover-column {
        flex: 0 0 auto;
        width: 100%;
        max-width: 280px;
        margin: 0 auto 30px;
    }

    .book-cover-3d {
        height: 400px;
    }

    .single-book-title {
        font-size: 2rem;
        text-align: center;
    }

    .single-book-author {
        text-align: center;
    }

    .single-book-actions {
        flex-direction: column;
    }

    .cl-btn-large-cta {
        width: 100%;
        text-align: center;
    }

    .librarte-book-main {
        padding: 20px;
    }
}

.librarte-tabs {
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
}

.tab-btn {
    background: none;
    border: none;
    color: #737373;
    font-size: 16px;
    cursor: pointer;
    padding-bottom: 5px;
}

.tab-btn.active {
    color: #fff;
    border-bottom: 2px solid #996633;
}

/* --- SHARED GLASSMORPHISM & VARIABLES --- */
:root {
    --cl-p-color: #996633;
    --cl-s-color: #592B02;
    --cl-t-color: #0D0D0D;
    --cl-e-color: #732C02;
    --cl-bg-glass: rgba(255, 255, 255, 0.85);
    --cl-bd-glass: rgba(255, 255, 255, 0.5);
    --cl-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --cl-radius: 16px;
}

.cl-glass-panel {
    background: var(--cl-bg-glass);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--cl-bd-glass);
    box-shadow: var(--cl-shadow);
    border-radius: var(--cl-radius);
    border-radius: var(--cl-radius);
    padding: 20px;
}

/* Glass Form Elements */
.cl-glass-panel input[type="text"],
.cl-glass-panel input[type="email"],
.cl-glass-panel input[type="number"],
.cl-glass-panel input[type="tel"],
.cl-glass-panel select,
.cl-glass-panel textarea {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--cl-bd-glass);
    border-radius: 8px;
    padding: 12px;
    color: var(--cl-t-color);
    font-family: inherit;
    width: 100%;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.cl-glass-panel input:focus,
.cl-glass-panel select:focus,
.cl-glass-panel textarea:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--cl-p-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(153, 102, 51, 0.2);
}

.cl-glass-panel label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: var(--cl-s-color);
}

/* --- MENU NAVIGATION STYLES --- */
#cl-glass-nav-wrapper {
    font-family: inherit;
    line-height: 1.5;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    z-index: 999;
    position: relative;
    user-select: none;
    /* UX Improvement */
}

#cl-glass-nav-wrapper *,
#cl-glass-nav-wrapper *::before,
#cl-glass-nav-wrapper *::after {
    box-sizing: border-box;
}

#cl-glass-nav-wrapper .cl-menu-list {
    background: var(--cl-bg-glass);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--cl-bd-glass);
    box-shadow: var(--cl-shadow);
    border-radius: var(--cl-radius);
    padding: 6px 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    list-style: none !important;
    margin: 0 !important;
    position: relative;
}

#cl-glass-nav-wrapper .cl-menu-item {
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    position: relative;
    list-style: none !important;
}

#cl-glass-nav-wrapper .cl-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none !important;
    color: var(--cl-t-color);
    font-size: 15px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--cl-radius);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    white-space: nowrap;
    cursor: pointer;
    background: transparent;
    border: none;
}

/* Icon Styling */
#cl-glass-nav-wrapper .cl-link img.cl-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    transition: filter 0.3s;
}

#cl-glass-nav-wrapper .cl-link:hover {
    background-color: rgba(153, 102, 51, 0.1);
    color: var(--cl-s-color);
}

#cl-glass-nav-wrapper .cl-link.cl-active {
    background-color: var(--cl-p-color);
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(153, 102, 51, 0.3);
}

#cl-glass-nav-wrapper .cl-link.cl-active img.cl-icon {
    filter: brightness(0) invert(1);
    /* Make icon white */
}

#cl-glass-nav-wrapper .cl-link.cl-active:hover {
    background-color: var(--cl-e-color);
}

#cl-glass-nav-wrapper .cl-submenu {
    position: absolute;
    top: 120%;
    left: 0;
    min-width: 200px;
    background: var(--cl-bg-glass);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--cl-bd-glass);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: var(--cl-radius);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
    list-style: none !important;
    margin: 0 !important;
}

@media (min-width: 769px) {
    #cl-glass-nav-wrapper .cl-has-child:hover .cl-submenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    #cl-glass-nav-wrapper .cl-has-child:hover .cl-arrow-icon {
        transform: rotate(180deg);
    }
}

#cl-glass-nav-wrapper .cl-sub-link {
    display: block;
    padding: 8px 16px;
    color: var(--cl-t-color);
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.2s;
}

#cl-glass-nav-wrapper .cl-sub-link:hover {
    background-color: rgba(153, 102, 51, 0.1);
    color: var(--cl-s-color);
}

#cl-glass-nav-wrapper .cl-arrow-icon {
    font-size: 10px;
    transition: transform 0.3s;
    display: inline-block;
    margin-left: 4px;
}

#cl-glass-nav-wrapper .cl-mobile-trigger {
    display: none;
    background: var(--cl-bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--cl-bd-glass);
    box-shadow: var(--cl-shadow);
    border-radius: 50px;
    padding: 12px 18px;
    cursor: pointer;
    z-index: 1001;
    gap: 4px;
}

#cl-glass-nav-wrapper .cl-mobile-trigger span {
    display: block;
    width: 6px;
    height: 6px;
    background-color: var(--cl-p-color);
    border-radius: 50%;
}

#cl-glass-nav-wrapper .cl-close-btn {
    display: none;
    position: absolute;
    top: 25px;
    right: 25px;
    background: transparent;
    border: none;
    font-size: 36px;
    color: var(--cl-t-color);
    cursor: pointer;
    line-height: 1;
    z-index: 1002;
}

@media (max-width: 768px) {
    #cl-glass-nav-wrapper .cl-mobile-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #cl-glass-nav-wrapper .cl-menu-list {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        max-width: none;
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 20px;
        padding: 40px 20px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: scale(0.95);
        transition: all 0.3s ease-in-out;
        z-index: 9999;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    #cl-glass-nav-wrapper .cl-menu-list.cl-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: scale(1);
    }

    #cl-glass-nav-wrapper .cl-close-btn {
        display: block;
    }

    #cl-glass-nav-wrapper .cl-link {
        font-size: 22px;
        padding: 15px 40px;
        width: 100%;
        text-align: center;
    }

    #cl-glass-nav-wrapper .cl-link img.cl-icon {
        width: 28px;
        height: 28px;
    }

    #cl-glass-nav-wrapper .cl-submenu {
        position: static;
        background: transparent;
        box-shadow: none;
        border: none;
        padding: 10px 0 0 0;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: auto;
        text-align: center;
        width: 100%;
    }

    #cl-glass-nav-wrapper .cl-submenu .cl-sub-link {
        font-size: 18px;
        padding: 10px;
        color: #666;
    }

    #cl-glass-nav-wrapper .cl-has-child.cl-sub-open .cl-submenu {
        display: flex;
        animation: cl-fade-down 0.3s ease;
    }

    #cl-glass-nav-wrapper .cl-has-child.cl-sub-open .cl-arrow-icon {
        transform: rotate(180deg);
    }

    @keyframes cl-fade-down {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* --- CHECKOUT & CART SHORTCODE STYLES --- */

/* Cart Icon Shortcode Wrapper */
.librarte-cart-icon-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    /* Uses the glass panel style via class in PHP, or we inherit variables here */
}

.librarte-cart-icon-wrapper a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--cl-t-color);
    font-weight: bold;
    font-size: 1.1em;
}

.librarte-cart-icon-wrapper img {
    width: 40px;
    /* Slightly larger for standalone */
    height: 40px;
    object-fit: contain;
    transition: transform 0.3s;
}

.librarte-cart-icon-wrapper:hover img {
    transform: scale(1.1);
}

/* Checkout App Styling */
#librarte-checkout-app {
    max-width: 800px;
    margin: 40px auto;
    /* Glassmorphism applied via class in HTML */
    color: var(--cl-t-color);
}

#librarte-checkout-app h2,
#librarte-checkout-app h3 {
    color: var(--cl-p-color);
    border-bottom: 2px solid var(--cl-bd-glass);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

#checkout-totals {
    background: rgba(255, 255, 255, 0.5);
    padding: 20px;
    border-radius: var(--cl-radius);
    margin: 20px 0;
    text-align: right;
}

.currency-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    justify-content: flex-end;
}

.currency-btn {
    padding: 8px 16px;
    border: 1px solid var(--cl-p-color);
    background: transparent;
    color: var(--cl-p-color);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.currency-btn.active,
.currency-btn:hover {
    background: var(--cl-p-color);
    color: #fff;
}

#btn-send-whatsapp {
    width: 100%;
    padding: 15px;
    background-color: #25D366;
    /* WhatsApp Green */
    color: white;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

#btn-send-whatsapp:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
}

#btn-send-whatsapp:disabled {
    background-color: #aaa;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.delivery-options label,
.payment-methods select,
.upload-proof input {
    display: block;
    margin-bottom: 10px;
    font-size: 1.05em;
    cursor: pointer;
}

.payment-methods select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.8);
}

/* --- CART MODAL STYLES --- */
.cl-cart-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.cl-cart-modal-overlay.open {
    display: flex;
}

.cl-cart-modal-content {
    background: var(--cl-bg-glass);
    /* Reusing Glass Variable */
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--cl-bd-glass);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: cl-scale-up 0.3s ease;
}

@keyframes cl-scale-up {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cl-cart-modal-content .cl-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--cl-t-color);
}

.cl-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cl-cart-item:last-child {
    border-bottom: none;
}

.cl-cart-item h4 {
    margin: 0;
    font-size: 16px;
    color: var(--cl-p-color);
}

.cl-cart-item .price {
    font-weight: bold;
    color: var(--cl-t-color);
}

.cl-remove-item {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 12px;
}

.cl-cart-footer {
    margin-top: 20px;
    text-align: right;
    border-top: 2px solid var(--cl-p-color);
    padding-top: 15px;
}

.cl-btn-checkout {
    display: inline-block;
    background: var(--cl-p-color);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    margin-top: 10px;
    transition: background 0.3s;
}

.cl-btn-checkout:hover {
    background: var(--cl-s-color);
}

/* --- COMMUNITY SHORTCODE STYLES --- */
.librarte-community {
    max-width: 900px;
    margin: 0 auto;
}

.community-header h2 {
    color: var(--cl-p-color);
    margin-bottom: 10px;
}

.community-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.section-chat,
.section-recommendations {
    flex: 1 1 300px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--cl-bd-glass);
    padding: 20px;
    border-radius: var(--cl-radius);
}

.section-chat h3,
.section-recommendations h3 {
    color: var(--cl-s-color);
    margin-top: 0;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.mini-book-card {
    text-align: center;
}

.mini-book-card img {
    border-radius: 4px;
    transition: transform 0.2s ease;
    width: 100%;
    height: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mini-book-card:hover img {
    transform: scale(1.05);
}

.mini-book-card h4 {
    font-size: 14px;
    margin-top: 5px;
    color: var(--cl-t-color);
}

/* --- FULL CART PAGE STYLES --- */
#librarte-full-cart {
    max-width: 900px;
    margin: 40px auto;
}

.cl-cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.cl-cart-table th,
.cl-cart-table td {
    text-align: left;
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.cl-cart-table th {
    background: rgba(255, 255, 255, 0.4);
    color: var(--cl-s-color);
    font-weight: 600;
}

.cl-cart-summary {
    background: rgba(255, 255, 255, 0.4);
    padding: 20px;
    border-radius: var(--cl-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cl-cart-actions {
    display: flex;
    gap: 15px;
}

.cl-btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--cl-p-color);
    color: var(--cl-p-color);
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.cl-btn-secondary:hover {
    background: var(--cl-p-color);
    color: white;
}

@media (max-width: 600px) {
    .cl-cart-table thead {
        display: none;
    }

    .cl-cart-table tr {
        display: block;
        border-bottom: 2px solid rgba(0, 0, 0, 0.1);
        margin-bottom: 15px;
    }

    .cl-cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border: none;
        padding: 10px;
    }

    .cl-cart-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--cl-s-color);
    }
}

/* ==========================================================================
   CATÁLOGO MEJORADO
   ========================================================================== */

.librarte-filters-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.librarte-search-input {
    flex: 2;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--cl-radius);
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.librarte-search-btn {
    padding: 10px 20px;
    background: var(--cl-p-color);
    color: #fff;
    border: none;
    border-radius: var(--cl-radius);
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.librarte-search-btn:hover {
    background: var(--cl-s-color);
}

.librarte-active-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
    font-size: 13px;
}

.filter-tag {
    background: var(--cl-p-color);
    color: #fff;
    padding: 4px 12px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 12px;
    transition: opacity 0.3s;
}

.filter-tag:hover {
    opacity: 0.8;
    color: #fff;
}

.clear-all {
    color: var(--cl-e-color);
    text-decoration: underline;
    font-size: 12px;
}

.librarte-results-count {
    padding: 10px 0;
    font-size: 14px;
    color: #666;
}

.librarte-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}

/* Book cover link */
.book-cover-link {
    display: block;
    text-decoration: none;
}

.book-details h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.book-details h3 a:hover {
    color: var(--cl-p-color);
}

.book-author {
    color: #888;
    font-size: 13px;
    margin: 0 0 8px;
}

/* Pagination */
.librarte-pagination {
    text-align: center;
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.librarte-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--cl-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--cl-t-color);
}

.librarte-pagination .page-numbers.current {
    background: var(--cl-p-color);
    color: #fff;
    border-color: var(--cl-p-color);
}

.librarte-pagination .page-numbers:hover:not(.current) {
    background: rgba(153, 102, 51, 0.1);
    border-color: var(--cl-p-color);
}

/* ==========================================================================
   PÁGINA DE CATEGORÍAS
   ========================================================================== */

.librarte-categories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.librarte-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.librarte-category-card {
    text-decoration: none;
    display: block;
    border-radius: var(--cl-radius);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.librarte-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.category-cover {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.category-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 20px 15px;
    color: #fff;
}

.category-overlay h3 {
    margin: 0 0 5px;
    font-size: 20px;
}

.book-count {
    font-size: 13px;
    opacity: 0.8;
}

/* ==========================================================================
   PÁGINA INDIVIDUAL DE LIBRO
   ========================================================================== */

.librarte-single-book {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.book-hero {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.book-hero-cover {
    flex-shrink: 0;
    width: 280px;
    position: relative;
}

.book-hero-cover img {
    width: 100%;
    border-radius: var(--cl-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.book-hero-info {
    flex: 1;
}

.book-hero-info h1 {
    font-size: 28px;
    margin: 0 0 10px;
    color: var(--cl-s-color);
}

.book-meta-author {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.book-meta-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.book-meta-tags .tag {
    background: var(--cl-p-color);
    color: #fff;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.book-meta-complexity {
    color: #888;
    margin-bottom: 15px;
}

.book-price-big {
    font-size: 24px;
    font-weight: 700;
    color: var(--cl-p-color);
    margin: 20px 0;
}

.book-description {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.book-description h3 {
    color: var(--cl-s-color);
    margin-bottom: 10px;
}

.book-related {
    margin-top: 40px;
}

.book-related h3 {
    color: var(--cl-s-color);
    margin-bottom: 20px;
    font-size: 22px;
}

.related-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

@media (max-width: 768px) {
    .book-hero {
        flex-direction: column;
        align-items: center;
    }

    .book-hero-cover {
        width: 200px;
    }

    .book-hero-info {
        text-align: center;
    }

    .book-meta-tags {
        justify-content: center;
    }
}

/* ==========================================================================
   DASHBOARD DE USUARIO
   ========================================================================== */

.librarte-dashboard {
    max-width: 900px;
    margin: 20px auto;
}

.dashboard-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}

.dashboard-header .user-info h2 {
    margin: 0;
    color: var(--cl-s-color);
}

.dashboard-header .user-email {
    color: #888;
    font-size: 14px;
    margin: 5px 0 0;
}

.dashboard-header .logout-btn {
    margin-left: auto;
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    gap: 5px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.dash-tab-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--cl-radius) var(--cl-radius) 0 0;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.dash-tab-btn.active {
    background: var(--cl-p-color);
    color: #fff;
    border-color: var(--cl-p-color);
}

.dash-tab-content {
    display: none;
    padding: 20px 0;
}

.dash-tab-content.active {
    display: block;
}

/* Orders */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-card {
    padding: 15px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.order-date {
    font-size: 13px;
    color: #888;
}

.order-body {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.order-status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 15px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.order-total {
    font-weight: 700;
    color: var(--cl-s-color);
}

.order-items {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.order-item-name {
    background: rgba(153, 102, 51, 0.1);
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--cl-p-color);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state a {
    color: var(--cl-p-color);
    font-weight: 600;
}

/* Community improvements */
.chat-schedule {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--cl-radius);
    font-size: 13px;
}

.community-cta {
    text-align: center;
    margin-top: 30px;
    padding: 30px;
    background: rgba(153, 102, 51, 0.05);
    border-radius: var(--cl-radius);
    border: 1px dashed var(--cl-p-color);
}

.mini-price {
    display: block;
    font-weight: 600;
    color: var(--cl-p-color);
    font-size: 13px;
    margin-top: 3px;
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-header .logout-btn {
        margin-left: 0;
    }

    .dashboard-tabs {
        flex-direction: column;
    }

    .dash-tab-btn {
        border-radius: var(--cl-radius);
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .librarte-filters-row {
        flex-direction: column;
    }

    .librarte-filters select {
        width: 100%;
    }
}

/* ==========================================================================
   BOTÓN MI LIBRERO (CARRITO) EN NAVEGACIÓN
   ========================================================================== */

/* Separador visual entre nav links y el botón carrito */
#cl-glass-nav-wrapper .cl-cart-item-nav {
    margin-left: 8px;
    padding-left: 8px !important;
    border-left: 1px solid rgba(153, 102, 51, 0.2);
}

/* Estilo CTA del botón Mi Librero */
#cl-glass-nav-wrapper .cl-cart-nav-btn {
    background: var(--cl-s-color) !important;
    color: #ffffff !important;
    border-radius: 50px !important;
    padding: 10px 20px !important;
    font-weight: 700 !important;
    gap: 10px !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: 0 4px 14px rgba(89, 43, 2, 0.3);
}

#cl-glass-nav-wrapper .cl-cart-nav-btn:hover {
    background: var(--cl-e-color) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(89, 43, 2, 0.4);
}

#cl-glass-nav-wrapper .cl-cart-nav-btn .cl-icon {
    filter: brightness(0) invert(1);
    /* icono blanco */
}

/* Wrapper posición relativa para el badge */
#cl-glass-nav-wrapper .cl-cart-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Badge contador flotante */
#cl-glass-nav-wrapper .cl-cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    background: var(--cl-p-color);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #fff;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

/* Animación de pulso cuando el badge tiene libros */
#cl-glass-nav-wrapper .cl-cart-badge:not(:empty):not([data-count="0"]) {
    animation: cl-badge-pulse 2s infinite;
}

@keyframes cl-badge-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* Estilo en móvil del botón Mi Librero */
@media (max-width: 768px) {
    #cl-glass-nav-wrapper .cl-cart-item-nav {
        margin-left: 0;
        padding-left: 0 !important;
        border-left: none;
        width: 100%;
    }

    #cl-glass-nav-wrapper .cl-cart-nav-btn {
        font-size: 22px !important;
        padding: 15px 40px !important;
        width: 100% !important;
        justify-content: center !important;
    }

    #cl-glass-nav-wrapper .cl-cart-badge {
        top: -10px;
        right: -14px;
        min-width: 22px;
        height: 22px;
        font-size: 12px;
    }
}

/* ==========================================================================
   PAGINACIÓN
   ========================================================================== */
.librarte-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    padding: 20px 0;
}

.librarte-pagination .page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(153, 102, 51, 0.2);
    color: var(--cl-p-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.librarte-pagination .page-numbers:hover {
    background: rgba(153, 102, 51, 0.1);
    border-color: var(--cl-p-color);
    transform: translateY(-2px);
}

.librarte-pagination .page-numbers.current {
    background: var(--cl-p-color);
    color: #fff;
    border-color: var(--cl-p-color);
    box-shadow: 0 4px 10px rgba(153, 102, 51, 0.3);
}

.librarte-pagination .page-numbers.prev,
.librarte-pagination .page-numbers.next {
    width: auto;
    padding: 0 15px;
}

/* ==========================================================================
   FAVORITOS DE LA SEMANA - Shortcode Styles
   ========================================================================== */
.librarte-favoritos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Glass Panel override ONLY inside favoritos */
.librarte-favoritos-container .cl-glass-panel {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    border-radius: 20px;
    margin: 0 0 4vh;
}

/* Header */
.librarte-favoritos-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(153, 102, 51, 0.08));
    border: 1px solid rgba(153, 102, 51, 0.15);
    gap: 20px;
    flex-wrap: wrap;
}

.favoritos-header-content {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    min-width: 0;
}

/* Animated Heart Icon */
.favoritos-icon-pulse {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--cl-primary), var(--cl-accent, #D9A441));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: favPulse 2s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(153, 102, 51, 0.3);
}

.favoritos-heart {
    font-size: 24px;
    line-height: 1;
}

@keyframes favPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(153, 102, 51, 0.3);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(153, 102, 51, 0.5);
    }
}

.favoritos-header-text {
    min-width: 0;
}

.favoritos-title {
    margin: 0 0 4px 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--cl-secondary, #592B02);
    line-height: 1.2;
}

.favoritos-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: var(--cl-text-light, #666);
    line-height: 1.4;
}

/* Ver Catálogo Button */
.favoritos-ver-todo {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--cl-primary, #996633), var(--cl-secondary, #592B02));
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(153, 102, 51, 0.3);
    white-space: nowrap;
}

.favoritos-ver-todo:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(153, 102, 51, 0.45);
    background: linear-gradient(135deg, var(--cl-secondary, #592B02), var(--cl-primary, #996633));
    color: #fff;
}

/* Favoritos Grid — 4 columnas compactas en desktop */
.librarte-favoritos-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Book cards más compactas dentro de favoritos */
.librarte-favoritos-container .librarte-book-card {
    border-radius: 14px;
}

.librarte-favoritos-container .librarte-book-card .book-cover {
    height: 200px;
}

.librarte-favoritos-container .librarte-book-card .book-details {
    padding: 14px;
}

.librarte-favoritos-container .librarte-book-card .book-details h3 {
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.librarte-favoritos-container .librarte-book-card .book-author {
    font-size: 12px;
    margin-bottom: 8px;
}

.librarte-favoritos-container .librarte-book-card .price {
    font-size: 14px;
    margin-bottom: 10px;
}

.librarte-favoritos-container .librarte-book-card .add-to-librero {
    padding: 9px;
    font-size: 11px;
}

/* Responsive */
@media (max-width: 1024px) {
    .librarte-favoritos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .librarte-favoritos-header {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .favoritos-header-content {
        flex-direction: column;
        align-items: center;
    }

    .favoritos-title {
        font-size: 1.3rem;
    }

    .favoritos-ver-todo {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .librarte-favoritos-grid {
        grid-template-columns: 1fr;
    }

    .librarte-favoritos-container {
        padding: 20px 15px;
    }
}