/* ============================================================
   360Drive — Layout (hero, formulário, resultado, serviços)
   ============================================================ */

#main {
  flex: 1;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 46px) clamp(16px, 4vw, 44px) 84px;
  display: flex;
  flex-direction: column;
  gap: clamp(22px, 3vw, 36px);
}

/* Etiqueta dourada reutilizável */
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  font-weight: 800;
  color: var(--gold-light);
  text-transform: uppercase;
}

/* ── HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3.6vw, 44px);
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero-glow--gold {
  top: -120px; right: -80px;
  width: 340px; height: 340px;
  background: radial-gradient(circle, rgba(226, 184, 92, 0.14), transparent 70%);
}
.hero-glow--blue {
  bottom: -140px; left: -90px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(75, 155, 255, 0.12), transparent 70%);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(26px, 4vw, 52px);
  align-items: start;
}

/* ── Editorial ───────────────────────────────────────────── */
.hero-editorial {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(31px, 5vw, 50px);
  line-height: 1.04;
  color: var(--text-strong);
}

.hero-lead {
  margin: 0;
  max-width: 44ch;
  font-size: clamp(14px, 1.6vw, 16px);
  line-height: 1.65;
  color: var(--text-muted);
}

.hero-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 2px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-soft);
}

.check-item .check-mark {
  flex: none;
  width: 26px; height: 26px;
  border-radius: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(226, 184, 92, 0.14);
  color: var(--gold-light);
}

.ref-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-1);
  padding: 9px 14px;
  border-radius: var(--radius-md);
  background: rgba(226, 184, 92, 0.07);
  border: 1px solid rgba(226, 184, 92, 0.26);
  width: fit-content;
  font-size: 12.5px;
  color: var(--text-muted);
}

.ref-badge-month {
  font-weight: 700;
  font-size: 12.5px;
  color: var(--gold-light);
  padding: 3px 10px;
  border-radius: var(--space-2);
  background: rgba(226, 184, 92, 0.14);
  text-transform: capitalize;
}

/* ── Formulário ──────────────────────────────────────────── */
.hero-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Tabs de tipo */
.type-tabs {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.type-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 13px var(--space-2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all var(--duration-md);
  white-space: nowrap;
  line-height: 1;
}

.type-tab svg { width: 20px; height: 20px; flex-shrink: 0; }

.type-tab:hover { color: var(--text); }

.type-tab.active {
  color: #EAF2FF;
  border-color: var(--border-blue);
  background: rgba(75, 155, 255, 0.16);
  box-shadow: 0 0 0 1px rgba(75, 155, 255, 0.25), 0 8px 22px rgba(75, 155, 255, 0.22);
}

/* ── Selects / combobox ──────────────────────────────────── */
.select-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.select-label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-soft);
  padding-left: 2px;
}

.select-wrapper {
  position: relative;
  z-index: 1;
}
.select-wrapper.is-open { z-index: 50; }

/* Ícone de busca (só na marca) */
.select-search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--gold-light);
}

/* Campo (input de marca/modelo e select de ano) */
.sel {
  width: 100%;
  padding: 15px 42px 15px 16px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  min-height: 52px;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

/* Marca tem borda dourada de destaque + espaço para o ícone de busca */
.select-wrapper--search .sel {
  padding-left: 44px;
  background: var(--surface-3);
  border-color: var(--border-gold);
}

.sel::placeholder { color: var(--text-dim); font-weight: 500; }

.sel:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: var(--focus-ring);
}

