.page-checkout,
.page-checkout-complete {
  min-width: 320px;
  background:
    radial-gradient(circle at 12% 5%, rgba(55, 228, 176, 0.16), transparent 30rem),
    radial-gradient(circle at 88% 10%, rgba(140, 246, 210, 0.08), transparent 26rem),
    #06080d;
  color: var(--text);
}

.page-checkout::before,
.page-checkout-complete::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.027) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.027) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 86%);
}

.checkout-exit {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.checkout-exit:hover { color: var(--text); border-color: rgba(140,246,210,.38); }

.checkout-section {
  min-height: 100svh;
  padding: calc(var(--nav-h) + 34px) 0 clamp(60px, 8vw, 96px);
}

.checkout-container { max-width: 1180px; }

.checkout-progress {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 0 auto 30px;
  color: var(--subtle);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.checkout-progress span { display: inline-flex; align-items: center; gap: 10px; }
.checkout-progress span:not(:last-child)::after { content: "/"; color: var(--line); }
.checkout-progress .is-complete { color: var(--muted); }
.checkout-progress .is-current { color: var(--accent-2); }

.checkout-split { display: grid; gap: 30px; align-items: start; }
.checkout-sidebar { display: grid; gap: 16px; }

.summary-box,
.checkout-form-wrapper,
.status-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 18, 27, .9);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .32);
  backdrop-filter: blur(16px);
}

