/* =========================================
   VARIABLES CSS & RESET
   ========================================= */
:root {
    --bg-darkest: #141414;
    --bg-dark: #1a1a1a;
    --bg-medium: #222222;
    
    --primary: #60C3EB;
    --secondary: #D4AF37;
    --secondary-glow: #f9d868;
    --text-main: #f0f0f0;
    --text-muted: #b0b0b0;
    
    --font-heading: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; /* Cursor custom en PC */ }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-darkest);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.8;
    overflow-x: hidden;
    position: relative;
}

/* EFECTOS DE FONDO */
.noise-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 9000; opacity: 0.03; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E"); }
#magic-dust { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; background: radial-gradient(circle at center, #222 0%, #0d0d0d 100%); }
#watermark-logo { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 60vw; opacity: 0.02; z-index: -1; pointer-events: none; filter: grayscale(100%); }

/* CURSOR PERSONALIZADO (Solo Desktop) */
.cursor-dot, .cursor-outline { position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); border-radius: 50%; z-index: 9999; pointer-events: none; }
.cursor-dot { width: 8px; height: 8px; background-color: var(--secondary); }
.cursor-outline { width: 40px; height: 40px; border: 1px solid var(--secondary); transition: width 0.2s, height 0.2s, background-color 0.2s; }

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--primary); font-weight: 700; }
a { text-decoration: none; color: inherit; transition: var(--transition); cursor: none; }
ul { list-style: none; }

.reveal { opacity: 0; transform: translateY(50px); transition: all 1s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
.section-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--secondary), transparent); opacity: 0.2; margin: 0 auto; max-width: 60%; }

/* NAVBAR */
.navbar { position: fixed; top: 0; left: 0; width: 100%; padding: 20px 5%; display: flex; justify-content: space-between; align-items: center; z-index: 1000; transition: var(--transition); background: transparent; }
.navbar.scrolled { background: rgba(15, 15, 15, 0.95); backdrop-filter: blur(15px); padding: 15px 5%; border-bottom: 1px solid rgba(96, 195, 235, 0.1); }
.logo img { height: 50px; transition: var(--transition); }
.logo:hover img { filter: drop-shadow(0 0 15px var(--primary)); transform: scale(1.05); }
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-main); position: relative; }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--secondary); transition: var(--transition); }
.nav-links a:hover::after { width: 100%; }
.hamburger { display: none; cursor: pointer; font-size: 1.5rem; color: var(--primary); }

/* HERO (VISIBLE SIEMPRE) */
.hero { 
    height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; 
    position: relative; padding: 0 20px; z-index: 10; background: transparent;
}
.hero-content { z-index: 20; position: relative; color: #ffffff; }
.hero h1 { 
    font-size: 4rem; 
    padding: 0 25px; 
    line-height: 1.3;
    width: 100%;    
}
.hero p { 
    font-size: 1.5rem; color: #eeeeee; margin-bottom: 40px; font-weight: 300; letter-spacing: 1px;
    opacity: 1;
}
.cta-group { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }

/* MINI HERO (Para páginas internas) */
.mini-hero {
    height: 30vh; /* Reducido de 50vh */
    min-height: 250px; /* Reducido de 400px */
    display: flex; align-items: center; justify-content: center; text-align: center; 
    position: relative; padding: 0 20px; z-index: 10; background: transparent;
    margin-top: 80px; /* Espacio para navbar fija */
}

/* BOTONES */
.btn { padding: 12px 30px; font-family: var(--font-body); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; cursor: none; transition: var(--transition); border-radius: 2px; font-size: 0.85rem; display: inline-block; position: relative; overflow: hidden; }

.btn-primary { 
    background-color: var(--primary); color: #000; border: 1px solid var(--primary); 
    box-shadow: 0 0 20px rgba(96, 195, 235, 0.4); 
}
.btn-primary:hover { 
    background-color: transparent; color: var(--primary); 
    box-shadow: 0 0 50px var(--primary); 
    text-shadow: 0 0 10px var(--primary);
}

.btn-secondary { 
    background-color: transparent; color: var(--secondary); border: 1px solid var(--secondary); 
}
.btn-secondary:hover { 
    background-color: rgba(212, 175, 55, 0.1); 
    box-shadow: 0 0 30px var(--secondary); 
    color: #fff; 
}

.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 2.8rem; color: var(--secondary); margin-bottom: 15px; position: relative; display: inline-block; text-shadow: 0 0 10px rgba(212, 175, 55, 0.2); }
.section-header h2::after { content: ''; display: block; width: 60px; height: 3px; background: var(--primary); margin: 15px auto 0; box-shadow: 0 0 10px var(--primary); }

