@charset "utf-8";

/* ==========================================================================
   1. ESTILOS GLOBALES Y BASE
   Configuraciones que afectan a todo el documento.
   ========================================================================== */

html {
    scroll-behavior: smooth; /* Hace que el deslizamiento al hacer clic en enlaces ancla sea suave */
}

body {
    width: 100%;
    background-color: #FCF6EF; /* Color de fondo general de la página */
    overflow-x: hidden; /* Oculta cualquier elemento que se salga por los lados, evitando scroll horizontal */
    margin: 0; /* Quita el margen que los navegadores ponen por defecto */
}

/* Clases de utilidad para fondos de secciones */
.bg-claro { background-color: #FAF7F0; }
.bg-oscuro { background-color: #f0ede6; }


/* ==========================================================================
   2. COMPONENTES REUTILIZABLES (BOTONES)
   Elementos que se repiten en varias partes de la página.
   ========================================================================== */

/* Botón principal (El del banner) */
.btn {
    font-family: "Montserrat", sans-serif;
    font-size: 25px;
    text-transform: uppercase;
    text-decoration: none;
    padding: 18px 35px;
    font-weight: 600;
    background-color: #1A1A1D;
    color: #FAF7F0;
    border: 2px solid #1A1A1D;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: inline-block;
}

.btn:hover {
    background-color: transparent;
    color: #1A1A1D;
    box-shadow: inset 0 0 0 2px #1A1A1D;
}

/* Botón pequeño (El de las tarjetas de productos) */
.btn-detalle {
    display: inline-block;
    padding: 8px 20px;
    background-color: transparent;
    color: #1A1A1D;
    border: 1px solid #1A1A1D;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn-detalle:hover {
    background-color: #1A1A1D;
    color: #FAF7F0;
}


/* ==========================================================================
   3. CABECERA (HEADER Y NAVEGACIÓN)
   La parte superior de tu página (Logo y Menú).
   ========================================================================== */

header {
    display: flex;
    justify-content: space-between;
    background-color: #FCF6EF;
    align-items: center;
    padding-top: 20px;
    padding-bottom: 20px; 
    padding-left: 20px; 
    padding-right: 20px; 
}

#logo {
    display: flex;
    align-items: center;
}

#logo img {
    height: 125px; /* Define el tamaño de tu logo */
}

#menu nav a {
    text-decoration: none;
    color: #2A2A2A;
    font-family: "Montserrat", sans-serif;
    font-style: normal;
    font-size: 20px;
    padding-right: 75px;
    position: relative;
    top: 20px; 
}

/* ==========================================================================
   4. BANNER PRINCIPAL (HERO SECTION)
   La primera gran imagen y título que ve el usuario.
   ========================================================================== */

#fondo {
    width: 100%;	
    height: 600px;
    background: url("../imagenes/fondo_producto/modelo.png");
    background-size: cover; /* Hace que la imagen cubra todo el espacio */
    background-position: center;
    font-family: "Montserrat", sans-serif;
    color: #FCF6EF;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Sombra para que el texto resalte */
    display: flex;
    flex-direction: column; 
    justify-content: center; 
    align-items: flex-start; 
    padding-left: 100px; 
}

article h1 p {
    font-family: "Montserrat", sans-serif;
    font-size: 75px;
    font-style: normal;
    margin: 0; 
    margin-bottom: 20px; 
}

article h2 p {
    font-size: 30px; 
    margin: 0;
    margin-bottom: 40px; 
}


/* ==========================================================================
   5. SECCIÓN DE CATEGORÍAS (LAS 3 CAJAS GRANDES)
   Donde muestras las marcas principales (Eucerin, Cetaphil, etc.).
   ========================================================================== */

.categorias h1 {
    text-align: center;
    font-family: "Montserrat", sans-serif;
    color: #1A1A1D;
    padding-top: 10px;
}

.productos {
    display: flex;
    justify-content: center; /* Centra las cajas horizontalmente */
    gap: 50px; /* Espacio entre las cajas */
    flex-wrap: wrap; /* Permite que las cajas bajen de renglón si no caben */
    margin: 50px 0;
    padding: 0 20px;
}

