/* ==========================================================================
   PAYMENT CHECKOUT — Premium checkout UI
   ========================================================================== */

.payment-page {
  --pay-primary: #0F172A;
  --pay-secondary: #1E40AF;
  --pay-accent: #F59E0B;
  --pay-bg: #F8FAFC;
  --pay-text: #0F172A;
  --pay-muted: #64748B;
  --pay-border: rgba(15, 23, 42, 0.08);
  --pay-glass: rgba(255, 255, 255, 0.72);
  --pay-radius: 16px;
  --pay-shadow: 0 4px 24px -4px rgba(15, 23, 42, 0.08);
  --pay-shadow-hover: 0 12px 40px -8px rgba(30, 64, 175, 0.18);
  --pay-transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--pay-bg);
  color: var(--pay-text);
  min-height: 100vh;
}

body.dark-mode.payment-page {
  --pay-bg: #0A0A0B;
  --pay-text: #F1F5F9;
  --pay-muted: #94A3B8;
  --pay-border: rgba(255, 255, 255, 0.08);
  --pay-glass: rgba(20, 20, 24, 0.85);
}

.pay-checkout {
  padding: clamp(100px, 14vw, 130px) 0 clamp(60px, 8vw, 100px);
}

.pay-checkout__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

.pay-checkout__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--pay-secondary);
  margin-bottom: 12px;
}

.pay-checkout__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 12px;
}

.pay-checkout__desc {
  font-size: 1rem;
  color: var(--pay-muted);
  line-height: 1.65;
}

/* Progress */
.pay-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  max-width: 480px;
  margin: 0 auto 48px;
}

.pay-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  opacity: 0.45;
  transition: opacity var(--pay-transition);
}

.pay-progress__step.is-active,
.pay-progress__step.is-done {
  opacity: 1;
}

.pay-progress__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  background: var(--pay-glass);
  border: 2px solid var(--pay-border);
  backdrop-filter: blur(8px);
  transition: all var(--pay-transition);
}

.pay-progress__step.is-active .pay-progress__num {
  background: var(--pay-secondary);
  border-color: var(--pay-secondary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.2);
}

.pay-progress__step.is-done .pay-progress__num {
  background: #10B981;
  border-color: #10B981;
  color: #fff;
}

.pay-progress__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pay-muted);
}

.pay-progress__line {
  flex: 1;
  height: 2px;
  min-width: 40px;
  max-width: 80px;
  background: var(--pay-border);
  margin-bottom: 28px;
}

/* Layout */
.pay-checkout__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

@media (min-width: 960px) {
  .pay-checkout__layout {
    grid-template-columns: minmax(280px, 340px) 1fr;
    gap: 32px;
  }
}

/* Method cards */
.pay-methods {
  background: var(--pay-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--pay-border);
  border-radius: var(--pay-radius);
  padding: 20px;
  box-shadow: var(--pay-shadow);
}

.pay-methods__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pay-muted);
  margin-bottom: 16px;
}

.pay-methods__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

@media (min-width: 480px) {
  .pay-methods__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 960px) {
  .pay-methods__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pay-method {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 88px;
  padding: 14px 10px;
  background: #fff;
  border: 2px solid var(--pay-border);
  border-radius: 12px;
  cursor: pointer;
  transition: transform var(--pay-transition), box-shadow var(--pay-transition),
    border-color var(--pay-transition), background var(--pay-transition);
  text-align: center;
}

body.dark-mode .pay-method {
  background: rgba(255, 255, 255, 0.04);
}

.pay-method:hover {
  transform: translateY(-2px);
  box-shadow: var(--pay-shadow-hover);
  border-color: rgba(30, 64, 175, 0.35);
}

.pay-method.is-selected {
  border-color: var(--pay-secondary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15), var(--pay-shadow-hover);
  background: rgba(30, 64, 175, 0.04);
}

.pay-method__icon {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-method__icon img {
  height: 24px;
  width: auto;
  max-width: 56px;
  object-fit: contain;
}

.pay-method__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--pay-text);
  line-height: 1.2;
}

