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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --bg-color: #ecf0f1;
    --text-color: #2c3e50;
    --border-color: #bdc3c7;
    --success-color: #27ae60;
    --light-gray: #f8f9fa;
    --spacing-unit: 1rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: var(--light-gray);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

/* Header */
.header {
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-unit) 0;
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.tagline {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.cart-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
}

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

.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.75rem;
    font-weight: bold;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 4rem var(--spacing-unit);
    text-align: center;
}

.hero-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-unit);
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

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

.btn-primary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--light-gray);
    transform: translateY(-2px);
}

.btn.full-width {
    width: 100%;
    margin-top: 0.5rem;
}

/* Filters */
.filters-section {
    background-color: white;
    padding: 2rem var(--spacing-unit);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 70px;
    z-index: 99;
}

.filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    background-color: white;
    color: var(--text-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    font-weight: 500;
}

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

.filter-btn.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Products Section */
.productos {
    padding: 3rem var(--spacing-unit);
}

.productos h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

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

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

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

.product-image {
    width: 100%;
    height: 200px;
    background-color: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #bbb;
}

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

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

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

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

.product-footer {
    display: flex;
    gap: 0.5rem;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    height: 36px;
    flex: 1;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background-color: var(--light-gray);
    color: var(--text-color);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

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

.qty-input {
    flex: 1;
    border: none;
    text-align: center;
    font-size: 1rem;
    background-color: transparent;
}

.qty-input:focus {
    outline: none;
}

.add-to-cart-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.add-to-cart-btn:hover {
    background-color: #2980b9;
}

/* Cart Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

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

.modal-content {
    background-color: white;
    margin: auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

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

.modal h2 {
    margin-bottom: 1.5rem;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.cart-item-info p {
    font-size: 0.9rem;
    color: #666;
}

.cart-item-qty {
    text-align: center;
    min-width: 60px;
}

.cart-item-qty p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.cart-item-total {
    text-align: right;
    min-width: 100px;
}

.cart-item-total p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.remove-btn {
    background-color: transparent;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 1rem;
}

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

.cart-summary {
    border-top: 2px solid var(--border-color);
    padding-top: 1rem;
}

.cart-total {
    font-size: 1.3rem;
    text-align: right;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

/* How to Buy Section */
.como-comprar {
    background-color: white;
    padding: 3rem var(--spacing-unit);
    border-top: 1px solid var(--border-color);
}

.como-comprar h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

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

.step {
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.step p {
    color: #666;
    font-size: 0.95rem;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem var(--spacing-unit);
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 1.8rem;
    }

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

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

    .product-image {
        height: 150px;
    }

    .product-info {
        padding: 1rem;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 0;
    }

    .header-content {
        padding: 0.75rem 0;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

    .filters-section {
        top: 60px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem var(--spacing-unit);
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
    }

    .product-name {
        font-size: 1rem;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .cart-item-total {
        width: 100%;
        text-align: right;
    }
}
