/* =======================================================
   MEDIMEX - Stylesheet
   Palette: Medical Blue / Clean White
   ======================================================= */

/* --- Tokens ------------------------------------------ */
:root {
  --blue-900: #0d2a5e;
  --blue-800: #1B4F9B;
  --blue-700: #2563bc;
  --blue-500: #3b82f6;
  --blue-200: #bfdbfe;
  --blue-100: #dbeafe;
  --blue-50:  #eff6ff;
  --blue-25:  #f8fbff;

  --navy:  #0f1f3d;
  --white: #ffffff;
  --gray-50:  #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;

  --green:  #059669;
  --orange: #d97706;
  --purple: #7c3aed;
  --teal:   #0d9488;
  --red:    #dc2626;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'DM Serif Display', Georgia, serif;

  --title-color: #1c2535;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --shadow-xl: 0 24px 60px rgba(27,79,155,.18);

  --transition: 240ms cubic-bezier(.4,0,.2,1);
}

/* --- Reset ------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  color: var(--gray-700);
  background: var(--white);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
[hidden] { display: none !important; }

/* --- Container --------------------------------------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons ----------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: .875rem;
  letter-spacing: .01em;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  user-select: none;
}
.btn--primary {
  background: var(--blue-800);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(27,79,155,.35);
}
.btn--primary:hover {
  background: var(--blue-900);
  box-shadow: 0 6px 24px rgba(27,79,155,.45);
  transform: translateY(-1px);
}
.btn--ghost {
  background: rgba(255,255,255,.15);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.4);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.25);
  border-color: rgba(255,255,255,.7);
}
.btn--outline {
  background: transparent;
  color: var(--blue-800);
  border: 1.5px solid var(--blue-200);
}
.btn--outline:hover {
  background: var(--blue-50);
  border-color: var(--blue-500);
  transform: translateY(-1px);
}
.btn--white {
  background: var(--white);
  color: var(--blue-800);
  font-weight: 700;
}
.btn--white:hover {
  background: var(--blue-50);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}
.btn--lg  { padding: 14px 32px; font-size: 1rem; }
.btn--sm  { padding: 8px 16px; font-size: .8125rem; }

/* --- Reveal al hacer scroll --------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(.16,1,.3,1), transform 700ms cubic-bezier(.16,1,.3,1);
}
.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* --- Section utils ----------------------------------- */
.section-badge {
  display: inline-block;
  background: var(--blue-50);
  color: var(--blue-800);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--blue-200);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.2;
  color: var(--title-color);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

/* =======================================================
   HEADER
   ======================================================= */
.header {
  position: fixed;
  top: 14px;
  left: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  border-radius: 30px;
  box-shadow: 0 18px 40px -10px rgba(13,42,94,.18), 0 4px 14px rgba(13,42,94,.07);
  transition: box-shadow 320ms ease, background 320ms ease;
}
.header.scrolled {
  box-shadow: 0 22px 48px -8px rgba(13,42,94,.26), 0 6px 18px rgba(13,42,94,.1);
}
.header__inner {
  position: relative;
  height: 108px;
  transition: height 460ms cubic-bezier(.16,1,.3,1);
}
.header.scrolled .header__inner { height: 64px; }

.header__brand-row {
  display: flex;
  align-items: center;
  height: 64px;
}
.header__spacer {
  flex: 1 1 0;
  transition: flex-grow 460ms cubic-bezier(.16,1,.3,1);
}
.header.scrolled .header__spacer { flex-grow: 0; }

.header__logo { flex-shrink: 0; }
.logo-img {
  height: 46px;
  width: auto;
  object-fit: contain;
  transition: height 420ms cubic-bezier(.16,1,.3,1);
}
.header.scrolled .logo-img { height: 36px; }

.header__actions {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  transition: flex-grow 460ms cubic-bezier(.16,1,.3,1);
}
.header.scrolled .header__actions { flex-grow: 0; margin-left: auto; }

