:root {
    --bg-color: #F0F5F9;        
    --primary-blue: #0056b3;    
    --dark-blue: #1A2B4C;       
    --accent-green: #00C896;    
    --clay-shadow-out: 6px 6px 12px rgba(166, 180, 200, 0.4), -6px -6px 12px rgba(255, 255, 255, 0.9);
    --clay-shadow-in: inset 4px 4px 8px rgba(166, 180, 200, 0.3), -4px -4px 8px rgba(255, 255, 255, 0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-color); color: var(--dark-blue); padding-top: 90px; padding-bottom: 100px; overflow-x: hidden; }

/* ================= ENCABEZADO Y BUSCADOR INTELIGENTE ================= */
.header-flotante {
    position: fixed; top: 15px; left: 5%; width: 90%; height: 60px;
    background: rgba(240, 245, 249, 0.7); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-radius: 30px; box-shadow: var(--clay-shadow-out);
    z-index: 1000; overflow: hidden; 
}

.vista-normal {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 65px 0 20px; 
    transition: opacity 0.3s ease, visibility 0.3s;
}

.logo-text { font-weight: 800; font-size: 24px; color: var(--primary-blue); letter-spacing: -0.5px; }

.distribuidor-tag {
    display: flex; align-items: center; gap: 5px; background: var(--bg-color); padding: 6px 14px;
    border-radius: 20px; border: 1px solid rgba(0, 86, 179, 0.1); 
    box-shadow: inset 2px 2px 4px rgba(166, 180, 200, 0.2), inset -2px -2px 4px rgba(255, 255, 255, 0.8);
}
.tag-text { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--primary-blue); white-space: nowrap;}
.icono-seguridad { color: var(--primary-blue); flex-shrink: 0;}

.btn-lupa-trigger {
    position: absolute; right: 10px; top: 8px; width: 44px; height: 44px; 
    border: none; border-radius: 50%; background-color: var(--bg-color); color: var(--primary-blue);
    box-shadow: var(--clay-shadow-out); display: flex; justify-content: center; align-items: center;
    cursor: pointer; z-index: 10; transition: all 0.3s ease;
}
.btn-lupa-trigger:active { box-shadow: var(--clay-shadow-in); transform: scale(0.95); color: var(--accent-green); }

.vista-buscador {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; gap: 10px; padding: 0 15px 0 20px;
    background: rgba(240, 245, 249, 0.98);
    opacity: 0; visibility: hidden; 
    transition: opacity 0.3s ease, visibility 0.3s;
}

