/* --- 1. CONFIGURACIÓN Y RESET --- */
@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --azul-oscuro: #2c3e50;
    --naranja: #ff9800;
    --gris-claro: #f4f4f4;
    --blanco: #ffffff;
}

body {
    font-family: 'Rubik', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- 2. BARRA DE NAVEGACIÓN (NAV) --- */
.nav {
    background: var(--azul-oscuro);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 12px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1250px; /* Ancho ideal para que no se pegue a los bordes */
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 30px;
    width: 100%;
}

/* Contenedor del Logo */
.nav-top {
    display: flex;
    align-items: center;
    margin-right: auto; /* EMPUJA EL MENÚ A LA DERECHA */
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--blanco);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
}

.logo span {
    color: var(--naranja);
}

/* Links de Navegación */
.nav-links {
    display: flex;
    gap: 35px; /* Espacio cómodo entre links */
    align-items: center;
    margin-left: auto; /* REFUERZA LA POSICIÓN A LA DERECHA */
}

.nav-links a {
    text-decoration: none;
    color: var(--gris-claro);
    font-weight: 400;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--naranja);
}

/* Botón de Contacto resaltado */
.btn-nav {
    background: var(--naranja);
    color: var(--blanco) !important;
    padding: 10px 22px;
    border-radius: 6px;
    font-weight: 700 !important;
    transition: 0.3s ease;
}

.btn-nav:hover {
    background: #e68a00;
    transform: scale(1.05);
}

/* Icono de Menú Hamburguesa (Celu) */
.menu-icon {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-icon .bar {
    width: 28px;
    height: 3px;
    background-color: var(--blanco);
    transition: 0.3s;
}

/* ============================================================
   ESTILOS RESPONSIVE (MÓVIL Y TABLET)
   ============================================================ */

@media (max-width: 768px) {
    
    /* 1. Ajuste del Nav y Logo */
    .nav-container {
        flex-direction: column;
        padding: 0;
    }

    .nav-top {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px; /* Aire para que el logo no toque los bordes */
    }

    .logo {
        font-size: 1.2rem; /* Un poco más chico para que no choque con el menú */
        letter-spacing: 1px;
    }

    /* 2. Icono de Menú (Hamburguesa) corregido */
    .menu-icon {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        height: 24px;
        width: 30px;
    }

    .menu-icon .bar {
        width: 100%;
        height: 3px;
        background-color: var(--blanco);
        border-radius: 2px;
        transition: 0.3s;
    }

    /* 3. Menú Desplegable */
    .nav-links {
        width: 100%;
        flex-direction: column;
        gap: 0;
        background: var(--azul-oscuro);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
        margin-left: 0;
    }

    .nav-links.show {
        max-height: 500px; /* Altura suficiente para todos los links */
        padding-bottom: 20px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .btn-nav {
        width: 80% !important;
        margin: 15px auto !important;
        border-radius: 4px !important;
    }

    /* 4. Sección Principal (Hero) */
    .hero {
        padding: 60px 20px;
        text-align: center;
    }

    .hero h1 {
        font-size: 1.8rem; /* Evita que el título se corte */
        line-height: 1.2;
    }

    .hero p {
        font-size: 0.9rem;
        margin: 15px 0;
    }

    /* 5. Catálogo y Grillas */
    .productos-grid {
        grid-template-columns: 1fr !important; /* Una sola chapa por fila */
        padding: 10px;
    }

    .card-producto {
        margin-bottom: 20px;
    }

    /* 6. Footer (Zinguería Sol - Información) */
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .footer-section {
        width: 100%;
    }
}

/* Ajuste para pantallas muy pequeñas (iPhone SE, etc) */
@media (max-width: 380px) {
    .logo {
        font-size: 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
}

/* Animación de "X" para el menú */
.menu-icon.open .bar:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.menu-icon.open .bar:nth-child(2) { opacity: 0; }
.menu-icon.open .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }