/* ==========================================================================
   VIRO — Checkout
   Estrutura inspirada no Hotmart. Limpo, profissional, mobile-first.
   Página em off-white, cartões brancos, acento verde.
   ========================================================================== */

:root {
  --page-bg: #f5f6f8;        /* off-white subtil (troca para #fff se quiseres branco puro) */
  --surface: #ffffff;
  --text: #14171c;
  --text-muted: #6b7280;
  --text-soft: #9aa0aa;
  --border: #e8e9ee;
  --border-strong: #d7d9e0;

  /* Acento verde */
  --accent: #16a34a;
  --accent-hover: #148140;
  --accent-soft: #eafaf0;

  /* Bumps */
  --bump-border: #c4e6cd;
  --bump-footer: #eefaf1;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow-card: 0 1px 3px rgba(20, 24, 32, 0.05), 0 1px 2px rgba(20, 24, 32, 0.03);
  --shadow-btn: 0 6px 16px rgba(22, 163, 74, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Cabeçalho ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.site-header__logo {
  display: block;
  height: 34px;
  width: auto;
}

.site-header__secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}

/* ---------- Layout ---------- */

.checkout {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 22px 18px 56px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-card);
}

.section__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section__title--loud {
  font-size: 18px;
  margin: 0;
}

/* Passo numerado */
.step {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Produto ---------- */

.product-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.product-head__img {
  flex-shrink: 0;
  width: 88px;
  height: 88px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  object-fit: cover;
  display: block;
}

.product-head__name {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.product-head__price {
  margin-top: 6px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.product-head__meta {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---------- Campos ---------- */

.field {
  margin-bottom: 16px;
}

.field:last-child {
  margin-bottom: 0;
}

.field__label {
  display: block;
  margin-bottom: 7px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.field__input {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field__input::placeholder {
  color: #9ca3af;
}

.field__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.field__input--error {
  border-color: #c0392b;
}

.field__input--error:focus {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.14);
}

.field__error {
  display: none;
  margin: 6px 0 0;
  font-size: 12.5px;
  color: #c0392b;
}

.field__error--show {
  display: block;
}

/* ---------- Métodos de pagamento (placeholder) ---------- */

#payment-element:empty {
  display: none;
}

.pm-placeholder {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: #fbfbfc;
}

.pm-caption {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.pm-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pm-logo {
  height: 38px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pm-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 14px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.pm-note svg {
  color: var(--accent);
}

/* ---------- Order bumps ---------- */

.bumps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.bumps-head__tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 10px;
}

.bump {
  display: block;
  border: 1.5px solid var(--bump-border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 12px;
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.bump:last-child {
  margin-bottom: 0;
}

.bump:has(.bump__check:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.bump__main {
  display: flex;
  gap: 14px;
  padding: 16px;
}

.bump__img {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  object-fit: cover;
  display: block;
}

.bump__content {
  flex: 1;
  min-width: 0;
}

.bump__name {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.bump__desc {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
}

.bump__pricing {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.bump__old {
  font-size: 13px;
  color: var(--text-soft);
  text-decoration: line-through;
}

.bump__badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 5px;
  padding: 2px 7px;
}

.bump__now {
  font-size: 16px;
  font-weight: 800;
}

/* Rodapé "Adicionar item" */
.bump__footer {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  background: var(--bump-footer);
  border-top: 1px solid var(--bump-border);
}

.bump__check {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.bump__box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--border-strong);
  border-radius: 5px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.bump__box::after {
  content: "";
  width: 5px;
  height: 10px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}

.bump__check:checked ~ .bump__box {
  background: var(--accent);
  border-color: var(--accent);
}

.bump__check:checked ~ .bump__box::after {
  transform: rotate(45deg) scale(1);
}

.bump__check:focus-visible ~ .bump__box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.bump__add {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ---------- Detalhes da compra ---------- */

.summary__lines {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.summary__line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.summary__line-name {
  color: var(--text);
}

.summary__line-price {
  flex-shrink: 0;
  font-weight: 500;
  color: var(--text);
}

.summary__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
}

.summary__total span:last-child {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ---------- Nota de consentimento (implícito, sem fricção) ---------- */

.consent-note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.5;
  color: #8a8a8a;
}

.consent-note a {
  color: #6b7280;
  text-decoration: underline;
}

.pay-btn {
  width: 100%;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: background-color 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.pay-btn:hover {
  background: var(--accent-hover);
}

.pay-btn:active {
  transform: translateY(1px);
}

.pay-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.pay-btn:disabled,
.pay-btn--loading {
  opacity: 0.65;
  cursor: progress;
}

.pay-message {
  display: none;
  margin-top: 12px;
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
}

.pay-message--error {
  color: #c0392b;
}

.trust {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.trust__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.trust__item svg {
  color: var(--accent);
}

.trust__sep {
  color: var(--text-soft);
}

.trust strong {
  color: #635bff; /* roxo Stripe */
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------- Página de obrigado ---------- */

.thankyou {
  text-align: center;
  padding: 36px 24px;
}

.thankyou__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thankyou__icon--pending {
  background: #fff4e5;
  color: #b76e00;
}

.thankyou__icon--error {
  background: #fdecea;
  color: #c0392b;
}

.thankyou__title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.thankyou__text {
  margin: 0 0 22px;
  font-size: 15px;
  color: var(--text-muted);
}

/* ---------- Ecrãs maiores ---------- */

@media (min-width: 560px) {
  .checkout {
    padding-top: 32px;
  }

  .card,
  .bump__main {
    padding: 24px;
  }
}
