:root {
  --navy: rgb(0, 0, 37);
  --blue: rgb(13, 60, 254);
  --blue-soft: rgb(141, 141, 255);
  --amber: rgb(252, 188, 14);
  --green: rgb(0, 228, 126);
  --red: rgb(255, 90, 90);
  --ink: rgba(0, 0, 37, 0.9);
  --ink-soft: rgba(0, 0, 37, 0.55);
  --white: #ffffff;
  --card-radius: 20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy);
  overflow-x: hidden;
}

body {
  font-family: "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue-soft); text-decoration: none; }
a:hover { color: var(--white); }

img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.tw-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.tw-header .logo img { width: 130px; height: auto; }

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 2px;
}

.lang-toggle a, .lang-toggle span {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12.5px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}

.lang-toggle a:hover { color: #fff; }

.lang-toggle span.active {
  background: var(--blue);
  color: #fff;
}

/* ---------- Hero + form ---------- */
main { flex: 1; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
  padding: 30px 20px 60px;
  max-width: 720px;
  margin: 0 auto;
}

.eyebrow {
  background: rgba(252, 150, 20, 0.12);
  border: 1px solid rgba(252, 150, 20, 0.35);
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

.hero h1 {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.hero h1 span { color: var(--amber); }

.hero p {
  color: rgba(255, 255, 255, 0.62);
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
}

.trust-line {
  color: rgba(255, 255, 255, 0.45);
  font-size: 13.5px;
}

.checkout-card {
  width: 100%;
  max-width: 620px;
  margin: 0 auto 60px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 70px rgba(0, 0, 0, 0.35);
  padding: 36px;
  color: var(--ink);
}

.checkout-cols { display: flex; flex-direction: column; }

/* Desktop: formulario a la izquierda, métodos de pago a la derecha (como
   Stripe/Wompi) — en mobile se apilan en el mismo orden del DOM. */
@media (min-width: 900px) {
  .checkout-card { max-width: 940px; padding: 40px; }
  .checkout-cols { flex-direction: row; align-items: stretch; gap: 40px; }
  .checkout-form-col {
    flex: 0 0 300px;
    padding-right: 40px;
    border-right: 1px solid rgba(0, 0, 37, 0.08);
    display: flex;
    flex-direction: column;
  }
  .checkout-form-col .security-note { margin-top: auto; }
  .checkout-methods-col { flex: 1; min-width: 0; }
}

label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field { margin-bottom: 18px; }

.field input, .field textarea {
  width: 100%;
  border: 1.5px solid rgba(0, 0, 37, 0.14);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus, .field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(13, 60, 254, 0.15);
}

.amount-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.amount-field .currency-badge {
  font-size: 12px;
  font-weight: 700;
  color: rgba(0, 0, 37, 0.4);
  white-space: nowrap;
}

.field-error {
  color: var(--red);
  font-size: 12.5px;
  margin-top: 6px;
  display: none;
}

.field-error.visible { display: block; }

/* Gateway tabs */
.gateway-tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0 20px;
}

.gateway-tab {
  flex: 1;
  border: 1.5px solid rgba(0, 0, 37, 0.12);
  background: rgba(0, 0, 37, 0.03);
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.gateway-tab.active {
  border-color: var(--blue);
  background: rgba(13, 60, 254, 0.06);
}

.gateway-tab .tab-title {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}

.gateway-tab .tab-sub {
  display: block;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.gateway-panel { display: none; }
.gateway-panel.active { display: block; }

/* ---------- Selector de métodos estilo pasarela (panel Wompi) ---------- */
.gw-methods { display: flex; flex-direction: column; gap: 6px; }

.gw-methods-group {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 14px 0 2px;
}

.gw-methods-group:first-child { margin-top: 0; }

.gw-method-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(0, 0, 37, 0.08);
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.gw-method-row:hover {
  border-color: rgba(0, 0, 37, 0.14);
  box-shadow: 0 6px 16px rgba(0, 0, 37, 0.08);
  transform: translateY(-1px);
}

.gw-method-row:active { transform: translateY(0); box-shadow: none; }
.gw-method-row:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.gw-method-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(0, 0, 37, 0.04);
  border: 1px solid rgba(0, 0, 37, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
  overflow: hidden;
}

.gw-method-icon img { width: 24px; height: 24px; object-fit: contain; }

.gw-method-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gw-method-title { color: rgb(0, 0, 37); font-size: 14.5px; font-weight: 600; }
.gw-method-sub { color: var(--ink-soft); font-size: 12px; }

.gw-method-logos { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.gw-method-logos img { height: 16px; width: auto; object-fit: contain; }

.gw-method-chevron { color: rgba(0, 0, 37, 0.28); font-size: 17px; flex-shrink: 0; }

#paypal-button-container { min-height: 45px; }

.status-banner {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  display: none;
}

.status-banner.visible { display: block; }
.status-banner.success { background: rgba(0, 228, 126, 0.12); color: rgb(0, 140, 78); border: 1px solid rgba(0, 228, 126, 0.35); }
.status-banner.error { background: rgba(255, 90, 90, 0.1); color: rgb(190, 40, 40); border: 1px solid rgba(255, 90, 90, 0.35); }
.status-banner.pending { background: rgba(252, 188, 14, 0.14); color: rgb(150, 105, 0); border: 1px solid rgba(252, 188, 14, 0.4); }

.security-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(13, 60, 254, 0.05);
  border: 1px solid rgba(13, 60, 254, 0.15);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: 20px;
  font-size: 12.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* ---------- Otros métodos de pago (grid de tarjetas) ---------- */
.pm-section {
  width: 100%;
  max-width: 1180px;
  margin: -10px auto 70px;
  padding: 0 20px;
  box-sizing: border-box;
}

.pm-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
}

.pm-header-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.pm-header h2 { color: #fff; font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.pm-header p { color: rgba(255, 255, 255, 0.55); font-size: 14.5px; margin: 0; }

.pm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.pm-card {
  background: #fff;
  border-radius: 20px;
  padding: 26px;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 20px 45px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pm-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.pm-card-head::-webkit-details-marker { display: none; }
.pm-card-head::marker { content: ""; }
.pm-card-head:hover .pm-card-chevron { color: rgba(13, 60, 254, 0.55); }
.pm-card-head:hover h3 { color: var(--blue); }

.pm-card-body { display: flex; flex-direction: column; gap: 18px; }

.pm-card-chevron {
  color: rgba(0, 0, 37, 0.3);
  font-size: 20px;
  flex-shrink: 0;
  align-self: center;
  transition: transform 0.2s ease;
}

.pm-card[open] .pm-card-chevron { transform: rotate(90deg); }

.pm-flag { font-size: 30px; line-height: 1; flex-shrink: 0; }
.pm-flag img { height: 24px; width: auto; max-width: 84px; object-fit: contain; }

.pm-flag-pair { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pm-flag-pair img { height: 24px; width: auto; max-width: 64px; object-fit: contain; border-radius: 4px; }
.pm-flag-pair .pm-flag-sep { color: rgba(0, 0, 37, 0.25); font-size: 13px; font-weight: 700; }

.pm-group-label {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin: 26px 0 14px;
}

.pm-group-label:first-of-type { margin-top: 0; }
.pm-card-head h3 { color: rgb(0, 0, 37); font-size: 16.5px; font-weight: 700; margin: 0 0 4px; }
.pm-card-head p { color: var(--ink-soft); font-size: 12.5px; margin: 0; line-height: 1.4; }

.pm-rows { display: flex; flex-direction: column; gap: 12px; }

.pm-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(0, 0, 37, 0.07);
  padding-bottom: 10px;
}

.pm-row:last-child { border-bottom: none; padding-bottom: 0; }

.pm-row-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pm-row-label { color: var(--ink-soft); font-size: 11.5px; font-weight: 600; }
.pm-row-value { color: rgb(0, 0, 37); font-size: 13.5px; font-weight: 700; word-break: break-word; }

.pm-copy {
  border: none;
  background: rgba(13, 60, 254, 0.08);
  color: var(--blue);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.pm-copy:hover { background: rgba(13, 60, 254, 0.16); }
.pm-copy.copied { background: rgba(0, 228, 126, 0.18); color: rgb(0, 140, 78); }

.pm-note {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
  display: flex;
  gap: 8px;
}

.pm-note-info { background: rgba(13, 60, 254, 0.06); color: rgb(30, 55, 150); }
.pm-note-ready { background: rgba(0, 228, 126, 0.1); color: rgb(0, 120, 68); }

.pm-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.pm-qr-box {
  width: 160px;
  height: 160px;
  padding: 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 37, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pm-qr-box img, .pm-qr-box svg { width: 100%; height: 100%; display: block; }
.pm-qr-box { cursor: zoom-in; transition: box-shadow 0.15s ease; }
.pm-qr-box:hover { box-shadow: 0 0 0 1px rgba(0, 0, 37, 0.08), 0 0 0 4px rgba(13, 60, 254, 0.15); }

/* ---------- Lightbox para ampliar códigos QR ---------- */
.qr-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 37, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 24px;
  box-sizing: border-box;
}

.qr-lightbox.visible { display: flex; }

.qr-lightbox-content {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 32px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-lightbox-content img, .qr-lightbox-content svg {
  width: min(320px, 70vw);
  height: min(320px, 70vw);
  display: block;
}

.qr-lightbox-close {
  position: absolute;
  top: -16px;
  right: -16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(0, 0, 37);
}

.pm-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: rgba(0, 0, 37, 0.04);
  border-radius: 10px;
  padding: 8px 10px;
  box-sizing: border-box;
}

.pm-link-row span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: var(--ink-soft);
}

.pm-external-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: rgb(13, 60, 254);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 12px;
  text-decoration: none;
  box-sizing: border-box;
}

.pm-external-btn:hover { filter: brightness(1.08); color: #fff; }

@media (max-width: 640px) {
  .pm-section { margin-top: 0; }
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 30px 40px 40px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
}

.footer-contact {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* ---------- WhatsApp FAB ---------- */
.fab-whatsapp {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 50;
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

/* ---------- Confirmation page ---------- */
.confirm-card {
  max-width: 560px;
  margin: 80px auto;
  background: #fff;
  color: var(--ink);
  border-radius: 24px;
  padding: 44px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 70px rgba(0, 0, 0, 0.35);
}

.confirm-icon { font-size: 46px; margin-bottom: 10px; }
.confirm-card h1 { font-size: 24px; margin: 0 0 10px; }
.confirm-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.5; }
.confirm-card a.back-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--blue);
  font-weight: 700;
}

@media (max-width: 640px) {
  .tw-header { padding: 20px; }
  .checkout-card { padding: 26px 20px; border-radius: 18px; }
  .hero { padding: 20px 16px 40px; }
  .gateway-tabs { flex-direction: column; }
  footer { padding: 24px 20px 30px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
