/* Página de pagamento. Usa os tokens e os botões de estilos.css. */
.pagina-checkout { background: var(--cimento); }
.pagina-checkout [hidden] { display: none !important; }
html { scroll-padding-top: 76px; }

/* Só enquanto a pessoa ainda não pagou */
body:not([data-etapa="pagar"]) .so-pagar,
body:not([data-etapa="pagar"]) .so-pagar-titulo,
body:not([data-etapa="pagar"]) .contagem { display: none; }
body[data-etapa="recusado"] .link-acesso,
body[data-etapa="erro"] .link-acesso { display: none; }
body[data-etapa="pix"] .economia,
body[data-etapa="pix"] .escada-depois,
body[data-etapa="pix"] .resumo-formato { display: none; }
body[data-etapa="pix"] .capa-mini { width: 44px; }
body[data-etapa="pix"] .capa-nome { display: none; }
body[data-etapa="pix"] .escada { margin-top: 10px; }
body[data-etapa="acesso"] .resumo { display: none; }
body[data-etapa="acesso"] .checkout-grade { display: block; max-width: 620px; margin: 0 auto; }
body.sem-oferta .so-oferta { display: none; }

.topo-checkout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 0 var(--margem);
  background: var(--papel);
  border-bottom: 1px solid var(--linha);
}
.selo-seguro { display: inline-flex; align-items: center; gap: 6px; color: var(--cafe-claro); font-size: 13px; }

.checkout { width: 100%; max-width: 1120px; margin: 0 auto; padding: 16px var(--margem) 40px; }

/* Etapas */
.passos { display: flex; justify-content: center; gap: 6px 18px; flex-wrap: wrap; margin: 0 0 16px; padding: 0; color: var(--cafe-claro); font-size: 13px; list-style: none; }
.passos li { display: inline-flex; align-items: center; gap: 6px; }
.passo-marca { display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 700; }
.passo-marca .icone { width: 12px; height: 12px; stroke-width: 3; }
.passos .feito { color: var(--cafe); }
.passos .feito .passo-marca { border-color: var(--cafe); background: var(--cafe); color: var(--papel); }
.passos .atual { color: var(--cafe); font-weight: 700; }
.passos .atual .passo-marca { border-color: var(--rec); background: var(--rec); color: var(--papel); }

.checkout h1 { margin-bottom: 16px; font-size: clamp(25px, 4vw, 38px); line-height: 1.1; letter-spacing: -0.03em; text-wrap: balance; }
.retomar { margin-bottom: 16px; padding: 10px 14px; border-radius: 12px; background: var(--papel); font-size: 15px; }

/* No celular, o pagamento vem logo depois do preço e os argumentos ficam abaixo */
.checkout-grade { display: flex; flex-direction: column; gap: 14px; }
.coluna-lateral, .coluna-principal { display: contents; }
.resumo { order: 1; }
.painel-pagamento { order: 2; }
.o-que-recebe { order: 3; }
.razoes { order: 4; }
.duvidas { order: 5; }

