/* =============================================
   1. VARIABLES DE MARCA Y CONFIGURACIÓN
   ============================================= */
:root {
    --green: #32a753;         /* Verde Salud Greens */
    --green-dark: #288a44;
    --amber: #ffb800;         /* Ámbar Energía */
    --dark: #0f172a;          /* Azul Oscuro Premium */
    --text: #334155;          /* Gris Texto */
    --light: #f8fafc;         /* Fondo Soft */
    --white: #ffffff;
    --font-title: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --glass: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

.section-padding {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--light);
}

.text-center {
    text-align: center;
}

.mb-12 {
    margin-bottom: 3rem;
}

/* =============================================
   2. ELEMENTOS UI PREMIUM (GLASS & BOTONES)
   ============================================= */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: var(--green);
    color: var(--white);
    padding: 18px 35px;
    border-radius: 50px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
    font-family: var(--font-title);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.btn-primary:hover {
    background: var(--dark);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(50, 167, 83, 0.3);
}

.btn-primary.full {
    width: 100%;
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 16px 35px;
    border-radius: 50px;
    font-weight: 800;
    text-decoration: none;
    transition: var(--transition);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--amber);
}

/* =============================================
   3. HEADER Y NAVEGACIÓN
   ============================================= */
#main-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    z-index: 1000;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.h-logo {
    height: 100px; /* Tamaño solicitado para PC */
    width: auto;
    display: block;
    object-fit: contain;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--green);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.cart-trigger {
    position: relative;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark);
    transition: var(--transition);
}

.cart-trigger:hover {
    color: var(--green);
}

#cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--amber);
    color: var(--dark);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 900;
    padding: 2px 7px;
    box-shadow: var(--shadow-sm);
}

