/*
Theme Name: Colagenorex Premium Theme
Theme URI: https://colagenorex.com
Author: Antigravity AI
Description: Tema de WordPress premium y responsivo diseñado para Colagenorex, utilizando el sistema de diseño "Vitality Science System".
Version: 1.0.0
Text Domain: colagenorex
*/

/* ==========================================================================
   1. VARIABLES DE DISEÑO (Vitality Science System)
   ========================================================================== */
:root {
    /* Paleta de Colores Clínicos y Farmacéuticos */
    --color-surface: #f7f9fc;
    --color-surface-dim: #d8dadd;
    --color-surface-bright: #f7f9fc;
    --color-surface-container-lowest: #ffffff;
    --color-surface-container-low: #f2f4f7;
    --color-surface-container: #eceef1;
    --color-surface-container-high: #e6e8eb;
    --color-surface-container-highest: #e0e3e6;
    
    --color-on-surface: #191c1e;
    --color-on-surface-variant: #42474f;
    --color-inverse-surface: #2d3133;
    --color-inverse-on-surface: #eff1f4;
    
    --color-outline: #737780;
    --color-outline-variant: #c3c6d0;
    --color-surface-tint: #3a608d;
    
    /* Colores Principales del Branding */
    --color-primary: #002546; /* Azul Farmacéutico Profundo */
    --color-on-primary: #ffffff;
    --color-primary-container: #0d3b66;
    --color-on-primary-container: #81a6d7;
    --color-inverse-primary: #a4c9fc;
    
    --color-secondary: #008f39; /* Verde Salud / Acción (Alineado con el verde brillante del logo y los iconos) */
    --color-on-secondary: #ffffff;
    --color-secondary-container: #8bfa9c;
    --color-on-secondary-container: #007430;
    
    --color-tertiary: #222425;
    --color-on-tertiary: #ffffff;
    --color-tertiary-container: #383a3a;
    --color-on-tertiary-container: #a3a4a4;
    
    --color-error: #ba1a1a;
    --color-on-error: #ffffff;
    --color-error-container: #ffdad6;
    --color-on-error-container: #93000a;

    --color-background: #f7f9fc;
    --color-on-background: #191c1e;
    --color-surface-variant: #e0e3e6;

    /* Tipografía */
    --font-display: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Bordes Redondeados (Shapes) */
    --border-radius-sm: 0.125rem;    /* 2px */
    --border-radius-default: 0.25rem; /* 4px (Estándar clínico preciso) */
    --border-radius-md: 0.375rem;     /* 6px */
    --border-radius-lg: 0.5rem;       /* 8px */
    --border-radius-xl: 0.75rem;      /* 12px */
    --border-radius-full: 9999px;

    /* Espaciado (Grid & Layout) */
    --spacing-base: 8px;
    --spacing-gutter: 24px;
    --spacing-margin-mobile: 16px;
    --spacing-margin-desktop: 64px;
    --container-max-width: 1200px;
    
    /* Sombra Atmosférica (Suave y limpia para evitar contaminación visual) */
    --shadow-atmospheric: 0 12px 24px -4px rgba(0, 37, 70, 0.05), 0 4px 12px -2px rgba(0, 37, 70, 0.03);
}

/* ==========================================================================
   2. ESTILOS GENERALES Y RESET
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    background-color: var(--color-background);
    color: var(--color-on-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

/* ==========================================================================
   3. TIPOGRAFÍA (Jerarquía de Vitality Science)
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: #111111; /* Negro para mayor legibilidad */
    line-height: 1.25;
}

/* Título de Hero */
.display-lg {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Encabezados Principales */
.headline-lg {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    margin-bottom: calc(var(--spacing-base) * 6);
}

/* Encabezados Medianos */
.headline-md {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.4;
}

/* Textos de Cuerpo */
.body-lg {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-on-surface-variant);
}

.body-md {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-on-surface-variant);
}

/* Etiquetas y Elementos Pequeños */
.label-sm {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ==========================================================================
   4. ESTRUCTURA Y GRID
   ========================================================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-gutter);
    width: 100%;
}