/* SERVICIOS */
.service-card { background: rgba(255, 255, 255, 0.02); padding: 40px; border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 8px; flex: 1; min-width: 300px; transition: var(--transition); cursor: none; position: relative; }
.service-card::after { content: 'Ver detalles +'; position: absolute; bottom: 20px; right: 30px; font-size: 0.8rem; opacity: 0; transition: var(--transition); letter-spacing: 1px; }
.service-card:hover::after { opacity: 1; transform: translateX(-5px); }
.card-editorial:hover { border-color: var(--primary); box-shadow: 0 0 40px rgba(96, 195, 235, 0.2); transform: translateY(-5px); }
.card-creativa:hover { border-color: var(--secondary); box-shadow: 0 0 40px rgba(212, 175, 55, 0.2); transform: translateY(-5px); }
.card-producciones:hover { border-color: #fff; box-shadow: 0 0 40px rgba(255, 255, 255, 0.2); transform: translateY(-5px); }

/* NUEVA SECCIÓN PROCESO (ICONS GRID) */
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; margin-top: 50px; text-align: center; }
.process-item i { font-size: 2.5rem; color: var(--secondary); margin-bottom: 20px; }
.process-item h4 { color: var(--primary); font-size: 1.1rem; margin-bottom: 10px; }
.process-item p { font-size: 0.9rem; color: var(--text-muted); }