.pay-method__desc {
  display: block;
  font-size: 9px;
  font-weight: 500;
  color: var(--pay-muted);
  margin-top: 3px;
  line-height: 1.25;
}

.pay-method--yape .pay-method__label { color: #6A0DAD; }
.pay-method--plin .pay-method__label { color: #00AFA0; }

.pay-method--plin .pay-method__icon {
  height: auto;
  min-height: 44px;
}

.pay-method__icon-qr {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.pay-method__icon-qr img {
  position: relative;
  z-index: 1;
  display: block;
  width: 44px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 1px 4px rgba(15, 23, 42, 0.12));
}

body.dark-mode .pay-method__icon-qr img {
  filter: brightness(0) invert(1) drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
}

.pay-method--plin.is-selected .pay-method__icon-qr img {
  filter: drop-shadow(0 2px 8px rgba(0, 175, 160, 0.25));
}

body.dark-mode .pay-method--plin.is-selected .pay-method__icon-qr img {
  filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0, 175, 160, 0.35));
}

.pay-method--mercadopago .pay-method__label { color: #00B1EA; }
.pay-method--transferencia .pay-method__label { color: #1E40AF; }
.pay-method--pagoefectivo .pay-method__label { color: #1569C7; }

.pay-method--yape.is-selected { border-color: #6A0DAD; box-shadow: 0 0 0 3px rgba(106, 13, 173, 0.15); }
.pay-method--plin.is-selected { border-color: #00AFA0; box-shadow: 0 0 0 3px rgba(0, 175, 160, 0.15); }
.pay-method--mercadopago.is-selected { border-color: #00B1EA; box-shadow: 0 0 0 3px rgba(0, 177, 234, 0.15); }
.pay-method--transferencia.is-selected { border-color: #1E40AF; box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15); }
.pay-method--pagoefectivo.is-selected { border-color: #1569C7; box-shadow: 0 0 0 3px rgba(21, 105, 199, 0.15); }
.pay-method--paypal.is-selected { border-color: #003087; box-shadow: 0 0 0 3px rgba(0, 48, 135, 0.12); }
.pay-method--binance.is-selected { border-color: #F0B90B; box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.2); }

/* Panel */
.pay-panel {
  background: var(--pay-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--pay-border);
  border-radius: var(--pay-radius);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--pay-shadow);
  min-height: 420px;
}

.pay-panel__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 360px;
  padding: 24px;
  color: var(--pay-muted);
}

.pay-panel__empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.pay-panel__empty h3 {
  font-size: 1.25rem;
  color: var(--pay-text);
  margin-bottom: 8px;
}

.pay-panel__empty p {
  font-size: 0.95rem;
  max-width: 320px;
  line-height: 1.6;
}

.is-hidden { display: none !important; }

.pay-panel__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--pay-border);
}

.pay-panel__brand-logo {
  height: 36px;
  display: flex;
  align-items: center;
}

.pay-panel__brand-logo img {
  height: 32px;
  width: auto;
}

.pay-panel__brand-text h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.pay-panel__brand-text p {
  font-size: 13px;
  color: var(--pay-muted);
}

/* Form */
.pay-form {
  animation: payFadeIn 300ms ease;
}

@keyframes payFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.pay-form__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 560px) {
  .pay-form__grid--2 { grid-template-columns: 1fr 1fr; }
  .pay-form__grid--exp { grid-template-columns: 1fr 1fr; }
}

.pay-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pay-field--full { grid-column: 1 / -1; }

.pay-field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pay-muted);
}

.pay-field input,
.pay-field select,
.pay-field textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  color: var(--pay-text);
  background: #fff;
  border: 1.5px solid var(--pay-border);
  border-radius: 12px;
  transition: border-color var(--pay-transition), box-shadow var(--pay-transition);
}

body.dark-mode .pay-field input,
body.dark-mode .pay-field select,
body.dark-mode .pay-field textarea {
  background: rgba(255, 255, 255, 0.06);
}

.pay-field input:focus,
.pay-field select:focus,
.pay-field textarea:focus {
  outline: none;
  border-color: var(--pay-secondary);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.12);
}

.pay-field.is-valid input,
.pay-field.is-valid select { border-color: #10B981; }

.pay-field.is-error input,
.pay-field.is-error select {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.pay-field__hint {
  font-size: 12px;
  color: var(--pay-muted);
}

.pay-field__error {
  font-size: 12px;
  color: #EF4444;
  display: none;
}

.pay-field.is-error .pay-field__error { display: block; }

/* Card preview */
.pay-card-preview {
  margin-bottom: 24px;
  perspective: 800px;
}

.pay-card-visual {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1.586;
  margin: 0 auto;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 50%, #1E40AF 100%);
  color: #fff;
  box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.5);
  transition: background 400ms ease;
  overflow: hidden;
}

.pay-card-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.08) 50%, transparent 70%);
  pointer-events: none;
}

