/* =========================================================
   Checkout de una sola página (compra.html)
   Colores de marca: verde #00d95f, azul #003b61, negro #000
   ========================================================= */

html {
  font-family: "Open Sans", sans-serif !important;
  scroll-behavior: smooth;
  overflow-x: clip;
}
* {
  box-sizing: border-box;
}
img,
svg {
  max-width: 100%;
}
h1,
h2,
h3,
h4 {
  font-family: "Capriola", sans-serif !important;
  font-weight: 400 !important;
}

.co-body {
  --co-green: #00d95f;
  --co-green-ink: #007a35; /* verde legible sobre blanco */
  --co-green-soft: #effdf5;
  --co-green-ring: rgba(0, 217, 95, 0.22);
  --co-blue: #003b61;
  --co-ink: #000000;
  --co-ink-2: #334155;
  --co-ink-3: #64748b;
  --co-line: #dfe6ec;
  --co-card: #ffffff;
  --co-field: #ffffff;
  --co-soft: #f5fbf8;
  --co-red: #d92d20;
  --co-red-soft: #fef3f2;
  --co-amber: #b54708;
  --co-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px rgba(0, 59, 97, 0.07);

  min-height: 100vh;
  margin: 0;
  overflow-x: clip;
  background: linear-gradient(180deg, #f7fafc 0%, #eef7f1 44%, #ffffff 100%);
  color: var(--co-ink);
  font-family: "Open Sans", sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.co-body.dark-mode {
  --co-green-ink: #3ee98a;
  --co-green-soft: rgba(0, 217, 95, 0.1);
  --co-ink: #f8fafc;
  --co-ink-2: #cbd5e1;
  --co-ink-3: #94a3b8;
  --co-line: rgba(148, 163, 184, 0.26);
  --co-card: #0f2235;
  --co-field: #0b1d2f;
  --co-soft: #13283b;
  --co-red: #f97066;
  --co-red-soft: rgba(249, 112, 102, 0.12);
  --co-amber: #fdb022;
  --co-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  background: linear-gradient(180deg, #071320 0%, #0b1d2f 48%, #071320 100%);
}
.co-body p,
.co-body h1,
.co-body h2,
.co-body h3 {
  margin: 0;
  color: var(--co-ink);
}
.co-body [hidden] {
  display: none !important;
}

/* ----------------------------------------------------- Cabecera */
.co-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--co-blue);
  box-shadow: 0 6px 20px rgba(0, 30, 50, 0.18);
}
.co-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 72rem;
  margin: 0 auto;
  padding: 10px 16px;
}
.co-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-family: "Capriola", sans-serif;
  font-size: 1.05rem;
  white-space: nowrap;
}
.co-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.co-brand b {
  font-weight: 400;
  color: var(--co-green);
}
.co-header__right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.co-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.co-secure i {
  color: var(--co-green);
}
.co-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
}

/* ----------------------------------------------------- Estructura */
.co-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 20px 16px 24px;
}
.co-hero {
  margin-bottom: 16px;
}
.co-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px !important;
  color: var(--co-green-ink) !important;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.co-hero h1 {
  font-size: clamp(1.45rem, 5.4vw, 2.1rem);
  line-height: 1.2;
}
.co-hero__sub {
  margin-top: 6px !important;
  color: var(--co-ink-2) !important;
  font-size: 0.95rem;
}
.co-layout {
  display: grid;
  gap: 20px;
  align-items: start;
}
.co-form {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.co-aside {
  display: none;
}

/* ----------------------------------------------------- Tarjetas de sección */
.co-card {
  position: relative;
  border: 1px solid var(--co-line);
  border-radius: 20px;
  background: var(--co-card);
  padding: 16px;
  box-shadow: var(--co-shadow);
}
.co-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.co-card__head h2 {
  font-size: 1.08rem;
  line-height: 1.3;
}
/* Ícono de cada sección; se vuelve verde con un check cuando se completa. */
.co-step {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(0, 217, 95, 0.14);
  color: var(--co-green-ink);
  font-size: 0.9rem;
  transition: background 0.25s ease, color 0.25s ease;
}
.co-card.is-complete .co-step {
  background: var(--co-green);
  color: #000000;
}
.co-card.is-complete .co-step::after {
  content: "\f00c";
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 2px solid var(--co-card);
  border-radius: 999px;
  background: var(--co-blue);
  color: #ffffff;
  font-family: "Font Awesome 6 Free";
  font-size: 0.5rem;
  font-weight: 900;
  animation: coPop 0.35s ease both;
}
.co-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* área táctil mínima en móvil */
  margin: -6px -8px -6px auto;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--co-green-ink);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ----------------------------------------------------- 1. Plan */
