/*
 * Novo design do Stand Cadilac — carregado depois de /css/site.css (CSS do site PHP).
 * Tudo o que é novo usa o prefixo "nd-". As regras sobre classes antigas ficam no fim, agrupadas.
 *
 * Cores: vermelho da marca (logótipo), grafite, cinza-claro do showroom, azul da matrícula.
 * Tipo: Archivo, uma só família em várias larguras (expandida nos títulos, condensada nos preços).
 */

:root {
  --nd-vermelho: #E2231A;
  --nd-vermelho-esc: #B9170F;
  --nd-grafite: #1E2023;
  --nd-grafite-2: #16181A;
  --nd-showroom: #F3F4F5;
  --nd-linha: #E1E3E6;
  --nd-cinza: #6A6F76;
  --nd-azul-p: #1F3E9A;
  --nd-raio: 14px;
  --nd-fonte: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Base ---------- */

body.nd { background: var(--nd-showroom); }
body.nd,
body.nd *:not(i):not(.fa):not([class^="im-"]):not([class*=" im-"]):not([class^="fa-"]):not([class*=" fa-"]) {
  font-family: var(--nd-fonte);
}
body.nd main { background: var(--nd-showroom); }
body.nd h1, body.nd h2, body.nd h3, body.nd h4 { text-transform: none; letter-spacing: -.01em; }
body.nd :focus-visible { outline: 2px solid var(--nd-vermelho); outline-offset: 3px; }
.nd-espaco-topo { height: 50px; background: var(--nd-grafite); }
/* O tema dá 100px em cima e em baixo ao .container de cada secção; nas secções novas o espaço é do bloco */
body.nd main > section[class*="nd-"] > .container { padding-top: 0; padding-bottom: 0; }
body.nd main > section.nd-pesquisa { overflow: visible; }

/* Botões */
.nd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 650; font-size: 15px; line-height: 1.1; text-decoration: none !important; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.nd-btn-vermelho { background: var(--nd-vermelho); color: #fff !important; }
.nd-btn-vermelho:hover { background: var(--nd-vermelho-esc); }
.nd-btn-linha { border-color: rgba(255, 255, 255, .5); color: #fff !important; background: transparent; }
.nd-btn-linha:hover { background: #fff; color: var(--nd-grafite) !important; border-color: #fff; }
.nd-btn-branco { background: #fff; color: var(--nd-grafite) !important; }
.nd-btn-branco:hover { background: var(--nd-showroom); }
.nd-btn-escuro { background: var(--nd-grafite); color: #fff !important; }
.nd-btn-escuro:hover { background: #000; }

/* ---------- Menu ---------- */

body.nd > nav .menu-cnt > ul > li > a { font-weight: 550; font-size: 15px; text-transform: none; letter-spacing: 0; }
body.nd > nav.scroll-menu:before { background: var(--nd-grafite) !important; }
body.nd > nav .menu-cnt > ul > li > a.active { color: #fff !important; text-decoration: underline 2px var(--nd-vermelho); text-underline-offset: 9px; }
body.nd > nav .menu-cnt > ul > li.nd-menu-tel > a { white-space: nowrap; font-weight: 650; }
body.nd > nav .menu-cnt > ul > li.nd-menu-tel i { margin-right: 6px; }
body.nd > nav .menu-cnt > ul > li.nd-menu-cta { display: block; align-self: flex-start; }
body.nd > nav .menu-cnt > ul > li.nd-menu-cta > a {
  display: inline-block; height: auto !important; min-height: 0 !important; white-space: nowrap;
  background: var(--nd-vermelho); color: #fff !important; border-radius: 999px;
  padding: 10px 20px !important; margin: 15px 0 0 10px; line-height: 20px;
}
body.nd > nav.scroll-menu .menu-cnt > ul > li.nd-menu-cta > a { margin-top: 5px; }
body.nd > nav .menu-cnt > ul > li.nd-menu-cta > a::before, body.nd > nav .menu-cnt > ul > li.nd-menu-cta > a::after { display: none !important; }

body.nd > nav .menu-cnt > ul > li.nd-menu-cta > a:hover { background: var(--nd-vermelho-esc); }
@media (max-width: 991.98px) {
  body.nd > nav .menu-cnt > ul > li.nd-menu-cta > a { display: inline-block; margin: 10px 0; }
  body.nd > nav .menu-cnt > ul > li > a.active { color: var(--nd-vermelho) !important; box-shadow: none; }
}

/* ---------- Hero ---------- */

.nd-hero {
  position: relative; display: flex; align-items: center;
  min-height: min(86vh, 820px); min-height: max(620px, min(86vh, 820px));
  color: #fff; background: var(--nd-grafite-2); overflow: hidden;
}
.nd-hero-foto {
  position: absolute; inset: 0; background: var(--fundo) 60% 40% / cover no-repeat;
  animation: nd-aproxima 14s ease-out both;
}
.nd-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(18, 19, 21, .9) 0%, rgba(18, 19, 21, .66) 38%, rgba(18, 19, 21, .05) 72%),
    linear-gradient(0deg, rgba(18, 19, 21, .55), transparent 32%);
}
.nd-hero-link { position: absolute; inset: 0; z-index: 1; }
body.nd main > section.nd-hero > .nd-hero-cnt { position: relative; z-index: 2; padding-top: 130px; padding-bottom: 130px; pointer-events: none; }
.nd-hero-cnt a { pointer-events: auto; }
body.nd .nd-hero-titulo {
  color: #fff; margin: 0; max-width: 9.5em;
  font-stretch: 118%; font-weight: 850; font-size: clamp(42px, 6.2vw, 86px); line-height: .96; letter-spacing: -.02em;
  animation: nd-sobe .9s .1s cubic-bezier(.2, .7, .2, 1) both;
}
body.nd .nd-hero-texto {
  color: rgba(255, 255, 255, .86); margin: 26px 0 0; max-width: 32em; font-size: 20px; line-height: 1.5;
  animation: nd-sobe .9s .25s cubic-bezier(.2, .7, .2, 1) both;
}
.nd-hero .nd-btn { margin-top: 28px; }
.nd-factos {
  list-style: none; margin: 38px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 30px;
  animation: nd-sobe .9s .4s cubic-bezier(.2, .7, .2, 1) both;
}
.nd-factos li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: rgba(255, 255, 255, .92); }
.nd-factos i {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255, 255, 255, .14); font-size: 12px; color: #fff;
}

@keyframes nd-aproxima { from { transform: scale(1.12); } to { transform: scale(1.02); } }
@keyframes nd-sobe { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .nd-hero-foto, body.nd .nd-hero-titulo, body.nd .nd-hero-texto, .nd-factos { animation: none; }
}

/* ---------- Pesquisa rápida ---------- */

.nd-pesquisa { position: relative; z-index: 5; margin-top: -60px; }
.nd-pesquisa-form {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.1fr auto; align-items: center;
  background: #fff; border-radius: 20px; padding: 12px 12px 12px 8px;
  box-shadow: 0 24px 60px -22px rgba(20, 22, 25, .38);
}
.nd-campo { display: block; margin: 0; padding: 4px 20px; border-right: 1px solid var(--nd-linha); cursor: pointer; }
.nd-campo:nth-child(4) { border-right: 0; }
.nd-campo span { display: block; font-size: 13px; color: var(--nd-cinza); margin-bottom: 2px; }
.nd-campo select {
  width: 100%; border: 0; padding: 4px 24px 4px 0; margin: 0; background: transparent; cursor: pointer;
  font-size: 17px; font-weight: 600; color: var(--nd-grafite);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%231E2023' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right 2px center; background-size: 13px 13px;
}
.nd-campo select:focus { outline: none; }
.nd-campo:focus-within { box-shadow: inset 0 -2px 0 var(--nd-vermelho); }
.nd-pesquisa .nd-btn { min-height: 58px; padding: 0 28px; border-radius: 14px; font-size: 16px; }

/* ---------- Blocos e cabeçalhos de secção ---------- */

.nd-bloco { padding: 100px 0 0; }
.nd-bloco:last-child { padding-bottom: 110px; }
.nd-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
body.nd .nd-cab h2 {
  margin: 0; color: var(--nd-grafite); font-stretch: 112%; font-weight: 800; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.02;
}
body.nd .nd-cab p { margin: 10px 0 0; color: var(--nd-cinza); font-size: 17px; }
.nd-lnk {
  white-space: nowrap; font-weight: 650; font-size: 16px; color: var(--nd-grafite) !important;
  border-bottom: 2px solid var(--nd-vermelho); padding-bottom: 4px; text-decoration: none !important;
}
.nd-lnk:hover { color: var(--nd-vermelho) !important; }
.nd-setas { display: flex; gap: 10px; }
.nd-seta {
  width: 50px; height: 50px; border-radius: 50%; border: 1.5px solid #C9CCD0; background: transparent;
  display: grid; place-items: center; color: var(--nd-grafite); cursor: pointer; transition: background-color .2s, color .2s, border-color .2s;
}
.nd-seta:hover { background: var(--nd-grafite); border-color: var(--nd-grafite); color: #fff; }
.nd-seta.swiper-button-disabled { opacity: .35; cursor: default; background: transparent; color: var(--nd-grafite); border-color: #C9CCD0; }

/* ---------- Cartão de viatura ---------- */

.nd-card {
  display: flex; flex-direction: column; height: 100%; background: #fff; border-radius: var(--nd-raio); overflow: hidden;
  color: var(--nd-grafite) !important; text-decoration: none !important;
  box-shadow: 0 1px 0 rgba(20, 22, 25, .04), 0 10px 30px -18px rgba(20, 22, 25, .28);
  transition: box-shadow .25s;
}
.nd-card:hover { box-shadow: 0 1px 0 rgba(20, 22, 25, .04), 0 18px 40px -18px rgba(20, 22, 25, .4); }
.nd-card-img { position: relative; aspect-ratio: 4 / 3; background: #dfe1e4; overflow: hidden; }
.nd-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.nd-card:hover .nd-card-img img { transform: scale(1.03); }
.nd-etq {
  position: absolute; top: 14px; left: 14px; z-index: 2; background: #fff; color: var(--nd-grafite);
  font-size: 13px; font-weight: 650; padding: 6px 12px; border-radius: 999px;
}
.nd-etq-vermelha { background: var(--nd-vermelho); color: #fff; }
.nd-card-corpo { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: 20px 22px 22px; }
body.nd .nd-card-titulo { margin: 0; color: var(--nd-grafite); font-stretch: 106%; font-weight: 750; font-size: 22px; line-height: 1.15; }
body.nd .nd-card-versao { margin: 3px 0 0; color: var(--nd-cinza); font-size: 15px; line-height: 1.35; }
.nd-specs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 15px; color: #3C4046; }
.nd-sep { width: 4px; height: 4px; border-radius: 50%; background: #C3C6CA; }
.nd-card-rodape {
  margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  border-top: 1px solid var(--nd-linha); padding-top: 14px;
}
.nd-preco span {
  display: block; font-stretch: 78%; font-weight: 750; font-size: 32px; line-height: 1; color: var(--nd-grafite);
  font-variant-numeric: tabular-nums;
}
.nd-preco .nd-preco-txt { font-stretch: 92%; font-size: 21px; font-weight: 650; color: var(--nd-cinza); }
.nd-preco-antes { display: block; font-size: 14px; color: var(--nd-cinza); margin-bottom: 4px; }
.nd-renda { font-size: 13px; color: var(--nd-cinza); text-align: right; line-height: 1.35; }
.nd-renda b { color: var(--nd-grafite); font-size: 15px; }

/* A matrícula: mês e ano */
.nd-matricula {
  display: inline-flex; align-items: stretch; height: 27px; border: 1.5px solid var(--nd-grafite); border-radius: 5px;
  overflow: hidden; background: #fff; color: var(--nd-grafite);
}
.nd-matricula i {
  font-style: normal; background: var(--nd-azul-p); color: #fff; width: 16px;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
}
.nd-matricula b { padding: 0 8px; display: grid; place-items: center; font-stretch: 84%; font-weight: 700; font-size: 15px; letter-spacing: .03em; }

/* Grelha das últimas entradas */
.nd-grelha { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }

/* Destaques: foto em primeiro plano, texto por cima */
.nd-destaques .swiper { overflow: visible; clip-path: inset(-40px -100vw -40px 0); }
.nd-destaques { overflow: hidden; }
.nd-destaques .swiper-slide { height: auto; }
.nd-destaques .nd-card { position: relative; height: 480px; color: #fff !important; background: var(--nd-grafite); }
.nd-destaques .nd-card-img { position: absolute; inset: 0; aspect-ratio: auto; }
.nd-destaques .nd-card-img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(18, 19, 21, .94) 0%, rgba(18, 19, 21, .35) 42%, transparent 62%);
}
.nd-destaques .nd-card-corpo { position: relative; z-index: 2; margin-top: auto; flex: 0; padding: 24px; gap: 12px; }
body.nd .nd-destaques .nd-card-titulo { color: #fff; font-size: 25px; }
body.nd .nd-destaques .nd-card-versao { color: rgba(255, 255, 255, .75); }
.nd-destaques .nd-specs { color: rgba(255, 255, 255, .85); }
.nd-destaques .nd-matricula { border-color: #fff; }
.nd-destaques .nd-card-rodape { border-top-color: rgba(255, 255, 255, .18); }
.nd-destaques .nd-preco span { color: #fff; }
.nd-destaques .nd-preco .nd-preco-txt, .nd-destaques .nd-preco-antes, .nd-destaques .nd-renda { color: rgba(255, 255, 255, .75); }
.nd-destaques .nd-renda b { color: #fff; }

/* Vendidas: compacto, fotos a cinzento */
.nd-vendidas .swiper-slide { height: auto; }
.nd-vendidas .nd-card { border-radius: 12px; }
.nd-vendidas .nd-card-img { aspect-ratio: 3 / 2; }
.nd-vendidas .nd-card-img img { filter: grayscale(.85) contrast(.95); }
.nd-vendidas .nd-etq { top: auto; left: auto; right: 10px; bottom: 10px; border-radius: 6px; padding: 4px 10px; }
.nd-vendidas .nd-card-corpo { padding: 14px 16px 16px; gap: 8px; }
body.nd .nd-vendidas .nd-card-titulo { font-size: 16px; font-stretch: 102%; }
body.nd .nd-vendidas .nd-card-versao { font-size: 13px; }
.nd-vendidas .nd-specs { font-size: 13px; }
.nd-vendidas .nd-specs > span:not(.nd-matricula), .nd-vendidas .nd-card-rodape { display: none; }
.nd-vendidas .nd-matricula { height: 23px; }
.nd-vendidas .nd-matricula b { font-size: 13px; }

/* ---------- Faixa escura: os nossos valores ---------- */

.nd-valores { margin-top: 110px; padding: 100px 0; background: var(--nd-grafite); color: #fff; }
.nd-valores-grelha { display: grid; grid-template-columns: 1fr 1.1fr; gap: 80px; align-items: center; }
body.nd .nd-valores-marca { margin: 0 0 18px; color: rgba(255, 255, 255, .65); font-size: 15px; }
body.nd .nd-valores-titulo {
  margin: 0; color: #fff; font-stretch: 118%; font-weight: 850; font-size: clamp(38px, 4.4vw, 60px); line-height: .98; letter-spacing: -.02em;
}
body.nd .nd-valores-texto { margin: 24px 0 0; color: rgba(255, 255, 255, .74); font-size: 18px; line-height: 1.6; max-width: 30em; }
.nd-acoes { list-style: none; margin: 0; padding: 0; }
.nd-acao {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
  padding: 28px 0; border-top: 1px solid rgba(255, 255, 255, .14);
}
.nd-acao:last-child { border-bottom: 1px solid rgba(255, 255, 255, .14); }
body.nd .nd-acao h3 { margin: 0; color: #fff; font-stretch: 106%; font-weight: 700; font-size: 24px; line-height: 1.2; }
body.nd .nd-acao p { margin: 6px 0 0; color: rgba(255, 255, 255, .65); font-size: 16px; line-height: 1.5; }
.nd-acao:first-child .nd-btn { background: var(--nd-vermelho); border-color: var(--nd-vermelho); }
.nd-acao:first-child .nd-btn:hover { background: var(--nd-vermelho-esc); border-color: var(--nd-vermelho-esc); color: #fff !important; }
/* Sem secção de vendidas a seguir, a faixa escura encosta ao rodapé */
.nd-valores:last-child { margin-bottom: 0; }

/* ---------- Faixa de chamada e rodapé ---------- */

.nd-cta { background: var(--nd-vermelho); color: #fff; }
.nd-cta .container { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding-top: 44px; padding-bottom: 44px; }
body.nd .nd-cta h2 { margin: 0; color: #fff; font-stretch: 114%; font-weight: 800; font-size: clamp(28px, 3vw, 38px); line-height: 1.05; }
body.nd .nd-cta p { margin: 8px 0 0; color: rgba(255, 255, 255, .92); font-size: 17px; }
.nd-cta-btns { display: flex; flex-wrap: wrap; gap: 12px; }
body.nd footer { background-color: var(--nd-grafite-2) !important; }
body.nd footer > .container { padding-top: 70px; }
body.nd footer .footer-bar { border-top: 1px solid rgba(255, 255, 255, .1); }

/* ---------- Barra de ações (telemóvel) ---------- */

.nd-barra { display: none; }

/* ---------- Páginas interiores: ajustes leves ao CSS antigo ---------- */

body.nd .viaturas-listagem-v1 .isotope-item { margin-bottom: 26px; }
body.nd .title h1, body.nd .title h2 { font-stretch: 112%; font-weight: 800; }
body.nd .btn-ver-mais, body.nd .btn-xs, body.nd .btn-sm { text-transform: none; }

/* ---------- Responsivo ---------- */

@media (max-width: 1199.98px) {
  .nd-pesquisa-form { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 8px; gap: 0; }
  .nd-campo { padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--nd-linha); }
  .nd-campo:nth-child(odd) { border-right: 1px solid var(--nd-linha); }
  .nd-campo:nth-child(3), .nd-campo:nth-child(4) { border-bottom: 0; }
  .nd-pesquisa .nd-btn { grid-column: 1 / -1; margin-top: 8px; }
}
@media (max-width: 991.98px) {
  .nd-grelha { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .nd-valores-grelha { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 767.98px) {
  .nd-hero { min-height: 640px; align-items: flex-end; }
  .nd-hero-foto { background-position: 68% 40%; }
  .nd-hero::after { background: linear-gradient(0deg, rgba(18, 19, 21, .95) 0%, rgba(18, 19, 21, .7) 48%, rgba(18, 19, 21, .15) 78%); }
  body.nd main > section.nd-hero > .nd-hero-cnt { padding-top: 120px; padding-bottom: 96px; }
  body.nd .nd-hero-texto { font-size: 17px; margin-top: 16px; }
  .nd-factos { flex-direction: column; gap: 10px; margin-top: 24px; }
  .nd-factos li { font-size: 14px; }
  .nd-campo select { font-size: 15px; }
  .nd-bloco { padding-top: 70px; }
  .nd-cab { flex-direction: column; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
  .nd-setas { display: none; }
  .nd-grelha { grid-template-columns: 1fr; gap: 18px; }
  .nd-destaques .nd-card { height: 410px; }
  .nd-valores { margin-top: 80px; padding: 70px 0; }
  .nd-acao { grid-template-columns: 1fr; gap: 16px; padding: 24px 0; }
  .nd-acao .nd-btn { justify-self: start; }
  .nd-cta .container { flex-direction: column; align-items: flex-start; }

  .nd-barra {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
    background: #fff; padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 30px rgba(20, 22, 25, .15);
  }
  .nd-barra a {
    min-height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--nd-showroom); color: var(--nd-grafite) !important; font-weight: 650; font-size: 15px; text-decoration: none !important;
  }
  .nd-barra a.nd-barra-p { background: var(--nd-vermelho); color: #fff !important; }
  body.nd { padding-bottom: 76px; }
  /* O chat e o Turnstile sobem para não ficarem por baixo da barra */
  body.nd .a21chat { bottom: 86px !important; }
  body.nd #turnstile-global { bottom: 92px !important; }
}
