/* =====================================================================
   Aguiar Automóveis · sistema de design base
   Minimalista, moderno (referências: tesla.com, kia.pt, byd.com).
   Regras: cantos retos, muito branco, tipografia grande e limpa,
   preto como cor de ação, azul Aguiar só como acento.
   Cada página tem o seu CSS em /css/pages/<pagina>.css
   ===================================================================== */

:root {
  --ink: #05141f;          /* quase preto (texto e botões) */
  --ink-2: #3b4650;        /* texto secundário */
  --muted: #6b7680;        /* texto terciário */
  --line: #e3e5e8;         /* linhas e contornos */
  --line-2: #cfd3d8;
  --soft: #f5f6f7;         /* fundos suaves */
  --soft-2: #eceef0;
  --white: #ffffff;
  --brand: #0b1897;        /* azul Aguiar (do logótipo) */
  --brand-2: #009ee3;      /* azul claro do logótipo */
  --ok: #0f7b4a;
  --warn: #b26a00;
  --danger: #c0272d;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Inter Tight', 'Inter', system-ui, sans-serif;

  --nav-h: 64px;
  --wrap: 1360px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--ink); color: #fff; }

.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; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* ---------- Tipografia ---------- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.display { font-size: clamp(40px, 6vw, 84px); line-height: 1; letter-spacing: -0.035em; }
.h1 { font-size: clamp(32px, 4.2vw, 56px); letter-spacing: -0.03em; }
.h2 { font-size: clamp(26px, 3vw, 40px); }
.h3 { font-size: clamp(20px, 1.8vw, 24px); }
.lead { font-size: clamp(16px, 1.3vw, 19px); color: var(--ink-2); line-height: 1.55; }
.muted { color: var(--muted); }
.link { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.link-arrow .icon { transition: transform .25s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- Botões (cantos retos) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 28px;
  font-size: 14px; font-weight: 500; letter-spacing: .01em; white-space: nowrap;
  border: 1px solid transparent; border-radius: 0;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #1c2b37; }
.btn-light { background: rgba(255, 255, 255, .92); color: var(--ink); backdrop-filter: blur(8px); }
.btn-light:hover { background: #fff; }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-outline-light { border-color: rgba(255,255,255,.9); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--ink); }
.btn-ghost { color: var(--ink); padding: 0 14px; }
.btn-ghost:hover { background: var(--soft); }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; padding: 0 36px; font-size: 15px; }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 13px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Etiquetas ---------- */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; font-size: 12px; font-weight: 500; background: var(--soft); color: var(--ink-2); }
.tag-dark { background: var(--ink); color: #fff; }
.tag-brand { background: var(--brand); color: #fff; }
.tag-warn { background: #fff4e0; color: var(--warn); }

/* ---------- Formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > label { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font-size: 15px; background: var(--white); border: 1px solid var(--line-2); border-radius: 0;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  appearance: none;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.textarea { min-height: 120px; resize: vertical; }
.select { padding-right: 40px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2305141f' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") right 14px center / 12px no-repeat; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { appearance: none; flex: none; width: 18px; height: 18px; margin-top: 1px; border: 1px solid var(--line-2); background: #fff; display: grid; place-content: center; cursor: pointer; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ''; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.form-grid { display: grid; gap: 14px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.form-note { font-size: 12px; color: var(--muted); }
.form-msg { padding: 14px 16px; font-size: 14px; display: none; }
.form-msg.ok { display: block; background: #e9f6ef; color: var(--ok); }
.form-msg.err { display: block; background: #fdecec; color: var(--danger); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr; } }

/* ---------- Cabeçalho ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav--transparent:not(.is-scrolled):not(.is-open) { background: transparent; backdrop-filter: none; }
.nav__inner { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.nav__logo { display: inline-flex; align-items: center; height: var(--nav-h); }
.nav__logo img { height: 34px; width: auto; }
.nav__links { display: flex; gap: 2px; }
.nav__links a, .nav__right a, .nav__right button {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px;
  font-size: 14px; font-weight: 500; color: var(--ink); transition: background-color .2s var(--ease);
}
.nav__links a:hover, .nav__right a:hover, .nav__right button:hover, .nav__links a.is-active { background: rgba(5, 20, 31, .06); }
.nav__right { display: flex; justify-content: flex-end; gap: 2px; }
.nav__menu-btn { display: none !important; }
body.has-transparent-nav main { margin-top: 0; }
main { margin-top: var(--nav-h); }

@media (max-width: 1080px) {
  .nav__links, .nav__right .hide-md { display: none; }
  .nav__inner { grid-template-columns: 1fr auto; }
  .nav__menu-btn { display: inline-flex !important; background: rgba(5, 20, 31, .06); }
}

/* Mega menu das viaturas */
.mega {
  position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 49;
  background: #fff; border-bottom: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
}
.mega.is-open { opacity: 1; visibility: visible; transform: none; }
.mega__inner { max-width: 1360px; margin: 0 auto; padding: 32px var(--gutter) 36px; display: grid; grid-template-columns: 1fr 260px; gap: 48px; }
.mega__cars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px 16px; }
.mega__car { display: block; text-align: center; }
.mega__car img { width: 100%; aspect-ratio: 3/2; object-fit: cover; background: var(--soft); transition: transform .35s var(--ease); }
.mega__car:hover img { transform: scale(1.03); }
.mega__car strong { display: block; margin-top: 10px; font-size: 14px; font-weight: 500; }
.mega__car span { font-size: 12px; color: var(--muted); }
.mega__side { border-left: 1px solid var(--line); padding-left: 32px; display: flex; flex-direction: column; gap: 4px; }
.mega__side a { padding: 7px 0; font-size: 14px; color: var(--ink-2); display: flex; justify-content: space-between; }
.mega__side a:hover { color: var(--ink); }
.mega__side a small { color: var(--muted); }
.mega__side .mega__all { margin-top: 12px; color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.mega-backdrop { position: fixed; inset: 0; z-index: 48; background: rgba(5, 20, 31, .25); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility .25s; }
.mega-backdrop.is-open { opacity: 1; visibility: visible; }

/* Menu móvel (gaveta à direita) */
.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__bg { position: absolute; inset: 0; background: rgba(5, 20, 31, .35); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s var(--ease); }
.drawer.is-open .drawer__bg { opacity: 1; }
.drawer__panel {
  position: absolute; inset: 0 0 0 auto; width: min(380px, 100%); background: #fff;
  display: flex; flex-direction: column; padding: 16px 24px 32px;
  transform: translateX(100%); transition: transform .35s var(--ease); overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__close { align-self: flex-end; width: 40px; height: 40px; display: grid; place-items: center; }
.drawer__close:hover { background: var(--soft); }
.drawer nav { display: flex; flex-direction: column; margin-top: 8px; }
.drawer nav a { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px; font-size: 16px; font-weight: 500; }
.drawer nav a:hover { background: var(--soft); }
.drawer__contacts { margin-top: auto; padding-top: 24px; display: grid; gap: 10px; }

/* ---------- Rodapé ---------- */
.ft { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.ft a { transition: color .2s var(--ease), opacity .2s var(--ease); }
.ft ::selection { background: #fff; color: var(--ink); }

/* 1. chamada final */
.ft-cta { border-bottom: 1px solid rgba(255,255,255,.12); }
.ft-cta__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px 64px; align-items: end; padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(48px, 6vw, 80px); }
.ft-status { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255,255,255,.72); margin-bottom: 22px; }
.ft-status__dot { width: 8px; height: 8px; background: rgba(255,255,255,.4); }
.ft-status.is-open .ft-status__dot { background: #34d07f; box-shadow: 0 0 0 4px rgba(52,208,127,.18); animation: ft-pulse 2.4s var(--ease) infinite; }
.ft-status.is-closed .ft-status__dot { background: #f2a33a; }
@keyframes ft-pulse { 50% { box-shadow: 0 0 0 8px rgba(52,208,127,0); } }
.ft-cta__title { font-size: clamp(36px, 5.4vw, 76px); line-height: 1; letter-spacing: -0.035em; font-weight: 500; }
.ft-cta__title span { color: rgba(255,255,255,.42); }
.ft-cta__actions { display: grid; border-top: 1px solid rgba(255,255,255,.14); }
.ft-action { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 16px; padding: 18px 4px; border-bottom: 1px solid rgba(255,255,255,.14); font-size: 17px; font-weight: 500; }
.ft-action small { display: block; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 2px; }
.ft-action .icon { color: rgba(255,255,255,.8); }
.ft-action__arrow { transition: transform .3s var(--ease); }
.ft-action:hover { background: rgba(255,255,255,.04); }
.ft-action:hover .ft-action__arrow { transform: translateX(6px); }

/* 2. colunas */
.ft-main { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 48px 40px; padding-top: clamp(56px, 7vw, 88px); padding-bottom: clamp(40px, 5vw, 64px); }
.ft-brand img { height: 36px; width: auto; filter: brightness(0) invert(1); }
.ft-brand > p { margin-top: 20px; color: rgba(255,255,255,.66); font-size: 14px; max-width: 38ch; }
.ft-col h3 { font-family: var(--font); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: 18px; }
.ft-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.ft-col li a { color: rgba(255,255,255,.82); font-size: 14px; display: inline-flex; align-items: baseline; gap: 8px; }
.ft-col li a small { font-size: 11px; color: rgba(255,255,255,.4); }
.ft-col li a:hover { color: #fff; }
.ft-visit address { font-style: normal; font-size: 14px; line-height: 1.6; }
.ft-visit address a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); text-underline-offset: 4px; }
.ft-visit address a:hover { text-decoration-color: #fff; }
.ft-hours { margin: 20px 0 0; display: grid; gap: 6px; font-size: 13px; }
.ft-hours div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 6px; border-bottom: 1px dashed rgba(255,255,255,.12); }
.ft-hours dt { color: rgba(255,255,255,.55); }
.ft-hours dd { margin: 0; color: rgba(255,255,255,.9); text-align: right; }
.ft-hours div.is-today dt, .ft-hours div.is-today dd { color: #fff; font-weight: 500; }
.ft-contacts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.ft-contacts a { font-size: 15px; font-weight: 500; color: #fff; }
.ft-contacts a:hover { opacity: .75; }
.ft-contacts small { display: block; font-size: 11px; color: rgba(255,255,255,.4); }

/* colunas em acordeão (só fecham no telemóvel) */
.ft-acc > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: default; }
.ft-acc > summary::-webkit-details-marker { display: none; }
.ft-acc > summary .icon { display: none; }
.ft-acc > summary h3 { margin-bottom: 18px; }

/* formulário de alertas */
.ft-alert { margin-top: 32px; max-width: 440px; }
.ft-alert__label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: 12px; }
.ft-alert__row { display: grid; grid-template-columns: 1fr 1.3fr 52px; border: 1px solid rgba(255,255,255,.22); transition: border-color .2s var(--ease); }
.ft-alert__row:focus-within { border-color: #fff; }
.ft-alert__input { min-width: 0; height: 52px; padding: 0 14px; background: transparent; border: 0; color: #fff; font-size: 14px; }
.ft-alert__input + .ft-alert__input { border-left: 1px solid rgba(255,255,255,.22); }
.ft-alert__input::placeholder { color: rgba(255,255,255,.45); }
.ft-alert__input:focus { outline: none; background: rgba(255,255,255,.05); }
.ft-alert__btn { background: #fff; color: var(--ink); display: grid; place-items: center; transition: background-color .2s var(--ease); }
.ft-alert__btn:hover { background: #dfe3e7; }
.ft-alert__note { margin-top: 10px; font-size: 12px; color: rgba(255,255,255,.4); }
.ft-alert__note a { text-decoration: underline; }
.ft-alert .form-msg { margin-top: 12px; }
.ft-alert .form-msg.ok { background: rgba(52,208,127,.12); color: #7ee2ad; }
.ft-alert .form-msg.err { background: rgba(255,90,90,.12); color: #ff9c9c; }
.ft-alert.is-sent .ft-alert__row, .ft-alert.is-sent .ft-alert__note { display: none; }

/* 3. assinatura gigante */
.ft-sign { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 8px; user-select: none; }
.ft-sign__word { font-family: var(--font-display); font-weight: 600; font-size: clamp(96px, 23vw, 360px); line-height: .74; padding-top: .06em; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.16); background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,0) 85%); -webkit-background-clip: text; background-clip: text; margin-left: -0.04em; }
.ft-sign__since { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.4); padding-bottom: 1.2em; white-space: nowrap; }

/* 4. barra legal */
.ft-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.ft-bottom__inner { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: 'social legal top' 'copy copy copy'; align-items: center; gap: 18px 28px; padding-top: 22px; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
.ft-social { grid-area: social; display: flex; gap: 6px; }
.ft-social a { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.85); }
.ft-social a:hover { background: #fff; color: var(--ink); border-color: #fff; }
.ft-legal { grid-area: legal; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 13px; }
.ft-legal a { color: rgba(255,255,255,.6); }
.ft-legal a:hover { color: #fff; }
.ft-copy { grid-area: copy; font-size: 12px; color: rgba(255,255,255,.38); text-align: center; }
.ft-top { grid-area: top; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); color: #fff; }
.ft-top:hover { background: #fff; color: var(--ink); }

@media (max-width: 1080px) {
  .ft-main { grid-template-columns: 1fr 1fr; }
  .ft-brand { grid-column: 1 / -1; }
  .ft-visit { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
  .ft-visit h3 { grid-column: 1 / -1; }
  .ft-visit address { grid-column: 1; }
  .ft-hours { grid-column: 2; grid-row: 2 / span 2; margin-top: 0; }
  .ft-contacts { grid-column: 1; }
}
@media (max-width: 860px) {
  .ft-cta__inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ft-cta__inner { padding-top: 56px; padding-bottom: 40px; gap: 28px; }
  .ft-action { padding: 14px 4px; font-size: 16px; }
  .ft-main { grid-template-columns: 1fr; gap: 0; padding-top: 40px; padding-bottom: 32px; }
  .ft-brand { padding-bottom: 32px; }
  .ft-acc { border-top: 1px solid rgba(255,255,255,.12); }
  .ft-acc > summary { cursor: pointer; min-height: 56px; }
  .ft-acc > summary h3 { margin: 0; }
  .ft-acc > summary .icon { display: block; color: rgba(255,255,255,.6); transition: transform .25s var(--ease); }
  .ft-acc[open] > summary .icon { transform: rotate(180deg); }
  .ft-acc ul { padding-bottom: 22px; }
  .ft-visit { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; }
  .ft-visit { display: block; }
  .ft-hours { margin-top: 20px; }
  .ft-alert__row { grid-template-columns: 1fr 52px; }
  .ft-alert__input + .ft-alert__input { border-left: 0; border-top: 1px solid rgba(255,255,255,.22); grid-column: 1; }
  .ft-alert__btn { grid-column: 2; grid-row: 1 / span 2; }
  .ft-sign { flex-direction: column; align-items: flex-start; gap: 0; }
  .ft-sign__word { font-size: 31vw; }
  .ft-sign__since { padding: 0 0 12px; order: -1; }
  .ft-bottom__inner { grid-template-columns: 1fr auto; grid-template-areas: 'social top' 'legal legal' 'copy copy'; }
  .ft-legal { justify-content: flex-start; }
  .ft-copy { text-align: left; }
}

/* ---------- Componentes partilhados ---------- */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section--soft { background: var(--soft); }
.section--dark { background: var(--ink); color: #fff; }
.section--dark .muted, .section--dark .lead { color: rgba(255, 255, 255, .72); }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px; margin-bottom: clamp(28px, 4vw, 48px); }
.section__head .eyebrow { margin-bottom: 12px; }

/* Cartão de viatura (usado na home, inventário, semelhantes, histórias) */
.car-card { display: flex; flex-direction: column; background: #fff; position: relative; }
.car-card__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; background: var(--soft); }
.car-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s var(--ease), transform .6s var(--ease); }
.car-card__media img + img { opacity: 0; }
.car-card:hover .car-card__media img:first-child { transform: scale(1.03); }
.car-card:hover .car-card__media img + img { opacity: 1; }
.car-card__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 2; }
.car-card__body { padding: 18px 0 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.car-card__title { font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; }
.car-card__version { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.55em; }
.car-card__specs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.car-card__specs span { display: inline-flex; align-items: center; gap: 6px; }
.car-card__price { margin-top: 14px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.car-card__price small { font-size: 13px; font-weight: 400; color: var(--muted); }
.car-card > a.car-card__link { position: absolute; inset: 0; z-index: 1; }

.grid-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 40px 24px; }

/* Faixa de vantagens */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.perk { padding: 28px 28px 28px 0; }
.perk + .perk { padding-left: 28px; border-left: 1px solid var(--line); }
.perk .icon { width: 28px; height: 28px; stroke-width: 1.3; }
.perk h3 { margin-top: 18px; font-size: 17px; font-family: var(--font); font-weight: 600; letter-spacing: 0; }
.perk p { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
@media (max-width: 900px) { .perks { grid-template-columns: 1fr 1fr; } .perk:nth-child(3) { padding-left: 0; border-left: 0; } .perk:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .perks { grid-template-columns: 1fr; } .perk, .perk + .perk { padding: 24px 0; border-left: 0; border-top: 1px solid var(--line); } .perk:first-child { border-top: 0; } }

/* Barra de contacto fixa no mobile (página da viatura) */
.sticky-cta { position: fixed; inset: auto 0 0 0; z-index: 40; display: none; gap: 8px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom)); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }

/* Breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); padding: 20px 0 0; }
.crumbs a:hover { color: var(--ink); }
.crumbs span[aria-hidden] { opacity: .5; }

/* Cabeçalho de página interior */
.page-head { padding: clamp(48px, 7vw, 96px) 0 clamp(32px, 4vw, 48px); }
.page-head .eyebrow { margin-bottom: 14px; }
.page-head .lead { margin-top: 18px; max-width: 60ch; }

/* Conteúdo de texto longo (histórias, páginas legais) */
.prose { font-size: 17px; line-height: 1.75; color: var(--ink-2); max-width: 70ch; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 26px; color: var(--ink); margin-top: 2em; }
.prose h3 { font-size: 20px; color: var(--ink); margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: .4em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* Animação ao entrar no ecrã */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Banner de cookies */
.cookie { position: fixed; left: 16px; bottom: 16px; z-index: 70; max-width: 400px; padding: 18px 20px; background: #fff; color: var(--ink-2); border: 1px solid var(--line); font-size: 13px; display: none; gap: 14px; flex-direction: column; box-shadow: 0 24px 48px rgba(5,20,31,.22); }
.cookie.is-on { display: flex; }
.cookie a { text-decoration: underline; }
.cookie .btn { min-height: 40px; background: var(--ink); color: #fff; }
.cookie .btn:hover { background: #1c2b37; }
@media (max-width: 640px) {
  .cookie { left: 0; right: 0; bottom: 0; max-width: none; flex-direction: row; align-items: center; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); font-size: 12px; border-width: 1px 0 0; }
  .cookie .btn { flex: none; }
}

/* =========================================================
   Processo de qualidade (partial process.ejs)
   ========================================================= */
.pr { border-top: 1px solid var(--line); }
.pr__head { display: grid; grid-template-columns: 1.15fr 1fr; gap: 20px 64px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.pr__head .eyebrow { margin-bottom: 16px; }
.pr__head .h1 { max-width: 17ch; }
.pr__more { margin-top: 20px; }
.pr__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.pr-step { position: relative; padding: 28px 28px 36px 0; border-bottom: 1px solid var(--line); transition-delay: var(--d, 0ms); }
.pr-step:not(:nth-child(3n + 1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.pr-step__icon { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line-2); color: var(--ink); transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease); }
.pr-step:hover .pr-step__icon { background: var(--ink); color: #fff; border-color: var(--ink); }
.pr-step__title { margin-top: 22px; font-size: clamp(20px, 1.7vw, 24px); letter-spacing: -0.015em; }
.pr-step__text { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--ink-2); max-width: 42ch; }
.pr-step__checks { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.pr-step__checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); }
.pr-step__checks .icon { flex: none; margin-top: 2px; }
.pr--compact .pr-step { padding-bottom: 28px; }
/* linha que se preenche ao entrar no ecrã */
.pr-step::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--brand, var(--ink)); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease) var(--d, 0ms); }
.pr-step.is-in::before { transform: scaleX(1); }
@media (max-width: 1080px) {
  .pr__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-step:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .pr-step:nth-child(2n) { padding-left: 28px; border-left: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .pr__head { grid-template-columns: 1fr; }
  .pr__steps { grid-template-columns: 1fr; border-top: 0; }
  .pr-step, .pr-step:nth-child(2n) { display: grid; grid-template-columns: 48px 1fr; column-gap: 18px; padding: 22px 0; border-left: 0; padding-left: 0; }
  .pr-step__icon { grid-row: 1 / span 3; }
  .pr-step__title { margin-top: 2px; }
  .pr-step::before { display: none; }
  .pr-step:first-child { border-top: 1px solid var(--ink); }
}

/* =========================================================
   "Não encontrou? Peça-nos o que procura" (partial request-car.ejs)
   ========================================================= */
.rq { border-top: 1px solid var(--line); }
.rq__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: 40px clamp(40px, 6vw, 96px); align-items: start; }
.rq__copy { position: sticky; top: calc(var(--nav-h) + 40px); }
.rq__copy .eyebrow { margin-bottom: 16px; }
.rq__copy .h1 { max-width: 14ch; text-wrap: balance; }
.rq__copy .lead { margin-top: 20px; max-width: 46ch; }
.rq__list { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
.rq__list li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink); }
.rq__list .icon { flex: none; margin-top: 3px; }
.rq__form { background: #fff; border: 1px solid var(--line); padding: clamp(22px, 3vw, 36px); }
.section--soft .rq__form { border-color: transparent; }
.rq__title { font-family: var(--font-display); font-size: 20px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); margin-bottom: 18px; }
.rq__title--2 { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.rq-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.rq-chip { position: relative; cursor: pointer; }
.rq-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rq-chip span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 14px; border: 1px solid var(--line-2); font-size: 14px; font-weight: 500; color: var(--ink); background: #fff; transition: border-color .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease); }
.rq-chip:hover span { border-color: var(--ink); }
.rq-chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.rq-chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.rq-done { display: grid; gap: 14px; justify-items: start; padding: 8px 0; }
.rq-done__icon { display: grid; place-items: center; width: 52px; height: 52px; background: var(--ink); color: #fff; }
.rq-done p:not(.rq__title) { color: var(--ink-2); max-width: 44ch; }
@media (max-width: 900px) {
  .rq__grid { grid-template-columns: 1fr; }
  .rq__copy { position: static; }
}
@media (max-width: 640px) {
  .rq__form { margin: 0 calc(var(--gutter) * -1); border-left: 0; border-right: 0; }
}

/* =========================================================
   Barra de atalhos no telemóvel (fundo do ecrã)
   ========================================================= */
:root { --tab-h: 0px; }
.tabbar { display: none; }
@media (max-width: 760px) {
  :root { --tab-h: calc(60px + env(safe-area-inset-bottom)); }
  body { padding-bottom: var(--tab-h); }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-template-columns: repeat(5, 1fr); height: var(--tab-h); padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 255, 255, .94); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px); border-top: 1px solid var(--line); transition: transform .3s var(--ease); }
  .tabbar.is-hidden { transform: translateY(100%); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 60px; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: .01em; background: none; border: 0; -webkit-tap-highlight-color: transparent; }
  .tabbar .icon { width: 22px; height: 22px; }
  .tabbar .is-on { color: var(--ink); }
  .tabbar .is-on .icon { stroke-width: 2; }
  .tabbar a:active, .tabbar button:active { color: var(--ink); }
  /* páginas com barra própria (ficha da viatura) */
  body:has(.sticky-cta) { padding-bottom: 0; }
  body:has(.sticky-cta) .tabbar { display: none; }
  .cookie { bottom: var(--tab-h); }
  body:has(.sticky-cta) .cookie { bottom: 0; }
}
