:root {
    --primary-color: #3f51b5;
    --accent-color: #e91e63;
    --text-dark: #2c3e50;
    --bg-light: #f8f9fa;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* Encabezado Principal */
.main-header {
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.top-color-bar {
    height: 6px;
    background: linear-gradient(90deg, #ffeb3b, #e91e63, #3f51b5, #00bcd4, #4caf50);
}
.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}
.logo-company img {
    height: 55px;
    cursor: pointer;
}
.main-nav {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}
.nav-link-item {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}
.nav-link-item:hover, .nav-link-item.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Menú Desplegable (Dropdown) */
.dropdown {
    position: relative;
    display: inline-block;
}
.dropbtn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}
.dropdown:hover .dropbtn {
    background-color: #f0f2f5;
}
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 5px;
}
.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
}
.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--accent-color);
}
.dropdown:hover .dropdown-content {
    display: block;
}

/* Área de Contenido Dinámico */
.main-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    min-height: 60vh;
}

/* Cabecera de la Marca Independiente */
.category-header-brand {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    border-left: 6px solid var(--primary-color);
}
.brand-logo-container img {
    max-width: 140px;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.brand-text-container h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}
.brand-text-container p {
    color: #566573;
    font-size: 1rem;
    line-height: 1.5;
}

/* Bloques de Fila: Producto + Ficha Nutricional */
.product-row-block {
    background: var(--white);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    padding: 2.5rem;
    border-radius: 16px;
    margin-bottom: 1.8rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    align-items: center;
}
.product-info-col {
    text-align: center;
    padding-right: 1rem;
}
.img-wrapper img {
    max-height: 220px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 1.2rem;
}
.product-info-col h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}
.product-info-col p {
    color: #7f8c8d;
    font-size: 0.95rem;
}

/* Columna de Tablas Nutricionales */
.product-nutri-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px dashed #d5dbdb;
    padding-left: 1rem;
}
.contenedor-tabla-fija {
    width: 100%;
    text-align: center;
}
.contenedor-tabla-fija img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Estado Vacío o Errores */
.no-products, .no-nutri {
    text-align: center;
    padding: 3rem;
    color: #95a5a6;
    font-style: italic;
}

/* Sección Home / Pantalla de Bienvenida */
.hero-home {
    background: linear-gradient(135deg, #e91e6315, #3f51b515);
    padding: 4.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 3.5rem;
}
.hero-home h1 { 
    font-size: 2.8rem; 
    font-weight: 900; 
    color: var(--primary-color); 
    margin-bottom: 1.2rem; 
}
.hero-home p {
    font-size: 1.1rem;
    color: #34495e;
    max-width: 800px;
    margin: 0 auto;
}
.brands-marquee-section { 
    text-align: center;
    margin-bottom: 2rem;
}
.brands-marquee-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}
.brands-marquee-section .subtitle {
    color: #7f8c8d;
    margin-bottom: 2rem;
}
.marquee-track { 
    display: flex; 
    justify-content: center; 
    gap: 2.5rem; 
    flex-wrap: wrap; 
}
.slide-logo {
    background: var(--white);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
}
.slide-logo img { 
    height: 70px; 
    width: 110px;
    object-fit: contain;
    cursor: pointer; 
}
.slide-logo:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); 
}

/* Pie de Página */
.main-footer { background: #2c3e50; color: var(--white); padding: 3rem 2rem 1rem 2rem; margin-top: 5rem; }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.footer-contact { text-align: right; }
.footer-rights { text-align: center; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #34495e; font-size: 0.85rem; }

/* Responsive para Celulares */
@media(max-width: 768px) {
    .header-container { flex-direction: column; gap: 1rem; }
    .main-nav { flex-wrap: wrap; justify-content: center; }
    .product-row-block { grid-template-columns: 1fr; gap: 2rem; }
    .product-nutri-col { border-left: none; border-top: 1px dashed #d5dbdb; padding-left: 0; padding-top: 1.5rem; }
    .category-header-brand { flex-direction: column; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-contact { text-align: center; }
}