/* Estructura base de las 3 cajas */
.prod1, .prod2, .prod3 {
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #FAF7F0;
    font-family: "Montserrat", sans-serif;
    position: relative; 
    overflow: hidden;   
    z-index: 1;
    border-radius: 10px;
}

/* La imagen de fondo de cada caja (Capa fantasma) */
.prod1::before, .prod2::before, .prod3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain; /* Evita que los logos se recorten */
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1; 
    transition: all 0.4s ease; /* Animación suave al pasar el mouse */
}

/* Asignación de imágenes a cada caja */
.prod1::before { background-image: url("../imagenes/marcas/eucerin.png"); }
.prod2::before { background-image: url("../imagenes/marcas/cetaphil.png"); }
.prod3::before { background-image: url("../imagenes/marcas/la roche posay.png"); }

/* Textos dentro de las cajas */
.prod1 h1, .prod2 h1, .prod3 h1 {
    margin: 0;
    z-index: 2; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

/* Efectos al pasar el mouse sobre las cajas */
.prod1:hover::before, .prod2:hover::before, .prod3:hover::before {
    filter: blur(5px) brightness(0.6); /* Oscurece y desenfoca la imagen */
    transform: scale(1.1); /* Zoom a la imagen */
}

.prod1:hover h1, .prod2:hover h1, .prod3:hover h1 {
    text-shadow: 2px 2px 10px rgba(0,0,0,1); /* Intensifica la sombra del texto */
}


/* ==========================================================================
   6. SECCIÓN DE TARJETAS DE PRODUCTOS (LISTADO)
   El catálogo detallado de tus productos.
   ========================================================================== */

.categoria-seccion {
    padding: 60px 50px;
    border-top: 1px solid #e0e0e0; /* Línea separadora */
}

.categoria-titulo {
    text-align: center;
    font-family: "Montserrat", sans-serif;
    font-size: 35px;
    margin-bottom: 40px;
    color: #1A1A1D;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.lista-productos {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Las tarjetas bajan de renglón automáticamente */
    gap: 30px; /* Espacio entre tarjetas */
}

/* La tarjeta individual de cada producto */
.producto-card {
    width: 250px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Sombrita de la tarjeta */
    font-family: "Montserrat", sans-serif;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.producto-card:hover {
    transform: translateY(-5px); /* La tarjeta "flota" hacia arriba */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.producto-img-container {
    width: 100%;
    height: 250px;
    background-color: #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    font-size: 40px;
}

.producto-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que la foto del producto se deforme */
}

.producto-info {
    padding: 20px;
}

.producto-nombre {
    font-size: 16px;
    font-weight: 700;
    margin: 10px 0;
    color: #1A1A1D;
}

.producto-precio {
    font-size: 18px;
    color: #555;
    font-weight: 500;
    margin-bottom: 15px;
}


/* ==========================================================================
   7. DISEÑO RESPONSIVO (MÓVILES)
   Todo lo que está aquí adentro SOLO se aplica si la pantalla es menor a 768px.
   ========================================================================== */

@media screen and (max-width: 768px) {

    /* Adaptar el Header (Menú) */
    header {
        flex-direction: column; 
        padding: 20px; 
    }

    #logo img {
        height: 80px; 
        margin-bottom: 20px; 
    }

    nav {
        display: flex;
        flex-direction: column; 
        align-items: center;
        gap: 15px; 
        width: 100%;
    }

    nav a {
        padding-right: 0; 
        top: 0; 
        font-size: 18px; 
        display: block;
        padding: 10px 0; 
    }

    /* Adaptar el Banner Principal */
    #fondo {
        height: auto; 
        min-height: 450px; 
        padding: 40px 15px; 
        align-items: center; 
        text-align: 70% center; 
    }

    article h1 p {
        font-size: 35px; 
        line-height: 1.1;
        margin-bottom: 15px;
    }

    article h2 p {
        font-size: 18px; 
        margin-bottom: 30px;
    }

    .btn {
        font-size: 18px; 
        padding: 12px 25px;
    }

    /* Adaptar las Cajas de Categorías */
    .productos {
        gap: 25px; 
    }

    .prod1, .prod2, .prod3 {
        width: 100%; 
        max-width: 400px; 
        height: 300px; 
    }
}