/* ══ RESET & VARIABLES ════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --deep: #080e18;
  --panel: #080d18;
  --orange: #e87b20;
  --blue: #5aadcf;
  --accent-orange: #e87b20;
  --accent-blue: #5aadcf;
  --white: #f0f4f8;
  --muted: rgba(240,244,248,0.42);
}
html { scroll-behavior: smooth; }
body {
  background: var(--deep);
  font-family: 'Barlow', sans-serif;
  color: var(--white);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ══ NAVBAR ══════════════════════════════════════════ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 52px; z-index: 200;
  background: rgba(8,14,24,0.0); backdrop-filter: blur(0px);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s;
}
.navbar.scrolled {
  background: rgba(6,9,15,0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 15px 52px;
}
.navbar-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 40px; /* Altura correcta para evitar recortes */
  text-decoration: none;
  transition: height 0.3s ease;
}
.navbar-logo img {
  height: 100%;
  width: auto;
  filter: brightness(0.95) drop-shadow(0 4px 12px rgba(0,0,0,0.4));
  transition: all 0.3s ease;
}
.navbar-logo:hover img {
  filter: brightness(1.05) drop-shadow(0 6px 18px rgba(0,0,0,0.6));
  transform: scale(1.02);
}
.navbar.scrolled .navbar-logo {
  height: 32px;
}
.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}
@media (min-width: 769px) {
  .nav-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    gap: 36px;
    white-space: nowrap;
  }
}
.nav-links a {
  font-family: 'Barlow Condensed', sans-serif; font-size: 0.78rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(240,244,248,0.45); text-decoration: none; transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-cta {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--orange);
  border: 1px solid rgba(232,123,32,0.4); padding: 8px 22px; text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav-cta:hover { background: var(--orange); color: var(--deep); }

/* ══ FOOTER ════════════════════════════════════════ */
.site-footer {
  background: #050b13;
  border-top: 1px solid rgba(90,173,207,0.1);
  padding: 60px 0 0;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 56px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 48px 52px;
  flex-wrap: wrap;
}

/* Brand block */
.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  flex: 0 0 auto;
}
.footer-logo {
  width: clamp(140px, 14vw, 190px);
  filter: brightness(0.88);
  transition: filter 0.3s;
}
.footer-logo:hover { filter: brightness(1.05); }
.footer-tagline {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: rgba(240,244,248,0.25);
}

/* Divisor vertical */
.footer-divider {
  width: 1px;
  align-self: stretch;
  background: rgba(255,255,255,0.06);
  flex-shrink: 0;
}

/* Nav */
.footer-nav, .footer-contact { flex: 0 0 auto; }
.footer-nav-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent-orange);
  margin-bottom: 18px;
}
.footer-nav ul, .footer-contact ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav ul li a {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.1em;
  color: rgba(240,244,248,0.45);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-nav ul li a:hover { color: var(--white); }

/* Contacto */
.footer-contact ul li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(240,244,248,0.4);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}
.footer-contact ul li svg {
  width: 14px;
  flex-shrink: 0;
  opacity: 0.5;
}
.footer-contact ul li a {
  color: rgba(240,244,248,0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-branch-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 244, 248, 0.85);
  margin-bottom: 6px;
}
.footer-contact ul li a:hover { color: var(--accent-blue); }

/* Bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(240,244,248,0.2);
}
.footer-credit a {
  color: rgba(90,173,207,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-credit a:hover { color: var(--accent-blue); }

/* ══ WHATSAPP FLOTANTE MULTI-SUCURSAL ═══════════════════════════ */
.wa-widget {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: 'Montserrat', 'Inter', 'Segoe UI', sans-serif;
}

.wa-menu {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  width: 290px;
  background: rgba(14, 21, 33, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.6), 0 0 24px rgba(37, 211, 102, 0.18);
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              visibility 0.28s;
  pointer-events: none;
}

.wa-widget.open .wa-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.wa-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 6px 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.wa-menu-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #25d366;
  text-transform: uppercase;
}

.wa-menu-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s, transform 0.2s;
}

.wa-menu-close:hover {
  color: #fff;
  transform: scale(1.15);
}

