* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    overflow-x: hidden;
}

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

.main-sobreNosotros{
    display: flex;
    margin: 3rem auto 0;
    gap: 2rem;
    
    .main-info {
        text-align: left;
        margin-bottom: 2rem;
        h2 {
            margin-bottom: 2rem;
        }
        flex: 1;
        font-size: 1.2rem;
    }

    .main-img{
        margin: 0 auto;
        flex: 1;
        height: 600px;
        margin-bottom: 2rem;

        img { 
            height: 100%;
            width: 100%;
        }
    }
}

/* Header y navegación responsiva */
header {
    background-color: #4a3831;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

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

.logo {
    font-size: 24px;
    font-weight: bold;
    z-index: 2;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 2;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    list-style: none;
    transition: all 0.3s ease;
}

.nav-menu li {
    margin-left: 30px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #e6c9b1;
}

.cart-icon {
    position: relative;
    cursor: pointer;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #e6c9b1;
    color: #4a3831;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Hero section responsivo */
.hero {
    background-color: #e6c9b1;
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #4a3831;
}

.hero p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 30px;
    color: #5e4b42;
}

.btn {
    padding: 12px 24px;
    background-color: #4a3831;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-block;
    text-decoration: none;
}

.btn:hover {
    background-color: #5e4b42;
}

/* Products section */
.products {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: #4a3831;
}

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

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

.product-img {
    height: 200px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img img {
    max-width: 100%;
    max-height: 100%;
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #4a3831;
    margin-bottom: 15px;
}

.add-to-cart {
    width: 100%;
    padding: 10px;
    background-color: #4a3831;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-to-cart:hover {
    background-color: #5e4b42;
}

/* Cart modal */
.cart-modal {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background-color: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
}

/*Cuando ambas clases estan activas, se mueve el elemento a right: 0*/
.cart-modal.active {
    right: 0;
}

.cart-header {
    background-color: #4a3831;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-cart {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.cart-items {
    padding: 20px;
    max-height: calc(100% - 180px);
    overflow-y: auto;
}

.cart-item {
    display: flex;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    background-color: #f0f0f0;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 500;
    margin-bottom: 5px;
}

.cart-item-price {
    color: #4a3831;
    font-weight: bold;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.quantity-btn {
    width: 25px;
    height: 25px;
    background-color: #eee;
    border: none;
    cursor: pointer;
}

.quantity {
    margin: 0 10px;
}

.cart-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background-color: #4a3831;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

.checkout-btn:hover {
    background-color: #5e4b42;
}

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

.overlay.active {
    display: block;
}

/* Footer responsivo */
footer {
    background-color: #4a3831;
    color: white;
    padding: 40px 0;
}

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

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 18px;
    color: #e6c9b1;
}

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

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #e6c9b1;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
    color: #ccc;
}

/* Responsividad mejorada */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-sobreNosotros{
        flex-direction: column;

        .main-info{
            text-align: center;
        }
    }

    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        flex-direction: column;
        background-color: #4a3831;
        align-items: center;
        justify-content: center;
        z-index: 1;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 20px 0;
        font-size: 20px;
    }
    
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 16px;
        padding: 0 20px;
    }
    
    .section-title {
        font-size: 30px;
    }
    
}

@media (max-width: 600px) {
    .products-grid {
        grid-template-columns: 1fr;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero p {
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .cart-item-img {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .cart-item-quantity {
        justify-content: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .logo {
        font-size: 20px;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .cart-modal {
        width: 100%;
    }
}

/* Asegura que el carrito se pueda cerrar en dispositivos pequeños */
@media (max-width: 400px) {
    .cart-modal.active {
        width: 100%;
    }
}