:root {
  --black: #000000;
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-card: #141414;
  --white: #ffffff;
  --muted: #8a8a8a;
  --line: rgba(255, 255, 255, 0.12);
  --rockstar-yellow: #fcaf17;
  --rockstar-yellow-dim: rgba(252, 175, 23, 0.12);
  --success: #4ade80;
  --error: #f87171;
  --pix: #32bcad;
  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --header-h: 64px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

.checkout-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.checkout-header-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.header-inner {
  width: min(1100px, 94%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-logo img {
  height: 26px;
  filter: brightness(0) invert(1);
}

.header-title {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.header-back {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rockstar-yellow);
  transition: opacity 0.2s;
}

.header-back:hover { opacity: 0.8; }

/* Layout */
.checkout-layout {
  width: min(1100px, 94%);
  margin: 32px auto 48px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: start;
  flex: 1;
}

.checkout-panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.checkout-head {
  padding: 28px 28px 24px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rockstar-yellow);
  margin-bottom: 8px;
}

.checkout-head h1 {
  font-family: var(--font-display);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  line-height: 1.1;
}

.checkout-head p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.progress-steps {
  display: flex;
  margin-top: 24px;
  border: 1px solid var(--line);
  width: 100%;
}

.progress-step {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  border-right: 1px solid var(--line);
  transition: background 0.2s, color 0.2s;
}

.progress-step:last-child { border-right: none; }

.progress-step.active {
  background: var(--rockstar-yellow);
  color: var(--black);
}

.progress-step.done {
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.checkout-content { padding: 28px; }

.checkout-step { display: none; }
.checkout-step.active { display: block; }

.step-lead {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* Forms */
label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.form-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }

input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--white);
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s;
}

input:focus {
  outline: none;
  border-color: var(--rockstar-yellow);
}

input::placeholder { color: rgba(255, 255, 255, 0.28); }

.trust-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.trust-list li {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-list i {
  color: var(--rockstar-yellow);
  font-size: 11px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border: none;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-primary {
  background: var(--rockstar-yellow);
  color: var(--black);
}

.btn-primary:hover { opacity: 0.9; }

.btn-pix {
  background: var(--pix);
  color: var(--black);
  margin-top: 12px;
}

.btn-pix:hover { opacity: 0.9; }

.btn-lg { height: 54px; }

.link-voltar {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-align: center;
  transition: color 0.2s;
}

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

.checkout-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Payment methods */
.pagamento-metodos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  margin-bottom: 0;
}

.metodo {
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  border-right: 1px solid var(--line);
  transition: background 0.2s, color 0.2s;
}

.metodo:last-child { border-right: none; }

.metodo.active {
  background: var(--rockstar-yellow);
  color: var(--black);
}

.metodo-icon {
  display: block;
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--white);
}

.metodo-icon--pix { color: var(--pix); }

.metodo.active .metodo-icon,
.metodo.active .metodo-icon--pix { color: var(--black); }

.metodo span {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Card brands */
.card-brands-section {
  margin: 10px 0 20px;
}

.card-brands-bar {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-brand-item {
  background: #fff;
  border-radius: 2px;
  padding: 3px 6px;
  height: 22px;
  width: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: opacity 0.2s, border-color 0.2s;
}

.card-brand-item.dim { opacity: 0.35; }

.card-brand-item.active {
  opacity: 1;
  border-color: var(--rockstar-yellow);
}

.card-brand-img {
  display: block;
  height: 14px !important;
  width: auto !important;
  max-width: 32px !important;
  max-height: 14px !important;
  object-fit: contain;
}

#wrapper-cartao { display: none; }
#wrapper-cartao.active { display: block; }

/* PIX */
.pix-box {
  border: 1px solid var(--line);
  padding: 24px;
  display: grid;
  gap: 20px;
}

.pix-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pix-logo { height: 32px; }

.pix-head strong {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pix-block { text-align: center; }

.pix-label {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.pix-qr {
  max-width: 220px;
  margin: 0 auto;
  display: block;
  border: 1px solid var(--line);
}

.pix-code {
  background: var(--bg-elevated);
  border: 1px dashed var(--line);
  padding: 12px;
  font-size: 12px;
  word-break: break-all;
  text-align: left;
  color: var(--muted);
}

.pix-timer-wrap { text-align: center; }

.timer {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--rockstar-yellow);
}

/* Upload */
.comprovante-section {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.comprovante-section h4 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.comprovante-section h4 i {
  color: var(--rockstar-yellow);
  margin-right: 6px;
}

.upload-area {
  border: 1px dashed var(--line);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.upload-area:hover { border-color: rgba(255, 255, 255, 0.3); }

.upload-area i {
  font-size: 24px;
  color: var(--muted);
}

.upload-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
}

.upload-desc {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.file-preview {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-elevated);
  padding: 10px 14px;
  margin-top: 10px;
  border: 1px solid var(--line);
}

.btn-upload-comprovante {
  margin-top: 12px;
  background: var(--white);
  color: var(--black);
  display: none;
}

.upload-status {
  display: none;
  margin-top: 10px;
  font-size: 12px;
  padding: 10px;
}

.upload-status.success {
  display: block;
  background: rgba(74, 222, 128, 0.1);
  color: var(--success);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.upload-status.error {
  display: block;
  background: rgba(248, 113, 113, 0.1);
  color: var(--error);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.upload-status.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
}

/* States */
.state-box,
.sucesso-box {
  text-align: center;
  padding: 40px 24px;
  border: 1px solid var(--line);
}

.state-box strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.state-box span {
  font-size: 13px;
  color: var(--muted);
}

.sucesso-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 2px solid var(--rockstar-yellow);
  color: var(--rockstar-yellow);
  font-family: var(--font-display);
  font-size: 28px;
  margin-bottom: 16px;
}

.sucesso-box h4 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px;
}

.sucesso-box > p {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 20px;
}

.sucesso-list {
  list-style: none;
  padding: 16px;
  margin: 0 0 24px;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
}

.sucesso-list li {
  font-size: 13px;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sucesso-list li:last-child { border-bottom: none; }

#erro-cartao {
  display: none;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.08);
  padding: 20px;
  margin: 16px 0;
  text-align: center;
}

#erro-cartao h3 {
  font-family: var(--font-display);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px;
  color: var(--error);
}

#erro-cartao p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 16px;
}

.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--rockstar-yellow);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