.section-padding {
    padding: calc(var(--spacing-base) * 10) 0;
}

/* ==========================================================================
   5. COMPONENTES REUTILIZABLES
   ========================================================================== */

/* Botones con transiciones micro-animadas */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: var(--border-radius-default);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    text-align: center;
}

/* Botón Primario: Verde de marca */
.btn-primary {
    background-color: #008f39 !important;
    color: var(--color-on-primary) !important;
}

.btn-primary:hover {
    background-color: #006e2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 110, 44, 0.15);
}

/* Botón Secundario: Verde de conversión */
.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-on-secondary);
}

.btn-secondary:hover {
    background-color: #006e2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 110, 44, 0.15);
}

/* Botón Fantasma / Esqueleto: Borde verde */
.btn-ghost {
    background-color: transparent;
    border-color: var(--color-secondary);
    color: var(--color-secondary);
}

.btn-ghost:hover {
    background-color: rgba(0, 110, 44, 0.05);
    transform: translateY(-2px);
}

/* Tarjetas Clínicas */
.card {
    background-color: var(--color-surface-container-lowest);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--border-radius-default);
    padding: calc(var(--spacing-base) * 4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-atmospheric);
}

/* ==========================================================================
   6. CABECERA Y NAVEGACIÓN (Sticky Header)
   ========================================================================== */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--color-outline-variant);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 95px;
    display: flex;
    align-items: center;
    transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 37, 70, 0.08);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

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

.header-logo-img {
    height: 90px; /* Tamaño del logo dentro de la cabecera (115px) para evitar desbordes */
    width: auto;
    display: block;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Forzar que el botón de llamado a la acción del header sea verde */
.site-header .btn-cta-trigger {
    background-color: #008f39 !important;
    color: var(--color-on-primary) !important;
}

.site-header .btn-cta-trigger:hover {
    background-color: #006e2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 110, 44, 0.15);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-menu a {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    color: var(--color-on-surface-variant);
}

.nav-menu a:hover {
    color: var(--color-primary);
}

/* Menú hamburguesa para Móvil */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    margin: 5px 0;
    transition: 0.3s;
}

/* ==========================================================================
   7. SECCIÓN HERO
   ========================================================================== */
.hero-section {
    background-color: var(--color-surface);
    padding: 80px 0;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hero-title {
    color: #111111;
}

.hero-description {
    color: var(--color-on-surface-variant);
}

/* Lista de Beneficios con Checkmarks */
.hero-benefits-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 8px 0;
}

.hero-benefits-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--color-on-surface);
}

.hero-benefits-list li svg {
    color: var(--color-secondary);
    flex-shrink: 0;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

/* Contenedor de Imagen de Hero (Render del Producto) */
.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-width: 0;
    width: 100%;
}

.hero-image-placeholder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, #ffffff 0%, #eceef1 100%);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow-atmospheric);
    overflow: hidden;
}

.hero-image-placeholder svg {
    color: var(--color-primary);
    margin-bottom: 16px;
    opacity: 0.8;
}

.hero-image-placeholder .product-pill-shape {
    width: 120px;
    height: 220px;
    background: var(--color-primary);
    border-radius: 60px;
    margin: 20px 0;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 37, 70, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    writing-mode: vertical-lr;
    transform: rotate(15deg);
    border: 4px solid #ffffff;
}

/* ==========================================================================
   8. SECCIÓN: ¿POR QUÉ ELEGIR COLAGENOREX?
   ========================================================================== */
.why-section {
    background-color: var(--color-surface-container-lowest);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.why-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
}

.why-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-default);
    background-color: var(--color-surface-container-low);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-secondary);
}

.why-card h3 {
    font-size: 18px;
    color: #111111;
}

/* ==========================================================================
   9. SECCIÓN: BENEFICIOS PRINCIPALES
   ========================================================================== */
.benefits-section {
    background-color: var(--color-surface);
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    grid-template-rows: auto auto;
    gap: 24px;
}

