/* Reset y estilos base */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --text-light: #7f8c8d;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --border-radius: 4px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

/* Header */
.header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.logo-container img {
    height: 50px;
    width: auto;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--dark-color);
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.main-nav a:hover::after {
    width: 100%;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-actions button {
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.user-actions button:hover {
    background-color: var(--light-color);
}

#cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
}

#login-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

#login-btn:hover {
    background-color: #1a252f;
}

.search-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 999;
}

.search-container.active {
    display: block;
}

.search-container input {
    width: 80%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
}

.search-container button {
    width: 20%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    font-weight: 600;
    transition: var(--transition);
}

.search-container button:hover {
    background-color: #1a252f;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    padding: 0;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--dark-color);
    transition: var(--transition);
}

/* Hero section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/hero-bg.jpg') no-repeat center center/cover;
    height: 80vh;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    margin-top: 70px;
}

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

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Features section */
.features {
    padding: 5rem 0;
    background-color: white;
}

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

.feature {
    text-align: center;
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

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

/* Book sections */
.book-section, .rental-section {
    padding: 5rem 0;
    background-color: #f9f9f9;
}

.filter-options {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
}

.filter-options select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    flex: 1;
    max-width: 300px;
}

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

.book-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
}

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

.book-image {
    height: 300px;
    overflow: hidden;
}

.book-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.book-card:hover .book-image img {
    transform: scale(1.05);
}

.book-info {
    padding: 1.5rem;
}

.book-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.book-author {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.book-price {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.book-rating {
    color: var(--warning-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.book-actions {
    display: flex;
    gap: 0.5rem;
}

.book-actions button {
    flex: 1;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
}

.book-actions .btn-buy {
    background-color: var(--secondary-color);
    color: white;
}

.book-actions .btn-rent {
    background-color: var(--accent-color);
    color: white;
}

.book-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.8rem;
    font-weight: 600;
}

.view-more {
    text-align: center;
    margin-top: 3rem;
}

/* Rental section */
.rental-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.rental-details, .rental-benefits {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.rental-details h3, .rental-benefits h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.rental-details ol {
    padding-left: 1.5rem;
}

.rental-details ol li {
    margin-bottom: 0.75rem;
}

.rental-benefits ul li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rental-books-title {
    text-align: center;
    margin: 3rem 0;
    color: var(--primary-color);
}

/* About section */
.about-section {
    padding: 5rem 0;
    background-color: white;
}

.about-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    width: 500px;
    height: 500px;

}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background-color: var(--light-color);
    border-radius: var(--border-radius);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Testimonials */
.testimonials {
    padding: 5rem 0;
    background-color: #f9f9f9;
}

.testimonial-slider {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.testimonial {
    display: none;
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
}

.testimonial.active {
    display: block;
}

.testimonial-content {
    max-width: 600px;
    margin: 0 auto;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-author h4 {
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.testimonial-author span {
    font-size: 0.9rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.25rem;
}

.rating {
    color: var(--warning-color);
    font-size: 0.9rem;
}

.slider-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.slider-controls button {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-color);
    cursor: pointer;
    transition: var(--transition);
}

.slider-controls button:hover {
    color: var(--secondary-color);
}

.slider-dots {
    display: flex;
    gap: 0.5rem;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background-color: var(--secondary-color);
}

/* Contact section */
.contact-section {
    padding: 5rem 0;
    background-color: white;
}

.contact-section .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-method {
    margin-bottom: 2rem;
}

.contact-method h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-color);
    color: var(--dark-color);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    color: white;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 4rem 0 0;
}

.footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-column h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
}

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

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.payment-methods img {
    height: 30px;
    width: auto;
    background-color: white;
    padding: 0.25rem;
    border-radius: 4px;
}

.footer-bottom {
    background-color: #1a252f;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

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

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

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

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--secondary-color);
}

.cart-items {
    margin: 1.5rem 0;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 100px;
    border-radius: 4px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-author {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-weight: 700;
    color: var(--secondary-color);
}

.cart-item-remove {
    color: var(--error-color);
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 0.5rem;
    display: inline-block;
}

.cart-totals {
    margin: 1.5rem 0;
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.cart-subtotal, .cart-shipping, .cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cart-total {
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.cart-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.cart-actions button {
    flex: 1;
}

.empty-cart {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .rental-info {
        grid-template-columns: 1fr;
    }
    
    .about-section .container {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 70px);
        background-color: white;
        box-shadow: var(--box-shadow);
        transition: var(--transition);
        padding: 2rem;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero {
        height: auto;
        padding: 6rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .contact-section .container {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        order: 1;
    }
}

@media (max-width: 576px) {
    .filter-options {
        flex-direction: column;
    }
    
    .filter-options select {
        max-width: 100%;
    }
    
    .book-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-actions {
        flex-direction: column;
    }
}