/* ==========================================================================
   TRAVEL SALE — Campaña Bicitando (24 al 30 de agosto)
   Componentes reutilizables: barra fija, modal, contador y badges.
   Sin dependencias externas. Namespace: .ts-
   ========================================================================== */

:root {
  --ts-yellow: #facc15;        /* amarillo Bicitando (marca) */
  --ts-yellow-hi: #fde047;     /* hover */
  --ts-black: #0a0a0a;
  --ts-graphite: #171717;
  --ts-graphite-2: #232323;
  --ts-bar-h: 0px;             /* lo calcula el JS según la altura real */
}

/* Los componentes no dependen del preflight de Tailwind para el box model */
.ts-bar, .ts-bar *,
.ts-modal, .ts-modal *,
.ts-count, .ts-count *,
.ts-badge, .ts-badge * { box-sizing: border-box; }

/* Cuando la campaña está activa, el contenido baja lo que mide la barra */
html.ts-on body { padding-top: var(--ts-bar-h); }
html.ts-on #navbar { top: var(--ts-bar-h); }

/* El scroll a anclas no queda tapado por barra + navbar */
html.ts-on #escapadas,
html.ts-on #fechas { scroll-margin-top: calc(var(--ts-bar-h) + 70px); }

/* --------------------------------------------------------------------------
   1) BARRA DE ANUNCIO (fija arriba de todo)
   -------------------------------------------------------------------------- */
.ts-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;                  /* por encima del navbar (z-50) */
  background: var(--ts-yellow);
  color: var(--ts-black);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.28);
  animation: ts-bar-in 0.5s ease both;
}
.ts-bar__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.ts-bar__text {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(0.75rem, 3.2vw, 0.95rem);
  line-height: 1.3;
  letter-spacing: 0.005em;
  text-align: center;
  margin: 0;
}
/* El separador "|" se ve más prolijo con aire y algo de transparencia */
.ts-bar__sep {
  opacity: 0.45;
  margin: 0 5px;
  font-weight: 600;
}
.ts-bar__cta {
  flex-shrink: 0;
  background: var(--ts-black);
  color: #fff;
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(0.72rem, 2.8vw, 0.85rem);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.ts-bar__cta:hover { background: var(--ts-graphite-2); transform: translateY(-1px); }
.ts-bar__cta:active { transform: scale(0.96); }
.ts-bar__cta:focus-visible { outline: 2px solid var(--ts-black); outline-offset: 2px; }

@media (max-width: 640px) {
  .ts-bar__inner { gap: 10px; padding: 9px 12px; justify-content: space-between; }
  .ts-bar__text { text-align: left; flex: 1; }
}

@keyframes ts-bar-in {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   2) MODAL DE BIENVENIDA
   -------------------------------------------------------------------------- */
.ts-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.ts-modal.is-open { opacity: 1; pointer-events: auto; }

.ts-modal__card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--ts-graphite) 0%, var(--ts-black) 100%);
  border: 1px solid rgba(250, 204, 21, 0.28);
  border-radius: 22px;
  padding: 30px 24px 24px;
  text-align: center;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
  transform: translateY(18px) scale(0.97);
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.38s ease;
}
.ts-modal.is-open .ts-modal__card { transform: none; opacity: 1; }

.ts-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.65);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.ts-modal__close:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.ts-modal__close:focus-visible { outline: 2px solid var(--ts-yellow); outline-offset: 2px; }

.ts-modal__kicker {
  display: inline-block;
  background: rgba(250, 204, 21, 0.12);
  border: 1px solid rgba(250, 204, 21, 0.3);
  color: var(--ts-yellow);
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.ts-modal__title {
  font-family: "Barlow Condensed", "Bebas Neue", system-ui, sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  font-size: clamp(1.7rem, 7vw, 2.3rem);
  line-height: 1;
  margin: 0 0 12px;
}
.ts-modal__title span { color: var(--ts-yellow); }
.ts-modal__sub {
  font-family: "Poppins", system-ui, sans-serif;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 auto 20px;
  max-width: 330px;
}
.ts-modal__sub strong { color: var(--ts-yellow); font-weight: 700; }

.ts-modal__list {
  list-style: none;
  margin: 0 0 22px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  text-align: left;
}
.ts-modal__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 7px 0;
}
.ts-modal__check { color: var(--ts-yellow); font-weight: 700; flex-shrink: 0; }

.ts-btn {
  display: block;
  width: 100%;
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  text-decoration: none;
  padding: 15px 20px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}
.ts-btn--primary { background: var(--ts-yellow); color: var(--ts-black); }
.ts-btn--primary:hover { background: var(--ts-yellow-hi); transform: translateY(-1px); }
.ts-btn--primary:active { transform: scale(0.97); }
.ts-btn--ghost {
  margin-top: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 20px;
}
.ts-btn--ghost:hover { color: #fff; border-color: rgba(255, 255, 255, 0.34); }
.ts-btn:focus-visible { outline: 2px solid var(--ts-yellow); outline-offset: 3px; }

.ts-modal__legal {
  margin: 16px 0 0;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.42);
}

/* --------------------------------------------------------------------------
   3) CONTADOR REGRESIVO
   -------------------------------------------------------------------------- */
.ts-count {
  background: var(--ts-black);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 22px 20px;
  text-align: center;
}
.ts-count__label {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ts-yellow);
  margin: 0 0 14px;
}
.ts-count__grid {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
}
.ts-count__box {
  min-width: 78px;
  background: var(--ts-graphite);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 6px 8px;
}
.ts-count__num {
  display: block;
  font-family: "Barlow Condensed", "Bebas Neue", system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  line-height: 1;
  color: var(--ts-yellow);
  font-variant-numeric: tabular-nums;
}
.ts-count__unit {
  display: block;
  margin-top: 3px;
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
@media (max-width: 380px) {
  .ts-count__box { min-width: 68px; }
  .ts-count__grid { gap: 8px; }
}

/* --------------------------------------------------------------------------
   4) BADGE "TRAVEL SALE · 3 CUOTAS SIN INTERÉS"
   -------------------------------------------------------------------------- */
.ts-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  background: var(--ts-yellow);
  color: var(--ts-black);
  font-family: "Poppins", system-ui, sans-serif;
  border-radius: 10px;
  padding: 6px 12px;
  line-height: 1.1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.ts-badge__top {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ts-badge__sub {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
/* Variante flotante para superponer sobre la foto de una card */
.ts-badge--float {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
}

/* --------------------------------------------------------------------------
   Accesibilidad: respeta "reducir movimiento"
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ts-bar,
  .ts-modal,
  .ts-modal__card,
  .ts-btn,
  .ts-bar__cta { animation: none !important; transition: none !important; }
  .ts-modal__card { transform: none; }
}