.summary-box { padding: clamp(24px, 3vw, 36px); }
.summary-label,
.checkout-header-inline > span,
.status-kicker {
  display: block;
  margin-bottom: 10px;
  color: var(--accent-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.summary-title {
  margin: 0 0 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -.05em;
  line-height: 1;
}

.summary-price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; }
.summary-total-label { color: var(--muted); font-size: 13px; font-weight: 700; }
.summary-total-price { color: var(--text); font-size: clamp(34px, 4vw, 48px); font-weight: 800; letter-spacing: -.05em; }
.summary-note { margin: 4px 0 24px; color: var(--subtle); text-align: right; font-size: 11px; }

.summary-features { padding: 20px; border-radius: 10px; background: rgba(255,255,255,.025); }
.features-heading { margin: 0 0 13px; color: var(--text); font-size: 12px; font-weight: 700; }
#summary-features-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
#summary-features-list li { position: relative; padding-left: 20px; color: var(--muted); font-size: 12px; line-height: 1.45; }
#summary-features-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }

.trust-box { display: flex; gap: 15px; padding: 20px; border: 1px solid rgba(140,246,210,.24); border-radius: 12px; background: rgba(55,228,176,.055); }
.trust-icon { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: rgba(55,228,176,.13); color: var(--accent); font-weight: 800; }
.trust-box h2 { margin: 0 0 5px; color: var(--text); font-size: 14px; }
.trust-box p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.trust-signals { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; color: var(--subtle); font-size: 11px; }

.checkout-header-inline { margin-bottom: 20px; }
.checkout-header-inline h2 { margin: 0 0 8px; color: var(--text); font-size: clamp(32px, 4vw, 50px); letter-spacing: -.055em; line-height: 1; text-transform: none; }
.checkout-header-inline p { max-width: 520px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.checkout-form-wrapper { min-height: 300px; padding: clamp(22px, 3vw, 34px); }

.checkout-loading { min-height: 230px; display: flex; align-items: center; justify-content: center; gap: 16px; color: var(--muted); }
.checkout-loading strong { display: block; margin-bottom: 3px; color: var(--text); font-size: 14px; }
.checkout-loading p { margin: 0; font-size: 12px; }
.spinner { width: 22px; height: 22px; flex: 0 0 22px; display: inline-block; border: 2px solid rgba(255,255,255,.18); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.checkout-heading { margin: 26px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--text); font-size: 13px; }
.local-preview-banner { display: grid; gap: 3px; margin-bottom: 20px; padding: 14px 16px; border: 1px solid rgba(140,246,210,.28); border-radius: 8px; background: rgba(55,228,176,.07); }
.local-preview-banner strong { color: var(--accent-2); font-size: 12px; }
.local-preview-banner span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.preview-field,
.preview-payment { min-height: 58px; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: #0b1018; }
.preview-field { align-items: flex-start; flex-direction: column; gap: 3px; }
.preview-field span { color: var(--subtle); font-size: 10px; }
.preview-field strong,
.preview-payment strong { color: var(--text); font-size: 12px; font-weight: 600; }
.preview-payment > span { min-width: 48px; color: var(--accent-2); font-size: 20px; letter-spacing: .08em; }
.preview-payment div { display: grid; gap: 3px; }
.preview-payment small { color: var(--subtle); font-size: 10px; line-height: 1.4; }
.checkout-button { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 26px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--accent-2); color: var(--bg); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.checkout-button:disabled { opacity: .48; cursor: not-allowed; }
.checkout-consent { margin: 12px 0 0; color: var(--subtle); text-align: center; font-size: 10px; line-height: 1.5; }
.checkout-message { margin-top: 18px; padding: 14px; border: 1px solid rgba(255,107,107,.3); border-radius: 8px; background: rgba(255,107,107,.07); color: #ffb0b0; font-size: 12px; line-height: 1.55; }
.checkout-recovery { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.checkout-recovery a { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); font-size: 12px; font-weight: 700; }
.hidden, [hidden] { display: none !important; }

.confirmation-section { display: grid; align-items: center; }
.confirmation-container { max-width: 920px; }
.status-card { padding: clamp(30px, 6vw, 68px); text-align: center; }
.status-icon { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 22px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.025); }
.status-icon svg { width: 36px; height: 36px; }
.status-success .status-icon { border-color: rgba(55,228,176,.42); color: var(--accent); background: rgba(55,228,176,.08); }
.status-error .status-icon { border-color: rgba(255,107,107,.4); color: #ff7777; background: rgba(255,107,107,.07); }
.status-pending .status-icon { border-color: rgba(245,180,65,.4); color: #f5b441; background: rgba(245,180,65,.07); }
.status-card h1 { margin: 0 0 12px; color: var(--text); font-size: clamp(38px, 6vw, 70px); letter-spacing: -.065em; line-height: .98; }
#status-message { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 15px; line-height: 1.65; }

.order-confirmation { width: min(100%, 440px); display: grid; gap: 4px; margin: 28px auto 0; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); }
.order-confirmation span { color: var(--subtle); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.order-confirmation strong { color: var(--text); font-size: 26px; }
.order-confirmation small { color: var(--muted); font-size: 11px; }

.next-steps { display: grid; margin-top: 30px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-align: left; }
.next-steps > div { padding: 20px; border-bottom: 1px solid var(--line); background: rgba(8,12,18,.55); }
.next-steps > div:last-child { border-bottom: 0; }
.next-steps span { display: block; margin-bottom: 16px; color: var(--accent-2); font-size: 9px; font-weight: 800; }
.next-steps strong { display: block; margin-bottom: 5px; color: var(--text); font-size: 13px; }
.next-steps p { margin: 0; color: var(--subtle); font-size: 11px; line-height: 1.5; }
.status-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 26px; }
.status-actions a { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; border-radius: 8px; font-size: 13px; font-weight: 800; }
.status-primary { background: var(--accent-2); color: var(--bg); }
.status-secondary { border: 1px solid var(--line); color: var(--text); }

@media (min-width: 860px) {
  .checkout-split { grid-template-columns: minmax(340px, .85fr) minmax(440px, 1.15fr); gap: clamp(36px, 5vw, 70px); }
  .checkout-sidebar { position: sticky; top: calc(var(--nav-h) + 28px); }
  .next-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .next-steps > div { border-right: 1px solid var(--line); border-bottom: 0; }
  .next-steps > div:last-child { border-right: 0; }
}

@media (max-width: 640px) {
  .checkout-progress { justify-content: flex-start; overflow-x: auto; white-space: nowrap; }
  .checkout-section { padding-top: calc(var(--nav-h) + 20px); }
  .summary-box, .checkout-form-wrapper { padding: 22px; }
  .trust-signals { justify-content: flex-start; }
  .status-actions, .status-actions a { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 1.5s; } }
