/* ===== VARIÁVEIS DE TEMA ===== */
:root {
  --verde: #009c3b;
  --verde-escuro: #004d1a;
  --verde-hover: #007a2e;
  --amarelo: #ffdf00;
  --azul: #003580;
  --azul-hover: #002060;
  --cinza-claro: #f5f5f5;
  --cinza-texto: #666;
  --vermelho-alerta: #cc0000;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f0f0;
  color: #222;
  min-height: 100vh;
}

/* ===== HEADER ===== */
header {
  background: var(--verde);
  color: #fff;
  text-align: center;
  padding: 18px 20px 14px;
}

header h1 {
  font-size: clamp(0.95rem, 3.5vw, 1.2rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.brand__icon { font-size: 1.4rem; }
.brand__name {
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.5px;
}

.header-seals {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}

.header-seal { font-size: 0.75rem; color: rgba(255,255,255,0.85); }

/* ===== BANNER URGÊNCIA ===== */
.urgency-bar {
  background: var(--vermelho-alerta);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 700;
}

.urgency-bar span { font-variant-numeric: tabular-nums; }

/* ===== CONTAINER ===== */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* ===== STEPPER ===== */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.step__circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ddd;
  color: #999;
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s, color 0.3s;
}

.step__label {
  font-size: 0.68rem;
  color: #aaa;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.3s;
}

.step.active .step__circle { background: var(--verde); color: #fff; }
.step.active .step__label  { color: var(--verde); }
.step.done  .step__circle  { background: var(--verde-escuro); color: #fff; }
.step.done  .step__label   { color: var(--verde-escuro); }

.step__line {
  flex: 1;
  height: 2px;
  background: #ddd;
  min-width: 40px;
  margin-bottom: 18px;
  transition: background 0.3s;
}

.step__line.done { background: var(--verde); }

/* ===== RESUMO DO PEDIDO ===== */
.order-summary {
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}

.product-thumb {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
}

.product-thumb img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px;
}

.order-info h3 { font-size: 0.95rem; font-weight: 800; color: var(--verde-escuro); margin-bottom: 6px; }
.order-info__row { font-size: 0.82rem; color: var(--cinza-texto); margin-bottom: 2px; }
.order-info__price { font-size: 1.4rem; font-weight: 900; color: var(--verde); margin-top: 6px; }
.order-info__frete { font-size: 0.78rem; color: var(--verde); font-weight: 600; }
.order-info__total { font-size: 0.9rem; font-weight: 800; color: var(--verde-escuro); margin-top: 10px; }
.order-info__total span { color: var(--verde); }

/* ===== SELETOR DE QUANTIDADE ===== */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.qty-label { font-size: 0.85rem; font-weight: 700; color: #555; }

.qty-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid var(--verde);
  background: #fff;
  color: var(--verde);
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:active { transform: scale(0.92); }

.qty-value {
  font-size: 1.1rem;
  font-weight: 900;
  color: #333;
  min-width: 24px;
  text-align: center;
}

/* ===== FORMULÁRIO ===== */
.form-card {
  background: #fff;
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  margin-bottom: 16px;
}

.form-card h2 {
  font-size: 1rem;
  font-weight: 800;
  color: #333;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f0f0f0;
}

.form-group { margin-bottom: 14px; }

label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #555;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

input, select {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  color: #222;
  background: #fff;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

input:focus, select:focus { outline: none; border-color: var(--verde); }
input.error, select.error { border-color: #e00; background: #fff5f5; }

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.optional-tag { font-size: 0.7rem; color: #aaa; font-weight: 400; text-transform: none; margin-left: 4px; }

/* ===== DIVISOR DE SEÇÃO ===== */
.form-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--verde);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-top: 2px solid #f0f0f0;
  padding-top: 14px;
  margin-top: 4px;
  margin-bottom: 10px;
}

/* ===== BOTÃO PAGAR ===== */
.btn-pay {
  display: block;
  width: 100%;
  padding: 18px;
  background: var(--verde);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: background 0.2s, transform 0.1s;
}

.btn-pay:hover { background: var(--verde-hover); }
.btn-pay:active { transform: scale(0.98); }
.btn-pay:disabled { background: #aaa; cursor: not-allowed; }

.pay-security {
  font-size: 0.75rem;
  color: #888;
  text-align: center;
  margin-top: 10px;
}

/* ===== PIX ===== */
#pix-section { display: none; }

.pix-card {
  background: #fff;
  border-radius: 14px;
  padding: 28px 20px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  text-align: center;
}

.pix-card h2 { font-size: 1.1rem; font-weight: 800; color: var(--verde-escuro); margin-bottom: 20px; }

.qrcode-wrapper img {
  max-width: 200px;
  width: 100%;
  border: 4px solid var(--amarelo);
  border-radius: 12px;
  margin-bottom: 20px;
}

.copy-label { font-size: 0.82rem; font-weight: 700; color: #555; text-align: left; margin-bottom: 6px; }

.copy-box { display: flex; gap: 8px; margin-bottom: 14px; }

#copia-cola-input {
  flex: 1;
  font-size: 0.75rem;
  padding: 10px 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  resize: none;
  height: 60px;
  line-height: 1.4;
  color: #444;
}

.btn-copy {
  padding: 0 14px;
  background: var(--amarelo);
  color: #111;
  border: none;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.82rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}

.btn-copy:hover { background: #e6c800; }

.pix-instruction {
  font-size: 0.85rem;
  color: var(--cinza-texto);
  background: var(--cinza-claro);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  text-align: left;
}

.awaiting {
  font-size: 0.9rem;
  color: var(--verde);
  font-weight: 700;
  animation: blink 1.2s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ===== SUCESSO ===== */
#success-section { display: none; }

.success-card {
  background: var(--verde);
  color: #fff;
  border-radius: 14px;
  padding: 40px 24px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,156,59,0.3);
}

.success-card__icon { font-size: 4rem; margin-bottom: 16px; }
.success-card h2 { font-size: 1.3rem; font-weight: 900; margin-bottom: 12px; }
.success-card p { font-size: 0.95rem; color: rgba(255,255,255,0.85); }

/* ===== RODAPÉ ===== */
footer {
  text-align: center;
  padding: 20px 16px;
  font-size: 0.72rem;
  color: #aaa;
}
