/* Importar tipografías de Google Fonts */
        @import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

        /* Reset y configuración base */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            /* Paleta de colores */
            --primary-deep-blue: #0428a6;
            --primary-royal-blue: #2a6bbe;
            --primary-gold: #d4a237;
            --primary-warm-gold: #f8ab34;
            --accent-burgundy: #410f67;
            --accent-cream: #fef7ed;
            
            /* Colores neutros sofisticados */
            --primary-dark: #0f172a;
            --secondary-dark: #1e293b;
            --tertiary-dark: #334155;
            --text-white: #ffffff;
            --text-cream: #fef7ed;
            --text-gray: #e2e8f0;
            --text-medium-gray: #94a3b8;
            --text-dark-gray: #475569;
            --text-dark: #1e293b;
            --overlay-dark: rgba(15, 23, 42, 0.85);
            --overlay-light: rgba(254, 247, 237, 0.95);
            
            /* Tipografías elegantes */
            --font-heading: 'Playfair Display', serif;
            --font-body: 'Inter', sans-serif;
            --font-accent: 'Crimson Text', serif;
            
            /* Sombras y efectos */
            --shadow-soft: 0 4px 20px rgba(15, 23, 42, 0.08);
            --shadow-medium: 0 8px 30px rgba(15, 23, 42, 0.12);
            --shadow-strong: 0 15px 50px rgba(15, 23, 42, 0.2);
            --border-radius: 12px;
            --border-radius-lg: 20px;
        }

        body {
            font-family: var(--font-body);
            line-height: 1.7;
            color: var(--text-dark);
            background: linear-gradient(135deg, #fefefe 0%, #f8fafc 100%);
            font-weight: 400;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 0 2rem;
        }

        /* Navegación elegante */
        .navbar {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background: rgba(15, 23, 42, 0.95);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(212, 175, 55, 0.2);
            z-index: 1000;
            padding: 1.2rem 0;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .navbar.scrolled {
            background: rgba(15, 23, 42, 0.98);
            padding: 0.8rem 0;
            border-bottom: 1px solid rgba(212, 175, 55, 0.3);
        }

        .nav-container {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 2rem;
        }

        .nav-logo .logo-image {
            height: 55px;
            width: auto;
            max-width: 140px;
            object-fit: contain;
            filter: brightness(1.1);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .nav-logo .logo-image:hover {
            filter: brightness(1.2);
            transform: scale(1.02);
        }

        .nav-menu {
            display: flex;
            list-style: none;
            gap: 2.5rem;
            align-items: center;
        }

        .nav-link {
            color: var(--text-cream);
            text-decoration: none;
            font-weight: 500;
            font-family: var(--font-body);
            font-size: 0.95rem;
            letter-spacing: 0.5px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            padding: 0.8rem 0;
        }

        .nav-link:hover,
        .nav-link.active {
            color: var(--primary-gold);
        }

        .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--primary-gold), var(--primary-warm-gold));
            transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .nav-link:hover::after,
        .nav-link.active::after {
            width: 100%;
        }

        /* Hero Section con video de fondo */
        .hero-libreria {
            position: relative;
            height: 70vh;
            min-height: 500px;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            margin-top: 90px;
        }

        .hero-video {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            z-index: 0;
        }

        .hero-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(15, 23, 42, 0.75);
            z-index: 1;
        }

        .hero-overlay::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('banner/libreria.mp4');
            pointer-events: none;
        }

        .hero-content {
            position: relative;
            z-index: 2;
            text-align: center;
            color: var(--text-white);
            max-width: 900px;
            padding: 0 2rem;
        }

        /* Responsive para video */
        @media (max-width: 768px) {
            .hero-video {
                /* En móviles, el video puede ser más pesado, añadimos fallback */
                min-width: 100%;
                min-height: 100%;
            }
        }

        /* Preloader para video si es necesario */
        .video-loading {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, var(--primary-deep-blue) 0%, var(--primary-royal-blue) 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 0;
        }

        .video-loading.loaded {
            display: none;
        }

        .hero-libreria h1 {
            font-family: var(--font-heading);
            font-size: 4.5rem;
            font-weight: 700;
            margin-bottom: 1.5rem;
            letter-spacing: 2px;
            text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
            line-height: 1.2;
            animation: fadeInUp 1s ease-out;
        }

        .hero-libreria p {
            font-family: var(--font-accent);
            font-size: 1.8rem;
            color: var(--text-cream);
            font-style: italic;
            text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.2);
            animation: fadeInUp 1s ease-out 0.3s both;
        }

        /* Barra de búsqueda sofisticada */
        .search-section {
            background: var(--text-white);
            padding: 3rem 0;
            box-shadow: var(--shadow-soft);
            border-bottom: 1px solid rgba(212, 175, 55, 0.1);
        }

        .search-container {
            display: flex;
            gap: 1.5rem;
            max-width: 900px;
            margin: 0 auto;
            align-items: stretch;
        }

        .search-box {
            flex: 1;
            position: relative;
        }

        .search-input {
            width: 100%;
            padding: 1.3rem 1.5rem 1.3rem 3.5rem;
            border: 2px solid #e2e8f0;
            border-radius: var(--border-radius-lg);
            font-size: 1rem;
            font-family: var(--font-body);
            font-weight: 400;
            background: #fefefe;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: var(--shadow-soft);
        }

        .search-input:focus {
            outline: none;
            border-color: var(--primary-gold);
            box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
            background: var(--text-white);
        }

        .search-icon {
            position: absolute;
            left: 1.2rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-medium-gray);
            font-size: 1.1rem;
        }

        .category-select {
            padding: 1.3rem 1.5rem;
            border: 2px solid #e2e8f0;
            border-radius: var(--border-radius-lg);
            font-family: var(--font-body);
            font-weight: 500;
            background: #fefefe;
            min-width: 220px;
            color: var(--text-dark);
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: var(--shadow-soft);
        }

        .category-select:focus {
            outline: none;
            border-color: var(--primary-gold);
            box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
        }

        .search-btn {
            background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-warm-gold) 100%);
            color: var(--text-white);
            border: none;
            padding: 1.3rem 2.5rem;
            border-radius: var(--border-radius-lg);
            font-weight: 600;
            font-family: var(--font-body);
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: var(--shadow-medium);
            white-space: nowrap;
        }

        .search-btn:hover {
            background: linear-gradient(135deg, var(--primary-warm-gold) 0%, var(--primary-gold) 100%);
            transform: translateY(-2px);
            box-shadow: var(--shadow-strong);
        }

        /* Categorías elegantes - ELIMINADO */
        
        /* Products Section refinada */
        .products-section {
            padding: 6rem 0;
            background: var(--text-white);
        }

        .section-title {
            font-family: var(--font-heading);
            font-size: 3rem;
            font-weight: 600;
            text-align: center;
            margin-bottom: 4rem;
            color: var(--text-dark);
            letter-spacing: 1.5px;
            position: relative;
        }

        .section-title::after {
            content: '';
            position: absolute;
            bottom: -15px;
            left: 50%;
            transform: translateX(-50%);
            width: 80px;
            height: 3px;
            background: linear-gradient(90deg, var(--primary-gold), var(--primary-warm-gold));
            border-radius: 2px;
        }

        .products-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 3rem;
        }

        .filter-buttons {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .filter-btn {
            padding: 0.8rem 2rem;
            border: 2px solid var(--primary-gold);
            background: var(--text-white);
            color: var(--primary-gold);
            border-radius: var(--border-radius-lg);
            font-family: var(--font-body);
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            box-shadow: var(--shadow-soft);
        }

        .filter-btn:hover {
            background: linear-gradient(135deg, var(--primary-gold), var(--primary-warm-gold));
            color: var(--text-white);
            transform: translateY(-2px);
            box-shadow: var(--shadow-medium);
        }

        .filter-btn.active {
            background: linear-gradient(135deg, var(--primary-gold), var(--primary-warm-gold));
            color: var(--text-white);
            border-color: var(--primary-gold);
            box-shadow: var(--shadow-medium);
        }

        .products-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 2.5rem;
        }

        .product-card {
            background: var(--text-white);
            border-radius: var(--border-radius-lg);
            overflow: hidden;
            box-shadow: var(--shadow-soft);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            border: 1px solid rgba(212, 175, 55, 0.1);
        }

        .product-card:hover {
            transform: translateY(-8px);
            box-shadow: var(--shadow-strong);
            border-color: rgba(212, 175, 55, 0.2);
        }

        .product-image {
            width: 100%;
            height: 280px;
            position: relative;
            overflow: hidden;
            background: #f8fafc;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .product-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }

        .product-card:hover .product-image img {
            transform: scale(1.05);
        }

        .product-image-placeholder {
            font-size: 3.5rem;
            color: var(--text-medium-gray);
        }

        .product-badge {
            position: absolute;
            top: 1.2rem;
            right: 1.2rem;
            background: linear-gradient(135deg, var(--primary-gold), var(--primary-warm-gold));
            color: var(--text-white);
            padding: 0.4rem 1rem;
            border-radius: var(--border-radius);
            font-size: 0.85rem;
            font-weight: 600;
            box-shadow: var(--shadow-medium);
        }

        .product-badge.new {
            background: linear-gradient(135deg, #10B981, #059669);
        }

        .product-badge.offer {
            background: linear-gradient(135deg, #EF4444, #DC2626);
        }

        .product-badge.bestseller {
            background: linear-gradient(135deg, var(--primary-gold), var(--primary-warm-gold));
        }

        .product-info {
            padding: 2rem;
        }

        .product-category {
            color: var(--primary-gold);
            font-size: 0.9rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1.2px;
            margin-bottom: 0.5rem;
        }

        .product-title {
            font-family: var(--font-heading);
            font-size: 1.3rem;
            font-weight: 600;
            margin: 0.8rem 0;
            color: var(--text-dark);
            line-height: 1.4;
        }

        .product-author {
            color: var(--text-dark-gray);
            font-size: 1rem;
            font-style: italic;
            margin-bottom: 1.5rem;
            font-family: var(--font-accent);
        }

        .product-price {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            margin-bottom: 1.5rem;
        }

        .current-price {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-gold);
            font-family: var(--font-heading);
        }

        .original-price {
            color: var(--text-medium-gray);
            text-decoration: line-through;
            font-size: 1.1rem;
        }

        .product-description {
            color: var(--text-dark-gray);
            font-size: 0.95rem;
            margin-bottom: 1.5rem;
            line-height: 1.5;
        }

        .product-actions {
            display: flex;
            gap: 0.8rem;
        }

        .contact-btn {
            flex: 1;
            background: linear-gradient(135deg, #25D366 0%, #20BA5A 100%);
            color: var(--text-white);
            border: none;
            padding: 1rem;
            border-radius: var(--border-radius);
            font-weight: 600;
            font-family: var(--font-body);
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: var(--shadow-medium);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }

        .contact-btn:hover {
            background: linear-gradient(135deg, #20BA5A 0%, #25D366 100%);
            transform: translateY(-2px);
            box-shadow: var(--shadow-strong);
        }

        /* Footer elegante */
        .footer {
            background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary-dark) 100%);
            color: var(--text-white);
            padding: 5rem 0 2rem;
            position: relative;
        }

        .footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(90deg, var(--primary-gold), var(--primary-warm-gold));
        }

        .footer-content {
            display: grid;
            grid-template-columns: 1fr 2fr 1fr;
            gap: 4rem;
            align-items: start;
            margin-bottom: 3rem;
        }

        .footer-logo {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .footer-logo .footer-logo-image {
            height: 70px;
            width: auto;
            max-width: 160px;
            object-fit: contain;
            margin-bottom: 1.5rem;
            filter: brightness(1.1);
        }

        .footer-logo p {
            font-size: 1.3rem;
            font-weight: 600;
            color: var(--text-cream);
            font-family: var(--font-heading);
            letter-spacing: 1px;
        }

        .footer-links {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 3rem;
        }

        .footer-column h4 {
            font-size: 1.2rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            color: var(--primary-gold);
            font-family: var(--font-heading);
            letter-spacing: 1px;
        }

        .footer-column ul {
            list-style: none;
        }

        .footer-column ul li {
            margin-bottom: 0.8rem;
        }

        .footer-column ul li a {
            color: var(--text-gray);
            text-decoration: none;
            font-family: var(--font-body);
            font-weight: 400;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
        }

        .footer-column ul li a:hover {
            color: var(--primary-gold);
            padding-left: 8px;
        }

        .footer-social {
            display: flex;
            gap: 1.5rem;
            justify-content: center;
            align-items: center;
        }

        .footer-social a {
            width: 55px;
            height: 55px;
            background: var(--tertiary-dark);
            color: var(--text-white);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            text-decoration: none;
            font-size: 1.3rem;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            border: 2px solid transparent;
        }

        .footer-social a:hover {
            background: linear-gradient(135deg, var(--primary-gold), var(--primary-warm-gold));
            color: var(--text-white);
            transform: translateY(-3px) scale(1.05);
            border-color: rgba(212, 175, 55, 0.3);
        }

        .footer-bottom {
            text-align: center;
            padding-top: 2rem;
            border-top: 1px solid var(--tertiary-dark);
        }

        .footer-bottom p {
            color: var(--text-medium-gray);
            font-size: 0.95rem;
            font-family: var(--font-body);
            font-weight: 400;
        }

        /* Responsive Design */
        @media (max-width: 1024px) {
            .container {
                padding: 0 1.5rem;
            }
            
            .hero-libreria h1 {
                font-size: 3.5rem;
            }
            
            .section-title {
                font-size: 2.5rem;
            }
        }

        @media (max-width: 768px) {

            .search-container {
                flex-direction: column;
                gap: 1rem;
            }

            .category-select {
                min-width: auto;
            }

            .categories-grid {
                grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
                gap: 2rem;
            }

            .products-header {
                flex-direction: column;
                gap: 2rem;
                align-items: stretch;
            }

            .filter-buttons {
                justify-content: center;
            }

            .products-grid {
                grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
                gap: 2rem;
            }

            .footer-content {
                grid-template-columns: 1fr;
                text-align: center;
                gap: 3rem;
            }

            .footer-links {
                grid-template-columns: 1fr;
                gap: 2.5rem;
            }

            .hero-libreria {
                padding: 8rem 0 4rem;
            }

            .hero-libreria h1 {
                font-size: 3rem;
            }

            .hero-libreria p {
                font-size: 1.5rem;
            }

            .section-title {
                font-size: 2.2rem;
            }

            .nav-link {
                font-size: 0.9rem;
            }
        }

        @media (max-width: 480px) {
            .hero-libreria h1 {
                font-size: 2.5rem;
            }

            .hero-libreria p {
                font-size: 1.3rem;
            }

            .section-title {
                font-size: 2rem;
            }

            .product-actions {
                flex-direction: column;
                gap: 1rem;
            }
        }

        /* Animaciones */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .fade-in {
            animation: fadeInUp 0.8s ease-out;
        }

        /* Estados de carga */
        .loading {
            text-align: center;
            padding: 3rem;
            color: var(--text-medium-gray);
        }

        .no-results {
            grid-column: 1/-1;
            text-align: center;
            padding: 3rem;
        }

        .no-results i {
            font-size: 3rem;
            color: var(--text-medium-gray);
            margin-bottom: 1rem;
        }

        .no-results h3 {
            color: var(--text-dark-gray);
            margin-bottom: 0.5rem;
        }

        .no-results p {
            color: var(--text-medium-gray);
        }