.checkout-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 8%, rgba(39, 199, 238, 0.08), transparent 28%),
    radial-gradient(circle at 90% 18%, rgba(246, 92, 168, 0.07), transparent 25%),
    #f3f2ee;
}

.checkout-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  isolation: isolate;
  background: rgba(10, 9, 16, 0.96);
  color: var(--white);
  box-shadow: 0 12px 35px rgba(10, 9, 16, 0.12);
  backdrop-filter: blur(16px);
}

.checkout-header-inner {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.checkout-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-header-actions a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.checkout-header-actions a:hover,
.checkout-header-actions a:focus-visible {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
}

.checkout-main {
  position: relative;
  z-index: 0;
  isolation: isolate;
  padding: clamp(54px, 7vw, 90px) 0 110px;
}

.checkout-intro {
  max-width: 760px;
  margin-bottom: 44px;
}

.checkout-intro .eyebrow {
  margin-bottom: 15px;
}

.checkout-intro h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 70px);
  letter-spacing: -0.055em;
  line-height: 1;
}

.checkout-intro h1 em {
  color: var(--cyan);
  font-style: normal;
}

.checkout-intro > p:last-child {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.checkout-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.checkout-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-steps li:not(:last-child)::after {
  width: 24px;
  height: 1px;
  margin-left: 2px;
  background: var(--line);
  content: "";
}

.checkout-steps b {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 10px;
}

.checkout-steps .is-current {
  color: var(--ink);
}

.checkout-steps .is-current b {
  border-color: var(--pink);
  background: var(--pink);
}

.checkout-grid {
  display: grid;
  align-items: start;
  grid-template-columns: minmax(285px, 0.72fr) minmax(0, 1.28fr);
  gap: 26px;
}

.order-summary,
.payment-panel {
  border: 1px solid rgba(10, 9, 16, 0.08);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(20, 14, 27, 0.08);
}

.order-summary {
  position: sticky;
  top: 98px;
  overflow: hidden;
}

.summary-visual {
  position: relative;
  display: grid;
  min-height: 330px;
  overflow: hidden;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(39, 199, 238, 0.15), transparent 42%),
    var(--ink);
}

.summary-visual::before,
.summary-visual::after {
  position: absolute;
  border: 1px solid rgba(39, 199, 238, 0.18);
  border-radius: 50%;
  content: "";
}

.summary-visual::before {
  width: 280px;
  height: 280px;
}

.summary-visual::after {
  width: 360px;
  height: 190px;
  border-color: rgba(246, 92, 168, 0.16);
  transform: rotate(-18deg);
}

.summary-visual img {
  position: relative;
  z-index: 2;
  width: min(78%, 280px);
  height: auto;
  border-radius: 28px;
  mix-blend-mode: screen;
}

.summary-badge {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: 18px;
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-content {
  padding: 28px;
}

.summary-content h2 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.035em;
}

.summary-subtitle {
  margin: 6px 0 23px;
  color: var(--muted);
  font-size: 13px;
}

.summary-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.summary-row span:last-child {
  text-align: right;
}

.summary-row.total {
  align-items: baseline;
  padding-top: 20px;
  font-weight: 900;
}

.summary-row.total strong {
  font-size: 26px;
}

.summary-note {
  display: flex;
  gap: 10px;
  margin: 18px 0 0;
  padding: 13px;
  border-radius: 13px;
  background: #f3f2ee;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.summary-note b {
  color: var(--ink);
}

.payment-panel {
  overflow: hidden;
}

.payment-head {
  padding: 30px 32px 24px;
  border-bottom: 1px solid var(--line);
}

.payment-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.payment-head h2 {
  margin: 0;
  font-size: 29px;
  letter-spacing: -0.035em;
}

.payment-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.secure-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(145, 239, 85, 0.14);
  color: #326a16;
  font-size: 10px;
  font-weight: 850;
}

.secure-chip::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 9px rgba(145, 239, 85, 0.8);
  content: "";
}

.payment-tabs {
  display: grid;
  margin-top: 22px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f3f2ee;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
}

.payment-tab {
  display: flex;
  min-height: 55px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.payment-tab[aria-selected="true"] {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 5px 18px rgba(10, 9, 16, 0.08);
}

.paypal-mark {
  color: #003087;
  font-size: 19px;
  font-style: italic;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.card-mark {
  position: relative;
  width: 25px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.card-mark::before {
  position: absolute;
  top: 3px;
  right: 0;
  left: 0;
  height: 2px;
  background: currentColor;
  content: "";
}

.payment-explainer {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 12px;
}

.payment-explainer > span:first-child {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(39, 199, 238, 0.12);
  color: #087b9a;
  font-weight: 900;
}

.payment-explainer strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 12px;
}

.form-shell {
  position: relative;
  min-height: 900px;
  background: var(--white);
}

.form-loader {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  display: flex;
  min-height: 280px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.form-loader::before {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(10, 9, 16, 0.1);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: checkout-spin 700ms linear infinite;
  content: "";
}

.form-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.checkout-frame {
  display: block;
  width: 100%;
  min-height: 1200px;
  border: 0;
  background: var(--white);
}

.form-fallback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 30px;
  border-top: 1px solid var(--line);
  background: #faf9f6;
  color: var(--muted);
  font-size: 12px;
}

.form-fallback a {
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 850;
}

.checkout-help {
  display: grid;
  margin-top: 28px;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.help-card {
  min-height: 130px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.62);
}

.help-card b {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
}

.help-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.checkout-footer {
  padding: 28px 0;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
}

.checkout-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.checkout-footer a {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
}

@keyframes checkout-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 940px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
  }

  .summary-visual {
    min-height: 100%;
  }
}

@media (max-width: 680px) {
  body.checkout-page {
    padding-bottom: 0;
  }

  .checkout-header-inner {
    min-height: 68px;
  }

  .checkout-header-actions a:first-child {
    display: none;
  }

  .checkout-main {
    padding-top: 38px;
  }

  .checkout-steps {
    align-items: flex-start;
    flex-direction: column;
  }

  .checkout-steps li:not(:last-child)::after {
    display: none;
  }

  .order-summary {
    display: block;
  }

  .summary-visual {
    min-height: 285px;
  }

  .payment-head {
    padding: 24px 20px 20px;
  }

  .payment-title-row {
    display: block;
  }

  .secure-chip {
    margin-top: 13px;
  }

  .payment-tab {
    min-height: 52px;
    font-size: 13px;
  }

  .form-fallback {
    align-items: flex-start;
    flex-direction: column;
    padding: 17px 20px;
  }

  .checkout-help {
    grid-template-columns: 1fr;
  }

  .help-card {
    min-height: auto;
  }

  .checkout-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-loader::before {
    animation-duration: 1.8s !important;
  }
}