.spinner-small {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--rockstar-yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

small {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--error);
}

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

/* Sidebar */
.order-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.order-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
}

.order-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rockstar-yellow);
}

.order-product {
  padding: 20px;
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.order-product img {
  width: 80px;
  height: 106px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.platform-tag {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.order-product-info h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  line-height: 1.25;
}

.bonus-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bonus-list li {
  font-size: 12px;
  color: var(--muted);
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.bonus-list li:last-child { border-bottom: none; }

.order-pricing {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.price-strike { text-decoration: line-through; }

.price-row.discount { color: var(--success); }

.price-free { color: var(--success); }

.price-row.total {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
}

.price-row.total span:last-child {
  font-size: 22px;
  font-weight: 600;
  color: var(--white);
}

.order-guarantee {
  padding: 16px 20px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.6;
  border-bottom: 1px solid var(--line);
}

.order-footer {
  padding: 16px 20px;
  display: flex;
  justify-content: center;
}

.order-footer img {
  height: 24px;
  filter: brightness(0) invert(1);
  opacity: 0.6;
}

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

  .order-sidebar {
    order: -1;
    position: static;
  }
}

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

  .metodo { border-right: none; border-bottom: 1px solid var(--line); }
  .metodo:last-child { border-bottom: none; }

  .progress-step {
    font-size: 9px;
    padding: 10px 4px;
  }

  .checkout-content,
  .checkout-head {
    padding-left: 20px;
    padding-right: 20px;
  }

  .trust-list {
    flex-direction: column;
    gap: 10px;
  }
}