.co-plan {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "icon info"
    "price price";
  gap: 12px 14px;
  align-items: start;
  border-radius: 16px;
  background: var(--co-soft);
  padding: 14px;
  cursor: pointer; /* abre el selector de plan (app.js) */
}
.co-plan__icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--co-green);
  color: #000000;
  font-size: 1.25rem;
}
.co-plan__info {
  grid-area: info;
  min-width: 0;
}
.co-plan__name {
  font-family: "Capriola", sans-serif;
  font-size: 1.12rem;
  line-height: 1.3;
}
.co-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 217, 95, 0.16);
  color: var(--co-green-ink);
  font-family: "Open Sans", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}
.co-plan__features {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  color: var(--co-ink-2);
  font-size: 0.8rem;
  font-weight: 600;
}
.co-plan__features li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.co-plan__features i {
  color: var(--co-green-ink);
  font-size: 0.7rem;
}
.co-plan__features li.is-off {
  opacity: 0.55;
  text-decoration: line-through;
}
.co-plan__features li.is-off i {
  color: var(--co-ink-3);
}
.co-plan__price {
  grid-area: price;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--co-line);
}
.co-plan__price strong {
  font-family: "Capriola", sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
}
.co-plan__price span {
  color: var(--co-ink-2);
  font-size: 0.78rem;
  font-weight: 600;
}

.co-picker {
  margin-top: 12px;
  animation: coFadeDown 0.22s ease both;
}
.co-picker__list {
  display: grid;
  gap: 8px;
}
.co-plan-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  border: 2px solid var(--co-line);
  border-radius: 14px;
  background: var(--co-card);
  padding: 10px 14px;
  color: var(--co-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.co-plan-opt:hover {
  border-color: rgba(0, 217, 95, 0.55);
}
.co-plan-opt[aria-checked="true"] {
  border-color: var(--co-green);
  background: var(--co-green-soft);
}
.co-plan-opt__body {
  display: grid;
  flex: 1;
  min-width: 0;
}
.co-plan-opt__body b {
  font-weight: 700;
}
.co-plan-opt__body em {
  color: var(--co-green-ink);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
}
.co-plan-opt__body small {
  color: var(--co-ink-2);
  font-size: 0.78rem;
}
.co-plan-opt__price {
  font-weight: 800;
  white-space: nowrap;
}

/* Radio visual reutilizado en planes y formas de pago */
.co-radio {
  position: relative;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border: 2px solid #94a3b8;
  border-radius: 999px;
  background: var(--co-field);
  transition: border-color 0.18s ease;
}
.co-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 999px;
  background: var(--co-green);
  transform: scale(0);
  transition: transform 0.18s ease;
}
.co-plan-opt[aria-checked="true"] .co-radio,
.co-method:has(input:checked) .co-radio {
  border-color: var(--co-green);
}
.co-plan-opt[aria-checked="true"] .co-radio::after,
.co-method:has(input:checked) .co-radio::after {
  transform: scale(1);
}

