/* Botón flotante de WhatsApp (todo el sitio) + banner CTA reutilizable
   (home, producto, categoría). Ambos inyectados por whatsapp-widgets.js
   según los datos de /api/site-info.php (whatsapp_number/_message/_cta_text). */

/* ---- Botón flotante ---- */
.whatsapp-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 400;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #25d366, #128c7e);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 10px 28px rgba(18,140,126,.4), inset 0 1px 0 rgba(255,255,255,.35);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.whatsapp-fab:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 34px rgba(18,140,126,.5), inset 0 1px 0 rgba(255,255,255,.4);
}
.whatsapp-fab svg { width: 30px; height: 30px; position: relative; }

.whatsapp-fab-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37,211,102,.55);
  animation: whatsapp-pulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes whatsapp-pulse {
  0% { transform: scale(1); opacity: .7; }
  100% { transform: scale(1.6); opacity: 0; }
}

.whatsapp-fab-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(11,29,51,.92);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 8px 20px rgba(11,29,51,.25);
}
.whatsapp-fab:hover .whatsapp-fab-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(-4px);
}

@media (max-width: 640px) {
  .whatsapp-fab { right: 14px; bottom: 14px; width: 54px; height: 54px; }
  .whatsapp-fab svg { width: 26px; height: 26px; }
  .whatsapp-fab-tooltip { display: none; }
}

/* ---- Banner CTA (mismo lenguaje "navy liquid glass" que el panel de
   filtros: franja navy con brillos degradados, esta vez en verde WhatsApp
   en vez de magenta/naranja para que se lea como una acción distinta). ---- */
/* max-width/centrado los da la clase .wrap ya presente en el div (mismo
   contenedor que usa el resto del sitio) — acá solo el "chrome" visual y
   el espacio inferior. */
.whatsapp-cta-banner {
  margin-bottom: 40px;
  padding: 32px 36px;
  border-radius: 22px;
  background:
    radial-gradient(360px 220px at 8% 0%, rgba(37,211,102,.35), transparent 60%),
    radial-gradient(320px 240px at 100% 100%, rgba(255,93,0,.2), transparent 65%),
    var(--navy);
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 20px 50px rgba(11,29,51,.28), inset 0 1px 0 rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.whatsapp-cta-banner:empty { display: none; }

.whatsapp-cta-icon {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid rgba(255,255,255,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3ee08a;
}
.whatsapp-cta-icon svg { width: 28px; height: 28px; }

.whatsapp-cta-text-wrap { flex: 1 1 320px; min-width: 0; }
.whatsapp-cta-banner h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.3rem;
  color: #fff;
  line-height: 1.3;
}
.whatsapp-cta-sub { margin: 6px 0 0; font-size: .88rem; color: rgba(255,255,255,.6); }

.whatsapp-cta-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(90deg, #25d366, #128c7e);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: .95rem;
  padding: 14px 28px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(18,140,126,.4);
  transition: box-shadow .15s ease, transform .15s ease;
  white-space: nowrap;
}
.whatsapp-cta-btn:hover {
  box-shadow: 0 14px 30px rgba(18,140,126,.5);
  transform: translateY(-2px);
}
.whatsapp-cta-btn svg { width: 20px; height: 20px; }

@media (max-width: 760px) {
  .whatsapp-cta-banner { padding: 26px 22px; flex-direction: column; text-align: center; gap: 18px; }
  /* flex-basis:320px de .whatsapp-cta-text-wrap está pensado para el ancho
     en fila (desktop) — en columna (mobile) ese mismo valor se lee como
     alto mínimo y deja un hueco enorme antes del botón. Se resetea a
     "auto" para que solo ocupe lo que su contenido necesita. */
  .whatsapp-cta-text-wrap { flex: 0 1 auto; }
  .whatsapp-cta-btn { width: 100%; justify-content: center; }
}