/* Botón de WhatsApp del header - solo ícono, discreto */
.header__cta {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-800);
  box-shadow: none;
}
.header__cta:hover {
  background: var(--blue-100);
  box-shadow: none;
  transform: none;
}
.header__cta span { display: none; }

.nav {
  position: absolute;
  top: 68px;
  left: 50%;
  transform: translate(-50%, 0);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: top 460ms cubic-bezier(.16,1,.3,1), left 460ms cubic-bezier(.16,1,.3,1), transform 460ms cubic-bezier(.16,1,.3,1);
}
.header.scrolled .nav {
  top: 32px;
  left: calc(100% - 150px);
  transform: translate(-100%, -50%);
}
.nav__link {
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-600);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav__link:hover {
  color: var(--blue-800);
  background: var(--blue-50);
}
/* Language Switcher - texto simple, sin fondo ni borde */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 500;
  color: var(--gray-400);
  padding: 2px;
  cursor: pointer;
  transition: color 180ms ease;
  line-height: 1;
}
.lang-btn:hover {
  color: var(--blue-700);
}
.lang-btn.active {
  color: var(--blue-800);
  font-weight: 700;
}
.lang-divider {
  color: var(--gray-200);
  font-size: .72rem;
  user-select: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all var(--transition);
}

/* =======================================================
   HERO
   ======================================================= */
.hero {
  position: relative;
  min-height: 92vh;
  overflow: hidden;
}
.hero__slides {
  position: relative;
  width: 100%;
  min-height: 92vh;
}
.hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  transition: opacity 900ms ease, visibility 0ms linear 900ms;
}
.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
  transition: opacity 900ms ease;
}
.hero__bg {
  position: absolute;
  inset: 0;
}
.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero__overlay {
  position: absolute;
  inset: 0;
}
.hero__overlay--a {
  background: linear-gradient(135deg, rgba(13,42,94,.88) 0%, rgba(27,79,155,.72) 50%, rgba(13,42,94,.60) 100%);
}
.hero__overlay--b {
  background: linear-gradient(200deg, rgba(15,31,61,.92) 0%, rgba(13,42,94,.78) 55%, rgba(37,99,188,.55) 100%);
}
.hero__overlay--c {
  background: linear-gradient(115deg, rgba(27,79,155,.85) 0%, rgba(37,99,188,.68) 55%, rgba(59,130,246,.5) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  padding-top: 132px;
  padding-bottom: 48px;
  max-width: 680px;
}
.hero__content > * {
  opacity: 0;
  transform: translateY(18px);
}
.hero__slide.is-active .hero__content > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 800ms cubic-bezier(.16,1,.3,1), transform 800ms cubic-bezier(.16,1,.3,1);
}
.hero__slide.is-active .hero__content > *:nth-child(1) { transition-delay: 60ms; }
.hero__slide.is-active .hero__content > *:nth-child(2) { transition-delay: 160ms; }
.hero__slide.is-active .hero__content > *:nth-child(3) { transition-delay: 260ms; }
.hero__slide.is-active .hero__content > *:nth-child(4) { transition-delay: 360ms; }
@media (prefers-reduced-motion: reduce) {
  .hero__content > * { opacity: 1; transform: none; transition: none; }
  .hero__slide { transition: opacity 300ms ease, visibility 0ms linear 300ms; }
}
.hero__badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: var(--white);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(8px);
  margin-bottom: 20px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--white);
  margin-bottom: 20px;
  text-wrap: balance;
}
.hero__subtitle {
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  line-height: 1.7;
  color: rgba(255,255,255,.85);
  margin-bottom: 36px;
  max-width: 520px;
}
.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Puntos de navegación del slider */
.hero__dots {
  position: absolute;
  z-index: 2;
  right: 40px;
  bottom: 44px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.5);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: all 260ms ease;
}
.hero__dot:hover { border-color: rgba(255,255,255,.9); }
.hero__dot.is-active {
  background: var(--white);
  border-color: var(--white);
  height: 22px;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.hero__scroll span {
  display: block;
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,.7), transparent);
  margin: 0 auto;
  animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%,100% { opacity: 1; transform: scaleY(1); }
  50%      { opacity: .4; transform: scaleY(.6); }
}

