@font-face {
    font-family: 'Baskervville';
    src: url('../fonts/Baskervville-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Variables */
:root {
    --primary-color: #812f3c;
    --secondary-color: #404040;
    --text-color: #333;
    --light-gray: #F1EFE6;
    --white: #ffffff;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Baskervville', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animación solo para la página principal */
body:not(.catalog) header {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

body:not(.catalog) .hero-content {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

body:not(.catalog) .hero h1 {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

body:not(.catalog) .hero p {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

body:not(.catalog) .cta-button {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.8s;
    opacity: 0;
}

/* Header y Navegación */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: .5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 80px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background-color: var(--white);
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--primary-color);
    margin-top: 70px;
}

.hero-content {
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    letter-spacing: 10px;
    font-weight: 700;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 2.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    font-size: 1.2rem;
}

.saber-mas-btn {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 1.2rem;
    box-shadow: 0 2px 8px rgba(129, 47, 60, 0.06);
}
.saber-mas-btn:hover, .saber-mas-btn:focus {
    background-color: #a13c4d;
    color: var(--white);
    transform: translateY(-2px) scale(1.04);
}

/* Secciones */
section {
    padding: 5rem 2rem;
}

h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

/* About Section */
.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background-color: var(--light-gray);
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

.feature i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Contact Section */
.contact-section {
    background-color: var(--light-gray);
    padding: 3rem 2rem;
}

.contact-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.contact-info {
    text-align: center;
    max-width: 600px;
    padding: 2rem;
}

.contact-info p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.contact-info i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Footer */
footer {
    background-color: var(--light-gray);
    color: var(--text-color);
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* Alinear los enlaces rápidos */
.footer-section:nth-child(2) {
    text-align: right;
}

.footer-section h4 {
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

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

/* Catalog Page Styles */

.catalog-page {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 20px auto;
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.catalog-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2em;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.catalog-controls {
    margin-bottom: 30px;
    text-align: center;
}

.dropdown-filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.dropdown-filters select {
    padding: 10px 18px;
    border: 1.5px solid var(--primary-color);
    border-radius: 25px;
    background: var(--light-gray);
    color: var(--primary-color);
    font-size: 1em;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    min-width: 160px;
    cursor: pointer;
}

.dropdown-filters select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 5px rgba(129, 47, 60, 0.2);
}

.dropdown-filters option {
    color: var(--primary-color);
    background: var(--white);
}

#search-input {
    padding: 12px 15px;
    width: 60%;
    max-width: 500px;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 1em;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

#search-input:focus {
    outline: none;
    border-color: #812f3c;
    box-shadow: 0 0 5px rgba(129, 47, 60, 0.5);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.book-card {
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.book-cover {
    display: block;
    max-width: 130px;
    max-height: 190px;
    width: auto;
    height: auto;
    margin: 0 auto 15px auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 4px;
    object-fit: contain;
    background: #F1EFE6;
    padding: 6px;
}

.book-info {
    text-align: left;
    flex-grow: 1;
}

.book-title {
    font-size: 1.2em;
    color: #812f3c;
    margin-bottom: 5px;
}

.book-author {
    font-size: 1em;
    color: #555;
    margin-bottom: 10px;
    font-style: italic;
}

.book-description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.book-details,
.book-price,
.book-category {
    font-size: 0.85em;
    color: #777;
    margin-bottom: 5px;
}

.book-details strong,
.book-price strong,
.book-category strong {
    color: #444;
}

/* Responsive adjustments if needed */
@media (max-width: 600px) {
    .catalog-grid {
        grid-template-columns: 1fr;
    }

    #search-input {
        width: 80%;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    section {
        padding: 3rem 1rem;
    }
}