/* GRID PRODUCTOS */
.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; padding: 20px; max-width: 1200px; margin: 0 auto; }
.book-card, .product-card { 
    background: rgba(30, 30, 30, 0.6); border: 1px solid rgba(255, 255, 255, 0.05); 
    padding: 20px; transition: var(--transition); text-align: center; position: relative; backdrop-filter: blur(5px);
    display: flex; flex-direction: column; justify-content: space-between; height: 100%;
}
.book-card:hover, .product-card:hover { transform: translateY(-10px); border-color: var(--secondary); box-shadow: 0 20px 40px rgba(0,0,0,0.6); }
.cover-img { width: 100%; height: 350px; object-fit: contain; border-radius: 4px; margin-bottom: 15px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); transition: var(--transition); background-color: #fff; padding: 10px; }
.book-card:hover .cover-img, .product-card:hover .cover-img { transform: scale(1.03); }
.card-title { font-size: 1.1rem; margin-bottom: 5px; color: var(--text-main); font-weight: 700; min-height: 2.5em; display: flex; align-items: center; justify-content: center; }
.card-subtitle { color: var(--primary); font-size: 0.8rem; margin-bottom: 10px; text-transform: uppercase; display: block; }
.card-price { font-size: 1.1rem; color: var(--secondary); font-weight: 700; margin: 10px 0; display: block; }
.btn-link { color: var(--secondary); font-size: 0.8rem; text-transform: uppercase; font-weight: 600; background: none; border: none; cursor: none; padding: 5px; margin-top: auto;}
.btn-link:hover { letter-spacing: 1px; color: #fff; text-shadow: 0 0 10px var(--secondary); }

/* GALERIA */
.gallery-item { height: 300px; overflow: hidden; border-radius: 4px; position: relative; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gallery-item:hover img { transform: scale(1.1); }

/* VISITANOS */
#visit-overlay { position: relative; min-height: 600px; background-image: url('local9.jpg'); background-attachment: fixed; background-position: center; background-size: cover; display: flex; align-items: center; justify-content: flex-end; padding: 50px 10%; }
#visit-overlay::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.9) 100%); }
.visit-card { position: relative; z-index: 2; background: rgba(15, 15, 15, 0.85); backdrop-filter: blur(15px); padding: 60px; max-width: 500px; border-left: 3px solid var(--secondary); box-shadow: -20px 20px 60px rgba(0,0,0,0.8); }

/* COOKIE BANNER */
#cookie-banner { 
    position: fixed; bottom: -100%; left: 0; width: 100%; 
    background: rgba(15, 15, 15, 0.98); border-top: 1px solid var(--secondary); 
    padding: 20px; z-index: 9999; backdrop-filter: blur(10px); 
    display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; 
    transition: bottom 0.5s ease-out; box-shadow: 0 -10px 30px rgba(0,0,0,0.5); 
}
#cookie-banner.show { bottom: 0; }
#cookie-banner p { font-size: 0.9rem; color: #ccc; margin: 0; max-width: 800px; }
#cookie-banner a { color: var(--primary); text-decoration: underline; cursor: pointer; }

/* FOOTER */
footer { padding: 60px 20px; background-color: #000; border-top: 1px solid #222; text-align: center; position: relative; z-index: 10; }
.newsletter-form { margin: 30px auto; max-width: 400px; display: flex; gap: 10px; }
.newsletter-form input { flex: 1; padding: 10px; background: #111; border: 1px solid #333; color: #fff; }
.social-icons { margin-bottom: 30px; display: flex; justify-content: center; gap: 20px; }
.social-icons a { width: 45px; height: 45px; border-radius: 50%; border: 1px solid #333; display: flex; align-items: center; justify-content: center; color: var(--text-muted); transition: var(--transition); background: #111; }
.social-icons a:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 20px rgba(96, 195, 235, 0.4); transform: translateY(-5px); }
.copyright { color: #555; font-size: 0.8rem; margin-top: 30px; padding-top: 20px; border-top: 1px solid #111; }
.legal-links span { cursor: pointer; margin: 0 10px; transition: 0.3s; } .legal-links span:hover { color: var(--secondary); }

/* MODALS */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.95); z-index: 2000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: all 0.3s ease; backdrop-filter: blur(5px); }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content { background: var(--bg-medium); padding: 40px; border: 1px solid var(--secondary); max-width: 800px; width: 90%; max-height: 90vh; overflow-y: auto; position: relative; transform: translateY(50px); transition: all 0.4s ease; display: flex; flex-wrap: wrap; gap: 30px; box-shadow: 0 0 50px rgba(212, 175, 55, 0.1); }
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close { position: absolute; top: 15px; right: 20px; font-size: 1.5rem; color: var(--secondary); cursor: pointer; z-index: 10; }
.modal-img { flex: 1; min-width: 250px; } .modal-img img { width: 100%; border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.modal-info { flex: 1.5; min-width: 300px; text-align: left; }

/* CARRITO WHATSAPP */
.cart-float {
    position: fixed; bottom: 30px; right: 30px;
    width: 65px; height: 65px;
    background-color: var(--secondary);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer; z-index: 10000;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: bounceIn 1s;
}
.cart-float:hover { transform: scale(1.1); }
.cart-float i { font-size: 1.8rem; color: #141414; }
.cart-count {
    position: absolute; top: -5px; right: -5px;
    background-color: #ff4444; color: white;
    font-size: 0.8rem; font-weight: bold;
    width: 25px; height: 25px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    border: 2px solid var(--bg-darkest);
}
.toast {
    position: fixed; bottom: 110px; right: 30px;
    background: rgba(20, 20, 20, 0.95); border-left: 4px solid var(--primary);
    color: #fff; padding: 15px 25px; border-radius: 4px;
    z-index: 10001; backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: slideIn 0.3s ease-out;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* =========================================
   NUEVO CSS PARA CARRUSEL EN MODAL
   ========================================= */
.modal-img-carousel {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background: #fff; /* Fondo blanco para estandarizar */
}
.carousel-slide {
    display: none;
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 400px;
}
.carousel-slide.active {
    display: block;
    animation: fadeEffect 0.5s;
}
/* Botones de navegación del carrusel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    user-select: none;
}
.carousel-btn:hover { background-color: var(--secondary); color: #000; }
.carousel-btn.prev { left: 0; border-radius: 0 4px 4px 0; }
.carousel-btn.next { right: 0; border-radius: 4px 0 0 4px; }

@keyframes fadeEffect { from {opacity: 0.4} to {opacity: 1} }

/* OPTIMIZACIÓN MÓVIL */
@media (max-width: 768px) {
    .navbar { background-color: var(--bg-darkest); padding: 15px 20px; }
    .nav-links { position: absolute; top: 70px; right: 0; width: 100%; background: rgba(15, 15, 15, 0.98); backdrop-filter: blur(15px); flex-direction: column; align-items: center; padding: 40px 0; transform: translateY(-150%); transition: transform 0.4s ease; border-bottom: 2px solid var(--secondary); }
    .nav-links.active { transform: translateY(0); }
    .hamburger { display: block; }
    .hero { padding: 0 10px; }
    .hero-content { width: 100%; }
    .hero h1 { font-size: 2.2rem; line-height: 1.2; margin-bottom: 15px; padding: 0 10px; }
    .hero p { font-size: 1rem; padding: 0 15px; }
    .cta-group { flex-direction: column; gap: 15px; padding: 0 40px; } 
    .btn { width: 100%; text-align: center; } 
    .section-header h2 { font-size: 2rem; }
    .section-header p { font-size: 0.9rem; padding: 0 20px; }
    .alchemy-text { font-size: 1rem; padding: 0 15px; text-align: justify; }
    .grid-container { display: flex; flex-direction: column; align-items: center; gap: 40px; padding: 20px 15px; }
    .book-card, .product-card { width: 100%; max-width: 350px; margin: 0; }
    .process-grid { grid-template-columns: 1fr; padding: 0 20px; }
    #visit-overlay { 
        padding: 60px 20px; 
        background-attachment: scroll; 
        display: flex; /* Cambiado a flex para centrar mejor si es necesario, o block */
        flex-direction: column;
        justify-content: center;
        min-height: 400px;
        background-position: center;
        background-size: cover;
    } 
    #visit-overlay::before { 
        background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(20,20,20,0.95) 100%); 
    }
    .visit-card { 
        width: 100%; 
        max-width: 400px;
        margin: 0 auto; 
        padding: 30px 20px; 
        text-align: center; 
        border-left: none; 
        border-top: 3px solid var(--secondary); 
        background: rgba(20, 20, 20, 0.85); 
    }
    .visit-card .btn { width: auto; margin-top: 20px; }
    .newsletter-form { flex-direction: column; padding: 0 20px; }
    #cookie-banner { flex-direction: column; bottom: 0; text-align: center; padding: 20px; }
    #cookie-banner button { width: 100%; margin-top: 10px; }
    .cursor-dot, .cursor-outline { display: none; } 
    * { cursor: auto; }
    .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}