/* Tarjeta con imagen de fondo */
.benefit-card-image {
    position: relative;
    min-height: 280px;
    border-radius: var(--border-radius-default);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
    border: 1px solid var(--color-outline-variant);
    background-size: cover;
    background-position: center;
    cursor: pointer;
}

/* Fondos degradados elegantes con imágenes y overlays */
.bg-mobility {
    background: linear-gradient(to top, rgba(0, 37, 70, 0.8) 0%, rgba(0, 37, 70, 0.3) 100%), 
                url('images/rodilla.jfif');
    background-size: cover;
    background-position: center;
}

.bg-recovery {
    background: linear-gradient(to top, rgba(0, 30, 12, 0.7) 0%, rgba(0, 30, 12, 0.25) 100%), 
                url('images/corredores.jfif');
    background-size: cover;
    background-position: center;
}

.bg-skin {
    background: linear-gradient(to top, rgba(13, 35, 60, 0.65) 0%, rgba(13, 59, 102, 0.2) 100%),
                url('images/piel.jpeg');
    background-size: cover;
    background-position: center;
}

.bg-antioxidant {
    background: linear-gradient(to top, rgba(0, 37, 70, 0.8) 0%, rgba(0, 37, 70, 0.3) 100%), 
                url('images/capsulas.jpeg');
    background-size: cover;
    background-position: center 55%;
}

.benefit-card-image h3 {
    color: #ffffff;
    margin-bottom: 8px;
}

.benefit-card-image p {
    color: var(--color-outline-variant);
    max-width: 480px;
}

/* Tarjeta de texto limpia */
.benefit-card-clean {
    position: relative;
    background-color: var(--color-surface-container-lowest);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--border-radius-default);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
}

.benefit-card-clean .benefit-icon {
    width: 40px;
    height: 40px;
    color: var(--color-primary);
}

/* --- INTERACTIVIDAD: DETALLE DE BENEFICIOS --- */

.benefit-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    width: 100%;
    transition: opacity 0.2s ease;
}

.benefit-card-clean .benefit-card-content {
    justify-content: center;
    gap: 16px;
}

.btn-read-more {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-secondary-container);
    margin-top: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
}

.benefit-card-clean .btn-read-more {
    color: var(--color-secondary);
    margin-top: 0;
}

.benefit-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 37, 70, 0.97); /* Azul profundo translúcido */
    color: #ffffff;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 12px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
}

.benefit-card-clean .benefit-detail-overlay {
    background-color: rgba(0, 110, 44, 0.97); /* Verde salud translúcido */
}

/* Cuando la tarjeta se expande */
.benefit-card-image.expanded .benefit-detail-overlay,
.benefit-card-clean.expanded .benefit-detail-overlay {
    transform: translateY(0);
}

.benefit-detail-overlay h3 {
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.benefit-detail-overlay .detail-text {
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

.btn-close-overlay {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    margin-top: 8px;
    transition: color 0.2s ease;
    align-self: flex-end;
}

.btn-close-overlay:hover {
    color: #ffffff;
}

/* Ajustes del layout del grid */
.benefits-grid .card-1 {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.benefits-grid .card-2 {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.benefits-grid .card-3 {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

.benefits-grid .card-4 {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

/* ==========================================================================
   10. SECCIÓN: FÓRMULA COMPLETA
   ========================================================================== */
.formula-section {
    background-color: var(--color-surface-container-lowest);
    position: relative;
}

/* Fondo de malla molecular abstracta usando CSS */
.formula-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background-image: radial-gradient(var(--color-outline-variant) 1px, transparent 0);
    background-size: 24px 24px;
    opacity: 0.15;
    pointer-events: none;
}

.formula-subtitle {
    text-align: center;
    color: var(--color-on-surface-variant);
    margin-top: -16px;
    margin-bottom: 48px;
}

.formula-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.formula-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--color-surface-container-low);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--border-radius-default);
    padding: 24px;
}

.formula-card .number {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-secondary);
    opacity: 0.8;
}

.formula-card h3 {
    font-size: 18px;
    color: #111111;
}

/* ==========================================================================
   11. SECCIÓN: COMPARATIVA DE MERCADO
   ========================================================================== */
.comparison-section {
    background-color: var(--color-surface);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--border-radius-default);
    border: 1px solid var(--color-outline-variant);
    box-shadow: var(--shadow-atmospheric);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: var(--color-surface-container-lowest);
}