.pay-card-visual--visa { background: linear-gradient(135deg, #1A1F71 0%, #0F172A 100%); }
.pay-card-visual--mastercard { background: linear-gradient(135deg, #EB001B 0%, #F79E1B 50%, #0F172A 100%); }
.pay-card-visual--amex { background: linear-gradient(135deg, #2E77BC 0%, #006FCF 100%); }
.pay-card-visual--diners { background: linear-gradient(135deg, #004A97 0%, #0079BE 100%); }

.pay-card-visual__chip {
  width: 44px;
  height: 32px;
  background: linear-gradient(135deg, #D4AF37, #B8860B);
  border-radius: 6px;
  margin-bottom: 28px;
}

.pay-card-visual__number {
  font-family: "Courier New", monospace;
  font-size: clamp(16px, 3.5vw, 20px);
  letter-spacing: 0.12em;
  margin-bottom: 20px;
  word-spacing: 0.2em;
}

.pay-card-visual__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pay-card-visual__name {
  font-size: 14px;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pay-card-visual__brand {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  opacity: 0.9;
}

/* QR & instructions */
.pay-qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(15, 23, 42, 0.03);
  border-radius: 12px;
  margin-bottom: 20px;
}

body.dark-mode .pay-qr-block {
  background: rgba(255, 255, 255, 0.04);
}

.pay-qr-block img {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  border: 4px solid #fff;
  box-shadow: var(--pay-shadow);
}

.pay-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  counter-reset: paystep;
}

.pay-steps li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--pay-muted);
}

.pay-steps li::before {
  counter-increment: paystep;
  content: counter(paystep);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--pay-secondary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-code-box {
  padding: 16px 20px;
  background: var(--pay-primary);
  color: #fff;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 20px;
}

.pay-code-box__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.7;
  margin-bottom: 6px;
}

.pay-code-box__value {
  font-family: "Courier New", monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.pay-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}

.pay-status--pending { background: rgba(245, 158, 11, 0.15); color: #D97706; }
.pay-status--valid { background: rgba(16, 185, 129, 0.15); color: #059669; }

/* PayPal branded */
.pay-form--paypal .pay-panel__brand { border-bottom-color: rgba(0, 48, 135, 0.2); }

/* Submit */
.pay-form__actions {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.pay-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--pay-secondary), #1D4ED8);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: transform var(--pay-transition), box-shadow var(--pay-transition);
  min-width: 200px;
}

.pay-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px -8px rgba(30, 64, 175, 0.45);
}

.pay-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.pay-submit.is-loading {
  pointer-events: none;
  position: relative;
  color: transparent;
}

.pay-submit.is-loading::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: paySpin 0.7s linear infinite;
}

@keyframes paySpin {
  to { transform: rotate(360deg); }
}

/* Trust badges */
.pay-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--pay-border);
}

.pay-trust span {
  font-size: 12px;
  font-weight: 500;
  color: var(--pay-muted);
}

/* Success */
.pay-panel__success {
  text-align: center;
  padding: 48px 24px;
  animation: payFadeIn 400ms ease;
}

.pay-panel__success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #10B981;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-panel__success h3 {
  font-size: 1.35rem;
  margin-bottom: 10px;
}

.pay-panel__success p {
  color: var(--pay-muted);
  margin-bottom: 24px;
  max-width: 400px;
  margin-inline: auto;
  line-height: 1.6;
}

/* Footer pay links */
a.pie-footer__pay {
  text-decoration: none;
  color: inherit;
}

a.pie-footer__pay .pie-footer__pay--text {
  display: block;
}

a.pie-footer__pay:focus-visible {
  outline: 2px solid var(--gold, #B8860B);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .pay-methods__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .pay-method {
    min-height: 76px;
    padding: 10px 6px;
  }
  .pay-method__icon img {
    height: 20px;
  }

  .pay-method__icon-qr {
    width: 40px;
    height: 40px;
  }

  .pay-method__icon-qr img {
    width: 40px;
  }

  .pay-plin-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pay-panel__brand--plin {
    flex-wrap: wrap;
  }

  .pay-plin-security-badge {
    width: 100%;
    margin-top: 4px;
  }
}

/* ── Yape / Plin Directo (premium QR layout) ── */
.pay-panel__brand--plin {
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.pay-panel__brand-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.pay-panel__brand-main--no-logo {
  gap: 0;
}

.pay-plin-accent {
  color: var(--gold, #C5A059);
  font-weight: 700;
}

.pay-plin-bank-accent {
  color: #004481;
  font-weight: 700;
}

.pay-panel__brand--plin .pay-panel__brand-text h3 {
  font-size: 1.05rem;
  line-height: 1.35;
}

.pay-panel__brand--plin .pay-panel__brand-text p {
  font-size: 13px;
  line-height: 1.5;
  max-width: 36em;
}

.pay-method--plin .pay-method__desc {
  font-size: 10px;
  line-height: 1.35;
}

.pay-plin-security-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(0, 175, 160, 0.08);
  border: 1px solid rgba(0, 175, 160, 0.22);
  color: #00AFA0;
  flex-shrink: 0;
}

.pay-plin-security-badge svg {
  flex-shrink: 0;
}

.pay-plin-security-badge strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--pay-text);
  line-height: 1.3;
}

.pay-plin-security-badge span {
  display: block;
  font-size: 11px;
  color: var(--pay-muted);
  line-height: 1.3;
}

.pay-form--plin {
  margin: 0;
}

.pay-plin-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 20px;
  padding: clamp(18px, 3vw, 28px);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

body.dark-mode .pay-plin-card {
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.pay-plin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(20px, 4vw, 32px);
  align-items: start;
}

.pay-plin-qr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.pay-plin-qr-frame {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.pay-plin-qr-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  box-sizing: content-box;
  margin: 0 auto;
  line-height: 0;
}

.pay-plin-qr-inner img {
  display: block;
  width: 220px;
  height: 220px;
  max-width: min(220px, calc(100vw - 96px));
  max-height: min(220px, calc(100vw - 96px));
  object-fit: contain;
  object-position: center center;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
  flex-shrink: 0;
}

.pay-plin-qr-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-style: solid;
  border-width: 0;
  pointer-events: none;
  z-index: 1;
}