/* =======================================================
   STATS
   ======================================================= */
.stats {
  background: linear-gradient(135deg, #0d2a5e 0%, #1B4F9B 100%);
  padding: 36px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  align-items: center;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  position: relative;
}
.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(255,255,255,.15);
}
.stat-item__value {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  white-space: nowrap;
  margin-bottom: 6px;
}
.stat-item__number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-item__suffix {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 700;
  color: #93c5fd;
  line-height: 1;
  margin-left: 2px;
}
.stat-item__label {
  font-size: .84rem;
  color: rgba(255,255,255,.82);
  font-weight: 500;
  letter-spacing: .02em;
  text-align: center;
  line-height: 1.3;
}

/* =======================================================
   ABOUT / QUIÉNES SOMOS
   ======================================================= */
.about {
  padding: 100px 0;
  background: var(--blue-25);
  position: relative;
  overflow: hidden;
}
.about::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/about-bg.jpg') center center / cover no-repeat;
  opacity: 0.18;
  z-index: 0;
  pointer-events: none;
}
.about__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}
.about__paragraphs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}
.about__p {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--gray-600);
}
.about__p--highlight {
  color: var(--title-color);
  font-weight: 600;
  border-left: 3px solid var(--blue-800);
  padding-left: 14px;
  background: rgba(27,79,155,.05);
  padding-top: 10px;
  padding-bottom: 10px;
  border-radius: 0 8px 8px 0;
}
.about__pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.about__pillar {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--white);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--blue-100);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.about__pillar:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-200);
}
.about__pillar strong {
  display: block;
  font-size: .84rem;
  color: var(--title-color);
  margin-bottom: 2px;
}
.about__pillar span {
  font-size: .75rem;
  color: var(--gray-600);
  line-height: 1.35;
}
.pillar-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--blue-50);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-800);
  border: 1px solid var(--blue-200);
}

/* =======================================================
   AI CHAT WIDGET - Diagnóstico Básico IA
   ======================================================= */
.ai-chat {
  display: flex !important;
  flex-direction: column !important;
  height: 520px !important;
  background: #ffffff !important;
  border-radius: 20px !important;
  box-shadow: 0 20px 60px rgba(27,79,155,.20), 0 4px 20px rgba(0,0,0,.08) !important;
  border: 1.5px solid #dbeafe !important;
  overflow: hidden !important;
}

/* Header */
.ai-chat__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #0d2a5e 0%, #1B4F9B 100%);
}
.ai-chat__avatar {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}
.ai-chat__header-info { flex: 1; min-width: 0; }
.ai-chat__title {
  font-family: var(--font-body) !important;
  font-size: .95rem !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}
.ai-chat__status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  color: rgba(255,255,255,.75);
  margin-top: 2px;
}
.ai-chat__dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: dotPulse 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes dotPulse {
  0%,100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74,222,128,.6); }
  50%      { opacity: .7; box-shadow: 0 0 0 4px rgba(74,222,128,.0); }
}
.ai-chat__badge-ia {
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .12em;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.3);
  flex-shrink: 0;
}

