:root {
  --brand-primary: #1e4fd6;
  --brand-secondary: #0f2f8a;
  --brand-accent: #3d8bfd; /* azul claro de acento (antes ámbar) */
  --ink: #0f274f;
  --muted: #4a5d7a;
  --surface: #e8f0fb; /* fondo azul suave, relación con T-board blue */
  --surface-deep: #d5e4f8;
  --card: #ffffff;
  --ok: #1b7a4a;
  --line: rgba(15, 47, 138, 0.14);
  --shadow: 0 12px 40px rgba(15, 47, 138, 0.14);
  --radius: 18px;
  --font: "Nunito", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1100px 480px at 8% -8%, rgba(61, 139, 253, 0.28), transparent 58%),
    radial-gradient(900px 420px at 100% 5%, rgba(15, 47, 138, 0.16), transparent 55%),
    radial-gradient(700px 360px at 50% 100%, rgba(30, 79, 214, 0.1), transparent 50%),
    linear-gradient(180deg, #f4f8ff 0%, var(--surface) 35%, var(--surface-deep) 100%);
  line-height: 1.5;
  padding-bottom: 88px;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; }

.nelly-wrap {
  width: min(1080px, calc(100% - 1.5rem));
  margin: 0 auto;
}

.nelly-barra {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: #fff;
  text-align: center;
  padding: 0.7rem 1rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.nelly-top {
  display: flex;
  justify-content: flex-end;
  padding: 0.85rem 0 0;
}

.nelly-pais {
  position: relative;
}

.nelly-pais-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.nelly-flag-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.nelly-flag {
  width: 18px;
  height: 12px;
  display: block;
  border-radius: 2px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

.nelly-flag--globe {
  width: 16px;
  height: 16px;
  box-shadow: none;
}

.nelly-pais-menu button,
.nelly-pais-menu a.nelly-pais-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nelly-pais-menu a.nelly-pais-link {
  padding: 0.7rem 0.9rem;
  text-decoration: none;
  font-weight: 600;
  border-top: 1px solid rgba(20,33,61,0.08);
  color: inherit;
}

.nelly-wa-ico {
  width: 1.15em;
  height: 1.15em;
  flex-shrink: 0;
}

.nelly-pais-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  min-width: 180px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 40;
}

.nelly-pais-menu.open { display: block; }

.nelly-pais-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.nelly-pais-menu button:hover,
.nelly-pais-menu button[aria-current="true"] {
  background: rgba(30, 79, 214, 0.08);
}

.nelly-hero {
  padding: 1rem 0 2rem;
  display: grid;
  gap: 1.1rem;
  /* Móvil: H1 → video → precio/CTA */
  grid-template-areas:
    "title"
    "video"
    "rest";
}

.nelly-hero-title { grid-area: title; }
.nelly-video-card { grid-area: video; }
.nelly-hero-rest { grid-area: rest; }

@media (min-width: 900px) {
  .nelly-hero {
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-areas:
      "video title"
      "video rest";
    align-items: start;
    gap: 1.25rem 2rem;
    padding-top: 1.5rem;
  }
}

.nelly-h1-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
}

.nelly-logo {
  display: block;
  width: min(72vw, 280px);
  height: auto;
  max-height: 96px;
  object-fit: contain;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .nelly-h1-row {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 1rem;
  }

  .nelly-logo {
    width: min(100%, 300px);
    max-height: 110px;
    margin-inline: 0;
  }
}

.nelly-h1-row h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.nelly-video-card {
  background: #0b1224;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  /* Contenedor fijo 9:16 para reels verticales */
  aspect-ratio: 9 / 16;
  max-height: min(72vh, 640px);
  width: min(100%, calc(min(72vh, 640px) * 9 / 16));
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.nelly-video-card video {
  width: 100%;
  flex: 1;
  min-height: 0;
  object-fit: contain; /* no recortar el reel */
  background: #0b1224;
  cursor: pointer;
}

@media (min-width: 900px) {
  .nelly-video-card {
    width: 100%;
    max-height: min(70vh, 620px);
  }
}

.nelly-creador {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  padding: 0.65rem 0.85rem;
  font-weight: 700;
  font-size: 0.92rem;
  background: rgba(255,255,255,0.06);
}

.nelly-creador span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-primary));
  color: #fff;
}

