/* =====================================================================
   WLPS Intelligence — versión estática limpia
   style.css · sin frameworks · compatible con todos los navegadores
   Paleta y tipografía originales conservadas.
   ===================================================================== */

/* ---------- Base global (idéntico al diseño original) ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  margin: 0;
  background: #0A0A0E;
  color: #ECECF1;
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font-family: inherit; }

::selection { background: rgba(124,92,255,.4); color: #fff; }
::placeholder { color: #6E6E7C; }

/* fuente monoespaciada auxiliar con fallback de sistema */
.mono { font-family: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ---------- Animaciones (originales) ---------- */
@keyframes wlpsTicker { to { transform: translateX(-50%); } }
@keyframes wlpsBlink  { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes wlpsFade   { from { opacity: 0; } to { opacity: 1; } }
@keyframes wlpsRise   { from { opacity: 0; transform: translateY(22px) scale(.985); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Layout ---------- */
.wrap { width: min(1180px, 92%); margin: 0 auto; }
.section { padding: 110px 0; }

/* ---------- Barra de navegación ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60; overflow: hidden;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  background: linear-gradient(90deg, rgba(24,12,46,.82), rgba(8,6,20,.78) 35%, rgba(8,6,20,.78) 65%, rgba(10,16,44,.82));
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled {
  background: linear-gradient(90deg, rgba(24,12,46,.97), rgba(8,6,20,.97) 35%, rgba(8,6,20,.97) 65%, rgba(10,16,44,.97));
  box-shadow: 0 10px 34px -16px rgba(80,40,200,.45);
}

/* ---------- Botón hamburguesa (oculto en escritorio) ---------- */
.nav-burger {
  display: none;
  align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none; padding: 0;      /* área táctil mínima 44x44 */
  border-radius: 10px; border: 1px solid rgba(255,255,255,.14);
  background: rgba(16,16,23,.5); color: #ECECF1; cursor: pointer;
  transition: border-color .25s;
}
.nav-burger:hover { border-color: rgba(124,92,255,.6); }
.nav-burger span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s, opacity .2s; }
.nav-burger span + span { margin-top: 4px; }
.nav-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Menú móvil desplegable (oculto en escritorio) ---------- */
.mobile-menu {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; z-index: 59;
  padding-top: 60px;                 /* deja pasar la barra fija de 60px arriba */
  background: linear-gradient(180deg, rgba(18,12,34,.98), rgba(8,6,20,.98));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(124,92,255,.28);
  box-shadow: 0 20px 44px -18px rgba(80,40,200,.55);
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu-inner { width: min(1220px, 94%); margin: 0 auto; padding: 10px 0 20px; display: flex; flex-direction: column; }
.mm-link {
  display: flex; align-items: center; min-height: 52px; padding: 6px 6px;
  font-size: 15.5px; font-weight: 500; color: #C9C9D4; text-decoration: none;
  letter-spacing: .01em; border-bottom: 1px solid rgba(255,255,255,.07);
  transition: color .2s;
}
.mm-link:hover, .mm-link:active { color: #ECECF1; }
.mm-cta {
  display: flex; align-items: center; justify-content: center;
  margin-top: 14px; min-height: 52px; padding: 6px 18px;
  font-size: 15px; font-weight: 600; color: #fff; text-decoration: none;
  border-radius: 10px; background: linear-gradient(90deg, #2A5CFF, #8B5CF6 55%, #C26BFF);
  box-shadow: 0 10px 26px -12px rgba(139,92,246,.7);
}

/* ---------- Enlaces / botones con hover (antes style-hover) ---------- */
.lnk { transition: color .25s; }
.lnk:hover { color: #ECECF1; }

.cta-grad { transition: opacity .25s; }
.cta-grad:hover { opacity: .92; }

.btn-primary { transition: background .25s; }
.btn-primary:hover { background: #8E70FF; }

.btn-ghost { transition: border-color .25s, color .25s; }
.btn-ghost:hover { border-color: rgba(124,92,255,.6); color: #fff; }

.hero-cta-primary { transition: transform .25s, box-shadow .25s; }
.hero-cta-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px -10px rgba(124,92,255,.75); }

.hero-cta-ghost { transition: transform .25s, border-color .25s, color .25s; }
.hero-cta-ghost:hover { border-color: rgba(124,92,255,.6); color: #fff; transform: translateY(-2px); }

.cap-card { transition: background .3s; }
.cap-card:hover { background: rgba(124,92,255,.05); }

.svc-card { transition: transform .3s, border-color .3s, box-shadow .3s; }
.svc-card:hover { transform: translateY(-4px); border-color: rgba(124,92,255,.4); box-shadow: 0 20px 44px -22px rgba(60,30,160,.5); }

.pkg-card { transition: transform .3s, box-shadow .3s; }
.pkg-card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -22px rgba(60,30,160,.55); }

.contact-card { transition: border-color .25s, transform .25s; }
.contact-card:hover { border-color: rgba(124,92,255,.55); transform: translateX(5px); }

.icon-btn { transition: color .25s, border-color .25s; }
.icon-btn:hover { color: #fff; border-color: rgba(124,92,255,.6); }

.qty-btn { transition: background .2s; }
.qty-btn:hover { background: rgba(124,92,255,.2); }

.remove-btn { transition: color .25s; }
.remove-btn:hover { color: #FF7A9C; }

/* ---------- Campos de formulario (antes style-focus) ---------- */
.field { transition: border-color .25s; }
.field:focus { border-color: rgba(124,92,255,.6); outline: none; }

/* ---------- Modal ficha de servicio ---------- */
.modal-veil {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(5,5,9,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: grid; place-items: center; padding: 20px; animation: wlpsFade .25s ease;
}
.modal-veil[hidden] { display: none; }

/* ---------- Botón flotante carrito ---------- */
.cart-fab {
  position: fixed; bottom: 26px; right: 26px; z-index: 70;
  display: flex; align-items: center; gap: 10px; padding: 14px 22px;
  border-radius: 999px; border: none;
  background: linear-gradient(90deg, #2A5CFF, #8B5CF6 55%, #C26BFF);
  color: #fff; font-size: 13.5px; font-weight: 600; cursor: pointer;
  box-shadow: 0 14px 34px -10px rgba(139,92,246,.6);
  transition: opacity .25s;
}
.cart-fab:hover { opacity: .92; }
.cart-fab[hidden] { display: none; }

/* ---------- Drawer / lista de cotización ---------- */
.drawer-veil {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(5,5,9,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  transition: opacity .3s; opacity: 0; pointer-events: none;
}
.drawer-veil.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 91;
  width: min(430px, 100%);
  background: linear-gradient(200deg, #14122A, #0C0C13 55%);
  border-left: 1px solid rgba(255,255,255,.1);
  transform: translateX(103%);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; z-index: 120;
  transform: translate(-50%, 90px);
  background: #16142B; border: 1px solid rgba(124,92,255,.4); border-radius: 10px;
  padding: 13px 24px; font-size: 13.5px;
  display: flex; gap: 10px; align-items: center;
  box-shadow: 0 14px 40px -10px rgba(0,0,0,.7);
  transition: transform .4s cubic-bezier(.2,.7,.2,1); max-width: 92%;
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- Grids reutilizables ---------- */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.grid-auto-fit { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.form-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; }
.cotizar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 44px; align-items: start; }

/* =====================================================================
   RESPONSIVE — móvil real
   ===================================================================== */
@media (max-width: 900px) {
  .cotizar-grid { gap: 30px; }
}

@media (max-width: 760px) {
  .section { padding: 66px 0; }
  /* !important: vence los display:inline puestos en el atributo style del HTML */
  .nav-menu { display: none !important; }           /* oculta TODA la nav horizontal */
  .nav-cta  { display: none !important; }            /* oculta el CTA desktop */
  .nav-burger { display: inline-flex !important; }   /* solo se ve el hamburguesa */
  .mobile-menu { display: block !important; }        /* se habilita el panel desplegable */
  .nav-inner { height: 60px !important; width: min(1220px, 92%) !important; }  /* ~16px de aire a cada lado */
  .nav-logo span:nth-child(1) { font-size: 18px !important; }             /* WLPS más chico */
  .nav-logo span:nth-child(3) { font-size: 12.5px !important; letter-spacing: .16em !important; }
  .hero { padding-top: 108px !important; min-height: auto !important; }
  .hero-ticker { margin-top: 54px !important; }
}

@media (max-width: 560px) {
  .form-row2, .checks { grid-template-columns: 1fr; }
  .cart-fab { bottom: 18px; right: 18px; }
  .toast { bottom: 18px; }
  .nav-cta { padding: 9px 15px !important; font-size: 12.5px !important; }
}

/* pantallas muy pequeñas: apila botones de tarjetas para que no se aprieten */
@media (max-width: 380px) {
  .card-actions { flex-direction: column; }
}

/* =====================================================================
   CHATBOT WLPS  (bloque añadido — no altera estilos previos)
   ===================================================================== */

/* Única regla que toca algo existente: evita el choque visual con el
   botón flotante del carrito, apilándolo por encima del chatbot. */
.cart-fab { bottom: 96px; }

/* --- Botón flotante --- */
.wlps-chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 75;
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #2A5CFF, #8B5CF6 55%, #C26BFF);
  box-shadow: 0 14px 34px -10px rgba(139,92,246,.65);
  transition: transform .25s, box-shadow .25s;
}
.wlps-chat-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 18px 40px -10px rgba(139,92,246,.85); }
.wlps-chat-fab.open .wlps-chat-fab-ico { display: none; }
.wlps-chat-fab.open::before { content: "✕"; font-size: 20px; }

/* --- Ventana --- */
.wlps-chat-window {
  position: fixed; bottom: 92px; right: 24px; z-index: 78;
  width: min(370px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 140px));
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid rgba(124,92,255,.28); border-radius: 18px;
  background: linear-gradient(190deg, #14122A, #0C0C13 60%);
  box-shadow: 0 26px 60px -20px rgba(0,0,0,.75);
  animation: wlpsChatIn .28s cubic-bezier(.2,.7,.2,1);
}
.wlps-chat-window[hidden] { display: none; }
@keyframes wlpsChatIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* --- Cabecera --- */
.wlps-chat-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(90deg, rgba(42,92,255,.16), rgba(194,107,255,.16));
}
.wlps-chat-title { display: flex; align-items: center; gap: 10px; }
.wlps-chat-title strong { display: block; font-size: 14px; color: #ECECF1; }
.wlps-chat-sub { font-size: 11px; color: #9A9AA8; }
.wlps-chat-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 3px rgba(74,222,128,.18); flex: none; }
.wlps-chat-close {
  width: 32px; height: 32px; border-radius: 8px; flex: none; font-size: 14px; cursor: pointer;
  border: 1px solid rgba(255,255,255,.12); background: transparent; color: #9A9AA8;
  transition: color .2s, border-color .2s;
}
.wlps-chat-close:hover { color: #fff; border-color: rgba(124,92,255,.6); }

/* --- Mensajes --- */
.wlps-chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.wlps-chat-msg { max-width: 84%; padding: 10px 13px; font-size: 13.5px; line-height: 1.5; border-radius: 14px; white-space: pre-line; word-wrap: break-word; }
.wlps-chat-msg.bot  { align-self: flex-start; background: #1A1A24; color: #ECECF1; border: 1px solid rgba(255,255,255,.06); border-bottom-left-radius: 5px; }
.wlps-chat-msg.user { align-self: flex-end; background: linear-gradient(135deg, #7C5CFF, #8B5CF6); color: #fff; border-bottom-right-radius: 5px; }
.wlps-chat-msg.bot strong { color: #C9B8FF; }

/* --- Botones de respuesta rápida --- */
.wlps-chat-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.wlps-chat-actions:empty { display: none; }
.wlps-chat-btn {
  padding: 9px 14px; font-size: 12.5px; font-weight: 600; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(124,92,255,.45); background: rgba(124,92,255,.10); color: #D9D2FF;
  transition: background .2s, border-color .2s, color .2s;
}
.wlps-chat-btn:hover { background: rgba(124,92,255,.22); border-color: rgba(124,92,255,.8); color: #fff; }
.wlps-chat-btn.primary { background: #7C5CFF; border-color: #7C5CFF; color: #fff; }
.wlps-chat-btn.primary:hover { background: #8E70FF; }

/* --- Fila de entrada de texto --- */
.wlps-chat-input-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); }
.wlps-chat-input-row[hidden] { display: none; }
.wlps-chat-input {
  flex: 1; padding: 11px 13px; font-size: 13.5px; color: #ECECF1; outline: none;
  background: #0A0A0E; border: 1px solid rgba(255,255,255,.12); border-radius: 10px;
  transition: border-color .2s;
}
.wlps-chat-input:focus { border-color: rgba(124,92,255,.6); }
.wlps-chat-send {
  width: 42px; flex: none; border: none; border-radius: 10px; cursor: pointer; color: #fff; font-size: 15px;
  background: linear-gradient(135deg, #7C5CFF, #8B5CF6);
}
.wlps-chat-send:hover { opacity: .92; }

/* --- Responsive --- */
@media (max-width: 560px) {
  .wlps-chat-fab { bottom: 18px; right: 18px; }
  .wlps-chat-window { right: 12px; left: 12px; width: auto; bottom: 84px; height: min(72vh, 560px); }
  .cart-fab { bottom: 86px; }
}
