/* Quiz do carro ideal: cartão de perguntas com lista de matches no pé e
   tela de resultado — mesmo tema do site (vermelho #ea3636, escuro #14191d,
   texto #2d3643, Inter). */

/* Hero (mesma base do .qv-hero) */
.qz-hero {
  background-color: #14191d;
  /* fundo abstrato dos títulos (escuro à esquerda, curvas e vermelho à
     direita) com um véu à esquerda para o texto ler bem */
  background-image: linear-gradient(90deg, rgba(5, 7, 10, 0.78) 0%, rgba(5, 7, 10, 0.6) 40%, rgba(5, 7, 10, 0.12) 68%, rgba(5, 7, 10, 0) 100%),
    url("../img/bg-top-titulos.webp");
  background-size: cover;
  background-position: center;
  padding: 9rem 0 7rem;
}

/* Telas estreitas: a diagonal cobria o título; vira faixa no pé do hero
   (mesma regra do .qv-hero). */
@media (max-width: 991px) {
  .qz-hero {
    /* mostra o lado escuro e as curvas; o vermelho ficaria sob o título */
    background-image: linear-gradient(rgba(5, 7, 10, 0.45), rgba(5, 7, 10, 0.45)),
      url("../img/bg-top-titulos.webp");
    background-position: 30% center;
  }
}

.qz-hero .tag {
  display: inline-block;
  font-size: 1.3rem;
  letter-spacing: 0.2em;
  color: #ea3636;
  border: 1px solid #ea3636;
  border-radius: 3rem;
  padding: 0.8rem 2rem;
  margin-bottom: 2.4rem;
}

.qz-hero h1 {
  font-size: 4.6rem;
  color: #fff;
  max-width: 68rem;
}

.qz-hero h1 strong {
  color: #ea3636;
}

.qz-hero > .container > p {
  font-size: 1.9rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 56rem;
  margin-top: 1.6rem;
}

/* Seção do quiz */
.qz-section {
  padding: 6rem 0 8rem;
}

.qz-card {
  background: #fff;
  border: 1px solid #e5e9ec;
  border-radius: 2rem;
  max-width: 82rem;
  margin: 0 auto;
  padding: 3.2rem;
}

/* Cabeçalho: "Pergunta N de 6" + barras de progresso */
.qz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.qz-step-label {
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #98a2ac;
  /* no celular "PERGUNTA 1 DE 6" quebrava antes do total */
  white-space: nowrap;
}

.qz-step-label span {
  color: #2d3643;
  font-weight: 700;
}

.qz-steps {
  display: flex;
  gap: 0.6rem;
  list-style: none;
}

.qz-steps li {
  height: 0.5rem;
  width: 2rem;
  border-radius: 3rem;
  background: #d5dbe1;
  transition: background-color 0.3s ease;
}

.qz-steps li.is-active,
.qz-steps li.is-done {
  background: #ea3636;
}

/* Corpo da pergunta */
.qz-body {
  min-height: 40rem;
  padding: 3rem 0;
  display: flex;
  flex-direction: column;
}

.qz-question {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: qz-enter 0.3s ease;
}

@keyframes qz-enter {
  from {
    opacity: 0;
    transform: translateX(2.4rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .qz-question {
    animation: none;
  }
}

.qz-question h2 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 2.8rem;
  color: #2d3643;
}

.qz-hint {
  font-size: 1.6rem;
  color: #5b6672;
}

/* Pergunta do orçamento */
.qz-budget {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-top: 1.6rem;
}

.qz-budget-value {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 4.6rem;
  line-height: 1.1;
  color: #ea3636;
}

#qz-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 0.8rem;
  border-radius: 3rem;
  background: linear-gradient(
    to right,
    #ea3636 0%,
    #ea3636 var(--qz-fill, 30%),
    #e5e9ec var(--qz-fill, 30%),
    #e5e9ec 100%
  );
  outline: none;
  cursor: pointer;
}

#qz-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: #fff;
  border: 0.6rem solid #ea3636;
  box-shadow: 0 0.2rem 0.8rem rgba(20, 25, 29, 0.25);
  cursor: grab;
}

#qz-range::-moz-range-thumb {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #fff;
  border: 0.6rem solid #ea3636;
  box-shadow: 0 0.2rem 0.8rem rgba(20, 25, 29, 0.25);
  cursor: grab;
}

.qz-budget-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 1.3rem;
  color: #98a2ac;
}