.wa-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: #fff;
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.wa-item:hover {
  background: rgba(37, 211, 102, 0.12);
  border-color: rgba(37, 211, 102, 0.35);
  transform: translateX(-3px);
}

.wa-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.2s;
}

.wa-item:hover .wa-item-icon {
  background: #25d366;
  color: #fff;
  transform: scale(1.08);
}

.wa-item-icon svg {
  width: 20px;
  height: 20px;
}

.wa-item-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.wa-item-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.2px;
}

.wa-item-desc {
  font-size: 11px;
  color: rgba(240, 244, 248, 0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wa-item-action {
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  transition: color 0.2s, transform 0.2s;
}

.wa-item-action svg {
  width: 16px;
  height: 16px;
}

.wa-item:hover .wa-item-action {
  color: #25d366;
  transform: translateX(2px);
}

/* Botón flotante principal */
.wa-float {
  height: 52px;
  padding: 0 22px 0 18px;
  background: #25d366;
  border: none;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: 'Montserrat', 'Inter', 'Segoe UI', sans-serif;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.1px;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, background 0.25s;
  position: relative;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.wa-float:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

.wa-widget.open .wa-float {
  background: #1eb956;
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.6);
}

.wa-icon {
  width: 26px;
  height: 26px;
  position: relative;
  z-index: 1;
}

.wa-icon-close {
  display: none;
  width: 22px;
  height: 22px;
}

.wa-widget.open .wa-icon-main {
  display: none;
}

.wa-widget.open .wa-icon-close {
  display: block;
}

.wa-text {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

/* Pulso animado */
.wa-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50px;
  background: #25d366;
  animation: waPulse 2.4s ease-out infinite;
  z-index: 0;
  pointer-events: none;
}

.wa-widget.open .wa-pulse {
  display: none;
}

@keyframes waPulse {
  0%   { transform: scale(1);   opacity: 0.6; }
  70%  { transform: scale(1.6); opacity: 0;   }
  100% { transform: scale(1.6); opacity: 0;   }
}

/* ══ MODAL SUCURSALES (DESDE BOTONES CTA) ═══════════════════ */
.branch-modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.branch-modal-wrap.open {
  opacity: 1;
  visibility: visible;
}
.branch-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 7, 12, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.branch-modal {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 380px;
  background: rgba(14, 21, 33, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 30px rgba(232, 123, 32, 0.15);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: scale(0.92) translateY(12px);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.branch-modal-wrap.open .branch-modal {
  transform: scale(1) translateY(0);
}
.branch-modal-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(232, 123, 32, 0.08);
  border: 1px solid rgba(232, 123, 32, 0.25);
  border-radius: 12px;
  margin-bottom: 4px;
}
.bmc-model {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bmc-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Menú hamburguesa (toggle) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 250;
  padding: 0;
}
.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--white);
  transition: transform 0.3s, opacity 0.3s;
}
.mobile-only {
  display: none !important;
}
body.no-scroll {
  overflow: hidden !important;
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .navbar { padding: 18px 24px; }
  .navbar.scrolled { padding: 12px 24px; }
  .navbar-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: 24px;
    display: inline-flex;
    align-items: center;
  }
  .navbar-logo img {
    height: 100%;
    width: auto;
    position: static;
    top: auto;
  }
  .navbar.scrolled .navbar-logo {
    height: 20px;
  }
  
  /* Mostrar botón de menú hamburguesa */
  .menu-toggle {
    display: flex;
    margin-left: auto; /* Empuja el botón a la derecha */
  }
  
  /* Mostrar elementos específicos de móvil */
  .mobile-only {
    display: block !important;
  }
  
  /* Ocultar botón Consultar del header principal */
  .navbar > .nav-cta {
    display: none !important;
  }
  
  /* Convertir enlaces en overlay móvil */
  .nav-links {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #050b13; /* Solid dark background to prevent bleed-through and overlap */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 90px 24px 40px;
    z-index: 150;
    overflow-y: auto;
  }
  
  /* Rediseño completo para menú desplegado en pantalla completa sin scroll */
  .navbar.menu-open {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #050b13 !important; /* Fondo 100% opaco */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 999999 !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .navbar.menu-open .navbar-logo {
    position: absolute !important;
    top: 24px !important;
    left: 24px !important;
    transform: none !important;
    height: 32px !important;
    display: inline-flex !important;
  }

  .navbar.menu-open .menu-toggle {
    position: absolute !important;
    top: 31px !important;
    right: 24px !important;
    display: flex !important;
    z-index: 1000000 !important;
  }

  .navbar.menu-open .nav-links {
    display: flex !important;
    position: absolute !important;
    top: 80px !important;
    left: 20px !important;
    right: 20px !important;
    bottom: 20px !important;
    height: calc(100vh - 100px) !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 18px !important;
    background: transparent !important;
    padding: 24px 10px 40px !important;
    margin: 0 !important;
    z-index: 999998 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  .navbar.menu-open .nav-links > li:not(.nav-contact-wrapper) > a {
    font-size: 1.35rem !important;
    font-family: 'Barlow Condensed', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.16em !important;
    text-transform: uppercase !important;
    color: var(--white) !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
    text-align: center !important;
    display: block !important;
  }

  .navbar.menu-open .nav-links > li:not(.nav-contact-wrapper) > a:hover,
  .navbar.menu-open .nav-links > li:not(.nav-contact-wrapper) > a.active {
    color: var(--orange) !important;
  }

  /* Contenedor del botón y dropdown de contacto en menú móvil */
  .nav-contact-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 320px !important;
    margin-top: 12px !important;
  }

  .nav-cta-mobile {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 280px !important;
    font-size: 1.15rem !important;
    color: var(--orange) !important;
    border: 1.5px solid var(--orange) !important;
    padding: 11px 24px !important;
    border-radius: 8px !important;
    font-family: 'Barlow Condensed', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.16em !important;
    background: rgba(232, 123, 32, 0.08) !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }

  .nav-cta-mobile:hover,
  .nav-cta-mobile[aria-expanded="true"] {
    background: var(--orange) !important;
    color: var(--deep) !important;
    box-shadow: 0 4px 20px rgba(232, 123, 32, 0.35) !important;
  }

  .nav-cta-chevron {
    width: 18px !important;
    height: 18px !important;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }

  .nav-cta-mobile[aria-expanded="true"] .nav-cta-chevron {
    transform: rotate(180deg) !important;
  }

  /* Desplegable de contactos hacia abajo */
  .nav-contact-dropdown {
    width: 100% !important;
    max-width: 280px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    margin-top: 0 !important;
    max-height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.3s ease,
                margin-top 0.3s ease !important;
  }

  .nav-contact-dropdown.open {
    max-height: 280px !important;
    opacity: 1 !important;
    margin-top: 12px !important;
    pointer-events: all !important;
  }

  .nav-contact-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 10px 14px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    transition: background 0.2s, border-color 0.2s, transform 0.2s !important;
  }

  .nav-contact-item:hover,
  .nav-contact-item:active {
    background: rgba(37, 211, 102, 0.16) !important;
    border-color: rgba(37, 211, 102, 0.45) !important;
    transform: translateX(3px) !important;
  }

  .nav-contact-icon {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 50% !important;
    background: rgba(37, 211, 102, 0.18) !important;
    color: #25D366 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .nav-contact-icon svg {
    width: 16px !important;
    height: 16px !important;
  }

  .nav-contact-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    flex: 1 !important;
  }

  .nav-contact-name {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.15 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
  }

  .nav-contact-desc {
    font-family: 'Barlow', sans-serif !important;
    font-size: 0.72rem !important;
    color: rgba(240, 244, 248, 0.65) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 400 !important;
  }

  .nav-contact-arrow {
    width: 14px !important;
    height: 14px !important;
    color: rgba(240, 244, 248, 0.4) !important;
    transition: transform 0.2s, color 0.2s !important;
  }

  .nav-contact-item:hover .nav-contact-arrow {
    transform: translateX(2px) !important;
    color: #25D366 !important;
  }

  /* Animación del menú hamburguesa a "X" */
  .navbar.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .navbar.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  .navbar.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .footer-inner { flex-direction: column; gap: 36px; padding: 0 28px 40px; }
  .footer-divider { display: none; }
  .wa-widget { bottom: 22px; right: 22px; }
  .wa-menu { width: 260px; bottom: calc(100% + 10px); }
  .wa-float { width: auto; height: 46px; padding: 0 16px 0 12px; gap: 8px; font-size: 14px; border-radius: 40px; }
  .wa-icon  { width: 22px; height: 22px; }
  .wa-pulse { border-radius: 40px; }
}