.pay-plin-qr-corner--tl {
  top: 0;
  left: 0;
  border-top-width: 3px;
  border-left-width: 3px;
  border-color: var(--gold, #C5A059);
  border-top-left-radius: 14px;
}

.pay-plin-qr-corner--tr {
  top: 0;
  right: 0;
  border-top-width: 3px;
  border-right-width: 3px;
  border-color: var(--gold, #C5A059);
  border-top-right-radius: 14px;
}

.pay-plin-qr-corner--bl {
  bottom: 0;
  left: 0;
  border-bottom-width: 3px;
  border-left-width: 3px;
  border-color: var(--gold, #C5A059);
  border-bottom-left-radius: 14px;
}

.pay-plin-qr-corner--br {
  bottom: 0;
  right: 0;
  border-bottom-width: 3px;
  border-right-width: 3px;
  border-color: var(--gold, #C5A059);
  border-bottom-right-radius: 14px;
}

.pay-plin-qr-label {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  line-height: 1.35;
}

.pay-plin-qr-meta {
  width: 100%;
  max-width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pay-plin-pay-apps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pay-plin-app-logo--plin {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
}

.pay-plin-app-logo--yape {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

.pay-plin-app-sep {
  width: 1px;
  height: 22px;
  background: rgba(15, 23, 42, 0.12);
  flex-shrink: 0;
}

.pay-plin-merchant-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  max-width: 100%;
  padding: 0 4px;
}

.pay-plin-merchant-info strong {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
}

.pay-plin-merchant-info span {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.35;
}

.pay-plin-merchant {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.pay-plin-merchant svg {
  flex-shrink: 0;
  color: var(--gold, #C5A059);
}

.pay-plin-merchant span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pay-plin-steps-col h4 {
  margin: 0 0 18px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.pay-plin-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pay-plin-step {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: center;
  column-gap: 10px;
  min-width: 0;
}

.pay-plin-step-pair {
  width: 110px;
  height: 68px;
  object-fit: contain;
  object-position: left center;
  flex-shrink: 0;
  display: block;
  margin: 0;
  padding: 0;
  justify-self: start;
}

.pay-plin-step-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

@media (max-width: 520px) {
  .pay-plin-step {
    grid-template-columns: 98px minmax(0, 1fr);
    column-gap: 8px;
  }

  .pay-plin-step-pair {
    width: 98px;
    height: 60px;
  }
}

.pay-plin-step-text strong {
  font-weight: 700;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
}

.pay-plin-step-text > span {
  font-weight: 400;
  color: #475569;
  font-size: 15px;
  line-height: 1.45;
}

.pay-plin-actions {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.pay-plin-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 24px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  background: #008000;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 128, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pay-plin-submit:hover {
  transform: translateY(-1px);
  background: #006b00;
  box-shadow: 0 14px 32px rgba(0, 128, 0, 0.35);
}

.pay-plin-submit:active {
  transform: translateY(0);
}

.pay-plin-submit-text {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.pay-plin-submit-arrow {
  flex-shrink: 0;
  margin-left: 2px;
  opacity: 0.95;
}

.pay-plin-submit:hover .pay-plin-submit-arrow {
  transform: translateX(2px);
  transition: transform 0.2s ease;
}

.pay-plin-trust-bar {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  margin-top: 16px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.pay-plin-trust-bar__item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 10px;
  color: #0f172a;
}

.pay-plin-trust-bar__item:not(:last-child) {
  border-right: 1px solid rgba(15, 23, 42, 0.1);
}

.pay-plin-trust-bar__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #334155;
}

.pay-plin-trust-bar__text {
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.25;
  text-align: left;
  min-width: 0;
  overflow-wrap: anywhere;
}

.pay-plin-trust-bar__item--bank {
  gap: 10px;
  padding: 10px 12px;
}

.pay-plin-trust-bbva {
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 800;
  color: #004481;
  letter-spacing: -0.03em;
  line-height: 1;
}

.pay-plin-trust-bbva-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  text-align: left;
}

.pay-plin-trust-bbva-meta span {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #334155;
  line-height: 1.2;
}

.pay-plin-trust-bbva-meta strong {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #004481;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .pay-plin-trust-bar {
    border-radius: 16px;
    flex-direction: column;
  }

  .pay-plin-trust-bar__item:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  }

  .pay-plin-trust-bar__item {
    padding: 10px 14px;
    justify-content: flex-start;
  }

  .pay-plin-trust-bar__text {
    font-size: 8px;
  }
}

/* ==========================================================================
   IZIPAY EMBEDDED FORM — isolate from site global resets
   ========================================================================== */
#izipay-wrapper,
#pay-form .kr-embedded {
  width: 100%;
  max-width: 480px;
  margin: 12px auto 0;
}

#izipay-wrapper .kr-embedded,
#pay-form .kr-embedded {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px 18px;
  box-sizing: border-box;
  --kr-field-background-color: #ffffff;
  --kr-field-color: #1a1a1a;
  --kr-field-placeholder-color: #94a3b8;
  --kr-field-border-color: #cbd5e1;
  --kr-field-border-radius: 8px;
}

html.dark-mode #izipay-wrapper .kr-embedded,
html.dark-mode #pay-form .kr-embedded,
.dark-mode #izipay-wrapper .kr-embedded,
.dark-mode #pay-form .kr-embedded {
  background: #16161a;
  border-color: rgba(197, 160, 89, 0.25);
  --kr-field-background-color: #121214;
  --kr-field-color: #ffffff;
  --kr-field-placeholder-color: #63636b;
  --kr-field-border-color: rgba(255, 255, 255, 0.12);
}

/* Undo site-wide * { margin:0; padding:0 } and button/input resets inside Izipay */
#izipay-wrapper .kr-embedded *,
#izipay-wrapper .kr-embedded *::before,
#izipay-wrapper .kr-embedded *::after,
#pay-form .kr-embedded *,
#pay-form .kr-embedded *::before,
#pay-form .kr-embedded *::after,
.kr-popin *,
.kr-popin *::before,
.kr-popin *::after,
[class*="kr-popin"] *,
[class*="kr-popin"] *::before,
[class*="kr-popin"] *::after {
  box-sizing: border-box;
}

#izipay-wrapper .kr-embedded .kr-pan,
#izipay-wrapper .kr-embedded .kr-expiry,
#izipay-wrapper .kr-embedded .kr-security-code,
#izipay-wrapper .kr-embedded .kr-card-holder-name,
#pay-form .kr-embedded .kr-pan,
#pay-form .kr-embedded .kr-expiry,
#pay-form .kr-embedded .kr-security-code,
#pay-form .kr-embedded .kr-card-holder-name {
  margin: 0 0 12px;
  min-height: 48px;
  pointer-events: auto;
}

#izipay-wrapper .kr-embedded .kr-iframe-wrapper,
#pay-form .kr-embedded .kr-iframe-wrapper,
#izipay-wrapper .kr-embedded .kr-iframe-wrapper iframe,
#pay-form .kr-embedded .kr-iframe-wrapper iframe {
  pointer-events: auto !important;
}