/* Resumo */
.resumo, .painel-pagamento, .o-que-recebe, .razoes, .duvidas { min-width: 0; padding: 18px; border-radius: 18px; background: var(--papel); }
.o-que-recebe h2 { font-size: 22px; line-height: 1.15; }
.resumo-produto { display: flex; align-items: center; gap: 14px; }
.capa-mini {
  position: relative;
  flex: none;
  width: 68px;
  aspect-ratio: 148 / 210;
  overflow: hidden;
  border-radius: 4px;
  background: var(--cafe) url("../imagens/capa-guia.jpg") center / cover;
  box-shadow: 0 6px 14px rgba(46, 36, 32, .28);
  color: var(--papel);
}
.capa-visor { position: absolute; top: 5px; left: 5px; width: 10px; height: 10px; border-top: 1px solid currentColor; border-left: 1px solid currentColor; }
.capa-nome { position: absolute; right: 5px; bottom: 6px; left: 5px; font-size: 11px; font-weight: 500; line-height: 1; letter-spacing: -0.02em; }
.resumo-nome { font-size: 18px; font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.resumo-formato { margin-top: 2px; color: var(--cafe-claro); font-size: 14px; line-height: 1.35; }

.escada { margin-top: 16px; border-top: 1px solid var(--linha); }
.escada-hoje, .escada-depois { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.escada-hoje { padding-top: 12px; font-weight: 500; }
.escada-hoje strong { color: var(--rec); font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -0.04em; animation: preco-pulso .7s ease-out .5s 1; }
.escada-depois { margin-top: 6px; color: var(--cafe-claro); font-size: 14px; }
.economia { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: #fbe9e6; font-size: 14px; line-height: 1.35; }
.economia strong { font-weight: 700; }
@keyframes preco-pulso { 50% { transform: scale(1.08); } }

.entrega { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; font-size: 14px; line-height: 1.35; list-style: none; }
.entrega li { display: flex; gap: 8px; }
.entrega .icone { margin-top: 1px; color: var(--rec); stroke-width: 3; }
.prova { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--linha); font-size: 14px; }
.prova strong { font-weight: 700; }

/* Pagamento */
.painel-pagamento { scroll-margin-top: 76px; }
.painel-pagamento h2 { margin-bottom: 12px; font-size: 22px; line-height: 1.15; }
.painel-pagamento > div > p { margin-bottom: 12px; }
.dica-pix { display: flex; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--cimento); font-size: 14px; line-height: 1.35; }
.dica-pix strong { font-weight: 700; }
.dica-pix .icone { color: var(--rec); }
.carregando, .aguardando { display: flex; align-items: center; gap: 10px; color: var(--cafe-claro); font-size: 15px; }
.carregando { min-height: 180px; justify-content: center; }
.giro { flex: none; width: 18px; height: 18px; border: 2px solid var(--linha); border-top-color: var(--rec); border-radius: 50%; animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.alerta { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #fbe9e6; color: #8e1f10; font-size: 15px; }

.garantias { display: grid; gap: 8px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--linha); font-size: 14px; line-height: 1.35; list-style: none; }
.garantias li { display: flex; align-items: center; gap: 8px; }
.transparencia { margin: 12px 0 0 !important; color: var(--cafe-claro); font-size: 13px; line-height: 1.45; }

/* Pix e acesso */
.pix-prazo { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.pix-prazo strong { color: var(--rec); font-size: 18px; font-variant-numeric: tabular-nums; }
.pix-passos { margin: 0 0 14px; padding-left: 20px; font-size: 15px; line-height: 1.5; }
.botao-acao { width: 100%; min-height: 54px; border-color: var(--rec); background: var(--rec); color: var(--papel); font: inherit; font-size: 16px; font-weight: 700; gap: 8px; cursor: pointer; }
.botao-acao:hover { border-color: #b22815; background: #b22815; color: var(--papel); }
.rotulo-campo { display: block; margin: 16px 0 6px; font-size: 14px; font-weight: 500; line-height: 1.35; }
.campo-copia { width: 100%; min-height: 44px; padding: 0 12px; overflow: hidden; border: 1px solid var(--linha); border-radius: 10px; background: var(--cimento); color: var(--cafe); font: inherit; font-size: 14px; text-overflow: ellipsis; }
.pix-qr { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 16px 0; color: var(--cafe-claro); font-size: 14px; line-height: 1.35; text-align: center; }
.pix-qr img { border: 1px solid var(--linha); border-radius: 12px; }
.sucesso-marca { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 14px; border-radius: 50%; background: var(--rec); color: var(--papel); animation: sucesso .4s ease-out; }
.sucesso-marca .icone { width: 28px; height: 28px; stroke-width: 3; }
@keyframes sucesso { from { opacity: 0; transform: scale(.6); } }
.link-acesso { margin-top: 18px; padding-top: 2px; border-top: 1px solid var(--linha); }
.link-acoes { display: grid; gap: 8px; margin-top: 8px; }
.botao-contorno { border-color: var(--cafe); background: transparent; color: var(--cafe); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; }

/* Argumentos e dúvidas */
.razoes h2, .duvidas h2 { margin-bottom: 12px; font-size: 22px; line-height: 1.15; }
.lista-razoes { display: grid; gap: 12px; margin: 0; padding: 0; font-size: 15px; line-height: 1.45; list-style: none; }
.lista-razoes li { padding-left: 12px; border-left: 3px solid var(--rec); }
.lista-razoes strong { font-weight: 700; }
.duvidas details { border-bottom: 1px solid var(--linha); }
.duvidas details:last-child { border-bottom: 0; }
.duvidas summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 0; font-size: 15px; font-weight: 500; line-height: 1.3; cursor: pointer; list-style: none; }
.duvidas summary::-webkit-details-marker { display: none; }
.duvidas summary::after { content: "+"; flex: none; font-size: 20px; line-height: 1; }
.duvidas details[open] summary::after { content: "\2212"; }
.duvidas details p { padding-bottom: 12px; font-size: 15px; line-height: 1.45; }

.rodape-checkout { padding: 0 var(--margem) 96px; color: var(--cafe-claro); font-size: 13px; line-height: 1.5; text-align: center; }
.rodape-checkout p + p { margin-top: 6px; }

.barra-checkout .botao { min-height: 46px; }

@media (min-width: 900px) {
  .checkout { padding-top: 24px; }
  .checkout h1 { text-align: center; }
  .checkout-grade { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); align-items: start; gap: 20px; }
  .coluna-lateral { position: sticky; top: 64px; display: grid; gap: 16px; grid-column: 2; grid-row: 1; min-width: 0; }
  .coluna-principal { display: grid; gap: 20px; grid-column: 1; grid-row: 1; min-width: 0; }
  .resumo, .painel-pagamento, .o-que-recebe, .razoes, .duvidas { padding: 24px; }
  .garantias { grid-template-columns: repeat(3, 1fr); }
  .garantias li { align-items: flex-start; }
  .link-acoes { grid-template-columns: 1fr 1fr; }
  .rodape-checkout { padding-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .escada-hoje strong, .sucesso-marca { animation: none; }
  .giro { animation-duration: 2s; }
}