.sel:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.sel option { background: #0B1A33; color: var(--text); }

.select-arrow {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: var(--text-dim);
  pointer-events: none;
  transition: transform var(--duration-fast), color var(--duration-fast);
}

.select-wrapper.is-open .select-arrow {
  transform: translateY(-50%) rotate(180deg);
  color: var(--gold-light);
}

.select-spinner {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 2;
}

/* Painel do combobox */
.combo-panel {
  display: flex;
  flex-direction: column;
  max-height: 280px;
  background: #0B1A33;
  border: 1px solid var(--border-gold-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  overflow: hidden;
}

/* CRÍTICO: display:flex acima venceria o [hidden] do user-agent.
   Esta regra (0,2,0) garante que o atributo hidden feche o painel. */
.combo-panel[hidden] { display: none; }

/* Painel EM FLUXO (empurra os campos) — evita bug de top-layer no iOS. */
.ac-panel {
  position: static;
  margin-top: 6px;
  z-index: auto;
}

.combo-options {
  list-style: none;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.combo-option {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast);
}

.combo-option:hover,
.combo-option.is-active {
  background: rgba(226, 184, 92, 0.12);
}

.combo-option:active { background: rgba(226, 184, 92, 0.22); }

.combo-option.is-selected {
  background: rgba(226, 184, 92, 0.14);
  color: var(--gold-light);
  font-weight: 700;
}

.combo-option.is-selected::after {
  content: '';
  width: 16px; height: 16px;
  margin-left: auto;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.combo-empty {
  padding: 16px 12px;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
}

/* CTA */
.btn-cta {
  margin-top: var(--space-1);
  height: 60px;
  border-radius: var(--radius-lg);
  font-size: 16px;
  gap: var(--space-3);
}

.form-note {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
}

/* ── RESULTADO ───────────────────────────────────────────── */
.result-section { width: 100%; }

.result-content {
  animation: fadeUp 0.5s ease;
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.4vw, 24px);
}

.result-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.result-head-titles { display: flex; flex-direction: column; gap: var(--space-1); }

.result-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  color: var(--text-strong);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(16px, 2vw, 24px);
  align-items: start;
}

/* Card de preço */
.fipe-price-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-radius: var(--radius-xl);
  padding: clamp(28px, 3vw, 42px) var(--space-6);
  background: var(--price-grad);
  border: 1px solid rgba(226, 184, 92, 0.22);
  border-top: 3px solid var(--gold);
  box-shadow: var(--shadow-price);
}

.fipe-orb {
  position: absolute;
  top: -90px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px; height: 200px;
  background: radial-gradient(circle, rgba(226, 184, 92, 0.16), transparent 70%);
  pointer-events: none;
}

.fipe-tag-label {
  position: relative;
  margin: 0;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
}

.fipe-ref-month {
  position: relative;
  margin: 5px 0 18px;
  font-size: 13px;
  color: var(--text-dim);
  text-transform: capitalize;
}

.fipe-price-value {
  position: relative;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: clamp(36px, 7vw, 54px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--gold-lighter);
  min-height: 1.1em;
  font-variant-numeric: tabular-nums;
}

.fipe-vehicle-name {
  position: relative;
  margin: 14px 0 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-soft);
  line-height: 1.4;
}

.fipe-badges {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.fbadge {
  padding: 6px 13px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 700;
}

.fbadge-blue  { background: rgba(75, 155, 255, 0.16); color: var(--blue-light); }
.fbadge-muted { background: var(--surface-3); color: var(--text-muted); }

/* Coluna direita */
.result-side {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.fact-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-3);
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px;
  border-radius: 13px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.fact-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.fact-value {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
}
.fact-value--ref { text-transform: capitalize; }

/* Tendência */
.trend-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.trend-icon {
  flex: none;
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  color: var(--gold-light);
}
.trend-icon svg { width: 22px; height: 22px; }

.trend-titles { display: flex; flex-direction: column; gap: 2px; }

.trend-label { font-size: 15px; font-weight: 800; color: var(--text); }
.trend-pct { font-weight: 800; }
.trend-sub { font-size: 12.5px; color: var(--text-muted); }

/* Histórico */
.history-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}

.history-title {
  margin: 0 0 var(--space-3);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.history-chart {
  width: 100%;
  height: 118px;
  display: block;
  overflow: visible;
}

.history-months {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
}

.history-months span {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: capitalize;
}

/* ── SERVIÇOS ────────────────────────────────────────────── */
.services {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.4vw, 22px);
  padding: clamp(24px, 3.2vw, 38px);
  background: var(--panel-grad-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-panel);
}

.services-head { display: flex; flex-direction: column; gap: 6px; }

.services-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 38px);
  color: var(--text-strong);
}

.services-sub { margin: 0; font-size: 14px; color: var(--text-muted); }

.svc-category {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.svc-category-label {
  margin: 0;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-light);
}
.svc-category--emergency .svc-category-label { color: var(--danger-soft); }
.svc-category--routine   .svc-category-label { color: var(--blue-light); }

.svc-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: var(--space-3);
}

.svc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 18px 12px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  min-height: 108px;
  cursor: pointer;
  transition: transform var(--duration-md), border-color var(--duration-md), background var(--duration-md);
}

.svc-card:hover {
  transform: translateY(-3px);
  border-color: rgba(226, 184, 92, 0.42);
  background: rgba(226, 184, 92, 0.06);
}

.svc-card:active { transform: translateY(0); }

.svc-card-icon {
  width: 46px; height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(226, 184, 92, 0.10);
  color: var(--gold-light);
}
.svc-card-icon svg { width: 24px; height: 24px; display: block; }

.svc-card-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
}

.location-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-dim);
}

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer { text-align: center; padding-top: 6px; }

.footer-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(226, 184, 92, 0.4), transparent);
  margin-bottom: 16px;
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
}