#izipay-wrapper .kr-embedded input.kr-input-field,
#pay-form .kr-embedded input.kr-input-field {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #1a1a1a;
  font: 14px/1.4 "Outfit", system-ui, sans-serif;
}

html.dark-mode #izipay-wrapper .kr-embedded input.kr-input-field,
html.dark-mode #pay-form .kr-embedded input.kr-input-field,
.dark-mode #izipay-wrapper .kr-embedded input.kr-input-field,
.dark-mode #pay-form .kr-embedded input.kr-input-field {
  background: #121214;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.12);
}

#izipay-wrapper .kr-embedded .kr-payment-button,
#pay-form .kr-embedded .kr-payment-button {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px 18px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #c5a059 0%, #a8843d 100%);
  color: #121214;
  font: 700 13px/1.2 "Outfit", system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

#izipay-wrapper .kr-embedded .kr-form-error,
#pay-form .kr-embedded .kr-form-error {
  margin-top: 10px;
  color: #ff5252;
  font-size: 13px;
  text-align: center;
}

#izipay-wrapper .kr-embedded .kr-installment-number,
#izipay-wrapper .kr-embedded .kr-first-installment-delay,
#pay-form .kr-embedded .kr-installment-number,
#pay-form .kr-embedded .kr-first-installment-delay {
  display: none !important;
}

/* If popin still appears, keep it usable above site chrome */
.kr-popin,
[class*="kr-popin"],
.kr-modal,
.kr-overlay {
  z-index: 100000 !important;
}

.kr-popin img,
[class*="kr-popin"] img {
  max-width: none;
  height: auto;
  display: inline-block;
}

.kr-popin button,
.kr-popin input,
[class*="kr-popin"] button,
[class*="kr-popin"] input {
  font: inherit;
}