/* Responsiveness for medium screen desktop resolutions to prevent nav overlap */
@media (max-width: 1200px) and (min-width: 769px) {
  .nav-links {
    gap: 24px !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    white-space: nowrap !important;
  }
  .nav-links a { font-size: 0.74rem !important; }
  .navbar { padding: 22px 28px !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   🤖 ASESOR COMERCIAL AI (CHATBOT FLOTANTE)
   ═══════════════════════════════════════════════════════════════════ */
.ai-chat-widget {
  position: fixed;
  z-index: 10000;
  font-family: 'Barlow', 'Montserrat', 'Inter', sans-serif;
}

/* Botón flotante para abrir/minimizar (ubicado por arriba de "Contactanos") */
.ai-chat-float {
  position: fixed;
  bottom: 96px;
  right: 32px;
  height: 50px;
  padding: 0 20px 0 16px;
  background: linear-gradient(135deg, #0e1e38 0%, #172a4d 100%);
  border: 1px solid rgba(232, 123, 32, 0.55);
  border-radius: 50px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(232, 123, 32, 0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  cursor: pointer;
  z-index: 9999;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.25s ease,
              border-color 0.25s ease;
  user-select: none;
}

.ai-chat-float:hover {
  transform: scale(1.05);
  border-color: #e87b20;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.55), 0 0 22px rgba(232, 123, 32, 0.45);
}

.ai-chat-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e87b20;
  flex-shrink: 0;
}

.ai-chat-text {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #f0f4f8;
}

.ai-chat-badge {
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(37, 211, 102, 0.18);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.4);
  padding: 2px 7px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Ocultar el botón launcher cuando la ventana del chat está abierta */
.ai-chat-widget.open .ai-chat-float {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.9);
}

/* Ocultar Asesor IA completamente cuando el menú de WhatsApp esté abierto (evita superposición con Administración) */
body.wa-menu-open .ai-chat-float,
body:has(.wa-widget.open) .ai-chat-float,
.ai-chat-widget.wa-open .ai-chat-float,
body.wa-menu-open .ai-chat-window,
body:has(.wa-widget.open) .ai-chat-window,
.ai-chat-widget.wa-open .ai-chat-window {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: scale(0.7) translateY(12px) !important;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s !important;
}

/* Ventana emergente del Chatbot */
.ai-chat-window {
  position: fixed;
  bottom: 96px;
  right: 32px;
  width: 380px;
  height: 600px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 120px);
  background: #0b1320;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(232, 123, 32, 0.35);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65), 0 0 30px rgba(232, 123, 32, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 10000;
  transform-origin: bottom right;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.94);
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
              visibility 0.28s;
}

.ai-chat-widget.open .ai-chat-window {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Botón flotante para cerrar/minimizar dentro de la ventana */
.ai-chat-btn-close-floating {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(14, 21, 33, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10005;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.ai-chat-btn-close-floating:hover {
  background: #e87b20;
  border-color: #e87b20;
  transform: scale(1.1);
}

/* Contenedor del iframe a pantalla completa de la ventana */
.ai-chat-iframe-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: transparent;
}

.ai-chat-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  border-radius: 16px;
}

/* Ajustes Responsive en Móviles */
@media (max-width: 768px) {
  .ai-chat-float {
    bottom: 78px;
    right: 22px;
    height: 44px;
    padding: 0 14px 0 12px;
    gap: 8px;
    font-size: 13px;
  }
  .ai-chat-icon {
    width: 20px;
    height: 20px;
  }
  .ai-chat-text {
    font-size: 0.8rem;
  }
  .ai-chat-window {
    bottom: 76px;
    right: 16px;
    width: calc(100vw - 32px);
    height: min(540px, calc(100vh - 100px));
    border-radius: 14px;
  }
}


