/* --- Variables y Reset --- */
:root {
    --primary: #ffffff;
    --dark: #121212;
    --gray: #f9f9f9;
    --accent: #e5a000; /* Un dorado elegante */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    background-color: #fff;
    line-height: 1.6;
}

/* --- Fondo Carrusel --- */
.carousel-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
}

.carousel-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.carousel-slide.active { opacity: 1; }

.carousel-container::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

/* --- Header --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 5%;
    position: fixed; /* Se mantiene al hacer scroll */
    width: 100%;
    z-index: 100;
    transition: background 0.3s ease;
}

header.scrolled {
    background: rgba(0, 0, 0, 0.9);
    padding: 1rem 5%;
}

.logo { display: flex; align-items: center; gap: 1rem; }
.logo-img { height: 50px; width: auto; }
.logo h1 {
    color: #fff;
    font-weight: 400;
    letter-spacing: 4px;
    font-size: 1.5rem;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
}

.nav-links { display: flex; list-style: none; }
.nav-links li { margin-left: 2rem; }
.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 5px rgba(0,0,0,0.6);
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--accent); }

/* --- Secciones Generales --- */
.section-padding { padding: 100px 10%; }
.container { max-width: 1200px; margin: 0 auto; }
.section-title {
    font-size: 2.5rem;
    font-weight: 300;
    text-align: center;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.bg-light { background-color: var(--gray); }

/* --- Home / Hero --- */
.hero { height: 100vh; display: flex; align-items: center; padding-left: 10%; }
.hero-content { max-width: 700px; color: #fff; }
.hero-content h2 { font-size: 3.5rem; font-weight: 300; margin-bottom: 2rem; text-shadow: 2px 4px 15px rgba(0,0,0,0.8); }

.btn-discover {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: 1px solid #fff;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.btn-discover:hover { background: #fff; color: #000; transform: scale(1.05); }

/* --- Libros --- */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.book-card {
    background: #fff;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.book-card:hover { transform: translateY(-10px); }
.book-card img { width: 100%; height: 400px; object-fit: cover; margin-bottom: 20px; }
.book-card h3 { margin-bottom: 15px; font-weight: 400; letter-spacing: 1px; }

.btn-detail {
    padding: 0.8rem 1.5rem;
    background: var(--dark);
    color: #fff;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: background 0.3s;
}

.btn-detail:hover { background: var(--accent); }

/* --- Autor --- */
.autor-flex { display: flex; align-items: center; gap: 50px; }
.autor-img img { width: 400px; height: 500px; object-fit: cover; box-shadow: 20px 20px 0 var(--dark); }
.autor-text p { margin-bottom: 1.5rem; font-size: 1.1rem; }

/* --- Contacto --- */
.contact-wrapper { max-width: 600px; margin: 0 auto; }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-form input, .contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    font-family: inherit;
}

.btn-send {
    padding: 1rem;
    background: var(--dark);
    color: #fff;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 600;
}

.btn-send:hover { background: #333; }

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    width: 60px; height: 60px;
    bottom: 40px; right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
}

/* --- Modales --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 40px;
    width: 80%;
    max-width: 900px;
    position: relative;
    border-radius: 4px;
}

.close-modal {
    position: absolute;
    right: 20px; top: 10px;
    font-size: 40px; cursor: pointer;
}

.modal-body { display: flex; gap: 40px; }
.modal-img img { width: 300px; height: auto; border-radius: 4px; }
.modal-info h2 { margin-bottom: 20px; font-weight: 400; }
.modal-info p { margin-bottom: 15px; }

.btn-amazon {
    display: inline-block;
    padding: 1rem 2rem;
    background: #ff9900;
    color: #000;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    margin-top: 20px;
}

/* --- Mobile --- */
@media screen and (max-width: 768px) {
    .autor-flex, .modal-body { flex-direction: column; text-align: center; }
    .autor-img img, .modal-img img { width: 100%; height: auto; }
    .hero-content h2 { font-size: 2.2rem; }
    .section-padding { padding: 60px 5%; }

    .modal-content {
        width: 95%;
        margin: 10px auto;
        padding: 20px;
        padding-top: 40px;
    }
    .modal-img img {
        display: block;
        max-width: 250px;
        margin: 0 auto 15px auto;
    }
    .close-modal {
        top: 0;
        right: 15px;
        font-size: 35px;
    }
}

footer { padding: 2rem; text-align: center; background: #111; color: #fff; font-size: 0.8rem; }