.btn-nav {
    background: var(--dark);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-nav:hover {
    background: var(--green);
}

/* =============================================
   4. HERO SECTION
   ============================================= */
.hero {
    background: linear-gradient(135deg, var(--amber) 0%, #ffcc33 100%);
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

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

.hero-text h1 {
    font-family: var(--font-title);
    font-size: 4.2rem;
    line-height: 1;
    margin: 25px 0;
    color: var(--dark);
}

.hero-text h1 span {
    color: var(--white);
    text-shadow: 3px 3px 0px rgba(0,0,0,0.05);
}

.premium-badge {
    background: rgba(255, 255, 255, 0.25);
    padding: 10px 22px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--dark);
}

.hero-text p {
    font-size: 1.25rem;
    margin-bottom: 45px;
    max-width: 550px;
    color: var(--dark);
    opacity: 0.9;
}

.hero-btns {
    display: flex;
    gap: 20px;
}

.img-fluid {
    width: 100%;
    border-radius: 50px;
    box-shadow: 40px 40px 90px rgba(0, 0, 0, 0.15);
}

/* =============================================
   5. SECCIÓN COMIDA REAL (REAL FOOD)
   ============================================= */
.real-food-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.rf-image-wrapper { position: relative; }

.rf-main-img {
    width: 100%;
    border-radius: 40px;
    box-shadow: var(--shadow-lg);
    display: block;
}

.rf-floating-badge {
    position: absolute;
    top: 30px;
    right: 30px;
    background: var(--white);
    padding: 12px 25px;
    border-radius: 50px;
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 0.8rem;
    color: var(--green);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 10px;
}

.rf-description {
    font-size: 1.15rem;
    color: var(--text);
    line-height: 1.8;
    margin: 25px 0 40px 0;
}

.rf-description strong { color: var(--green); font-weight: 800; }

.rf-pillars { display: flex; flex-direction: column; gap: 25px; }

.rf-pillar-item { display: flex; gap: 20px; align-items: flex-start; }

.rf-icon {
    min-width: 45px;
    height: 45px;
    background: #f0fdf4;
    color: var(--green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(50, 167, 83, 0.1);
}

.rf-pillar-item h4 {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.rf-pillar-item p { font-size: 0.95rem; color: #64748b; }

/* =============================================
   6. SECCIÓN DIFERENCIADORES
   ============================================= */
#diferenciadores .plan-card {
    padding: 3.5rem 2rem;
    height: 100%;
    text-align: center;
    border: 1px solid #f1f5f9;
}

#diferenciadores .plan-card i {
    color: var(--green);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

/* =============================================
   7. COMUNIDAD Y TESTIMONIOS
   ============================================= */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.t-card {
    background: var(--white);
    padding: 35px;
    border-radius: 30px;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
}

.t-user-img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 3px solid var(--green);
}

.t-user-img img { width: 100%; height: 100%; object-fit: cover; }

.t-card p {
    font-style: italic;
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 20px;
}

.t-info strong { display: block; color: var(--dark); }

.t-info span { font-size: 0.8rem; color: var(--green); font-weight: 700; }

/* =============================================
   8. CALCULADORA NUTRICIONAL (HERO)
   ============================================= */
.calculator { padding: 60px; }

.calc-header { text-align: center; margin-bottom: 45px; }

.section-title { font-family: var(--font-title); font-size: 2.5rem; margin-bottom: 15px; }

.section-title span { color: var(--green); }

.calc-content { display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px; }

.form-row-calc { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.field label, .field-full label, .label-naf {
    display: block;
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 10px;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input, select {
    padding: 15px 20px;
    border-radius: 15px;
    border: 2px solid #e2e8f0;
    width: 100%;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--green);
    background: #f0fdf4;
}

.field-full { margin: 25px 0; }

.naf-selector { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 35px; }

.naf-box {
    background: var(--white);
    padding: 20px 10px;
    border-radius: 18px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.naf-box i { font-size: 1.5rem; color: var(--green); margin-bottom: 10px; display: block; }

.naf-box span { display: block; font-weight: 800; font-size: 0.8rem; margin-bottom: 5px; }

.naf-box small { font-size: 0.65rem; color: #64748b; }

.naf-box.active { border-color: var(--green); background: #f0fdf4; transform: translateY(-5px); }

.calc-result {
    background: var(--white);
    border-radius: 35px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.main-kcal {
    width: 200px;
    height: 200px;
    border: 10px solid var(--green);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    background: #fdfdfd;
}

#val-tdee { font-size: 3rem; font-weight: 900; color: var(--green); line-height: 1; }

.main-kcal small { font-weight: 700; color: #64748b; font-size: 0.8rem; }

/* =============================================
   9. SUCURSALES
   ============================================= */
.sucursal-group { display: flex; justify-content: center; gap: 30px; margin-top: 40px; }

.btn-branch-map {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 30px;
    border-radius: 25px;
    border: 2px solid #e2e8f0;
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    min-width: 220px;
}

.map-pointer { font-size: 2.2rem; color: var(--amber); transition: var(--transition); }

.btn-branch-map span { font-family: var(--font-title); font-weight: 800; font-size: 1rem; color: var(--dark); }

.btn-branch-map.active { border-color: var(--green); background: #f0fdf4; box-shadow: 0 15px 30px rgba(50, 167, 83, 0.1); }

.btn-branch-map.active .map-pointer { color: var(--green); transform: scale(1.1); }

/* =============================================
   10. PLANES GREENS
   ============================================= */
.diners-wrapper { text-align: center; margin-bottom: 50px; }

.diners-wrapper p { font-weight: 800; font-size: 0.9rem; color: #64748b; margin-bottom: 15px; }

.diners-ui {
    display: inline-flex;
    align-items: center;
    gap: 30px;
    background: var(--white);
    padding: 12px 35px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
}

.diners-ui button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: var(--green);
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.diners-ui button:hover { background: var(--dark); }

#diners-count { font-size: 1.4rem; font-weight: 900; color: var(--dark); }

.planes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
}

.plan-card {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 40px;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.plan-card:hover { transform: translateY(-15px); box-shadow: 0 40px 70px rgba(0,0,0,0.1); }

.plan-card.featured { border: 3.5px solid var(--green); }

.ribbon {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green);
    color: var(--white);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(50, 167, 83, 0.3);
}

.plan-card h3 { font-size: 1.8rem; margin-bottom: 20px; color: var(--dark); }

.plan-card p { font-size: 0.95rem; color: #64748b; margin-bottom: 35px; line-height: 1.7; }

.p-duration { margin-bottom: 20px; font-weight: 600; }

.p-total { font-size: 1.7rem; font-weight: 900; color: var(--green); margin-bottom: 30px; }

.btn-add {
    background: var(--light);
    border: none;
    padding: 18px;
    border-radius: 20px;
    font-weight: 800;
    font-family: var(--font-title);
    cursor: pointer;
    transition: var(--transition);
    margin-top: auto;
}

.btn-add:hover { background: var(--dark); color: var(--white); }

.plan-card.special { border: 2px dashed var(--amber); }

#vegan-exclusive.disabled { opacity: 0.4; filter: grayscale(1); pointer-events: none; }

.lock-overlay {
    display: none;
    color: #ef4444;
    font-weight: 900;
    font-size: 0.8rem;
    text-align: center;
    margin-top: 15px;
    text-transform: uppercase;
}

#vegan-exclusive.disabled .lock-overlay { display: block; }

/* =============================================
   11. SECCIÓN APP MÓVIL
   ============================================= */
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.app-mockup img {
    width: 100%;
    max-width: 400px;
    border-radius: 40px;
    box-shadow: var(--shadow-lg);
    display: block;
    margin: 0 auto;
}

.app-content h2 span { color: var(--green); }

.app-store-badges { display: flex; gap: 20px; margin-top: 30px; font-weight: 800; font-size: 0.9rem; color: var(--dark); }

.app-store-badges i { font-size: 1.6rem; color: var(--green); margin-right: 8px; }

/* =============================================
   12. CHECKOUT FORM & DYNAMIC BLOCKS
   ============================================= */
.checkout-form { padding: 50px; max-width: 850px; margin: 0 auto; }

.checkout-form h3 { text-align: center; font-size: 2rem; margin-bottom: 35px; }

/* Estilo para los bloques de comensales inyectados por JS */
.diner-data-block {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.diner-data-block:hover {
    box-shadow: var(--shadow-lg);
}

/* Caja de resultados metabólicos dentro del checkout */
.field.full.result-box-diner {
    border: 2px dashed var(--green-dark);
    margin-top: 15px;
}

.d_kcal_display {
    font-family: var(--font-title);
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Pequeña animación cuando cambia el número */
.d_kcal_display:not(:empty) {
    animation: pulseKcal 0.5s ease;
}

@keyframes pulseKcal {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: var(--amber); }
    100% { transform: scale(1); }
}

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 30px; }

.form-grid .full { grid-column: span 2; }

input[type="time"] { background-color: var(--white); }

.p-method { font-weight: 800; margin-bottom: 15px; color: var(--dark); }

.payment-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 40px; }

.payment-group label {
    background: var(--white);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    border: 2px solid #e2e8f0;
    font-weight: 700;
    transition: var(--transition);
}

.payment-group input { display: none; }

.payment-group label:has(input:checked) { border-color: var(--green); background: #f0fdf4; color: var(--green); }

/* =============================================
   13. FOOTER
   ============================================= */
#main-footer { background: var(--dark); color: var(--white); padding: 80px 0 30px; }

.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 80px; margin-bottom: 60px; }

.f-logo { 
    height: 80px;
    width: auto;
    margin-bottom: 25px; 
    filter: brightness(0) invert(1); 
    object-fit: contain;
}

.f-brand p { color: #94a3b8; max-width: 300px; }

.f-links h4, .f-social h4 {
    color: var(--green);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    font-weight: 900;
}

.f-links a { display: block; color: #cbd5e1; text-decoration: none; margin-bottom: 12px; transition: var(--transition); }

.f-links a:hover { color: var(--green); }

.f-social a { color: var(--white); font-size: 1.5rem; margin-right: 20px; transition: var(--transition); }

.f-social a:hover { color: var(--amber); }

.f-bottom { border-top: 1px solid #1e293b; padding-top: 30px; text-align: center; color: #64748b; font-size: 0.85rem; }

/* =============================================
   14. SIDEBAR CARRITO
   ============================================= */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 420px;
    height: 100%;
    background: var(--white);
    z-index: 2000;
    box-shadow: -20px 0 60px rgba(0,0,0,0.15);
    transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active { right: 0; }

.cart-head { padding: 35px; border-bottom: 1px solid #f1f5f9; display: flex; justify-content: space-between; align-items: center; }

.cart-head h3 { font-family: var(--font-title); font-size: 1.5rem; }

#close-cart { background: none; border: none; font-size: 2rem; cursor: pointer; color: #94a3b8; transition: var(--transition); }

.cart-body { flex: 1; padding: 35px; overflow-y: auto; }

.cart-item { padding: 20px 0; border-bottom: 1px solid #f8fafc; display: flex; justify-content: space-between; align-items: center; }

.cart-item strong { font-size: 1rem; color: var(--dark); }

.cart-item small { color: #64748b; font-weight: 600; }

.remove-x {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 900;
    transition: var(--transition);
}

.remove-x:hover { background: #ef4444; color: white; }

.cart-foot { padding: 35px; background: var(--light); }

.total-row {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-title);
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 25px;
    color: var(--green);
}

/* =============================================
   15. ANIMACIONES & RESPONSIVE
   ============================================= */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

.animate-fade-in { animation: fadeInUp 0.8s ease-out; }

.animate-float { animation: float 5s ease-in-out infinite; }

/* MEDIA QUERIES */
@media (max-width: 992px) {
    .hero-grid, .calc-content, .footer-content, .form-row-calc, .app-grid, .real-food-grid { grid-template-columns: 1fr; }
    .hero-text { text-align: center; }
    .hero-btns { justify-content: center; }
    .hero-text h1 { font-size: 3rem; }
    .app-mockup img { max-width: 300px; margin-bottom: 40px; }
    .rf-image-wrapper { order: 2; margin-top: 40px; }
    
    .h-logo { height: 70px; }
    .f-logo { height: 85px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .section-padding { padding: 60px 0; }
    .naf-selector { grid-template-columns: repeat(2, 1fr); }
    .payment-group { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: span 1; }
    .cart-sidebar { width: 100%; }
    .testimonials-grid { grid-template-columns: 1fr; }
    
    .h-logo { height: 65px; }
    .f-logo { height: 90px; }

    /* Ajuste para los bloques de comensales en móvil */
    .checkout-form { padding: 20px; }
    .diner-data-block { padding: 20px; border-radius: 20px; }
    .d_kcal_display { font-size: 1.4rem; }
    
    
/* CONTENEDOR PRINCIPAL */
.wa-float-container {
    position: fixed !important;
    bottom: 30px !important;
    right: 30px !important;
    z-index: 999999 !important; /* Por encima de todo */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

/* EL BOTÓN (PILL) */
.wa-main-pill {
    background: var(--dark) !important;
    color: white !important;
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    border: 2px solid var(--green);
}

.wa-main-pill:hover {
    transform: scale(1.05);
    background: var(--green) !important;
}

.wa-circle-icon {
    background: var(--green);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.wa-label {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 0.85rem;
}

/* EL MENÚ QUE APARECE */
.wa-selector-menu {
    width: 260px;
    padding: 20px;
    display: none; /* Se activa con JS */
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.wa-selector-menu.show {
    display: flex !important;
    animation: fadeInUp 0.4s ease;
}

.wa-selector-menu p {
    font-size: 0.8rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 10px;
    text-align: center;
}

.wa-option {
    background: var(--white);
    border: 1px solid #ddd;
    padding: 12px;
    border-radius: 15px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.3s;
}

.wa-option:hover {
    background: #f0fdf4;
    border-color: var(--green);
    color: var(--green);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .wa-label { display: none; } /* En móvil solo el círculo */
    .wa-main-pill { padding: 10px; }
}
}