.input-buscar-full {
    flex: 1; height: 100%; background: transparent; border: none; outline: none;
    font-size: 14px; font-weight: 600; color: var(--dark-blue);
    -webkit-appearance: none; appearance: none;
    min-width: 0; 
}
.input-buscar-full::-webkit-search-cancel-button { display: none; }
.input-buscar-full::placeholder { color: #8BA3C4; font-weight: 400; font-size: 13px; }

.btn-cerrar-busqueda {
    width: 38px; height: 38px; background: none; border: none; color: #64748B;
    display: flex; justify-content: center; align-items: center; cursor: pointer; border-radius: 50%;
    flex-shrink: 0; margin-right: 5px;
}
.btn-cerrar-busqueda:active { background: rgba(0, 86, 179, 0.1); color: var(--primary-blue); }

.header-flotante.buscando .vista-normal { opacity: 0; visibility: hidden; pointer-events: none; }
.header-flotante.buscando .vista-buscador { opacity: 1; visibility: visible; pointer-events: auto; }
.header-flotante.buscando .btn-lupa-trigger { transform: scale(0.5); opacity: 0; pointer-events: none; }

/* ================= SECCIÓN HERO ================= */
.hero-section { margin-top: 5px; padding: 0 5%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-title { font-size: 22px; font-weight: 800; color: var(--dark-blue); line-height: 1.2; margin-bottom: 15px; }
.hero-image-container { width: 220px; height: 220px; border-radius: 40px; background-color: var(--bg-color); box-shadow: var(--clay-shadow-out); margin-bottom: 20px; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.hero-img { width: 90%; height: auto; object-fit: contain; }
.btn-cta-principal { width: 85%; height: 50px; border-radius: 28px; font-size: 16px; font-weight: 700; background-color: var(--primary-blue); color: #FFFFFF; border: none; box-shadow: 8px 8px 16px rgba(0, 86, 179, 0.3), -4px -4px 10px rgba(255, 255, 255, 0.6), inset 2px 2px 6px rgba(255, 255, 255, 0.2); transition: all 0.2s ease; cursor: pointer; }
.btn-cta-principal:active { transform: scale(0.95); box-shadow: inset 4px 4px 10px rgba(0, 0, 0, 0.2), inset -4px -4px 10px rgba(255, 255, 255, 0.1); }

/* ================= CREDENCIALES INFINITAS ================= */
.micro-credenciales-wrapper { margin-top: 35px; width: 100%; overflow: hidden; position: relative; }
.micro-credenciales-scroll { display: flex; width: max-content; animation: marquee-infinito 15s linear infinite; }
.marquee-grupo { display: flex; gap: 15px; padding-right: 15px; }
.credencial-pill { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 15px; border-radius: 20px; background-color: var(--bg-color); box-shadow: var(--clay-shadow-in); white-space: nowrap; }
.credencial-pill svg { color: var(--accent-green); }
.credencial-pill span { font-size: 12px; font-weight: 600; color: var(--dark-blue); }
@keyframes marquee-infinito { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ================= CATÁLOGO ================= */
.catalogo-section { padding: 20px 0; width: 100%; }
.encabezado-catalogo { text-align: center; margin-bottom: 15px; padding: 0 5%; }
.encabezado-catalogo h2 { font-size: 20px; font-weight: 800; color: var(--dark-blue); }
.encabezado-catalogo p { font-size: 13px; color: #4A5568; }

.filtros-scroll { display: flex; flex-wrap: nowrap; gap: 15px; padding: 15px 5% 30px 5%; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.filtros-scroll::-webkit-scrollbar { display: none; }
.filtro-btn { flex: 0 0 auto; scroll-snap-align: start; height: 40px; padding: 0 20px; border-radius: 20px; border: none; background-color: var(--bg-color); color: var(--dark-blue); font-size: 14px; font-weight: 600; box-shadow: var(--clay-shadow-out); transition: all 0.2s ease; white-space: nowrap; cursor: pointer; }
.filtro-btn.activo { background-color: var(--primary-blue); color: white; box-shadow: inset 3px 3px 6px rgba(0,0,0,0.2), inset -3px -3px 6px rgba(255,255,255,0.2); }

.catalogo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 0 5%; margin-bottom: 30px; }

/* ================= EFECTO TEASER Y GLASSMORPHISM ================= */
.catalogo-wrapper {
    position: relative;
    padding-bottom: 20px;
}

.catalogo-wrapper.modo-tease {
    overflow: hidden;
}

.glass-overlay-tease {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 260px;
    background: linear-gradient(to bottom, rgba(240, 245, 249, 0) 0%, rgba(240, 245, 249, 0.7) 40%, rgba(240, 245, 249, 1) 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 10px;
    z-index: 10;
}

.btn-ver-mas-glass {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 14px 35px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0px 8px 20px rgba(0, 86, 179, 0.4);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: pulseB2B 2s infinite; 
}

.btn-ver-mas-glass:active {
    transform: scale(0.95);
}

.tarjeta-producto { background: #FFFFFF; border-radius: 24px; padding: 15px 10px; box-shadow: var(--clay-shadow-out); display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; }
.producto-img { width: 90px; height: 90px; object-fit: contain; margin-bottom: 10px; filter: drop-shadow(0px 8px 10px rgba(0,0,0,0.1)); }
.tag-beneficio { font-size: 9px; padding: 3px 8px; margin-bottom: 8px; background-color: rgba(0, 200, 150, 0.15); color: var(--accent-green); border-radius: 12px; font-weight: 700; text-transform: uppercase; }
.producto-titulo { font-size: 13px; font-weight: 700; color: var(--dark-blue); line-height: 1.2; margin-bottom: 5px; min-height: 32px; }
.producto-estatus { font-size: 9px; color: var(--primary-blue); font-weight: 700; letter-spacing: 0.5px; margin-bottom: 12px; text-transform: uppercase; opacity: 0.8; }

.acciones-producto { display: flex; gap: 8px; width: 100%; margin-top: auto; align-items: center; }

.btn-accion-principal {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background-color: var(--primary-blue); 
    color: #FFFFFF; 
    border: none;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 0;
    box-shadow: 4px 4px 8px rgba(0,86,179,0.3), -4px -4px 8px rgba(255,255,255,0.7), inset 2px 2px 4px rgba(255,255,255,0.2);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-accion-principal:active {
    box-shadow: inset 4px 4px 8px rgba(0,0,0,0.3), inset -4px -4px 8px rgba(255,255,255,0.1);
    color: #EBF2FA;
    transform: scale(0.96);
}

.btn-accion-secundaria { width: 34px; height: 34px; border-radius: 10px; background-color: transparent; color: #64748B; border: 1px solid rgba(166, 180, 200, 0.3); display: flex; justify-content: center; align-items: center; transition: all 0.2s ease; cursor: pointer; }
.btn-accion-secundaria:active { background-color: var(--primary-blue); color: white; border-color: var(--primary-blue); box-shadow: inset 2px 2px 4px rgba(0,0,0,0.2); }

/* ================= BANNER B2B DINÁMICO ================= */
.banner-b2b { 
    width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; 
    background: linear-gradient(270deg, #1A2B4C, #0056b3, #1A2B4C);
    background-size: 400% 400%;
    animation: gradientB2B 8s ease infinite;
    padding: 55px 5%; text-align: center; 
    box-shadow: inset 0px 10px 20px rgba(0,0,0,0.3); 
    overflow: hidden;
}

@keyframes gradientB2B {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.b2b-titulo { color: white; font-size: 24px; font-weight: 800; margin-bottom: 10px; text-shadow: 0px 4px 10px rgba(0,0,0,0.4); }
.b2b-texto { color: #EBF2FA; font-size: 14px; line-height: 1.5; margin-bottom: 25px; padding: 0 10px; }

.btn-b2b { 
    width: 90%; height: 56px; border-radius: 28px; border: none; background-color: white; 
    color: var(--primary-blue); font-size: 16px; font-weight: 800; cursor: pointer; 
    animation: pulseB2B 2s infinite;
}

@keyframes pulseB2B {
    0% { transform: scale(1); box-shadow: 0px 8px 15px rgba(0,0,0,0.2); }
    50% { transform: scale(1.03); box-shadow: 0px 12px 20px rgba(255,255,255,0.3); }
    100% { transform: scale(1); box-shadow: 0px 8px 15px rgba(0,0,0,0.2); }
}

/* ================= BARRA DE COTIZACIÓN INFERIOR (CARRITO) ================= */
.barra-cotizacion {
    position: fixed;
    bottom: 15px;
    left: 5%;
    width: 90%;
    background: rgba(26, 43, 76, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    animation: slideUp 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cotizacion-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.icono-bolsa {
    position: relative;
    width: 40px; height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex; justify-content: center; align-items: center;
    color: var(--accent-green);
    transition: transform 0.2s;
}

.icono-bolsa.jump {
    transform: scale(1.3) translateY(-5px);
}

.badge-coti {
    position: absolute;
    top: -5px; right: -5px;
    background-color: var(--accent-green);
    color: white;
    width: 20px; height: 20px;
    border-radius: 50%;
    font-size: 11px; font-weight: 800;
    display: flex; justify-content: center; align-items: center;
    border: 2px solid #1A2B4C;
}

.textos-cotizacion {
    display: flex; flex-direction: column;
}

.titulo-coti { color: white; font-size: 13px; font-weight: 700; }
.sub-coti { color: #A0B3D1; font-size: 10px; }

.btn-enviar-coti {
    background: var(--accent-green);
    color: white; border: none; border-radius: 12px;
    padding: 0 15px; height: 40px;
    font-size: 13px; font-weight: 700;
    display: flex; align-items: center; gap: 5px;
    box-shadow: 0px 4px 10px rgba(0, 200, 150, 0.3);
    cursor: pointer; transition: transform 0.2s;
}

.btn-enviar-coti:active {
    transform: scale(0.95);
}

@keyframes slideUp { from { transform: translateY(100px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ================= BOTÓN FLOTANTE WHATSAPP ================= */
.btn-flotante-asesoria {
    position: fixed;
    bottom: 20px; 
    right: 5%;
    width: 54px; height: 54px;
    background: #25D366;
    color: white; border-radius: 50%; border: none;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0px 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 999; cursor: pointer;
    transition: bottom 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.2s;
}

.btn-flotante-asesoria svg {
    animation: ring-wa 3s infinite ease-in-out;
}

.btn-flotante-asesoria.con-carrito {
    bottom: 95px; 
}

@keyframes ring-wa {
    0% { transform: rotate(0); }
    5% { transform: rotate(15deg); }
    10% { transform: rotate(-10deg); }
    15% { transform: rotate(5deg); }
    20% { transform: rotate(-5deg); }
    25% { transform: rotate(0); }
    100% { transform: rotate(0); }
}

/* ========================================================
   MODAL DE FICHA TÉCNICA (GLASSMORPHISM)
   ======================================================== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(26, 43, 76, 0.4); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-end; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.modal-overlay.activo {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: #FFFFFF;
    border-radius: 32px 32px 0 0; 
    padding: 30px 20px 20px 20px;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0px -10px 40px rgba(0, 86, 179, 0.15);
}

.modal-overlay.activo .modal-content {
    transform: translateY(0);
}

.btn-cerrar-modal {
    position: absolute;
    top: 15px; right: 20px;
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-color);
    border: none;
    color: var(--dark-blue);
    font-size: 16px; font-weight: bold;
    display: flex; justify-content: center; align-items: center;
    cursor: pointer;
    box-shadow: var(--clay-shadow-out);
}
.btn-cerrar-modal:active { box-shadow: var(--clay-shadow-in); }

.modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(166, 180, 200, 0.2);
}

#modal-img {
    width: 90px; height: 90px;
    object-fit: contain;
    filter: drop-shadow(0px 8px 10px rgba(0,0,0,0.1));
}

.modal-title-area {
    display: flex; flex-direction: column; align-items: flex-start;
}

#modal-titulo {
    font-size: 18px; font-weight: 800; color: var(--dark-blue);
    line-height: 1.2; margin: 5px 0;
}

.sello-calidad {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 9px; font-weight: 700; color: #4A5568;
    background: #EBF2FA; padding: 4px 8px; border-radius: 10px;
    margin-top: 5px;
}
.sello-calidad svg { color: var(--accent-green); }

.modal-body {
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 20px;
}

.seccion-info { margin-bottom: 20px; }
.seccion-info h3 {
    font-size: 14px; font-weight: 700; color: var(--primary-blue);
    margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;
}

.lista-beneficios {
    list-style: none; padding: 0; margin: 0;
}
.lista-beneficios li {
    position: relative; padding-left: 20px;
    font-size: 13px; color: #4A5568; line-height: 1.5; margin-bottom: 8px;
}
.lista-beneficios li::before {
    content: "✓"; position: absolute; left: 0; top: 0;
    color: var(--accent-green); font-weight: bold; font-size: 14px;
}

.texto-ingredientes {
    font-size: 12px; color: #64748B; line-height: 1.6;
    background: var(--bg-color); padding: 12px; border-radius: 16px;
    border: 1px solid rgba(166, 180, 200, 0.2);
}

.modal-footer {
    padding-top: 10px;
}
.btn-modal-grande {
    height: 54px; font-size: 15px; border-radius: 20px;
}