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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --text-color: #2c3e50;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

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

/* NAVBAR */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

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

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-brand i {
    color: var(--secondary-color);
}

.navbar-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.navbar-cart {
    position: relative;
}

.cart-btn {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.7rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    transition: all 0.3s;
    font-weight: bold;
}

.cart-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.cart-count {
    background: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

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

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(231, 76, 60, 0.4);
}

/* FILTROS */
.filtros-section {
    background: var(--white);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.filtros-container {
    max-width: 1200px;
    margin: 0 auto;
}

.filtros-container h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 2rem;
}

.filtros {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filtro-btn {
    background: var(--light-bg);
    border: 2px solid transparent;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    color: var(--text-color);
}

.filtro-btn:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.filtro-btn.active {
    background: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

/* MAIN CONTENT */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

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

/* PRODUCTO CARD */
.producto-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

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

.producto-img-container {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.producto-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.producto-card:hover img {
    transform: scale(1.1);
}

.producto-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.producto-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.producto-categoria {
    font-size: 0.8rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.producto-nombre {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.producto-descripcion {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.precio-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    margin-top: auto;
}

.producto-precio {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.producto-precio-original {
    font-size: 1rem;
    color: #95a5a6;
    text-decoration: line-through;
}

.descuento-badge {
    background: var(--secondary-color);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: bold;
}

.btn-agregar {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #e67e22 100%);
    color: var(--white);
    border: none;
    padding: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s;
    width: 100%;
}

.btn-agregar:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.btn-agregar:active {
    transform: scale(0.98);
}

/* MODAL DEL CARRITO */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 2rem;
    border-bottom: 2px solid var(--light-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s;
}

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

.modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex-grow: 1;
}

.carrito-lista {
    list-style: none;
}

.carrito-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--light-bg);
    border-radius: 8px;
    margin-bottom: 1rem;
    gap: 1rem;
}

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

.carrito-item-nombre {
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.carrito-item-precio {
    color: var(--secondary-color);
    font-weight: bold;
}

.carrito-item-cantidad {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    border-radius: 5px;
    padding: 0.3rem;
}

.btn-cantidad {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-cantidad:hover {
    background: #2980b9;
}

.cantidad-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-weight: bold;
    color: var(--text-color);
}

.btn-eliminar {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.btn-eliminar:hover {
    background: #c0392b;
}

.carrito-vacio {
    text-align: center;
    padding: 3rem 2rem;
    color: #95a5a6;
}

.carrito-vacio i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #bdc3c7;
}

.modal-footer {
    padding: 2rem;
    border-top: 2px solid var(--light-bg);
    background: var(--light-bg);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.carrito-total {
    text-align: right;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.carrito-total h3 {
    margin: 0;
}

.carrito-total span {
    color: var(--secondary-color);
    font-weight: bold;
}

.btn-comprar {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.btn-comprar:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(39, 174, 96, 0.4);
}

.btn-seguir-comprando {
    background: var(--accent-color);
    color: var(--white);
    border: none;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-seguir-comprando:hover {
    background: #2980b9;
}

/* FOOTER */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 2rem 1rem;
    margin-top: 5rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

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

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

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

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

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #bdc3c7;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
    }

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

    .productos-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .filtros {
        gap: 0.8rem;
    }

    .filtro-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}