/* ----------------------------------------------------- 2. Firma */
.co-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--co-line);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.co-toggle:has(input:checked) {
  border-color: var(--co-green);
  background: var(--co-green-soft);
  box-shadow: 0 10px 26px rgba(0, 217, 95, 0.14);
}
.co-toggle__icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(0, 217, 95, 0.14);
  color: var(--co-green-ink);
  font-size: 1.1rem;
}
.co-toggle__body {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}
.co-body .co-toggle__title {
  color: var(--co-ink) !important;
  font-weight: 700;
}
.co-body .co-toggle__desc {
  color: var(--co-ink-2) !important;
  font-size: 0.8rem;
  line-height: 1.4;
}
.co-toggle__side {
  display: grid;
  justify-items: end;
  gap: 6px;
}
.co-body .co-toggle__price {
  color: var(--co-ink) !important;
  font-size: 0.9rem;
  font-weight: 800;
  white-space: nowrap;
}
.co-switch {
  position: relative;
  width: 50px;
  height: 30px;
  margin: 0;
  border-radius: 999px;
  background: #cbd5e1;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: background 0.2s ease;
}
.co-switch::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s cubic-bezier(0.3, 1.4, 0.6, 1);
}
.co-switch:checked {
  background: var(--co-green);
}
.co-switch:checked::before {
  transform: translateX(20px);
}
.co-switch:focus-visible {
  outline: 3px solid var(--co-green-ring);
  outline-offset: 2px;
}
.co-body.dark-mode .co-switch {
  background: #334155 !important;
}
.co-body.dark-mode .co-switch:checked {
  background: var(--co-green) !important;
}
.co-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px !important;
  color: var(--co-green-ink) !important;
  font-size: 0.82rem;
  font-weight: 700;
  animation: coFadeDown 0.22s ease both;
}

/* ----------------------------------------------------- 3. Datos */
.co-fields {
  display: grid;
  gap: 14px;
  margin: 0;
}
.co-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
}
.co-field label {
  color: var(--co-ink);
  font-size: 0.85rem;
  font-weight: 700;
}
.co-input {
  position: relative;
}
.co-body .co-input input {
  width: 100%;
  height: 52px;
  border: 1.5px solid var(--co-line);
  border-radius: 14px;
  background: var(--co-field);
  padding: 0 44px 0 14px;
  color: var(--co-ink);
  font: inherit;
  font-size: 16px; /* evita el zoom automático en móviles */
  font-weight: 600;
  text-overflow: ellipsis;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.4s ease;
}
.co-body .co-input input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}
.co-body .co-input input:focus {
  border-color: var(--co-green) !important;
  box-shadow: 0 0 0 4px var(--co-green-ring);
}
.co-body .co-field.is-valid .co-input input {
  border-color: rgba(0, 217, 95, 0.75) !important;
}
.co-body .co-field.is-invalid .co-input input {
  border-color: var(--co-red) !important;
  box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.12);
}
.co-body .co-field.is-autofilled .co-input input {
  animation: coAutofill 1.4s ease both;
}
.co-input__status {
  position: absolute;
  top: 50%;
  right: 14px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  pointer-events: none;
}
.co-field.is-valid .co-input__status::before {
  content: "\f058";
  color: var(--co-green);
  font-family: "Font Awesome 6 Free";
  font-size: 1.1rem;
  font-weight: 900;
  animation: coPop 0.3s ease both;
}
.co-field.is-invalid .co-input__status::before {
  content: "\f06a";
  color: var(--co-red);
  font-family: "Font Awesome 6 Free";
  font-size: 1.05rem;
  font-weight: 900;
}
.co-field.is-loading .co-input__status::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 59, 97, 0.18);
  border-top-color: var(--co-green);
  border-radius: 999px;
  animation: coSpin 0.8s linear infinite;
}
.co-body .co-help {
  color: var(--co-ink-3) !important;
  font-size: 0.78rem;
  line-height: 1.4;
}
.co-body .co-field.is-invalid .co-help {
  color: var(--co-red) !important;
  font-weight: 600;
}
.co-body .co-help.is-success {
  color: var(--co-green-ink) !important;
  font-weight: 700;
}
.co-suggest {
  justify-self: start;
  border: 0;
  border-radius: 10px;
  background: rgba(247, 144, 9, 0.12);
  padding: 7px 10px;
  color: var(--co-amber);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.co-suggest b {
  font-weight: 800;
  text-decoration: underline;
}

/* ----------------------------------------------------- Resumen */
.co-summary {
  display: grid;
  gap: 8px;
  margin: 0;
  font-size: 0.88rem;
}
.co-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.co-summary dt {
  color: var(--co-ink-2);
}
.co-summary dd {
  margin: 0;
  color: var(--co-ink);
  font-weight: 700;
  white-space: nowrap;
}
.co-summary .co-summary__total {
  align-items: baseline;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--co-line);
}
.co-summary__total dt {
  color: var(--co-ink);
  font-weight: 800;
}
.co-summary__total dd {
  font-family: "Capriola", sans-serif;
  font-size: 1.4rem;
  font-weight: 400;
}
.co-summary dd.is-bump {
  animation: coBump 0.4s ease;
}
.co-summary--inline {
  margin-bottom: 14px;
  border-radius: 14px;
  background: var(--co-soft);
  padding: 12px 14px;
}