.comparison-table th, 
.comparison-table td {
    padding: 18px 24px;
    font-family: var(--font-body);
}

.comparison-table th {
    background-color: var(--color-secondary); /* Verde de marca */
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
}

.comparison-table th:first-child {
    background-color: #004d1f; /* Contraste para la columna de características en verde oscuro */
}

.comparison-table td:first-child {
    font-weight: 600;
    color: var(--color-primary);
}

.comparison-table tr {
    border-bottom: 1px solid var(--color-outline-variant);
}

/* Resaltado de filas alternas */
.comparison-table tr:nth-child(even) {
    background-color: var(--color-surface-container-low);
}

/* Columna Colagenorex destacada */
.comparison-table td:nth-child(2), 
.comparison-table th:nth-child(2) {
    text-align: center;
}

.comparison-table td:nth-child(3) {
    text-align: center;
    color: var(--color-on-surface-variant);
}

.comparison-table th:nth-child(3) {
    text-align: center;
    color: #ffffff; /* Cambiado a blanco para evitar que se vea oscuro */
}

.comparison-table td svg.check-icon {
    color: var(--color-secondary);
}

.comparison-table td svg.cross-icon {
    color: var(--color-error);
}

/* ==========================================================================
   12. SECCIÓN: MODO DE USO
   ========================================================================== */
.usage-section {
    background-color: var(--color-surface-container-lowest);
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    text-align: center;
}

.usage-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px;
}

.usage-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-full);
    background-color: var(--color-surface-container);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-secondary);
    margin-bottom: 8px;
}

.usage-card h3 {
    font-size: 20px;
    color: var(--color-primary);
}

/* ==========================================================================
   13. BARRA DE CERTIFICACIONES
   ========================================================================== */
.trust-bar {
    background-color: #e6e8eb;
    padding: 24px 0;
    border-top: 1px solid var(--color-outline-variant);
    border-bottom: 1px solid var(--color-outline-variant);
}

.trust-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-on-surface-variant);
    letter-spacing: 0.05em;
}

.trust-badge svg {
    color: var(--color-primary);
    opacity: 0.7;
}

/* ==========================================================================
   14. LLAMADO A LA ACCIÓN (CTA)
   ========================================================================== */
.cta-section {
    background-color: var(--color-secondary);
    color: #ffffff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 110, 44, 0.4) 0%, transparent 70%);
    pointer-events: none;
}

.cta-section .btn {
    background-color: var(--color-primary);
    color: var(--color-on-primary);
}

.cta-section .btn:hover {
    background-color: #003766;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 37, 70, 0.2);
}

.cta-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    color: #ffffff;
    font-size: 36px;
}

.cta-subtitle {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--color-on-primary-container);
    margin-top: 8px;
}

/* ==========================================================================
   15. PIE DE PÁGINA
   ========================================================================== */
.site-footer {
    background-color: var(--color-surface-container);
    padding: 60px 0 30px;
    color: #111111; /* Cambiado a negro para mayor contraste */
    font-size: 14px;
    border-top: 1px solid var(--color-outline-variant);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: #111111; /* Cambiado a negro */
}

.footer-social-icons {
    display: flex;
    gap: 12px;
}

.footer-social-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--border-radius-default);
    border: 1px solid var(--color-outline);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    transition: all 0.2s;
}

