/* Colores y Variables */
:root {
    --primary: #2c3e50;  /* Azul marino oscuro */
    --accent: #3498db;   /* Azul medio (Peter River) */
    --light: #f4f7f6;    /* Gris muy claro / casi blanco */
    --text: #333;        /* Gris oscuro / casi negro */
    --white: #ffffff;    /* Blanco puro */
}

/* Reset básico para evitar el "div soup" */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Segoe UI', sans-serif; 
    color: var(--text); 
    line-height: 1.6; 
}

/*-----------------------------------------------------------------------*/
/* HEADER & NAV                           */
/*-----------------------------------------------------------------------*/

header { 
    background: var(--primary); /* <--- Cambia var(--white) por var(--primary) */
    padding: 10px 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: fixed; 
    top: 0; 
    width: 100%; 
    z-index: 1000; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease; 
}

.logo { 
    display: flex;
    align-items: center;
}

.logo a {
    display: block; 
    line-height: 0; 
}

.logo-img {
    height: 50px; 
    width: auto;  
    transition: height 0.3s ease; 
}

/* --- EFECTO COMPACTO AL HACER SCROLL --- */
header.compacto {
    padding: 5px 20px; /* Reduce el espacio arriba y abajo del menú */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* Hace la sombra un poco más fuerte al flotar */
}

header.compacto .logo-img {
    height: 35px; /* Reduce el tamaño de la imagen del logo de 50px a 35px */
}

nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
nav a { 
    text-decoration: none; 
    color: var(--white); /* <--- Cambia var(--primary) por var(--white) */
    font-weight: 500; 
    font-size: 0.95rem; 
}

/*-----------------------------------------------------------------------*/
/* HERO                                   */
/*-----------------------------------------------------------------------*/

.hero {
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), 
                      url('img/warehouse.jpeg');      
    background-position: center; 
    background-size: cover;      
    background-repeat: no-repeat; 
    color: white;
    padding: 0 20px;
}

.hero h1 { font-size: 3rem; margin-bottom: 10px; }
.hero p { font-size: 1.2rem; max-width: 600px; margin-bottom: 25px; }

.btn {
    padding: 12px 30px;
    background: var(--accent);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.btn:hover { background: #2980b9; }

/*-----------------------------------------------------------------------*/
/* GRID Y PRODUCTOS                            */
/*-----------------------------------------------------------------------*/

.content {
    /* Esto evita que el ancla del catálogo quede oculta por el header fijo */
    scroll-margin-top: 80px; 
}

.section-title { text-align: center; margin: 50px 0 30px; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto 50px;
    padding: 0 20px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

/* Estilos extra para la página individual de productos.php */
.product-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover; 
    border-radius: 6px;
    margin-bottom: 15px;
    background-color: var(--light); 
}

.medidas-text {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
    text-align: left;
    width: 100%;
}

.subproducts-list {
    list-style: none;
    padding: 0;
    margin-top: 15px;
    width: 100%;
    text-align: left;
}

.subproducts-list li {
    background: var(--light);
    margin: 8px 0;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.95rem;
    border-left: 4px solid var(--accent);
    color: var(--primary);
    font-weight: 500;
}

/*-----------------------------------------------------------------------*/
/* FOOTER                                 */
/*-----------------------------------------------------------------------*/

.main-footer {
    background-color: var(--primary); 
    color: white;
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; 
    padding: 0 20px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
}

.footer-col h3 {
    margin-bottom: 20px;
    color: var(--accent); 
    font-size: 1.2rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #ccc; text-decoration: none; transition: 0.3s; }
.footer-col ul li a:hover { color: white; padding-left: 5px; }

/* WhatsApp Styling Unificado */
.whatsapp-link, 
.whatsapp-link:visited, 
.whatsapp-link:hover, 
.whatsapp-link:active {
    display: flex;
    align-items: center;
    color: white !important; 
    text-decoration: none !important;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
    background: transparent !important;
    outline: none;
}

.footer-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    display: inline-block;
    vertical-align: middle;
    filter: none; 
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 40px;
    padding-top: 20px;
    font-size: 0.9rem;
    color: #888;
}