/* Messages scroll area */
.ai-chat__messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f0f4ff;
  scroll-behavior: smooth;
}
.ai-chat__messages::-webkit-scrollbar { width: 4px; }
.ai-chat__messages::-webkit-scrollbar-thumb { background: #bfdbfe; border-radius: 4px; }

/* Message rows */
.chat-msg {
  display: flex;
  gap: 8px;
  animation: msgSlide 260ms ease both;
}
@keyframes msgSlide {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg--bot  { align-self: flex-start; max-width: 92%; }
.chat-msg--user { align-self: flex-end;   max-width: 78%; flex-direction: row-reverse; }

.chat-msg__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}
.chat-msg--bot  .chat-msg__icon { background: #1B4F9B; color: #fff; }
.chat-msg--user .chat-msg__icon { background: #e5e7eb; color: #374151; }

/* Bubbles */
.chat-bubble {
  padding: 10px 14px;
  font-size: .84rem;
  line-height: 1.55;
  border-radius: 16px;
}
.chat-msg--bot .chat-bubble {
  background: #ffffff;
  color: #374151;
  border: 1px solid #e5e7eb;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.chat-msg--user .chat-bubble {
  background: #1B4F9B;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

/* Product recommendation card inside chat */
.chat-product-card {
  display: flex;
  gap: 10px;
  background: #f8fbff;
  border: 1.5px solid #bfdbfe;
  border-radius: 12px;
  padding: 10px;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(27,79,155,.08);
}
.chat-product-card__img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #e5e7eb;
}
.chat-product-card__info { flex: 1; min-width: 0; }
.chat-product-card__cat {
  font-size: .67rem;
  font-weight: 700;
  color: #3b82f6;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 3px;
}
.chat-product-card__name {
  font-size: .84rem;
  font-weight: 700;
  color: #0d2a5e;
  margin-bottom: 5px;
}
.chat-product-card__benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
.chat-product-card__benefits li {
  font-size: .74rem;
  color: #4b5563;
  display: flex;
  gap: 5px;
  align-items: flex-start;
  line-height: 1.4;
}
.chat-product-card__benefits li::before {
  content: '✓';
  color: #059669;
  font-weight: 700;
  font-size: .7rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.chat-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: #25d366;
  color: #fff !important;
  border-radius: 20px;
  font-size: .73rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 200ms, transform 200ms;
}
.chat-wa-btn:hover { background: #1ebe5e; transform: translateY(-1px); }

/* Typing animation */
.chat-typing-wrap {
  display: flex;
  gap: 8px;
  align-items: center;
  animation: msgSlide 260ms ease both;
}
.chat-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 9px 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #93c5fd;
  animation: bounce 1.2s ease-in-out infinite;
}
.chat-typing span:nth-child(2) { animation-delay: .18s; }
.chat-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes bounce {
  0%,80%,100% { transform: translateY(0); background: #93c5fd; }
  40%         { transform: translateY(-7px); background: #1B4F9B; }
}

/* Quick chips */
.ai-chat__chips {
  flex-shrink: 0;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}
.chat-chip {
  padding: 5px 11px;
  background: #eff6ff;
  color: #1B4F9B;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 180ms ease;
  white-space: nowrap;
  line-height: 1.3;
}
.chat-chip:hover {
  background: #1B4F9B;
  color: #ffffff;
  border-color: #1B4F9B;
  transform: translateY(-1px);
}

/* Input area */
.ai-chat__input-row {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}
.ai-chat__input {
  flex: 1;
  padding: 9px 15px;
  border: 1.5px solid #e5e7eb;
  border-radius: 22px;
  font-size: .84rem;
  font-family: var(--font-body);
  color: #374151;
  background: #f9fafb;
  outline: none;
  transition: border-color 200ms, background 200ms;
  min-width: 0;
}
.ai-chat__input::placeholder { color: #9ca3af; }
.ai-chat__input:focus { border-color: #3b82f6; background: #ffffff; }
.ai-chat__send {
  width: 38px;
  height: 38px;
  background: #1B4F9B;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 200ms, transform 200ms;
  box-shadow: 0 3px 10px rgba(27,79,155,.35);
}
.ai-chat__send:hover { background: #0d2a5e; transform: scale(1.08); }
.ai-chat__send:active { transform: scale(.95); }

/* Disclaimer */
.ai-chat__disclaimer {
  flex-shrink: 0;
  font-size: .68rem;
  color: var(--gray-400);
  text-align: center;
  padding: 5px 12px 7px;
  background: #ffffff;
  border-top: 1px solid var(--gray-100);
  line-height: 1.35;
}

/* =======================================================
   CATALOG
   ======================================================= */
.catalog {
  padding: 100px 0;
  background: var(--white);
}
.catalog__header {
  text-align: center;
  margin-bottom: 48px;
}
.catalog__subtitle {
  font-size: 1.0625rem;
  color: var(--gray-600);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Filtros */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 48px;
}
.filter-tab {
  padding: 9px 20px;
  border-radius: var(--radius-full);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  transition: all var(--transition);
  font-family: var(--font-body);
}
.filter-tab:hover {
  border-color: var(--blue-500);
  color: var(--blue-800);
  background: var(--blue-50);
}
.filter-tab.active {
  background: var(--blue-800);
  color: var(--white);
  border-color: var(--blue-800);
  box-shadow: 0 4px 14px rgba(27,79,155,.35);
}

/* Grid de productos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

/* Tarjetas */
.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--blue-200);
}
.product-card.hidden {
  display: none;
}
.product-card__img-wrap {
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  background: var(--gray-50);
  overflow: hidden;
}
.product-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 400ms ease;
}
.product-card:hover .product-card__img-wrap img {
  transform: scale(1.05);
}
.product-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--blue-800);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.product-card__badge--green  { background: var(--green); }
.product-card__badge--orange { background: var(--orange); }
.product-card__badge--purple { background: var(--purple); }
.product-card__badge--teal   { background: var(--teal); }
.product-card__badge--red    { background: var(--red); }

.product-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.product-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--title-color);
  line-height: 1.3;
}
.product-card__desc {
  font-size: .875rem;
  color: var(--gray-600);
  line-height: 1.55;
  flex: 1;
}
.product-card__btn { align-self: flex-start; margin-top: 4px; }

/* =======================================================
   CTA BANNER
   ======================================================= */
.cta-banner {
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 100%);
  padding: 72px 0;
}
.cta-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-banner__highlight {
  display: inline-block;
  background: rgba(251,191,36,.16);
  color: #fde68a;
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .01em;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(251,191,36,.35);
  margin-bottom: 14px;
}
.cta-banner__text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--white);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.cta-banner__text p {
  font-size: 1.0625rem;
  color: var(--blue-200);
  max-width: 520px;
  line-height: 1.65;
}

