/* ===== Orçamento — Mobile First ===== */
* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }

.orcamento-hero {
  background: linear-gradient(135deg, #f8a4c8 0%, #c084fc 100%);
  padding: 60px 0 48px;
  text-align: center;
  color: #fff;
}
.orcamento-hero h1 { font-size: 1.9rem; font-weight: 700; margin-bottom: 10px; color: #fff; }
.orcamento-hero p  { font-size: 1rem; opacity: 0.9; color: #fff; }

.orcamento-section { padding: 32px 0 100px; }

/* ── Stepper ─────────────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 36px;
  padding: 0 8px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stepper::-webkit-scrollbar { display: none; }

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 44px;
}

.step span { display: none; } /* esconde texto no mobile */

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #9ca3af;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.step.active .step-circle {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  box-shadow: 0 4px 12px rgba(168,85,247,0.4);
  transform: scale(1.12);
}
.step.active span { color: #7c3aed; font-weight: 700; }

.step.concluido .step-circle {
  background: #a855f7;
  color: #fff;
  font-size: 0;
}
.step.concluido .step-circle::after { content: '✓'; font-size: 0.85rem; }
.step.concluido span { color: #a855f7; }

.step-line {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  min-width: 14px;
  max-width: 48px;
  margin-bottom: 20px;
  transition: background 0.3s;
  flex-shrink: 0;
}
.step-line.ativa { background: #a855f7; }

/* ── Passos ──────────────────────────────────────────────────── */
.passo { animation: fadeSlide 0.3s ease; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.passo-titulo { font-size: 1.25rem; font-weight: 700; color: #1f2937; margin-bottom: 4px; }
.passo-sub    { color: #6b7280; font-size: 0.9rem; margin-bottom: 22px; }

.btn-voltar {
  background: none;
  border: none;
  color: #7c3aed;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 0;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.passo-nav { margin-top: 28px; display: flex; justify-content: flex-end; }

.btn-proximo {
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  border: none;
  padding: 15px 32px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  touch-action: manipulation;
  transition: opacity 0.2s, transform 0.15s;
  -webkit-appearance: none;
}
.btn-proximo:active:not(:disabled) { transform: scale(0.96); }
.btn-proximo:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Produtos ────────────────────────────────────────────────── */
.produtos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.produto-card {
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-user-select: none;
  user-select: none;
}
.produto-card:active { transform: scale(0.97); }
.produto-card.selecionado {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168,85,247,0.2);
}

.badge-ia {
  position: absolute;
  top: 8px; right: 8px;
  background: linear-gradient(135deg, #a855f7, #ec4899);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  z-index: 1;
}

.produto-foto { width: 100%; height: 120px; overflow: hidden; background: #f3f4f6; }
.produto-foto img { width: 100%; height: 100%; object-fit: cover; }
.produto-foto-icon { display: flex; align-items: center; justify-content: center; font-size: 2.6rem; }

.produto-card-info { padding: 10px 10px 12px; }
.produto-card-info h4 { font-size: 0.8rem; font-weight: 700; color: #1f2937; margin-bottom: 3px; line-height: 1.3; }
.produto-card-info p  { font-size: 0.7rem; color: #6b7280; margin: 0; line-height: 1.3; }

/* ── Variações de imagem ─────────────────────────────────────── */
.imagens-variacao {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.variacao-card {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-user-select: none;
  user-select: none;
}
.variacao-card:active { transform: scale(0.97); }
.variacao-card.selecionada {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168,85,247,0.2);
}
.variacao-card img { width: 100%; height: 140px; object-fit: cover; display: block; }
.variacao-card p { font-size: 0.75rem; color: #6b7280; text-align: center; padding: 6px 8px; margin: 0; }

/* ── Personalização ──────────────────────────────────────────── */
.paleta-cores { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }

.cor-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  touch-action: manipulation;
  flex-shrink: 0;
  transition: transform 0.15s, border-color 0.2s;
  -webkit-appearance: none;
}
.cor-btn:active { transform: scale(0.88); }
.cor-btn.selecionada {
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #7c3aed;
}
.cor-btn.desabilitada { opacity: 0.3; cursor: not-allowed; }

.cores-selecionadas-label { font-size: 0.82rem; color: #6b7280; margin-top: 6px; }

/* ── Campos ──────────────────────────────────────────────────── */
.campo-grupo { margin-bottom: 18px; }
.campo-label { display: block; font-size: 0.88rem; font-weight: 700; color: #374151; margin-bottom: 6px; }
.campo-opcional { font-weight: 400; color: #9ca3af; }
.campo-hint { font-size: 0.78rem; color: #9ca3af; }

.campo-input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px; /* evita zoom no iOS */
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.campo-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168,85,247,0.12);
  outline: none;
}

/* ── Resumo ──────────────────────────────────────────────────── */
.resumo-card {
  background: #faf5ff;
  border: 1px solid #e9d5ff;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 20px;
}

.resumo-linha {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #ede9fe;
  align-items: flex-start;
}
.resumo-linha:last-child { border-bottom: none; }
.resumo-icone { font-size: 1rem; min-width: 22px; }
.resumo-chave { font-size: 0.78rem; color: #7c3aed; font-weight: 700; min-width: 85px; }
.resumo-valor { font-size: 0.88rem; color: #1f2937; }

.resumo-imagem { width: 100%; max-width: 160px; border-radius: 10px; margin-top: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.resumo-cores { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.resumo-cor-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #e5e7eb; display: inline-block; }

/* ── WhatsApp dúvida ─────────────────────────────────────────── */
.whatsapp-duvida {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.88rem;
  color: #166534;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.whatsapp-duvida i { font-size: 1.2rem; color: #16a34a; }
.whatsapp-duvida a { color: #16a34a; font-weight: 700; text-decoration: underline; }

/* ── Botão enviar ────────────────────────────────────────────── */
.btn-enviar {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #fff;
  border: none;
  padding: 17px 32px;
  border-radius: 30px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  touch-action: manipulation;
  -webkit-appearance: none;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-enviar:active:not(:disabled) { transform: scale(0.97); }
.btn-enviar:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Confirmação ─────────────────────────────────────────────── */
.confirmacao { display: none; text-align: center; padding: 60px 20px; animation: fadeSlide 0.4s ease; }
.confirmacao.visivel { display: block; }
.confirmacao-icone { font-size: 4rem; margin-bottom: 16px; }
.confirmacao h3 { font-size: 1.4rem; font-weight: 700; color: #7c3aed; margin-bottom: 10px; }
.confirmacao p { color: #6b7280; font-size: 0.95rem; margin-bottom: 6px; }
.confirmacao a { color: #a855f7; font-weight: 600; }

/* ── Alertas ─────────────────────────────────────────────────── */
.alerta-erro {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.88rem;
  margin-top: 12px;
  display: none;
}
.loading-msg { color: #9ca3af; font-size: 0.9rem; margin: 20px 0; }

/* ── Desktop ─────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .orcamento-hero h1 { font-size: 2.4rem; }
  .orcamento-hero p  { font-size: 1.1rem; }
  .produtos-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
  .imagens-variacao { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .produto-foto { height: 150px; }
  .produto-card-info h4 { font-size: 0.92rem; }
  .produto-card-info p  { font-size: 0.78rem; }
  .step span { display: block; font-size: 0.72rem; }
  .step-circle { width: 36px; height: 36px; }
  .passo-titulo { font-size: 1.5rem; }
}

/* ── Validação inline ────────────────────────────────────────── */
.campo-input.campo-erro {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
  animation: shake 0.3s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ── Categorias ──────────────────────────────────────────────── */
.categorias-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.categoria-card {
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  -webkit-user-select: none;
  user-select: none;
}
.categoria-card:active { transform: scale(0.96); }
.categoria-card.selecionada {
  border-color: #a855f7;
  box-shadow: 0 0 0 3px rgba(168,85,247,0.2);
  background: #faf5ff;
}
.categoria-icone { font-size: 2rem; margin-bottom: 8px; }
.categoria-card span { font-size: 0.8rem; font-weight: 600; color: #374151; line-height: 1.3; display: block; }

@media (min-width: 480px) {
  .categorias-grid { grid-template-columns: repeat(3, 1fr); }
  .categoria-card span { font-size: 0.85rem; }
}
@media (min-width: 768px) {
  .categorias-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}

/* ── Opções (público / posicionamento) ───────────────────────── */
.opcoes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.opcao-btn {
  border: 2px solid #e5e7eb;
  border-radius: 30px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
  background: #fff;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  -webkit-appearance: none;
}
.opcao-btn:active { transform: scale(0.96); }
.opcao-btn.selecionada {
  border-color: #a855f7;
  background: #faf5ff;
  color: #7c3aed;
}
.opcao-btn-wide { width: 100%; border-radius: 12px; text-align: left; padding: 14px 18px; }

/* ── Divisor de seção ────────────────────────────────────────── */
.secao-divider {
  font-size: 0.88rem;
  font-weight: 700;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-top: 2px solid #ede9fe;
  padding-top: 20px;
  margin: 24px 0 16px;
}

/* ── Bloco de perguntas ──────────────────────────────────────── */
.perguntas-bloco {
  background: #faf5ff;
  border: 1px solid #ede9fe;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 8px;
}

/* ── Sem produtos msg ────────────────────────────────────────── */
.sem-produtos-msg {
  font-size: 0.82rem;
  color: #9ca3af;
  font-style: italic;
  margin-bottom: 12px;
}

/* ── Skeleton loading ────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
.skeleton-card { pointer-events: none; }
.skeleton-foto { width: 100%; height: 120px; }
.skeleton-titulo { height: 14px; width: 80%; margin: 10px 10px 6px; }
.skeleton-desc   { height: 11px; width: 55%; margin: 0 10px 12px; }

/* ── Validação campo ok ──────────────────────────────────────── */
.campo-input.campo-ok {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}

/* ── Upload foto referência ──────────────────────────────────── */
.upload-ref-label {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 2px dashed #d1d5db;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.88rem;
  color: #6b7280;
}
.upload-ref-label:hover { border-color: #a855f7; background: #faf5ff; color: #7c3aed; }
.upload-ref-label input { display: none; }
.upload-ref-preview {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 10px;
  margin-top: 10px;
  display: none;
  border: 1px solid #e5e7eb;
}

/* ── Botão compartilhar ──────────────────────────────────────── */
.btn-compartilhar {
  background: #fff;
  color: #7c3aed;
  border: 2px solid #a855f7;
  padding: 14px 32px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  touch-action: manipulation;
  -webkit-appearance: none;
  transition: background 0.2s, color 0.2s;
}
.btn-compartilhar:active { background: #faf5ff; }