/* ----------------------------------------------------- 4. Pago */
.co-methods {
  display: grid;
  gap: 10px;
}
.co-method {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 2px solid var(--co-line);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.co-method input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.co-method:has(input:checked) {
  border-color: var(--co-green);
  background: var(--co-green-soft);
  box-shadow: 0 10px 26px rgba(0, 217, 95, 0.14);
}
.co-method:has(input:focus-visible) {
  outline: 3px solid var(--co-green-ring);
  outline-offset: 2px;
}
.co-method .co-radio {
  margin-top: 1px;
}
.co-method__body {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}
.co-body .co-method__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: var(--co-ink) !important;
  font-weight: 700;
}
.co-body .co-method__desc {
  color: var(--co-ink-2) !important;
  font-size: 0.8rem;
  line-height: 1.4;
}
.co-body .co-method__amount {
  color: var(--co-green-ink) !important;
  font-size: 0.85rem;
  font-weight: 800;
}
.co-chip {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--co-green);
  color: #000000 !important;
  font-size: 0.66rem;
  font-weight: 800;
}
.co-brands {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  color: var(--co-ink) !important;
  font-size: 1.65rem;
}
.co-method__extra {
  display: none !important;
  margin-top: 8px;
  gap: 8px;
  border-radius: 12px;
  background: var(--co-card);
  padding: 10px;
  color: var(--co-ink-2) !important;
  font-size: 0.78rem;
  line-height: 1.4;
}
.co-method:has(input:checked) .co-method__extra {
  display: grid !important;
  animation: coFadeDown 0.2s ease both;
}
.co-bank {
  display: grid;
  gap: 6px;
}
.co-bank__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 0.82rem;
}
.co-body .co-bank__row > span {
  min-width: 92px;
  color: var(--co-ink-3) !important;
}
.co-body .co-bank__row b {
  color: var(--co-ink) !important;
  font-weight: 700;
}
.co-body .co-bank__row--account b {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.co-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1.5px solid var(--co-green);
  border-radius: 999px;
  background: transparent;
  padding: 4px 10px;
  color: var(--co-green-ink);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}
.co-body .co-copy span {
  min-width: 0;
  color: var(--co-green-ink) !important;
}
.co-copy.is-copied {
  background: var(--co-green);
  color: #000000;
}
.co-body .co-copy.is-copied span {
  color: #000000 !important;
}
.co-method__extra img {
  width: auto;
  height: 44px;
  border-radius: 6px;
  background: #ffffff;
  padding: 2px 6px;
}

.co-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 16px;
  border-radius: 12px;
  padding: 10px;
  color: var(--co-ink-2);
  font-size: 0.85rem;
  line-height: 1.45;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.co-body .co-terms span {
  color: var(--co-ink-2) !important;
}
.co-terms input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--co-green);
}
.co-terms__link {
  color: var(--co-ink) !important;
  font-weight: 700;
  text-decoration: underline;
}
.co-terms.is-attention {
  background: var(--co-red-soft);
  box-shadow: inset 0 0 0 1.5px var(--co-red);
  animation: coShake 0.4s ease;
}
.co-error {
  margin-top: 10px !important;
  border-radius: 12px;
  background: var(--co-red-soft);
  padding: 10px 12px;
  color: var(--co-red) !important;
  font-size: 0.85rem;
  font-weight: 600;
}