/* =======================================================
   CONTACT
   ======================================================= */
.contact {
  padding: 100px 0;
  background: var(--blue-25);
}
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.contact__desc {
  font-size: 1.0625rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 36px;
}
.contact__items {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}
.contact__item {
  display: flex;
  gap: 16px;
  align-items: center;
}
.contact__icon {
  width: 44px;
  height: 44px;
  background: var(--blue-50);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-800);
  flex-shrink: 0;
  border: 1px solid var(--blue-200);
}
.contact__item strong {
  display: block;
  font-size: .875rem;
  color: var(--gray-400);
  font-weight: 500;
  margin-bottom: 2px;
}
.contact__item p {
  font-size: .9375rem;
  color: var(--title-color);
  font-weight: 600;
}
.contact__wa-btn { display: inline-flex; }
.contact__map {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.contact__map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 380px;
  background: linear-gradient(135deg, var(--blue-50) 0%, var(--white) 100%);
  text-align: center;
  padding: 32px;
}
.contact__map-placeholder p {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--title-color);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.contact__map-placeholder span {
  font-size: .875rem;
  color: var(--gray-400);
}

/* =======================================================
   FOOTER
   ======================================================= */
.footer {
  background: var(--navy);
  padding-top: 64px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer__logo {
  height: 40px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
}
.footer__brand p {
  font-size: .9rem;
  color: var(--gray-400);
  line-height: 1.6;
}
.footer__links h4 {
  font-size: .8125rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 16px;
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer__links a {
  font-size: .9rem;
  color: rgba(255,255,255,.65);
  padding: 4px 0;
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--white); }
.footer__bottom {
  padding: 20px 0;
}
.footer__bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer__bottom p {
  font-size: .8125rem;
  color: var(--gray-400);
}
.footer__legal-link {
  font-size: .8125rem;
  color: var(--gray-400);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer__legal-link:hover { color: var(--white); }

.page .container > .section-title {
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.legal-content { max-width: 820px; margin: 0 auto; }
.legal-content .legal-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .8125rem;
  font-style: normal;
  color: var(--gray-500);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  padding: 7px 16px;
  border-radius: var(--radius-full);
  margin: 4px 0 36px;
}
.legal-content .legal-meta::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue-500);
  flex-shrink: 0;
}
.legal-section {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 24px;
  padding: 30px 0;
  border-bottom: 1px solid var(--gray-100);
}
.legal-section:first-of-type { padding-top: 0; }
.legal-section:last-of-type { border-bottom: none; padding-bottom: 0; }
.legal-section__num {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--blue-200);
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--blue-900);
  margin: 0 0 10px;
}
.legal-content p {
  font-size: .9375rem;
  line-height: 1.75;
  color: var(--gray-600);
  margin: 0;
}
.legal-content a { color: var(--blue-700); font-weight: 600; }
@media (max-width: 640px) {
  .legal-section { grid-template-columns: 1fr; gap: 8px; }
  .legal-section__num { display: none; }
}

