:root {
  --navy: #003854;
  --navy-deep: #002536;
  --oni-red: #ff0000;
  --gold: #fac800;
  --white: #ffffff;
  --ink: #0a0a0a;
  --muted: rgba(255, 255, 255, 0.62);
  --line: rgba(255, 255, 255, 0.14);
  --card: rgba(255, 255, 255, 0.04);
  --sidebar: rgba(0, 0, 0, 0.22);
  --ok: #3dce7a;
  --err: #ff5c5c;
  --font: "Montserrat", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font);
  color: var(--white);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 0, 0, 0.14), transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 48%, #001018 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
}

/* —— Header (Enemy-like centered brand) —— */
.site-header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.22em;
  font-size: 1.05rem;
  text-decoration: none;
}

.brand span {
  color: var(--oni-red);
}

.header-link {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

.header-link:hover {
  color: var(--white);
}

/* —— Checkout shell —— */
.checkout-shell {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  min-height: calc(100vh - 120px);
}

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

  .header-link {
    position: static;
    transform: none;
  }

  .site-header {
    justify-content: space-between;
    gap: 12px;
  }
}

.checkout-main {
  padding: 32px 36px 64px;
}

.checkout-aside {
  padding: 32px 28px 64px;
  background: var(--sidebar);
  border-left: 1px solid var(--line);
}

@media (max-width: 900px) {
  .checkout-aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    order: -1;
    padding-bottom: 24px;
  }

  .checkout-main {
    padding: 24px 20px 56px;
  }
}

.checkout-section {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.checkout-section:last-of-type {
  border-bottom: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
}

.section-note {
  margin: 0 0 14px;
  font-size: 0.82rem;
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 12px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 600px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
}

label .lbl {
  letter-spacing: 0.02em;
}

input,
select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--white);
  font: inherit;
  font-size: 0.95rem;
}

input:focus,
select:focus {
  outline: 1px solid var(--oni-red);
  border-color: var(--oni-red);
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

.checkbox-row input {
  width: auto;
  margin-top: 3px;
}

/* Ship / Pickup toggle */
.delivery-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 16px;
}

.delivery-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 12px 10px;
  cursor: pointer;
}

.delivery-toggle button.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.ship-list {
  display: grid;
  gap: 10px;
}

.ship-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

.ship-option:has(input:checked) {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.ship-option__body {
  display: grid;
  gap: 2px;
}

.ship-option__body strong {
  font-size: 0.92rem;
  font-weight: 600;
}

.ship-option__body small {
  color: var(--muted);
  font-size: 0.75rem;
}

.ship-option__price {
  font-weight: 700;
  color: var(--gold);
}

.hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

/* Payment */
.payment-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
}

.payment-box__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 600;
  font-size: 0.95rem;
}

.payment-box__title small {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.75rem;
}

#pp-button {
  min-height: 48px;
  margin-top: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--oni-red);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--white);
}

.status {
  margin: 12px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 1.2em;
}

.status.error {
  color: var(--err);
}

.status.ok {
  color: var(--ok);
}

.secure-note {
  margin-top: 12px;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Aside / summary */
.aside-title {
  margin: 0 0 16px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.line-items {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.line-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
}

.line-item__thumb {
  width: 56px;
  height: 56px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: var(--muted);
  position: relative;
}

.line-item__qty {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--oni-red);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.line-item__meta {
  font-size: 0.85rem;
}

.line-item__meta strong {
  display: block;
  font-weight: 600;
}

.line-item__meta small {
  color: var(--muted);
}

.discount-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 12px 0 4px;
}

.discount-row input {
  opacity: 0.7;
}

.discount-row button {
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: not-allowed;
}

.order-box {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.order-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  padding: 6px 0;
}

.order-row span:first-child {
  color: var(--muted);
}

.order-row.total {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-weight: 700;
  font-size: 1.05rem;
}

.order-row.total span:last-child {
  color: var(--gold);
}

.tax-note {
  margin: 6px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.site-footer {
  padding: 20px 24px 36px;
  text-align: center;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-top: 1px solid var(--line);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

/* Thanks / result */
.wrap {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 72px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
}

.sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.result-card {
  width: min(520px, 100%);
  margin: 24px auto 0;
  text-align: left;
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.result-card.is-center {
  text-align: center;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: oni-spin 0.8s linear infinite;
}

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

.success-check {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: rgba(61, 206, 122, 0.15);
  border: 2px solid var(--ok);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ok);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
}

.hidden {
  display: none !important;
}

.order-row[hidden] {
  display: none !important;
}

.result-actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

.mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.receipt-panel {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.receipt-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.receipt-qr {
  width: 180px;
  height: 180px;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

.receipt-qr-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  max-width: 260px;
  line-height: 1.45;
}

.receipt-card .receipt-box {
  margin-top: 18px;
}

@media print {
  .site-header,
  .site-footer,
  .result-actions,
  .header-link {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  .result-card {
    border: none;
    box-shadow: none;
    background: transparent;
  }
}