.qz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.qz-chip {
  font-family: inherit;
  font-size: 1.4rem;
  color: #5b6672;
  background: #fff;
  border: 1px solid #ccd4db;
  border-radius: 3rem;
  padding: 0.8rem 1.6rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.qz-chip:hover {
  border-color: #ea3636;
  color: #ea3636;
}

.qz-chip.is-active {
  border-color: #ea3636;
  color: #ea3636;
  background: #fff5f5;
}

.qz-feedback {
  font-size: 1.5rem;
  color: #5b6672;
  border-top: 1px solid #e5e9ec;
  padding-top: 1.6rem;
}

.qz-feedback strong {
  color: #2d3643;
}

/* Opções de resposta */
.qz-options {
  display: grid;
  gap: 1.2rem;
  margin-top: 1.6rem;
}

.qz-options.qz-options-grid {
  grid-template-columns: 1fr;
}

.qz-option {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  width: 100%;
  text-align: left;
  font-family: inherit;
  background: #fff;
  border: 1px solid #ccd4db;
  border-radius: 1.4rem;
  padding: 1.6rem 1.8rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.qz-option:hover {
  border-color: #ea3636;
}

.qz-option.is-selected {
  border-color: #ea3636;
  background: #fff5f5;
}

.qz-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
  border-radius: 50%;
  background: #f3f5f7;
  color: #5b6672;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.qz-option.is-selected .qz-option-icon {
  background: #ea3636;
  color: #fff;
}

.qz-option-icon svg {
  width: 2rem;
  height: 2rem;
}

.qz-option-text {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.qz-option-label {
  font-size: 1.6rem;
  font-weight: 700;
  color: #2d3643;
}

.qz-option-hint {
  font-size: 1.4rem;
  color: #5b6672;
  line-height: 1.4;
}

.qz-multi-note {
  font-size: 1.3rem;
  color: #98a2ac;
}

/* Navegação Voltar / Continuar */
.qz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e5e9ec;
  padding-top: 2rem;
}

.qz-back {
  font-family: inherit;
  font-size: 1.5rem;
  color: #5b6672;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.2rem;
}

.qz-back:hover {
  color: #2d3643;
}

.qz-next {
  font-family: inherit;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  background: #ea3636;
  border: none;
  border-radius: 3rem;
  padding: 1.4rem 3.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: filter 0.3s ease;
}

.qz-next:hover {
  filter: brightness(1.08);
}

/* Pé do cartão: matches até agora */
.qz-footer {
  border-top: 1px solid #e5e9ec;
  padding-top: 2.4rem;
}

.qz-footer-label {
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #98a2ac;
  margin-bottom: 1.6rem;
}

.qz-matches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  transition: opacity 0.2s ease;
}

.qz-matches.is-loading {
  opacity: 0.45;
}

.qz-mini {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-decoration: none;
  min-width: 0;
}

.qz-mini-photo {
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: 1rem;
  overflow: hidden;
  background: #f3f5f7 center / cover no-repeat;
  margin-bottom: 0.8rem;
}

.qz-mini-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qz-mini-model {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3643;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qz-mini-brand {
  font-size: 1.3rem;
  color: #5b6672;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qz-mini-price {
  font-style: normal;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ea3636;
  margin-top: 0.2rem;
}

.qz-location {
  font-size: 1.3rem;
  color: #98a2ac;
  margin-top: 1.6rem;
}

/* Tela de resultado */
.qz-result {
  max-width: 110rem;
  margin: 0 auto;
  text-align: center;
}

.qz-result .tag {
  display: inline-block;
  font-size: 1.3rem;
  letter-spacing: 0.2em;
  color: #ea3636;
  border: 1px solid #ea3636;
  border-radius: 3rem;
  padding: 0.8rem 2rem;
  margin-bottom: 2rem;
}

.qz-result h2 {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 3.6rem;
  color: #2d3643;
}

.qz-result-count {
  font-size: 1.7rem;
  color: #5b6672;
  margin-top: 0.8rem;
}

.qz-result-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.qz-result-chip {
  font-size: 1.4rem;
  color: #5b6672;
  background: #f3f5f7;
  border-radius: 3rem;
  padding: 0.7rem 1.6rem;
}

.qz-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 4rem;
  text-align: left;
}

.qz-result-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e9ec;
  border-radius: 2rem;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.qz-result-card:hover {
  border-color: #ea3636;
  transform: translateY(-0.4rem);
}

.qz-result-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #f3f5f7;
  overflow: hidden;
}

.qz-result-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.qz-result-above {
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: #b07a00;
  background: #fff8e5;
  border: 1px solid #e0a800;
  border-radius: 3rem;
  padding: 0.4rem 1.2rem;
}

.qz-result-body {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 2.4rem;
}

.qz-result-brand {
  font-size: 1.3rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #98a2ac;
}

.qz-result-model {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 2.2rem;
  color: #2d3643;
}

.qz-result-specs {
  font-size: 1.4rem;
  color: #5b6672;
  line-height: 1.5;
}

.qz-result-price {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 2.4rem;
  color: #ea3636;
  margin-top: 0.4rem;
}

.qz-result-link {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ea3636;
  margin-top: 0.8rem;
}

.qz-result-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 4rem;
}

.qz-result-cta {
  border-radius: 3rem;
  padding: 1.6rem 3.6rem;
  font-size: 1.6rem;
  font-family: inherit;
  background: #ea3636;
  color: #fff;
  transition: filter 0.3s ease;
}

.qz-result-cta:hover {
  filter: brightness(1.08);
}

.qz-restart {
  font-family: inherit;
  font-size: 1.5rem;
  color: #5b6672;
  background: none;
  border: 1px solid #ccd4db;
  border-radius: 3rem;
  padding: 1.4rem 2.8rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.qz-restart:hover {
  border-color: #2d3643;
  color: #2d3643;
}

.qz-result-note {
  font-size: 1.3rem;
  color: #98a2ac;
  margin-top: 2rem;
}

.qz-empty {
  max-width: 56rem;
  margin: 3rem auto 0;
  font-size: 1.6rem;
  color: #5b6672;
  line-height: 1.6;
}

/* Utilitário de leitor de tela (caso o tema global não defina) */
.qz-card .sr-only,
.qz-result .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 991px) {
  .qz-hero h1 {
    font-size: 3.6rem;
  }

  .qz-result h2 {
    font-size: 2.8rem;
  }

  .qz-result-grid {
    grid-template-columns: 1fr;
    max-width: 46rem;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 576px) {
  .qz-options.qz-options-grid {
    grid-template-columns: 1fr 1fr;
  }
}