.footer-social-btn:hover {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.footer-links-col h4, 
.footer-contact-col h4 {
    font-size: 15px;
    margin-bottom: 20px;
    color: #111111; /* Cambiado a negro */
}

.footer-links-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links-col a:hover {
    color: var(--color-primary);
}

.footer-legal-disclosure {
    border-top: 1px solid var(--color-outline-variant);
    padding-top: 24px;
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
    color: #111111; /* Cambiado a negro */
}

/* ==========================================================================
   16. MODAL INTERACTIVO (Lead / WhatsApp)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 37, 70, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background-color: var(--color-surface-container-lowest);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--border-radius-default);
    width: 90%;
    max-width: 500px;
    padding: 32px;
    box-shadow: var(--shadow-atmospheric);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-outline);
}

.modal-close:hover {
    color: var(--color-primary);
}

.modal-title {
    margin-bottom: 12px;
    text-align: center;
}

.modal-desc {
    text-align: center;
    margin-bottom: 24px;
    color: var(--color-on-surface-variant);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-primary);
}

.form-control {
    font-family: var(--font-body);
    font-size: 15px;
    padding: 12px;
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--border-radius-default);
    background-color: #ffffff;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 2px var(--color-secondary-container);
}

/* ==========================================================================
   17. RESPONSIVIDAD (Media Queries)
   ========================================================================== */

/* Tablet (Menor a 1024px) */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-image-container {
        grid-row: 1; /* Pone la botella arriba en tablet/móvil */
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .benefits-grid .card-1,
    .benefits-grid .card-2,
    .benefits-grid .card-3,
    .benefits-grid .card-4 {
        grid-column: 1 / 2;
        grid-row: auto;
    }

    .formula-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1.2fr 1.8fr;
    }

    .footer-contact-col {
        grid-column: 1 / 3;
    }
}