/* =======================================================
   WHATSAPP FLOTANTE
   ======================================================= */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 6px 24px rgba(37,211,102,.45);
  transition: all var(--transition);
  animation: waPulse 3s ease-in-out infinite;
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(37,211,102,.6);
  animation: none;
}
@keyframes waPulse {
  0%,100% { box-shadow: 0 6px 24px rgba(37,211,102,.45); }
  50%      { box-shadow: 0 6px 40px rgba(37,211,102,.7); }
}

/* =======================================================
   SELECTOR DE CANTIDAD (stepper)
   ======================================================= */
.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.product-card__footer .product-card__btn { margin: 0; }

.qty-stepper {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-top: 10px;
  padding: 4px 6px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  transition: border-color var(--transition);
}
.product-card__footer .qty-stepper { margin-top: 0; }
.qty-stepper--active { border-color: var(--blue-700); }
.qty-stepper--lg { padding: 6px 10px; gap: 14px; }
.qty-stepper__btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-800);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.qty-stepper--lg .qty-stepper__btn { width: 34px; height: 34px; font-size: 1.125rem; }
.qty-stepper__btn:hover { background: var(--blue-100); }
.qty-stepper__value {
  min-width: 18px;
  text-align: center;
  font-weight: 700;
  color: var(--title-color);
}

/* =======================================================
   BARRA FLOTANTE DE PEDIDO
   ======================================================= */
.order-bar {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 998;
  background: var(--white);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-xl);
  padding: 10px 10px 10px 20px;
}
.order-bar__inner {
  display: flex;
  align-items: center;
  gap: 14px;
}
.order-bar__count {
  font-size: .875rem;
  font-weight: 600;
  color: var(--title-color);
  white-space: nowrap;
}

/* =======================================================
   MODAL DE PEDIDO
   ======================================================= */
