/* ===== VARIABLES DE COLOR ===== */
:root {
    --primary-color: #ff6b35;      /* Naranja vibrante */
    --secondary-color: #2e86ab;    /* Azul profesional */
    --accent-color: #f7b538;       /* Amarillo cálido */
    --dark-color: #2d3142;         /* Azul oscuro */
    --light-color: #ffffff;        /* Blanco */
    --bg-color: #f8f9fa;           /* Gris claro */
    --success-color: #28a745;      /* Verde éxito */
    --danger-color: #dc3545;       /* Rojo peligro */
}

/* ===== RESET Y CONFIGURACIÓN BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    background-attachment: fixed;
}

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

/* ===== HEADER Y NAVEGACIÓN ===== */
header {
    background: linear-gradient(120deg, var(--dark-color), var(--secondary-color));
    color: var(--light-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
}

header h1 span {
    color: var(--accent-color);
}

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

nav a {
    color: var(--light-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

nav a:hover, nav a.active {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(rgba(45, 49, 66, 0.8), rgba(46, 134, 171, 0.7)), 
                url('../images/hero-bg.jpg') center/cover no-repeat;
    color: var(--light-color);
    text-align: center;
    padding: 5rem 1rem;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--light-color);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.4);
}

.btn:hover {
    background: #e55a2b;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(255, 107, 53, 0.6);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--light-color);
    margin-left: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===== SECCIONES DE PRODUCTOS ===== */
.section-title {
    text-align: center;
    margin: 3rem 0 2rem;
    font-size: 2.5rem;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 1rem;
}

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

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

.product-card {
    background: var(--light-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

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

.product-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.product-info p {
    color: #666;
    margin-bottom: 1rem;
    min-height: 60px;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.add-to-cart {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-to-cart:hover {
    background: #e55a2b;
    transform: scale(1.05);
}

/* ===== CARRITO ===== */
.cart-icon {
    position: relative;
    cursor: pointer;
}

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

.cart-modal {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--light-color);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: right 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
}

.cart-modal.active {
    right: 0;
}

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

.cart-header h3 {
    font-size: 1.8rem;
    color: var(--dark-color);
}

.close-cart {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--dark-color);
}

.cart-items {
    margin-bottom: 2rem;
}

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

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

.cart-item-name {
    font-weight: 600;
    color: var(--dark-color);
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

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

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: var(--light-color);
    cursor: pointer;
    font-weight: bold;
}

.cart-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 1.5rem 0;
    text-align: right;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.empty-cart {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-cart p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* ===== FORMULARIO DE PEDIDOS ===== */
.form-container {
    background: var(--light-color);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 3rem auto;
}

.form-container h3 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

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

/* ===== FOOTER ===== */
footer {
    background: var(--dark-color);
    color: var(--light-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

footer p {
    margin: 0.5rem 0;
}

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    nav ul {
        gap: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .hero h2 {
        font-size: 2rem;
    }

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

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

    .btn-secondary {
        margin-left: 0;
        margin-top: 1rem;
        display: block;
    }

    .cart-modal {
        width: 100%;
        right: -100%;
    }

    .form-container {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    nav ul {
        display: none;
    }

    .section-title {
        font-size: 2rem;
    }
}