/* Móvil (Menor a 768px) */
@media (max-width: 768px) {
    .section-padding {
        padding: calc(var(--spacing-base) * 6) 0;
    }

    /* Mostrar menú hamburguesa y ajustar logo */
    .menu-toggle {
        display: block;
    }

    .header-logo-img {
        height: 70px; /* Altura del logo dentro de la cabecera móvil para evitar desbordes */
        max-width: 240px; /* Evita que el ancho de la imagen empuje el botón del menú hamburguesa */
        width: auto;
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: 95px;
        left: 0;
        width: 100%;
        height: calc(100vh - 95px);
        background-color: var(--color-surface-container-lowest);
        flex-direction: column;
        padding: 40px var(--spacing-margin-mobile);
        gap: 32px;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden; /* Evita desbordamiento horizontal en navegadores móviles (Safari/Chrome de celular) */
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, visibility 0.3s ease;
        border-top: 1px solid var(--color-outline-variant);
        box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    }

    .main-navigation.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 24px;
    }

    .nav-menu a {
        font-size: 18px;
    }

    .hero-benefits-list {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .display-lg {
        font-size: 32px;
    }

    .headline-lg {
        font-size: 24px;
    }

    .why-grid, 
    .formula-grid, 
    .usage-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-contact-col {
        grid-column: auto;
    }
    
    .comparison-table th, 
    .comparison-table td {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* ==========================================================================
   18. MODELO DE EMPAQUE 3D AUTO-ROTATIVO (CSS 3D puro)
   Dimensiones físicas reales: 12.5cm ancho × 5.5cm alto × 5.5cm profundidad
   Escala: 20px por cm → 250px × 110px × 110px
   ========================================================================== */

/* Escena 3D: Contenedor con perspectiva para el efecto de profundidad */
.product-3d-scene {
    width: 300px;
    height: 200px;
    perspective: 800px;
    margin: 20px auto;
}

/* Contenedor de la Caja: Preserva el espacio 3D y gira infinitamente */
.product-3d-box {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-15deg) rotateY(-30deg);
    animation: auto-rotate-package 12s linear infinite;
}

/* Animación de giro automático 360° (No se detiene con hover) */
@keyframes auto-rotate-package {
    0%   { transform: rotateX(-15deg) rotateY(0deg); }
    100% { transform: rotateX(-15deg) rotateY(360deg); }
}

/* --- Estilo Base para las 6 Caras de la Caja --- */
.face {
    position: absolute;
    background-color: #ffffff;
    border: 1px solid var(--color-outline-variant);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backface-visibility: visible;
    box-shadow: inset 0 0 10px rgba(0, 37, 70, 0.04);
}

/* --- GEOMETRÍA DE LAS CARAS (Basada en 12.5×5.5×5.5 cm) --- */

/* Caras Frontal y Trasera: 250px ancho × 110px alto */
.face-front, .face-back {
    width: 250px;
    height: 110px;
    left: 25px;
    top: 45px;
}

/* Caras Laterales (Izquierda y Derecha): 110px × 110px (cuadradas) */
.face-left, .face-right {
    width: 110px;
    height: 110px;
    left: 95px;
    top: 45px;
}

/* Tapas Superior e Inferior: 250px ancho × 110px profundidad */
.face-top, .face-bottom {
    width: 250px;
    height: 110px;
    left: 25px;
    top: 45px;
}

/* Posicionamiento 3D en el Espacio (translateZ = mitad de la dimensión opuesta) */
.face-front  { transform: rotateY(  0deg) translateZ(55px); }
.face-back   { transform: rotateY(180deg) translateZ(55px); }
.face-left   { transform: rotateY(-90deg) translateZ(125px); }
.face-right  { transform: rotateY( 90deg) translateZ(125px); }
.face-top    { transform: rotateX( 90deg) translateZ(55px); }
.face-bottom { transform: rotateX(-90deg) translateZ(55px); }

/* ==========================================================================
   18b. TEXTURIZADO CON IMAGEN REAL (Pseudo-elemento rotado 90° CW)
   
   La imagen caja.jpg tiene el contenido rotado 90° en sentido antihorario.
   Usamos un ::before rotado 90° en sentido horario para corregirlo.
   
   Distribución de paneles (izquierda a derecha en la imagen):
   Panel 1 (5.5cm) → Panel 2 (12.5cm) → Panel 3 (5.5cm) → Panel 4 (12.5cm)
   Total horizontal: 36cm
   Proporción lateral: 15.28% | Proporción frontal: 34.72%
   ========================================================================== */

/* Ocultar contenido HTML de respaldo cuando hay textura */
.product-3d-box.has-texture .face {
    background: none;
    border: none;
    box-shadow: none;
    overflow: hidden;
}

.product-3d-box.has-texture .face > * {
    display: none !important;
}

/* Pseudo-elemento base para todas las caras con textura */
.product-3d-box.has-texture .face::before {
    content: '';
    position: absolute;
    background-image: var(--bg-texture);
    background-repeat: no-repeat;
    z-index: 1;
}

/* CARA FRONTAL (Panel 2: COLAGENOREX principal) */
.product-3d-box.has-texture .face-front::before {
    width: 110px;
    height: 250px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    background-size: 288% 151%;
    background-position: 22% 26%;
}

/* CARA TRASERA (Panel 4: COLAGENOREX dorso) */
.product-3d-box.has-texture .face-back::before {
    width: 110px;
    height: 250px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    background-size: 288% 151%;
    background-position: 94% 26%;
}

/* CARA IZQUIERDA (Panel 1: Información Nutricional) */
.product-3d-box.has-texture .face-left::before {
    width: 110px;
    height: 110px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    background-size: 654% 151%;
    background-position: 0% 26%;
}

/* CARA DERECHA (Panel 3: Contacto / Registro) */
.product-3d-box.has-texture .face-right::before {
    width: 110px;
    height: 110px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    background-size: 654% 151%;
    background-position: 72% 26%;
}

/* TAPA SUPERIOR (Solapa sobre Panel 2: Logo FLA) */
.product-3d-box.has-texture .face-top::before {
    width: 110px;
    height: 250px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    background-size: 288% 714%;
    background-position: 22% 2%;
}

/* TAPA INFERIOR (Solapa debajo del Panel 3) */
.product-3d-box.has-texture .face-bottom::before {
    width: 110px;
    height: 250px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    background-size: 288% 714%;
    background-position: 60% 98%;
}

/* --- DISEÑO HTML DE RESPALDO (Se muestra cuando NO hay textura) --- */

.face-front {
    border-top: 4px solid var(--color-primary);
    padding: 8px 12px;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.face-front .brand-stripe {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-container) 100%);
    color: #ffffff;
    padding: 3px 8px;
    text-align: center;
    font-family: var(--font-display);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.1em;
    border-radius: var(--border-radius-sm);
}