.order-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.order-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,31,61,.55);
}
.order-modal__panel {
  position: relative;
  background: var(--white);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  max-height: 86vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: var(--shadow-xl);
}
.order-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.order-modal__title { margin-bottom: 6px; font-size: 1.375rem; }
.order-modal__hint { font-size: .875rem; color: var(--gray-600); margin-bottom: 18px; }
.order-modal__list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 22px; }
.order-modal__min-notice { font-size: .875rem; color: #92400e; background: #fffbeb; border: 1px solid #fde68a; padding: 12px 14px; border-radius: 8px; margin-bottom: 18px; }
.order-modal__empty { font-size: .875rem; color: var(--gray-400); }
.order-modal__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
}
.order-modal__item-name { flex: 1; font-size: .875rem; font-weight: 600; color: var(--title-color); }
.order-modal__item-qty { font-size: .8125rem; color: var(--blue-700); font-weight: 700; }
.order-modal__item-remove {
  border: none;
  background: none;
  color: var(--gray-400);
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.order-modal__item-remove:hover { color: var(--red); }

.order-form { display: flex; flex-direction: column; gap: 14px; }
.order-form__row { display: flex; flex-direction: column; gap: 5px; }
.order-form__row label { font-size: .8125rem; font-weight: 600; color: var(--gray-700); }
.order-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .9375rem;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color var(--transition);
}
.order-form input:focus {
  outline: none;
  border-color: var(--blue-700);
}
.order-form__submit { margin-top: 4px; justify-content: center; }

@media (max-width: 480px) {
  .order-bar { left: 12px; right: 84px; bottom: 16px; }
  .order-bar__inner { justify-content: space-between; }
  .order-modal__panel { padding: 24px 20px; }
}

/* =======================================================
   RESPONSIVE
   ======================================================= */
@media (max-width: 1024px) {
  .about__inner,
  .contact__inner { grid-template-columns: 1fr; gap: 48px; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header { top: 10px; left: 10px; right: 10px; border-radius: 24px; }
  .header__inner { height: 56px; }
  .header__brand-row { height: 56px; }
  .header__spacer { flex-grow: 0; }
  .logo-img { height: 34px; }
  .nav, .header__cta { display: none; }
  .hamburger { display: flex; }
  .nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px; left: 0; right: 0;
    transform: none;
    background: var(--white);
    border-top: 1px solid var(--gray-100);
    padding: 16px 24px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    border-radius: 0 0 18px 18px;
  }
  .nav.open .nav__link { padding: 10px 14px; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }

  .hero__actions { flex-direction: column; align-items: flex-start; }
  .cta-banner__inner { flex-direction: column; text-align: center; }
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom .container { justify-content: center; text-align: center; }

  .products-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
  .filter-tabs { gap: 6px; }
  .filter-tab { padding: 8px 14px; font-size: .8125rem; }
  .about__pillars { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-card__body { padding: 14px; }
  .product-card__name { font-size: .875rem; }
  .product-card__desc { font-size: .8125rem; }
  .wa-float { width: 50px; height: 50px; bottom: 20px; right: 20px; }
}

/* --- Product Detail (single-producto.php) --------------------- */
.product-detail__breadcrumb {
  font-size: .8125rem;
  color: var(--gray-400);
  margin-bottom: 28px;
}
.product-detail__breadcrumb a { color: var(--blue-700); }
.product-detail__breadcrumb a:hover { text-decoration: underline; }

.product-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.product-detail__media {
  position: sticky;
  top: 96px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.product-detail__media img { width: 100%; height: 100%; object-fit: contain; padding: 20px; }

.product-detail__info .product-card__badge {
  position: static;
  display: inline-block;
  margin-bottom: 14px;
}
.product-detail__title { margin: 0 0 18px; }
.product-detail__desc {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 20px;
}
.product-detail__benefits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.product-detail__benefits li {
  position: relative;
  padding-left: 26px;
  color: var(--gray-700);
  font-size: .9375rem;
  line-height: 1.5;
}
.product-detail__benefits li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue-700);
}
.product-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.product-detail__notice {
  font-size: .8125rem;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-200);
  padding-top: 16px;
}

@media (max-width: 860px) {
  .product-detail__grid { grid-template-columns: 1fr; gap: 28px; }
  .product-detail__media { position: static; }
}