.nelly-copy .lead {
  margin: 0 0 1.1rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.nelly-precio {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.nelly-precio-main {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1;
  color: var(--brand-primary);
}

.nelly-precio-main small {
  font-size: 0.45em;
  font-weight: 700;
  color: var(--muted);
}

.nelly-precio-inicial {
  margin-top: 0.45rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.3;
}

.nelly-precio-sub {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.nelly-precio-lista {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: baseline;
  font-size: 0.95rem;
}

.nelly-precio-lista s {
  color: #8a93a5;
}

.nelly-ahorro {
  color: var(--ok);
  font-weight: 800;
}

.nelly-financiacion {
  margin-top: 0.55rem;
  font-weight: 700;
  color: var(--ink);
  font-size: 0.95rem;
}

.nelly-post-promo {
  display: none;
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: #e8f1ff;
  border: 1px solid rgba(30, 79, 214, 0.22);
  font-weight: 600;
}

.nelly-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 0.95rem 1.1rem;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(18, 140, 126, 0.28);
}

.nelly-cta:hover { filter: brightness(1.03); }

.nelly-checks {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.nelly-checks li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: 600;
}

.nelly-checks li::before {
  content: "✓";
  color: var(--ok);
  font-weight: 800;
}

.nelly-oferta {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  font-weight: 700;
  color: var(--brand-secondary);
}

.nelly-contador {
  font-variant-numeric: tabular-nums;
  background: #fff;
  border: 1px solid rgba(245, 166, 35, 0.4);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

.nelly-section {
  padding: 2rem 0;
}

.nelly-section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.nelly-cifras {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.nelly-cifras div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 0.75rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.nelly-cifras strong {
  display: block;
  font-size: 1.35rem;
  color: var(--brand-primary);
}

@media (max-width: 640px) {
  .nelly-cifras { grid-template-columns: 1fr; }
}

.nelly-pasos {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 760px) {
  .nelly-pasos { grid-template-columns: repeat(3, 1fr); }
}

.nelly-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.nelly-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.nelly-incluye {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 860px) {
  .nelly-incluye {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 1.5rem;
  }
}

.nelly-incluye-foto {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem;
}

.nelly-incluye-foto img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  background: #eef2f8;
  border-radius: 8px;
}

.nelly-incluye-col {
  display: grid;
  gap: 1rem;
}

.nelly-incluye-destacados {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.nelly-incluye-destacados li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 1rem;
}

.nelly-incluye-destacados strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--ink);
}

.nelly-incluye-destacados span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.nelly-incluye-componentes {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1rem 1rem;
}

.nelly-incluye-componentes h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  color: var(--brand-primary);
}

.nelly-incluye-componentes ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.55;
}

.nelly-incluye-componentes li + li {
  margin-top: 0.2rem;
}

.nelly-faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}

.nelly-faq summary {
  cursor: pointer;
  font-weight: 800;
}

.nelly-faq details[open] summary { margin-bottom: 0.5rem; }

.nelly-faq p {
  margin: 0;
  color: var(--muted);
}

.nelly-cierre {
  text-align: center;
  background: linear-gradient(135deg, rgba(30, 79, 214, 0.12), rgba(61, 139, 253, 0.18));
  border: 1px solid rgba(30, 79, 214, 0.18);
  border-radius: var(--radius);
  padding: 1.75rem 1.25rem;
}

.nelly-cierre h2 { margin-bottom: 0.5rem; }

.nelly-footer {
  padding: 2rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}

.nelly-footer strong { color: var(--ink); }

.nelly-barra-fija {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: none;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.9rem calc(0.7rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.nelly-barra-fija.visible { display: flex; }

.nelly-barra-fija .precio {
  font-weight: 800;
  color: var(--brand-primary);
  line-height: 1.15;
}

.nelly-barra-fija .precio small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
}

.nelly-barra-fija .nelly-cta {
  width: auto;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .nelly-barra-fija { display: none !important; }
}

.nelly-skeleton {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.nelly-skeleton.ready {
  opacity: 1;
  transform: none;
}
