:root {
  --pw-navy: #0b1730;
  --pw-navy-2: #12284b;
  --pw-ink: #132238;
  --pw-muted: #66758a;
  --pw-line: #e5ebf3;
  --pw-surface: #ffffff;
  --pw-page: #f4f7fb;
  --pw-orange: #f97316;
  --pw-red: #ef4444;
  --pw-blue: #2563eb;
  --pw-green: #16a34a;
  --pw-yellow: #d97706;
  --pw-shadow: 0 18px 45px rgba(18, 40, 75, .10);
}

html { scroll-behavior: smooth; }
#payment { scroll-margin-top: 24px; }

body.pw-body {
  min-height: 100vh;
  margin: 0;
  background: var(--pw-page);
  color: var(--pw-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.pw-nav {
  background: var(--pw-navy);
  box-shadow: 0 8px 24px rgba(11, 23, 48, .14);
}

.pw-nav .navbar-brand,
.pw-nav .nav-link { color: #fff !important; }

.pw-nav .nav-link { opacity: .78; font-weight: 500; }
.pw-nav .nav-link:hover, .pw-nav .nav-link.active { opacity: 1; }

.pw-logo { width: 34px; height: 34px; object-fit: contain; }
.pw-logo-lg { width: 76px; height: 76px; object-fit: contain; }

.pw-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 18%, rgba(249, 115, 22, .25), transparent 32%),
    radial-gradient(circle at 88% 0%, rgba(37, 99, 235, .28), transparent 34%),
    linear-gradient(135deg, var(--pw-navy), var(--pw-navy-2));
  color: #fff;
}

.pw-hero::after {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  right: -120px;
  bottom: -180px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(255,255,255,.03), 0 0 0 68px rgba(255,255,255,.03);
  animation: pwHeroOrbit 14s ease-in-out infinite;
}

.pw-page { padding: 42px 0 64px; }
.pw-card { background: var(--pw-surface); border: 1px solid var(--pw-line); border-radius: 18px; box-shadow: var(--pw-shadow); }
.pw-card-soft { background: #f8fafd; border: 1px solid var(--pw-line); border-radius: 14px; }
.pw-kicker { color: var(--pw-orange); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.pw-muted { color: var(--pw-muted); }
.pw-divider { height: 1px; background: var(--pw-line); }

.pw-btn-primary {
  border: 0;
  border-radius: 11px;
  padding: .8rem 1.1rem;
  color: #fff;
  background: linear-gradient(135deg, var(--pw-orange), var(--pw-red));
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(239, 68, 68, .18);
  transition: transform .2s ease, box-shadow .2s ease;
}

.pw-btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 14px 26px rgba(239, 68, 68, .25); }
.pw-btn-primary:focus-visible { outline: 3px solid rgba(37, 99, 235, .28); outline-offset: 2px; }

.pw-btn-light { border: 1px solid var(--pw-line); border-radius: 11px; background: #fff; color: var(--pw-ink); font-weight: 700; }
.pw-btn-light:hover { border-color: #cbd5e1; color: var(--pw-navy); background: #f8fafc; }

.pw-search { display: flex; gap: .6rem; padding: .55rem; background: #fff; border-radius: 14px; box-shadow: 0 16px 34px rgba(2, 6, 23, .16); }
.pw-search .form-control { min-height: 46px; border: 0; box-shadow: none; }
.pw-search .pw-btn-primary { white-space: nowrap; }

.pw-feature { display: flex; gap: .75rem; align-items: flex-start; }
.pw-feature-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; color: #fff; background: rgba(37, 99, 235, .12); color: var(--pw-blue); }

.pw-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .62rem; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.pw-badge-success { color: #166534; background: #dcfce7; }
.pw-badge-pending { color: #92400e; background: #fef3c7; }
.pw-badge-danger { color: #991b1b; background: #fee2e2; }
.pw-badge-neutral { color: #475569; background: #eef2f7; }

.pw-invoice-number { color: var(--pw-blue); font-weight: 800; }
.pw-total { font-size: clamp(1.65rem, 4vw, 2.35rem); font-weight: 800; letter-spacing: -.03em; }
.pw-pay-option { display: flex; align-items: center; gap: .8rem; min-height: 72px; padding: 1rem; border: 1px solid var(--pw-line); border-radius: 14px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.pw-pay-option:hover { border-color: #b9c9e5; box-shadow: 0 8px 18px rgba(18,40,75,.08); transform: translateY(-1px); }
.pw-page .pw-pay-option { animation: pwPaymentOptionIn .55s ease both; }
.pw-page .pw-pay-option:nth-child(1) { animation-delay: .12s; }
.pw-page .pw-pay-option:nth-child(2) { animation-delay: .2s; }
.pw-page .pw-pay-option:nth-child(3) { animation-delay: .28s; }
.pw-pay-option .pw-pay-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--pw-blue); background: #eff6ff; }
.pw-pay-option.disabled { opacity: .55; pointer-events: none; }
.pw-paypal-checkout { display: block; }
.pw-paypal-checkout #paypal-button-container { min-height: 44px; }

.pw-checkout-steps { display: flex; align-items: center; gap: .7rem; color: var(--pw-muted); font-size: .78rem; font-weight: 700; }
.pw-page .pw-checkout-steps { animation: pwCheckoutFade .7s .08s ease both; }
.pw-checkout-step { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; }
.pw-checkout-step-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: #e9eef6; color: #64748b; font-size: .72rem; }
.pw-checkout-step.is-active { color: var(--pw-blue); }
.pw-checkout-step.is-active .pw-checkout-step-number { color: #fff; background: var(--pw-blue); }
.pw-checkout-step.is-complete { color: var(--pw-green); }
.pw-checkout-step.is-complete .pw-checkout-step-number { color: #fff; background: var(--pw-green); }
.pw-checkout-step-line { width: 32px; height: 1px; background: var(--pw-line); }
.pw-summary-card { position: sticky; top: 24px; overflow: hidden; }
.pw-page #payment,
.pw-page #billing,
.pw-page #summary { animation: pwCheckoutCardIn .72s ease both; }
.pw-page #billing { animation-delay: .08s; }
.pw-page #summary { animation-delay: .16s; }
.pw-summary-top { padding: 1.2rem 1.35rem; color: #fff; background: linear-gradient(135deg, var(--pw-navy), var(--pw-navy-2)); }
.pw-summary-body { padding: 1.35rem; }
.pw-product-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; color: var(--pw-orange); background: #fff7ed; font-size: 1.15rem; }
.pw-info-row { display: flex; justify-content: space-between; gap: 1rem; font-size: .91rem; }
.pw-info-row + .pw-info-row { margin-top: .8rem; }
.pw-note { padding: .9rem 1rem; border: 1px solid #fed7aa; border-radius: 12px; color: #9a3412; background: #fff7ed; font-size: .82rem; }
.pw-payment-error { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.pw-payment-error { animation: pwAlertIn .55s ease both; }
.pw-trust-list { display: grid; gap: .7rem; margin: 0; padding: 0; list-style: none; }
.pw-trust-list li { display: flex; gap: .6rem; align-items: flex-start; color: var(--pw-muted); font-size: .82rem; }
.pw-trust-list i { color: var(--pw-green); }

.pw-status-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 0%, rgba(249,115,22,.12), transparent 34%), var(--pw-page); }
.pw-status-card { width: min(100%, 620px); padding: clamp(28px, 5vw, 52px); text-align: center; animation: pwStatusCardIn .75s ease both; }
.pw-status-card .pw-logo-lg { animation: pwStatusLogoIn .7s .08s ease both; }
.pw-status-card .pw-kicker,
.pw-status-card h1,
.pw-status-card p,
.pw-status-card .pw-return-grid,
.pw-status-card > .d-flex,
.pw-status-card > .pw-divider,
.pw-status-card > .btn { animation: pwStatusContentIn .65s .22s ease both; }
.pw-status-icon { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 20px; border-radius: 24px; font-size: 2rem; animation: pwStatusIconIn .65s .3s cubic-bezier(.2,.8,.2,1) both; }
.pw-status-icon.success { color: #166534; background: #dcfce7; }
.pw-status-icon.danger { color: #991b1b; background: #fee2e2; }
.pw-status-icon.pending { color: #92400e; background: #fef3c7; }
.pw-status-icon.success i { animation: pwStatusCheck .65s .68s ease both; }
.pw-status-icon.danger i { animation: pwStatusShake .55s .68s ease both; }

@keyframes pwStatusCardIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pwStatusLogoIn {
  from { opacity: 0; transform: translateY(-10px) scale(.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pwStatusIconIn {
  from { opacity: 0; transform: scale(.65); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pwStatusContentIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pwStatusCheck {
  0% { opacity: 0; transform: scale(.55); }
  70% { opacity: 1; transform: scale(1.16); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes pwStatusShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

@keyframes pwHeroOrbit {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-12px, -8px) scale(1.03); }
}

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

@keyframes pwCheckoutCardIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pwPaymentOptionIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .pw-status-card,
  .pw-status-card .pw-logo-lg,
  .pw-status-card .pw-kicker,
  .pw-status-card h1,
  .pw-status-card p,
  .pw-status-card .pw-return-grid,
  .pw-status-card > .d-flex,
  .pw-status-card > .pw-divider,
  .pw-status-card > .btn,
  .pw-status-icon,
  .pw-status-icon.success i,
  .pw-status-icon.danger i,
  .pw-hero::after,
  .pw-page .pw-checkout-steps,
  .pw-page #payment,
  .pw-page #billing,
  .pw-page #summary,
  .pw-payment-error,
  .pw-page .pw-pay-option { animation: none; }
}

.pw-footer { border-top: 1px solid var(--pw-line); color: var(--pw-muted); }

@media (max-width: 767.98px) {
  .pw-page { padding-top: 26px; }
  .pw-search { flex-direction: column; }
  .pw-search .pw-btn-primary { width: 100%; }
  .pw-hero .btn { width: 100%; }
  .pw-hero .d-flex { align-items: stretch !important; }
  .pw-summary-card { position: static; }
  .pw-checkout-steps { gap: .35rem; font-size: .7rem; }
  .pw-checkout-step-line { width: 16px; }
}