.co-error.is-info {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #fec84b;
  background: #fffaeb;
  color: #7a2e0e !important;
  font-weight: 400;
  line-height: 1.45;
}
.co-error.is-info i {
  margin-top: 3px;
  color: #dc6803;
}
.co-body.dark-mode .co-error.is-info {
  border-color: rgba(253, 176, 34, 0.45);
  background: rgba(253, 176, 34, 0.12);
  color: #fedf89 !important;
}
.co-pay:disabled {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
  filter: none;
}
.co-pay:disabled .fa-arrow-right {
  display: none;
}
.co-pay {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  margin-top: 12px;
  border: 0;
  border-radius: 16px;
  background: var(--co-green);
  color: #000000;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(0, 217, 95, 0.32);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.18s ease, box-shadow 0.18s ease;
}
.co-pay:hover {
  filter: brightness(0.96);
}
.co-pay:active {
  transform: scale(0.985);
}
.co-pay:focus-visible {
  outline: 3px solid var(--co-blue);
  outline-offset: 3px;
}
.co-body .co-pay span {
  color: #000000 !important;
}
.co-pay.is-loading {
  pointer-events: none;
  filter: saturate(0.6);
}
.co-pay.is-loading > i {
  display: none;
}
.co-pay.is-loading::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(0, 0, 0, 0.2);
  border-top-color: #000000;
  border-radius: 999px;
  animation: coSpin 0.8s linear infinite;
}
.co-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--co-ink-2);
  font-size: 0.74rem;
  font-weight: 600;
}
.co-trust li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.co-trust i {
  color: var(--co-green-ink);
}
.co-wa-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  border-radius: 12px;
  padding: 10px;
  color: var(--co-ink);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}
.co-wa-link i {
  color: #25d366;
  font-size: 1.2rem;
}
.co-wa-link:hover {
  background: var(--co-soft);
}

/* ----------------------------------------------------- Resumen lateral (escritorio) */
.co-aside__title {
  margin-bottom: 14px !important;
  font-size: 1.05rem;
}
.co-benefits {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px dashed var(--co-line);
  list-style: none;
  color: var(--co-ink-2);
  font-size: 0.82rem;
  font-weight: 600;
}
.co-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.co-benefits i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 217, 95, 0.14);
  color: var(--co-green-ink);
  font-size: 0.8rem;
}

/* ----------------------------------------------------- Barra fija (móvil) */
.co-sticky {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--co-line);
  background: var(--co-card);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(0, 30, 50, 0.12);
  transition: transform 0.25s ease;
}
.co-sticky.is-hidden {
  transform: translateY(110%);
}
.co-sticky__total {
  display: grid;
  line-height: 1.15;
}
.co-body .co-sticky__total span {
  color: var(--co-ink-2) !important;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.co-sticky__total strong {
  font-family: "Capriola", sans-serif;
  font-size: 1.35rem;
  font-weight: 400;
}
.co-sticky__wa {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #25d366;
  color: #ffffff;
  font-size: 1.6rem;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}
.co-pay--sticky {
  flex: 1;
  min-height: 50px;
  margin-top: 0;
  font-size: 1rem;
}
.co-body {
  padding-bottom: 84px;
}
.co-body.is-success {
  padding-bottom: 0;
}
.co-body.is-success .co-sticky {
  display: none;
}

/* ----------------------------------------------------- Pie */
.co-footer {
  max-width: 72rem;
  margin: 8px auto 0;
  padding: 20px 16px 28px;
  text-align: center;
}
.co-footer p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
  color: var(--co-ink-2) !important;
  font-size: 0.8rem;
}
.co-footer a,
.co-footer span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--co-ink-2);
  text-decoration: none;
}
.co-footer i {
  color: var(--co-green-ink);
}
.co-footer .co-footer__legal {
  margin-top: 8px !important;
  color: var(--co-ink-3) !important;
  font-size: 0.72rem;
}

