/* (Mantiene los estilos anteriores intactos) */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #1e293b;
    color: #fff;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #38bdf8;
}

.btn-sucursal {
    background-color: #0284c7;
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s ease, transform 0.2s;
    box-shadow: 0 4px 6px rgba(2, 132, 199, 0.2);
    border: none;
    cursor: pointer;
}

.btn-sucursal:hover {
    background-color: #0369a1;
    transform: translateY(-2px);
}

.hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    text-align: center;
    padding: 5rem 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.historia {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 2rem;
    text-align: center;
}

.historia h2 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    position: relative;
}

.historia h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #38bdf8;
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.catalogo {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.catalogo h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #1e293b;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.producto-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.producto-card:hover {
    transform: translateY(-5px);
}

.producto-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.producto-info {
    padding: 1.5rem;
}

.producto-titulo {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.producto-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.producto-precio {
    font-size: 1.25rem;
    font-weight: bold;
    color: #0f172a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-comprar {
    background-color: #22c55e;
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-comprar:hover {
    background-color: #16a34a;
}

footer {
    background-color: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}


/* ==========================================================================
   ESTILOS NUEVOS: MODAL DE INICIO DE SESIÓN
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.7); /* Fondo oscuro con opacidad */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Clase para activar y mostrar el modal mediante JS */
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #1e293b;
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    color: #1e293b;
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: #64748b;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.btn-submit {
    width: 100%;
    background-color: #0284c7;
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background-color: #0369a1;
}