/* ============================================================
   new-articles-banner.css
   Aviso flotante de artículos nuevos. Inicia COLAPSADO como
   pastilla compacta bottom-left; se expande a card cuando el
   usuario la toca. Rediseñado tras feedback: la versión anterior
   ocupaba demasiado espacio en móvil y tapaba contenido.
   ============================================================ */

/* ── Contenedor base ── */
.tp-nab {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 90000;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.tp-nab[hidden] { display: none !important; }

/* ── Estado colapsado: solo la pastilla ── */
.tp-nab.tp-nab-collapsed .tp-nab-panel { display: none; }

/* ── Estado expandido: solo el panel ── */
.tp-nab:not(.tp-nab-collapsed) .tp-nab-pill { display: none; }

/* ─────────────────────────────────────────────
   PASTILLA COMPACTA (colapsada)
   ───────────────────────────────────────────── */
.tp-nab-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  background: #fff;
  border: 1px solid #e5e0f0;
  border-left: 3px solid #4a2d8a;
  border-radius: 16px;
  padding: 10px 14px 10px 12px;
  box-shadow: 0 6px 20px rgba(74, 45, 138, .15);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: #1e0b4b;
  transition: transform .15s, box-shadow .15s, background .15s;
  animation: tpNabPillIn .35s ease-out;
}
.tp-nab-pill:hover,
.tp-nab-pill:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(74, 45, 138, .22);
  background: #faf7ff;
  outline: none;
}
.tp-nab-pill-icon { font-size: 1.2rem; line-height: 1; flex-shrink: 0; }
.tp-nab-pill-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.tp-nab-pill-eyebrow {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #4a2d8a;
}
.tp-nab-pill-title {
  font-size: .86rem;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tp-nab-pill-extra {
  font-size: .74rem;
  font-weight: 500;
  color: #6b5a94;
}
.tp-nab-pill-caret {
  font-size: .7rem;
  opacity: .5;
  transition: transform .2s;
  flex-shrink: 0;
}

@keyframes tpNabPillIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────
   PANEL EXPANDIDO
   ───────────────────────────────────────────── */
.tp-nab-panel {
  position: relative;
  max-width: 300px;
  background: #fff;
  border: 1px solid #e5e0f0;
  border-left: 4px solid #4a2d8a;
  border-radius: 14px;
  box-shadow: 0 10px 34px rgba(74, 45, 138, .2);
  padding: 14px 18px 12px 16px;
  animation: tpNabPanelIn .28s ease-out;
}

@keyframes tpNabPanelIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Botón cerrar permanente (X) */
.tp-nab-close {
  position: absolute;
  top: 4px;
  right: 6px;
  background: transparent;
  border: 0;
  font-size: 1.3rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px 9px;
  border-radius: 6px;
  transition: background .15s, color .15s;
}
.tp-nab-close:hover,
.tp-nab-close:focus-visible {
  color: #333;
  background: #f0eaf8;
  outline: none;
}

.tp-nab-label {
  font-size: .72rem;
  font-weight: 700;
  color: #4a2d8a;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 0 20px 8px 0;
}

.tp-nab-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.tp-nab-list li {
  margin: 6px 0;
  line-height: 1.38;
}
.tp-nab-list a {
  display: inline-block;
  color: #1e0b4b;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  border-bottom: 1px dotted transparent;
  transition: border-color .15s, color .15s;
}
.tp-nab-list a:hover,
.tp-nab-list a:focus-visible {
  color: #4a2d8a;
  border-bottom-color: currentColor;
  outline: none;
}

.tp-nab-all {
  display: inline-block;
  margin-top: 2px;
  font-size: .78rem;
  font-weight: 600;
  color: #4a2d8a;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s;
}
.tp-nab-all:hover,
.tp-nab-all:focus-visible {
  border-bottom-color: currentColor;
  outline: none;
}

/* ─────────────────────────────────────────────
   MÓVIL: pastilla incluso más discreta,
   panel expandido con margin apropiado sobre el
   botón flotante de WhatsApp (~72-88px de alto)
   ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .tp-nab {
    left: 14px;
    bottom: 88px;
  }
  .tp-nab-pill {
    max-width: calc(100vw - 28px);
    padding: 9px 12px 9px 10px;
  }
  .tp-nab-pill-title { font-size: .82rem; }
  .tp-nab-panel {
    max-width: calc(100vw - 28px);
    width: 280px;
  }
  .tp-nab-list a { font-size: .85rem; }
}

/* Motion reducido */
@media (prefers-reduced-motion: reduce) {
  .tp-nab-pill,
  .tp-nab-panel { animation: none; }
}
