:root {
    --primary: #1e293b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #10b981;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --whatsapp: #25D366;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* HEADER */
.header {
    background: var(--card-bg);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-top {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.025em;
}

.logo i {
    color: var(--accent);
    font-size: 2rem;
}

.logo img {
    width: 250px;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    background: var(--bg);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgb(59 130 246 / 0.2);
}

.search-bar button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.5rem;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-actions a {
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    transition: color 0.2s;
}

.header-actions a:hover {
    color: var(--accent);
}

.cart-icon {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: var(--shadow);
}

/* NAVIGATION */
.nav {
    background: var(--primary);
    padding: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: block;
    transition: background 0.2s;
    font-weight: 500;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    border: 1px solid var(--border);
    overflow: hidden;
    z-index: 1001;
}

.nav-menu li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown a {
    color: var(--text);
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid var(--border);
    font-weight: 500;
}

.dropdown a:hover {
    background: var(--bg);
    color: var(--accent);
}

.dropdown a:last-child {
    border-bottom: none;
}

/* HERO CAROUSEL */
.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    background: var(--primary);
}

.hero-carousel {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.hero-slide {
    min-width: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
}

.hero-content {
    position: relative;
    text-align: center;
    color: white;
    z-index: 1;
    max-width: 800px;
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.btn {
    background: var(--accent);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    box-shadow: var(--shadow);
}

.btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.hero-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
    z-index: 2;
}

.hero-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s;
}

.hero-dot.active {
    background: white;
    transform: scale(1.2);
}

/* SECTIONS */
.section {
    padding: 5rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.025em;
}

.view-all {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.view-all:hover {
    gap: 0.75rem;
}

/* PRODUCT CARDS */
.product-carousel {
    position: relative;
    overflow: hidden;
}

.product-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s ease;
}

.product-card {
    min-width: 320px;
    width: 420px;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    border: 1px solid var(--border);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-light);
    font-weight: 500;
}

.product-info {
    padding: 1.5rem;
}

.product-category {
    color: var(--accent);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary);
    line-height: 1.4;
    height: 3.2em;
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-author {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.product-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.btn-add-cart,
.btn-favorite {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    background: var(--card-bg);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
}

.btn-add-cart {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-add-cart:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-favorite:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* CAROUSEL CONTROLS */
.carousel-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.carousel-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    pointer-events: all;
    font-size: 1.125rem;
    color: var(--text);
}

.carousel-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: scale(1.1);
}


/* CTA SECTIONS */
.cta-section {
    background: var(--primary);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.cta-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s;
}

.cta-card:hover {
    transform: translateY(-8px);
}

.cta-card i {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent);
}

.cta-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* AUTHORS SECTION */
.authors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
}

.author-card {
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.author-card:hover {
    transform: translateY(-5px);
}

.author-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--bg);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--text-light);
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.author-card:hover .author-photo {
    border-color: var(--accent);
    color: var(--accent);
}

.author-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.author-books {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* FOOTER */
.footer {
    background: var(--primary);
    color: white;
    padding: 4rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    width: 70%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalFadeIn 0.3s;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10;
    box-shadow: var(--shadow);
}

.modal-close:hover {
    background: var(--accent);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding: 2.5rem;
}

.modal-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--bg);
    background-size: contain;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-weight: 500;
}

.modal-info h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.modal-info .author {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 500;
}

.modal-info .price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    margin: 1.5rem 0;
}

.modal-info .description {
    margin: 1.5rem 0;
    color: var(--text-light);
    line-height: 1.7;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
}

.modal-actions .btn {
    flex: 1;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* NOTIFICATION */
.toast {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    background: var(--success);
    color: white;
    padding: 1.25rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 3000;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.toast.show {
    transform: translateX(0);
}

/* CARRITO MODAL */
.carrito-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.carrito-content {
    background: white;
    max-width: 800px;
    margin: 2rem auto;
    border-radius: 20px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalFadeIn 0.3s;
}

.carrito-header {
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carrito-body {
    padding: 1.5rem;
}

.carrito-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.carrito-item img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
}

.cantidad-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cantidad-controls button {
    width: 30px;
    height: 30px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.cantidad-controls button:hover {
    background: var(--accent);
    color: white;
}

.carrito-total {
    padding: 1.5rem;
    border-top: 2px solid #eee;
    text-align: right;
    font-size: 1.5rem;
    font-weight: bold;
}

.checkout-form {
    padding: 1.5rem;
    background: #f8f9fa;
}

.checkout-form input,
.checkout-form select {
    width: 100%;
    padding: 0.75rem;
    margin: 0.5rem 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-whatsapp:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    color: #666;
}

/* RESPONSIVE */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .search-bar {
        display: none;
    }

    .header-actions a span {
        display: none;
    }

    .nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        transition: left 0.3s;
        z-index: 1500;
        overflow-y: auto;
    }

    .nav.active {
        left: 0;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-menu a {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        background: rgba(255, 255, 255, 0.05);
        border: none;
        display: none;
    }

    .nav-menu li:hover .dropdown {
        display: block;
    }

    .hero {
        height: 400px;
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .product-card {
        min-width: 240px;
    }

    .modal-body {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .modal-image {
        height: 300px;
    }

    .carrito-item {
        grid-template-columns: 60px 1fr auto;
        gap: 0.75rem;
    }

    .carrito-item img {
        width: 60px;
        height: 80px;
    }
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1499;
}

.overlay.active {
    display: block;
}