* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f4f6f9;
  color: #222;
  padding-bottom: 40px;
}

/* ===== TOPO ===== */
.topo {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #0a5;
  color: #fff;
  padding: 14px 18px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.topo h1 { font-size: 1.2rem; }

.btn-voltar {
  background: rgba(255,255,255,.2);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: .2s;
}
.btn-voltar:hover { background: rgba(255,255,255,.35); }

/* ===== CONTAINER ===== */
.checkout {
  max-width: 600px;
  margin: 18px auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ===== BLOCOS ===== */
.bloco {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.bloco h2 {
  font-size: 1.1rem;
  color: #0a5;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ===== RESUMO DOS ITENS ===== */
.linha-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: .95rem;
}
.linha-item:last-child { border-bottom: none; }
.linha-item small {
  display: block;
  color: #888;
  font-size: .8rem;
  margin-top: 2px;
}
.linha-item .sub { font-weight: bold; color: #0a5; white-space: nowrap; }

.total-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 2px solid #eee;
  font-size: 1.15rem;
}
.total-box strong { color: #0a5; font-size: 1.35rem; }

.vazio { color: #999; text-align: center; padding: 20px; }
.vazio a { color: #0a5; font-weight: bold; }

/* ===== FORMAS DE PAGAMENTO ===== */
.formas-pgto {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.opcao-pgto {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 2px solid #e3e3e3;
  border-radius: 10px;
  cursor: pointer;
  transition: .2s;
  font-size: 1rem;
}
.opcao-pgto:hover { border-color: #0a5; background: #f0fff8; }
.opcao-pgto input { accent-color: #0a5; transform: scale(1.3); }
.opcao-pgto input:checked ~ .opcao-texto { font-weight: bold; color: #0a5; }
/* destaca o cartão escolhido */
.opcao-pgto:has(input:checked) {
  border-color: #0a5;
  background: #f0fff8;
}

/* ===== FORMULÁRIO ===== */
.campo { margin-bottom: 14px; }
.campo label {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #444;
}
.campo input,
.campo textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 9px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: .2s;
}
.campo input:focus,
.campo textarea:focus { border-color: #0a5; box-shadow: 0 0 0 3px rgba(0,170,85,.12); }
.campo textarea { resize: vertical; min-height: 70px; }
.campo .obrig { color: #c00; }
.campo .ajuda { font-size: .78rem; color: #999; margin-top: 4px; }

/* ===== BOTÕES ===== */
.btn-primario, .btn-secundario {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: bold;
  cursor: pointer;
  transition: .2s;
}
.btn-primario { background: #0a5; color: #fff; }
.btn-primario:hover { background: #084; }
.btn-primario:disabled { background: #9bbfae; cursor: not-allowed; }
.btn-secundario { background: #eee; color: #444; }
.btn-secundario:hover { background: #ddd; }

/* ===== TELA DE SUCESSO ===== */
.sucesso { text-align: center; }
.check-ok {
  font-size: 3.5rem;
  margin-bottom: 8px;
  animation: pop .4s ease;
}
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

.sucesso h2 {
  color: #0a5;
  margin-bottom: 10px;
  justify-content: center;
}
.sucesso-total { font-size: 1.2rem; margin-bottom: 6px; }
.sucesso-total strong { color: #0a5; }
.sucesso-msg { color: #666; margin-bottom: 20px; }

.sucesso-acoes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
  margin: 0 auto;
}
.sucesso-acoes .btn-primario,
.sucesso-acoes .btn-secundario {
  text-decoration: none;
  text-align: center;
  display: block;
}
.btn-zap { background: #25D366; }
.btn-zap:hover { background: #1da851; }

/* ===== RESPONSIVO ===== */
@media (max-width: 480px) {
  .checkout { padding: 0 10px; }
  .bloco { padding: 16px; }
  .topo h1 { font-size: 1.05rem; }
}