/* ----------------------------------------------------- Éxito */
.co-success {
  max-width: 68rem;
  margin: 0 auto;
  animation: coFadeDown 0.3s ease both;
}

/* ----------------------------------------------------- Pantallas grandes */
@media (min-width: 640px) {
  .co-main {
    padding: 28px 24px 32px;
  }
  .co-card {
    padding: 22px;
  }
  .co-fields {
    grid-template-columns: 1fr 1fr;
  }
  .co-field--full {
    grid-column: 1 / -1;
  }
  .co-plan {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "icon info price";
    align-items: center;
  }
  .co-plan__price {
    display: grid;
    justify-items: end;
    gap: 4px;
    padding-top: 0;
    border-top: 0;
    text-align: right;
  }
}
@media (min-width: 1024px) {
  .co-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
  }
  /* Columna derecha: resumen y, debajo, la forma de pago (app.js la mueve aquí) */
  .co-aside {
    display: grid;
    gap: 14px;
  }
  .co-layout {
    grid-template-columns: minmax(0, 1fr) 400px;
  }
  .co-summary--inline {
    display: none;
  }
  .co-sticky {
    display: none;
  }
  .co-body {
    padding-bottom: 0;
  }
  .co-hero {
    margin-bottom: 20px;
  }
}
@media (max-width: 420px) {
  /* En teléfonos el tema sigue al sistema; se prioriza el sello de pago seguro */
  .co-icon-btn {
    display: none;
  }
}
@media (max-width: 340px) {
  .co-secure {
    display: none;
  }
}
@media (max-width: 380px) {
  .co-toggle {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .co-toggle__side {
    display: flex;
    flex: 1 0 100%;
    align-items: center;
    justify-content: space-between;
    padding-left: 54px;
  }
}

/* ----------------------------------------------------- Animaciones */
@keyframes coFadeDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes coPop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  70% {
    transform: scale(1.15);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}
@keyframes coSpin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes coAutofill {
  0% {
    background: rgba(0, 217, 95, 0.28);
  }
  100% {
    background: var(--co-field);
  }
}
@keyframes coBump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.12);
    color: var(--co-green-ink);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes coShake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .co-body *,
  .co-body *::before,
  .co-body *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =========================================================
   Pantalla de compra finalizada (mismo diseño que antes)
   ========================================================= */

/* El markup de éxito usa utilidades de Tailwind: textos negros en modo claro
   y colores equivalentes en modo oscuro. */
body:not(.dark-mode) #step-success .text-fel-navy,
body:not(.dark-mode) #step-success .text-slate-500 {
  color: #000000 !important;
}
.success-hero,
.success-hero h2,
.success-hero p {
  color: #ffffff !important;
}
.text-fel-green,
.text-fel-green * {
  color: #00d95f !important;
}
.text-fel-navy.bg-fel-green,
.bg-fel-green .text-fel-navy {
  color: #000000 !important;
}
body.dark-mode #step-success .bg-white {
  background-color: #0f2235 !important;
}
body.dark-mode #step-success .bg-slate-50 {
  background-color: #13283b !important;
}
body.dark-mode #step-success .border-white\/80,
body.dark-mode #step-success .border-slate-200 {
  border-color: rgba(148, 163, 184, 0.28) !important;
}
body.dark-mode #step-success .text-fel-navy {
  color: #f8fafc !important;
}
body.dark-mode #step-success .text-slate-500 {
  color: #cbd5e1 !important;
}
@media (max-width: 640px) {
  #step-success > div {
    border-radius: 1.35rem !important;
  }
  #step-success .success-hero {
    padding: 2rem 1rem;
  }
  #step-success h2 {
    font-size: 1.75rem;
    line-height: 2.15rem;
  }
}

