/* ==========================================================================
   1. RESETEO BÁSICO Y CONFIGURACIÓN GENERAL
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: #fcfbf9; /* Color crema elegante de fondo */
    color: #333333;            /* Gris oscuro para una lectura cómoda */
    overflow-x: hidden;        /* Evita el desborde horizontal */
}

/* ==========================================================================
   2. NAVEGACIÓN (HEADER)
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.9); /* Fondo semi-transparente */
    backdrop-filter: blur(5px);            /* Efecto difuminado moderno */
    z-index: 100;
}

header .logo {
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 1.2rem;
}

header nav a {
    text-decoration: none;
    color: #333;
    margin-left: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: #888;
}

/* ==========================================================================
   3. SECCIÓN HERO (IMAGEN GIGANTE DE ENTRADA)
   ========================================================================== */
.hero {
    height: 100vh; /* Ocupa el 100% de la altura de la pantalla */
    background-image: url('https://images.unsplash.com/photo-1542273917363-3b1817f69a2d?ixlib=rb-4.0.3&auto=format&fit=crop&w=2000&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Crea el efecto inmersivo Parallax */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 2px 2px 15px rgba(0,0,0,0.6);
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.5rem;
    margin-top: 15px;
    font-style: italic;
    text-shadow: 1px 1px 10px rgba(0,0,0,0.5);
}

/* ==========================================================================
   4. SECCIÓN HISTORIA (DISEÑO EN PARALELO)
   ========================================================================== */
.historia {
    display: flex;
    padding: 120px 50px;
    align-items: center;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.historia-texto {
    width: 50%;
}

.historia-texto h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 300;
    letter-spacing: 1px;
}

.historia-texto p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
}

.historia-imagen {
    width: 50%;
}

.historia-imagen img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* ==========================================================================
   5. SECCIÓN PRODUCTOS (CATÁLOGO GRID)
   ========================================================================== */
.productos-seccion {
    padding: 100px 50px;
    text-align: center;
    background-color: #ffffff;
}

.productos-seccion h2 {
    margin-bottom: 60px;
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 1px;
}

.grid-productos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.tarjeta-producto {
    text-align: center;
    padding: 15px;
    background: #fcfbf9;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.tarjeta-producto:hover {
    transform: translateY(-5px);
}

/* Espacio en blanco temporal para las fotos */
.imagen-placeholder {
    width: 100%;
    height: 400px;
    background-color: #e5e5e5; 
    margin-bottom: 25px;
    border-radius: 2px;
}

.tarjeta-producto h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 400;
}

.tarjeta-producto p {
    color: #777;
    font-size: 0.95rem;
    line-height: 1.5;
}

.tarjeta-producto button {
    margin-top: 20px;
    padding: 10px 25px;
    background: transparent;
    border: 1px solid #333;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tarjeta-producto button:hover {
    background: #333;
    color: #fff;
}

/* ==========================================================================
   6. SISTEMA DE ANIMACIONES (ESTADOS INICIALES)
   ========================================================================== */
.animar {
    opacity: 0;
    transition: all 1.2s cubic-bezier(0.25, 1, 0.5, 1); /* Transición muy fluida */
    will-change: transform, opacity;
}

/* Variaciones de movimiento */
.anim-slide-up { transform: translateY(60px); }
.anim-slide-right { transform: translateX(-60px); }
.anim-slide-left { transform: translateX(60px); }
.anim-fade-in { transform: scale(0.98); }

/* Delays (Efecto escalera en cascada) */
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* CLASE ACTIVA (Inyectada por JavaScript al hacer scroll) */
.animar.visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* ==========================================================================
   7. ADAPTACIÓN PARA CELULARES (MEDIA QUERY)
   ========================================================================== */
@media (max-width: 768px) {
    /* Ajustes generales de espaciado */
    header {
        flex-direction: column;
        padding: 15px;
        gap: 10px;
        position: absolute; /* Evita tapar demasiado espacio en pantallas muy chicas */
    }
    
    header nav a {
        margin: 0 10px;
    }
    
    /* Escalar textos en pantallas móviles */
    .hero-content h1 { 
        font-size: 2.3rem; 
        letter-spacing: 2px;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    /* Reorganizar la sección de historia a formato vertical */
    .historia {
        flex-direction: column;
        padding: 80px 20px;
        gap: 40px;
        text-align: center;
    }
    
    .historia-texto, .historia-imagen { 
        width: 100%; 
    }
    
    .historia-texto h2 {
        font-size: 2rem;
    }
    
    /* Adaptación del grid del catálogo */
    .productos-seccion {
        padding: 80px 20px;
    }
    
    .imagen-placeholder {
        height: 300px; /* Reducimos la altura en móvil para mejorar la navegación */
    }
}