/* ==========================================================================
   Megatoon Balões Personalizados — estilos do site público
   Mobile-first, responsivo, sem dependências externas.
   ========================================================================== */

:root {
  /* Paleta Megatoon: azul-marinho + verde-limão (mesma do index.html) */
  --color-primary: #8bc20d;        /* verde-limão escuro: links, bordas, foco, selecionado */
  --color-primary-dark: #6a9a0a;   /* hover dos elementos acima */
  --color-cta: #a8e010;            /* verde-limão vivo: fundo dos botões principais */
  --color-cta-hover: #8bc20d;
  --color-secondary: #0b2c5f;      /* azul-marinho: títulos, logo, textos fortes */
  --color-secondary-dark: #071e42;
  --color-accent: #a8e010;
  --color-bg: #ffffff;
  --color-bg-alt: #f2f7fd;
  --color-text: #1c2233;
  --color-text-muted: #667085;
  --color-border: #e2e8f4;
  --color-success: #14a588;
  --color-danger: #e5484d;
  --whatsapp: #25d366;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 8px 24px rgba(11, 44, 95, 0.10);
  --shadow-lg: 0 16px 40px rgba(11, 44, 95, 0.18);
  --max-width: 1180px;
  --font: 'Poppins', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; max-width: 100%; }

body {
  margin: 0;
  overflow-x: hidden;
  max-width: 100%;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
  text-align: center;
}
.btn-primary { background: var(--color-cta); color: var(--color-secondary-dark); box-shadow: 0 6px 18px rgba(168, 224, 16, .35); }
.btn-primary:hover { background: var(--color-cta-hover); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--color-secondary); border: 2px solid var(--color-secondary); }
.btn-outline:hover { background: var(--color-secondary); color: #fff; }
.btn-ghost { background: var(--color-bg-alt); color: var(--color-secondary); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo { font-weight: 800; font-size: 1.35rem; letter-spacing: .5px; color: var(--color-secondary); }
.logo span { color: var(--color-primary); }
.site-nav { display: none; gap: 28px; }
.site-nav a { font-weight: 600; font-size: .95rem; color: var(--color-text-muted); }
.site-nav a:hover { color: var(--color-primary); }

.mobile-menu-btn {
  display: block;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--color-secondary);
  cursor: pointer;
  padding: 4px;
}
.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 14px;
  padding: 16px 20px 20px;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
.mobile-nav.open { display: flex; }
.mobile-nav a { font-weight: 600; font-size: 1rem; color: var(--color-secondary); }
.mobile-nav a.btn { text-align: center; }

@media (min-width: 860px) {
  .site-nav { display: flex; align-items: center; }
  .mobile-menu-btn, .mobile-nav { display: none !important; }
}

/* ---------- Hero carousel ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--color-secondary), var(--color-secondary-dark));
}
.hero-track {
  display: flex;
  transition: transform .6s cubic-bezier(.65,0,.35,1);
  height: 100%;
}
.hero-slide {
  position: relative;
  flex: 0 0 100%;
  min-height: 52vw;
  max-height: 420px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
@media (min-width: 700px) {
  .hero-slide { min-height: 320px; }
}
@media (min-height: 760px) and (min-width: 700px) {
  .hero-slide { min-height: 380px; }
}
.hero-slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(10,30,50,.45) 0%, rgba(10,30,50,.08) 55%, rgba(10,30,50,0) 100%);
}
.hero-caption {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 22px 24px 36px;
  max-width: 640px;
}
.hero-caption h2 { font-size: 1.5rem; margin: 0 0 6px; text-wrap: balance; }
.hero-caption p { margin: 0 0 14px; opacity: .92; font-size: .92rem; }
@media (min-width: 700px) {
  .hero-caption h2 { font-size: 2.2rem; }
}

.hero-dots {
  position: absolute;
  z-index: 3;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.hero-dots button {
  width: 9px; height: 9px; border-radius: 50%;
  border: none; background: rgba(255,255,255,.45);
  padding: 0; cursor: pointer;
}
.hero-dots button.active { background: #fff; width: 24px; border-radius: 6px; }

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 3; background: rgba(255,255,255,.15); color: #fff;
  border: none; width: 42px; height: 42px; border-radius: 50%;
  font-size: 1.3rem; cursor: pointer; display: none;
  align-items: center; justify-content: center;
}
.hero-arrow:hover { background: rgba(255,255,255,.3); }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }
@media (min-width: 700px) {
  .hero-arrow { display: flex; }
}

/* ---------- Sections ---------- */
.section { padding: 32px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-title { text-align: center; margin: 0 0 6px; font-size: 1.5rem; color: var(--color-secondary); text-wrap: balance; }
.section-subtitle { text-align: center; color: var(--color-text-muted); max-width: 600px; margin: 0 auto 22px; font-size: .92rem; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid-cards { grid-template-columns: repeat(8, minmax(0, 1fr)); } }

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card img { margin: 0 auto 8px; max-height: 64px; object-fit: contain; }
.card strong { display: block; font-size: .82rem; }

.cta-band {
  background: linear-gradient(120deg, var(--color-secondary), var(--color-secondary-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 26px 28px;
  text-align: center;
}
.cta-band h2 { margin: 0 0 6px; font-size: 1.35rem; }
.cta-band p { margin: 0 0 16px; opacity: .95; font-size: .92rem; }

.steps-explainer { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .steps-explainer { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps-explainer .step { text-align: center; }
.steps-explainer .step .num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--color-secondary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin: 0 auto 8px; font-size: .9rem;
}
.steps-explainer .step strong { font-size: .84rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  padding: 26px 0 16px;
  margin-top: 0;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--color-secondary), var(--color-cta)) 1;
}
.site-footer strong { color: var(--color-secondary); }
.site-footer a { color: var(--color-primary); }
.site-footer a:hover { color: var(--color-primary-dark); }
.site-footer .logo { color: var(--color-secondary); }
.site-footer .logo span { color: var(--color-primary); }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.site-footer small { display: block; margin-top: 24px; opacity: .8; text-align: center; width: 100%; }

/* ==========================================================================
   Wizard de orçamento
   ========================================================================== */
.wizard-wrap {
  padding: 10px 0 16px;
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.wizard-title { text-align: center; font-size: 1.25rem; margin: 0 0 2px; color: var(--color-secondary); }
.wizard-subtitle { text-align: center; color: var(--color-text-muted); margin-bottom: 14px; font-size: .86rem; }

.wizard-box {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}
@media (min-width: 700px) { .wizard-box { padding: 22px 26px; } }

/* progress */
.wizard-progress {
  display: flex;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  gap: 0;
}
.wizard-progress .dot {
  flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-size: .76rem; font-weight: 700; color: var(--color-text-muted);
  background: #fff;
}
.wizard-progress .line { flex: 1 1 auto; height: 2px; background: var(--color-border); min-width: 10px; }
.wizard-progress .dot.done { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.wizard-progress .dot.current { border-color: var(--color-primary); color: var(--color-primary); }
.wizard-progress .line.done { background: var(--color-success); }

.wizard-step { display: none; animation: fadeIn .25s ease; }
.wizard-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.wizard-step h3 { margin: 0 0 16px; font-size: 1.05rem; text-align: center; }

.option-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.option-card {
  flex: 1 1 140px;
  max-width: 200px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.option-card .thumb {
  background: var(--color-bg-alt);
  border-radius: var(--radius-sm);
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 10px;
  overflow: hidden;
}
.option-card img { max-height: 84px; max-width: 100%; object-fit: contain; }
.option-card span { font-weight: 700; font-size: .86rem; display: block; color: var(--color-secondary); }
.option-card small { color: var(--color-text-muted); font-size: .74rem; }
.option-card:hover { border-color: var(--color-primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.option-card.selected { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(139, 194, 13, .2); }

/* Em telas estreitas, cards um pouco mais compactos (menos rolagem vertical) */
@media (max-width: 559px) {
  .option-grid { gap: 8px; }
  .option-card { flex-basis: 130px; padding: 10px 8px; }
  .option-card .thumb { height: 76px; margin-bottom: 8px; }
  .option-card img { max-height: 64px; }
}

/* Desktop: 4 cards por linha (não mexe no mobile, que já ficou como pedido) */
@media (min-width: 760px) {
  .option-card { flex-basis: 180px; }
}

.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 10px 8px; }
.color-swatch {
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid #fff;
  outline: 2px solid var(--color-border);
  cursor: pointer;
  position: relative;
}
.color-swatch.selected { outline: 3px solid var(--color-primary); }
.color-swatch .name {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  font-size: .6rem; white-space: nowrap; color: var(--color-text-muted); margin-top: 3px;
}

.form-field { margin-bottom: 12px; }
.form-field label { display: block; font-weight: 600; margin-bottom: 4px; font-size: .86rem; }
.form-field input[type=text],
.form-field input[type=email],
.form-field input[type=tel],
.form-field input[type=number],
.form-field textarea,
.form-field input[type=file] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .92rem;
  background: var(--color-bg-alt);
}
.form-field input:focus, .form-field textarea:focus {
  outline: none; border-color: var(--color-primary); background: #fff;
}
.form-hint { color: var(--color-text-muted); font-size: .76rem; margin-top: 3px; }
.form-row { display: grid; gap: 12px; }
@media (min-width: 620px) { .form-row.cols-2 { grid-template-columns: 1fr 1fr; } }

.field-error { color: var(--color-danger); font-size: .78rem; margin-top: 3px; display: none; }
.form-field.invalid input, .form-field.invalid textarea { border-color: var(--color-danger); }
.form-field.invalid .field-error { display: block; }

.wizard-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; }
.wizard-nav .btn { flex: 1; padding: 11px 22px; }
.wizard-nav .spacer { flex: 1; }

.summary-box { background: var(--color-bg-alt); border-radius: var(--radius-sm); padding: 12px; margin-bottom: 12px; }
.summary-box dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: .84rem; }
.summary-box dt { color: var(--color-text-muted); }
.summary-box dd { margin: 0; font-weight: 600; }

.wizard-result { text-align: center; padding: 10px 0; }
.wizard-result .icon { font-size: 2.6rem; margin-bottom: 8px; }
.wizard-result.success .icon { color: var(--color-success); }
.wizard-result.error .icon { color: var(--color-danger); }
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 4px solid var(--color-border); border-top-color: var(--color-primary);
  animation: spin .8s linear infinite; margin: 14px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Botão flutuante de WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(37, 211, 102, .45);
  animation: whatsappPulse 2.6s ease-in-out infinite;
}
.whatsapp-float:hover { transform: scale(1.06); }
@keyframes whatsappPulse {
  0%, 100% { box-shadow: 0 8px 22px rgba(37, 211, 102, .45); }
  50% { box-shadow: 0 8px 22px rgba(37, 211, 102, .75), 0 0 0 8px rgba(37, 211, 102, .12); }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float { animation: none; }
}

/* Quantity stepper */
.qty-stepper { display: flex; align-items: center; gap: 10px; max-width: 240px; margin: 0 auto; }
.qty-stepper button {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--color-border);
  background: #fff; font-size: 1.2rem; cursor: pointer; color: var(--color-secondary);
}
.qty-stepper input {
  flex: 1; min-width: 0; text-align: center; font-size: 1.1rem; font-weight: 700;
  border: 1.5px solid var(--color-border); border-radius: var(--radius-sm); padding: 9px; background: var(--color-bg-alt);
}
.qty-presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.qty-presets button {
  border: 1.5px solid var(--color-border); background: #fff; border-radius: 999px;
  padding: 6px 14px; cursor: pointer; font-weight: 600; font-size: .8rem;
}
.qty-presets button.selected, .qty-presets button:hover { border-color: var(--color-primary); color: var(--color-primary); }