.face-front .logo-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    letter-spacing: 0.05em;
}

.face-front .product-sub {
    font-size: 7px;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--color-outline);
    text-align: center;
}

.face-front .benefits-capsules {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.face-front .benefit-pill {
    font-size: 6px;
    background-color: var(--color-surface-container-low);
    color: var(--color-primary);
    padding: 2px 6px;
    border-radius: var(--border-radius-full);
    border: 1px solid var(--color-outline-variant);
    font-weight: 600;
}

.face-front .bottom-count {
    border-top: 1px dashed var(--color-outline-variant);
    padding-top: 4px;
    text-align: center;
    font-size: 8px;
    font-weight: 700;
    color: var(--color-secondary);
}

.face-back {
    padding: 8px;
    font-size: 6px;
}

.face-back h4 {
    font-size: 7px;
    font-family: var(--font-display);
    text-align: center;
    border-bottom: 1px solid var(--color-primary);
    padding-bottom: 2px;
    margin-bottom: 4px;
    color: var(--color-primary);
}

.face-back .nutri-table { width: 100%; border-collapse: collapse; }
.face-back .nutri-table th,
.face-back .nutri-table td { padding: 2px; text-align: left; border-bottom: 1px solid var(--color-outline-variant); font-size: 6px; }
.face-back .nutri-table th { font-weight: 700; }

.face-back .dosage-info {
    margin-top: 4px;
    padding: 4px;
    background-color: var(--color-surface-container-low);
    border-radius: var(--border-radius-sm);
    font-size: 6px;
    color: var(--color-on-surface-variant);
}

.face-left {
    padding: 8px 4px;
    justify-content: space-between;
    font-size: 6px;
    color: var(--color-on-surface-variant);
    border-left: 2px solid var(--color-primary);
}

.face-left h5 { font-family: var(--font-display); font-size: 7px; color: var(--color-primary); }
.face-left .barcode { width: 100%; height: 20px; background: repeating-linear-gradient(90deg, #000 0px, #000 1px, transparent 1px, transparent 3px); margin-top: 4px; }

.face-right {
    padding: 8px 4px;
    justify-content: space-between;
    font-size: 6px;
    color: var(--color-on-surface-variant);
    border-right: 2px solid var(--color-primary);
}

.face-right h5 { font-family: var(--font-display); font-size: 7px; color: var(--color-primary); }
.face-right .seremi-badge { background-color: var(--color-surface-container-high); padding: 3px; text-align: center; font-weight: bold; border-radius: var(--border-radius-sm); color: var(--color-primary); font-size: 6px; }

.face-top {
    background: linear-gradient(135deg, var(--color-primary) 0%, #001224 100%);
    border: 1px solid var(--color-outline);
    align-items: center;
    justify-content: center;
}

.face-top .cap-seal { width: 40px; height: 20px; border: 2px dashed rgba(255, 255, 255, 0.3); border-radius: 50%; }

.face-bottom {
    background-color: #d8dadd;
    border: 1px solid var(--color-outline);
}

/* --- VISTA ESTÁTICA TEMPORAL PARA v0 --- */
.product-static-preview {
    width: 100%;
    max-width: 480px; /* Incrementado para que la caja se vea más grande en desktop */
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.hero-static-image {
    width: 100%;
    max-width: 100%; /* Asegura que la imagen no desborde en pantallas pequeñas */
    height: auto;
    display: block;
    filter: drop-shadow(0 15px 35px rgba(0, 37, 70, 0.15));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-static-image:hover {
    transform: translateY(-8px);
}

/* ==========================================================================
   19. TABLA DE INFORMACIÓN NUTRICIONAL
   ========================================================================== */
.nutrition-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
    width: 100%;
}

.nutrition-table-column {
    width: 100%;
}

.nutrition-image-column {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.nutrition-box-image {
    max-width: 80%;
    height: auto;
    margin-top: -40px; /* Sube la imagen de la caja un poco */
    filter: drop-shadow(0 15px 35px rgba(0, 37, 70, 0.12));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nutrition-jar-image {
    max-width: 45%;
    height: auto;
    filter: drop-shadow(0 15px 35px rgba(0, 37, 70, 0.12));
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nutrition-box-image:hover,
.nutrition-jar-image:hover {
    transform: translateY(-8px);
}

.nutrition-general-info,
.nutrition-ingredients {
    background-color: var(--color-surface-container-low);
    padding: 20px;
    border-radius: var(--border-radius-default);
    border: 1px solid var(--color-outline-variant);
    margin-bottom: 24px;
}

.nutrition-general-info p,
.nutrition-ingredients p {
    color: var(--color-on-surface);
}

.nutrition-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background-color: var(--color-surface-container-lowest);
    margin-bottom: 12px;
}

.nutrition-table th, 
.nutrition-table td {
    padding: 12px 18px;
    font-family: var(--font-body);
    font-size: 15px;
    border-bottom: 1px solid var(--color-outline-variant);
}

.nutrition-table th {
    background-color: var(--color-secondary); /* Verde de marca igual al de la comparativa */
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 700;
}

.nutrition-table tr:nth-child(even) {
    background-color: var(--color-surface-container-low);
}

.nutrition-table-note {
    font-size: 13px;
    color: var(--color-on-surface-variant);
    margin-bottom: 24px;
    font-style: italic;
}

/* Responsividad para la sección de Información Nutricional */
@media (max-width: 1024px) {
    .nutrition-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .nutrition-box-image {
        margin-top: 0; /* Evita superposiciones con la tabla en móviles y tablets */
    }
}

/* ==========================================================================
   20. CARRUSEL AUTOMÁTICO DE HERO (SLIDESHOW DE FONDO)
   ========================================================================== */
.hero-section.hero-carousel {
    position: relative;
    overflow: hidden;
    background: none; /* Quitamos el fondo estático */
}

/* Degradado para garantizar legibilidad del texto en el lado izquierdo */
.hero-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 75%; /* Ampliamos para cubrir el 75% del ancho garantizando legibilidad total del texto */
    height: 100%;
    background: linear-gradient(to right, rgba(247, 249, 252, 1) 0%, rgba(247, 249, 252, 0.98) 55%, rgba(247, 249, 252, 0.85) 75%, rgba(247, 249, 252, 0) 100%);
    z-index: 2;
    pointer-events: none; /* Permite clics a través del degradado */
}

.carousel-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

/* El contenido del Hero debe flotar sobre los slides y el degradado */
.hero-carousel .container {
    position: relative;
    z-index: 3; /* Z-index mayor que el degradado (2) y slides (1) */
}

@media (min-width: 1025px) {
    /* En computadores, ocultamos el render HTML de la caja porque viene integrado en los slides diseñados */
    .hero-carousel .hero-image-container {
        visibility: hidden;
        pointer-events: none;
    }
}

/* Ajustes responsivos para móvil y tablet */
@media (max-width: 1024px) {
    /* En móvil, el degradado es vertical (de arriba a abajo) y cubre el 100% del ancho */
    .hero-overlay-gradient {
        width: 100%;
        background: linear-gradient(to bottom, rgba(247, 249, 252, 1) 0%, rgba(247, 249, 252, 0.98) 60%, rgba(247, 249, 252, 0.85) 80%, rgba(247, 249, 252, 0) 100%);
    }
}

/* Ajustes específicos para celular (Menor a 768px) */
@media (max-width: 768px) {
    /* Desactivar el carrusel de fondo y degradado en celulares para mejorar rendimiento y legibilidad */
    .hero-section.hero-carousel {
        background: var(--color-surface) !important; /* Forzar el fondo sólido del tema (#f7f9fc) */
    }
    
    .hero-section.hero-carousel .carousel-slides {
        display: none !important; /* Ocultar diapositivas de fondo */
    }
    
    .hero-section.hero-carousel .hero-overlay-gradient {
        display: none !important; /* Ocultar el degradado ya que no hay imagen de fondo */
    }
    
    /* Ocultar la caja del producto (sinfondo.png) de la parte de arriba en celular */
    .hero-carousel .hero-image-container {
        display: none !important;
    }
}