.success-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at top left,
      rgba(0, 217, 95, 0.22),
      transparent 34%
    ),
    linear-gradient(135deg, #003b61 0%, #082235 100%);
}
.success-hero > * {
  position: relative;
  z-index: 1;
}
.success-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.success-particles span {
  position: absolute;
  bottom: -1rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(0, 217, 95, 0.72);
  box-shadow: 0 0 18px rgba(0, 217, 95, 0.35);
  opacity: 0;
  animation: successParticleFloat 5.2s ease-in-out infinite;
}
.success-particles span:nth-child(1) {
  left: 8%;
  animation-delay: 0s;
}
.success-particles span:nth-child(2) {
  left: 22%;
  animation-delay: 0.9s;
  width: 0.32rem;
  height: 0.32rem;
}
.success-particles span:nth-child(3) {
  left: 39%;
  animation-delay: 1.7s;
}
.success-particles span:nth-child(4) {
  left: 56%;
  animation-delay: 0.45s;
  width: 0.62rem;
  height: 0.62rem;
}
.success-particles span:nth-child(5) {
  left: 72%;
  animation-delay: 1.25s;
}
.success-particles span:nth-child(6) {
  left: 87%;
  animation-delay: 2.1s;
  width: 0.35rem;
  height: 0.35rem;
}
.success-summary-grid {
  display: grid;
  gap: 1rem;
  background: #ffffff;
  padding: 1.5rem;
}
body.dark-mode .success-summary-grid {
  background: #0f172a;
}
.success-email-checklist {
  grid-column: 1 / -1;
  border: 1px solid rgba(0, 59, 97, 0.12);
  border-radius: 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  padding: 1.25rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}
.success-email-checklist h3 {
  margin: 0 0 1rem;
  color: #003b61;
  font-size: 1.05rem;
  font-weight: 900;
}
.success-email-checklist ul {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.email-check-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 3.25rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 0.8rem 0.9rem;
  transform: translateY(4px);
  opacity: 0.78;
  transition:
    border-color 0.45s ease,
    background 0.45s ease,
    box-shadow 0.45s ease,
    color 0.45s ease,
    opacity 0.45s ease,
    transform 0.45s ease;
}
/* El correo de Nuvei se oculta en transferencias (clase hidden de app.js) */
.email-check-item.hidden {
  display: none;
}
.email-check-item small {
  display: block;
  margin-top: 0.15rem;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 800;
}
.email-check-status {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
}
.email-check-item.is-loading .email-check-status {
  border: 2px solid rgba(0, 59, 97, 0.16);
  border-top-color: #00d95f;
  animation: emailCheckSpin 1s linear infinite;
}
.email-check-item.is-done {
  border-color: rgba(0, 217, 95, 0.42);
  background: rgba(0, 217, 95, 0.08);
  color: #003b61;
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 14px 34px rgba(0, 217, 95, 0.12);
}
.email-check-item.is-done .email-check-status {
  background: #00d95f;
  color: #003b61;
  animation: emailCheckPop 0.38s ease both;
}
.email-check-item.is-done .email-check-status::before {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-size: 0.85rem;
  font-weight: 900;
}
.email-check-item.is-warning {
  border-color: rgba(245, 158, 11, 0.48);
  background: rgba(245, 158, 11, 0.12);
  color: #78350f;
  opacity: 1;
  transform: translateY(0);
}
.email-check-item.is-warning .email-check-status {
  background: #f59e0b;
  color: #111827;
  animation: emailCheckPop 0.38s ease both;
}
.email-check-item.is-warning .email-check-status::before {
  content: "\f071";
  font-family: "Font Awesome 6 Free";
  font-size: 0.8rem;
  font-weight: 900;
}
body.dark-mode .success-email-checklist {
  border-color: rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, #102237 0%, #0b1728 100%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}
body.dark-mode .success-email-checklist h3 {
  color: #f8fafc;
}
body.dark-mode .email-check-item {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.78);
  color: #dbeafe;
}
body.dark-mode .email-check-item small {
  color: #94a3b8;
}
body.dark-mode .email-check-item.is-done {
  border-color: rgba(0, 217, 95, 0.5);
  background: rgba(0, 217, 95, 0.13);
  color: #f8fafc;
}
body.dark-mode .email-check-item.is-warning {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
}
@media (min-width: 640px) {
  .success-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 2rem;
  }
  .success-summary-grid.has-signature {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@keyframes successParticleFloat {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.8);
  }
  20% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translate3d(1.4rem, -13rem, 0) scale(1.2);
  }
}
@keyframes emailCheckSpin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes emailCheckPop {
  0% {
    transform: scale(0.72);
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes lockedCheckoutPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(148, 163, 184, 0.34);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(148, 163, 184, 0.08);
  }
}
@keyframes lockedCheckoutShine {
  0%,
  42% {
    transform: translateX(-120%);
  }
  70%,
  100% {
    transform: translateX(120%);
  }
}
/* ---------------------------------------------------------
   Información de método de pago en la pantalla de éxito
   --------------------------------------------------------- */

.success-payment-info {
  grid-column: 1 / -1;
  width: 100%;
}

.success-payment-method {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  padding: 1.15rem 1.25rem;
  border: 1px solid #dbe4ea;
  border-radius: 1.25rem;
  background: #f8fafc;
}

.success-payment-icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.9rem;
  background: rgba(0, 217, 95, 0.12);
  color: #00b94f;
  font-size: 1.2rem;
}

.success-transaction-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.9rem;
  background: #ffffff;
}

.success-transaction-box.hidden {
  display: none;
}

.success-transaction-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.success-transaction-value {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

body.dark-mode .success-payment-method {
  border-color: #334155;
  background: #172033;
}

body.dark-mode .success-transaction-box {
  border-color: #334155;
  background: #0f172a;
}

body.dark-mode .success-transaction-label {
  color: #94a3b8;
}

body.dark-mode .success-transaction-value {
  color: #f8fafc;
}

@media (min-width: 640px) {
  .success-transaction-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.success-final-message {
  grid-column: 1 / -1;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  color: #000000;
}

body.dark-mode .success-final-message {
  color: #dbeafe;
}
.success-final-message {
  grid-column: 1 / -1;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;

  width: min(100%, 42rem);

  margin-left: auto;
  margin-right: auto;

  padding: 0.85rem 1rem;

  border: 1px solid #facc15;
  border-radius: 1rem;

  background: #fef9c3;
  color: #000000;

  text-align: left;
}

.success-final-message i {
  flex-shrink: 0;
  color: #ca8a04;
  font-size: 1rem;
}

body.dark-mode .success-final-message {
  border-color: #a16207;
  background: #422006;
  color: #fef3c7;
}

body.dark-mode .success-final-message i {
  color: #facc15;
}

/* =========================================================
   Botón flotante de WhatsApp
   ========================================================= */
.whatsapp-float {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.whatsapp-bubble {
  max-width: 250px;
  border-radius: 18px 18px 4px 18px;
  background: #ffffff;
  color: #000000;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: 0 14px 34px rgba(0, 59, 97, 0.2);
  border: 1px solid rgba(0, 59, 97, 0.12);
}
.whatsapp-button {
  position: relative;
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #25d366;
  color: white;
  font-size: 30px;
  box-shadow: 0 16px 34px rgba(37, 211, 102, 0.36);
}
.whatsapp-button::before,
.whatsapp-button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(37, 211, 102, 0.55);
  animation: whatsappPulse 3s ease-out infinite;
}
.whatsapp-button::after {
  animation-delay: 1.5s;
}
@keyframes whatsappPulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.85);
    opacity: 0;
  }
  100% {
    transform: scale(1.85);
    opacity: 0;
  }
}
body.dark-mode .whatsapp-bubble {
  background: #0f2235;
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.28);
}
@media (max-width: 1023px) {
  /* En móvil WhatsApp vive en la barra fija de pago para no tapar el formulario */
  .whatsapp-float {
    display: none;
  }
  .co-body.is-success .whatsapp-float {
    right: 16px;
    bottom: 16px;
    display: flex;
  }
  .co-body.is-success .whatsapp-bubble {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .success-particles span,
  .whatsapp-button::before,
  .whatsapp-button::after {
    animation: none;
  }
}
