/* Campanha, cartões, galeria e segmentos (2026-11-16).
   Ficheiro isolado — carregado por último nas páginas públicas. */

/* ---------- Cartões de viatura: foto 16:9 e textos maiores ---------- */
.public-card__media{aspect-ratio:16/9}
.public-card__meta{flex-wrap:wrap;gap:8px 16px;padding:13px 16px;font-size:15px}
.public-card__meta li{flex:0 1 auto;overflow:visible;white-space:normal}
.public-card__meta svg{width:18px;height:18px}
.public-card__body .public-card__brand{font-size:23px}
.public-card__body .public-card__model{font-size:16px;white-space:normal}
.public-card__body .public-card__price-label{font-size:12px}
.public-card .public-price{font-size:30px}
@media(max-width:600px){
    .public-card__meta{gap:6px 12px;padding:11px 13px;font-size:14px}
    .public-card__body .public-card__brand{font-size:20px}
    .public-card__body .public-card__model{font-size:15px}
    .public-card .public-price{font-size:26px}
}

/* ---------- Campanha: etiqueta e preços ---------- */
.public-card__media .public-badge--promo{top:auto;bottom:.7rem;left:.7rem;z-index:2;padding:.38rem .62rem;border-radius:999px;background:#c4121f;color:#fff;font-size:11px;font-weight:800;letter-spacing:.04em;box-shadow:0 4px 12px rgba(0,0,0,.25)}
.public-price-old{display:block;margin:2px 0 0;color:#6b7280;font-size:15px;font-weight:600;text-decoration:line-through}
.vehicle-hero__price .vehicle-hero__price-old{display:block;color:#6b7280;font-size:16px;font-weight:600;text-decoration:line-through}

/* ---------- Campanha: banner da ficha ---------- */
.campaign-banner{position:relative;display:flex;align-items:center;gap:14px;margin:0 0 16px;padding:18px 16px 18px 12px;overflow:hidden;border-radius:18px;color:#fff;background:repeating-linear-gradient(90deg,rgba(255,255,255,.03) 0 2px,transparent 2px 10px),linear-gradient(135deg,#2a0508 0%,#5c0a12 55%,#3a070c 100%)}
.campaign-banner__badge{position:relative;display:flex;flex:0 0 auto;flex-direction:column;align-items:center;align-self:flex-start;margin-top:-18px}
.campaign-banner__string{display:block;width:1px;height:22px;background:rgba(255,255,255,.7)}
.campaign-banner__hex{display:flex;width:70px;height:78px;flex-direction:column;align-items:center;justify-content:center;color:#fff;text-align:center;line-height:1.1;clip-path:polygon(50% 0,100% 25%,100% 75%,50% 100%,0 75%,0 25%);background:linear-gradient(160deg,#e0202c,#a80d18);box-shadow:inset 0 0 0 4px #ff5a5f}
.campaign-banner__hex small{font-size:12px;font-weight:600}
.campaign-banner__hex strong{font-size:17px;font-weight:800}
.campaign-banner__main{display:flex;min-width:0;flex:1;flex-direction:column;align-items:center;gap:10px;padding-right:46px}
.campaign-banner__main p{margin:0;font-size:clamp(13px,1.3vw,17px);font-weight:600;letter-spacing:.04em;text-align:center;text-transform:uppercase}
.campaign-banner__timer{display:flex;align-items:center;gap:6px;padding:8px 12px;border-radius:12px;background:linear-gradient(180deg,#8c1220,#5a0a14);box-shadow:inset 0 0 0 1px rgba(255,120,120,.25)}
.campaign-banner__timer>span{min-width:38px;text-align:center}
.campaign-banner__timer b{display:block;font-size:clamp(20px,2vw,26px);font-weight:800;font-variant-numeric:tabular-nums;line-height:1}
.campaign-banner__timer small{display:block;margin-top:3px;font-size:9px;font-weight:600;letter-spacing:.06em;opacity:.8}
.campaign-banner__timer i{margin-top:-10px;font-style:normal;font-weight:800;opacity:.7}
.campaign-banner__clock{position:absolute;right:6px;bottom:-14px;width:68px;height:68px;transform:rotate(8deg);pointer-events:none}
@media(max-width:600px){
    .campaign-banner{gap:8px;padding:16px 10px 16px 8px}
    .campaign-banner__hex{width:60px;height:68px}
    .campaign-banner__main{padding-right:34px}
    .campaign-banner__clock{width:52px;height:52px}
}

/* ---------- Galeria: miniaturas com setas, arrastar e todas alcançáveis ---------- */
/* A faixa crescia com o nº de fotos e era cortada pela página (as últimas ficavam inalcançáveis). */
/* Ficha: galeria grande à esquerda (foto inteira, sem cortar) e cartão lateral à direita com a descrição. */
body.vehicle-page-active .vehicle-hero{grid-template-columns:minmax(0,1fr) minmax(0,528px);gap:32px;align-items:start}
body.vehicle-page-active .vehicle-hero__specs{grid-template-columns:repeat(2,minmax(0,1fr))}
body.vehicle-page-active .vehicle-hero__gallery .public-gallery__stage{aspect-ratio:16/9;background:#f1f3f5}
body.vehicle-page-active .vehicle-hero__gallery .public-gallery__stage img{width:100%;height:100%;aspect-ratio:auto;object-fit:contain}
@media(max-width:1280px){body.vehicle-page-active .vehicle-hero{grid-template-columns:minmax(0,1fr) minmax(0,462px);gap:24px}}
.vehicle-hero__gallery,.vehicle-hero__gallery .public-gallery{min-width:0;max-width:100%}
.public-gallery__thumbs-wrap{position:relative;width:100%;min-width:0;max-width:100%}
.vehicle-hero__gallery .public-gallery__thumbs{min-width:0;max-width:100%}
@media(max-width:900px){body.vehicle-page-active .vehicle-hero{grid-template-columns:minmax(0,1fr);gap:22px}}
.vehicle-hero__gallery .public-gallery__thumbs{justify-content:flex-start;overflow-x:auto;cursor:grab;user-select:none}
.vehicle-hero__gallery .public-gallery__thumbs:active{cursor:grabbing}
.vehicle-hero__gallery .public-gallery__thumbs img{pointer-events:none;-webkit-user-drag:none}
.public-gallery__thumbs-btn{position:absolute;top:calc(50% + 3px);z-index:3;display:grid;width:32px;height:32px;padding:0;place-items:center;transform:translateY(-50%);border:0;border-radius:50%;background:rgba(255,255,255,.92);color:#111;font-size:20px;line-height:1;box-shadow:0 2px 8px rgba(0,0,0,.25);cursor:pointer}
.public-gallery__thumbs-btn:hover{background:#fff}
.public-gallery__thumbs-btn--prev{left:4px}
.public-gallery__thumbs-btn--next{right:4px}

/* ---------- Segmentos: carrossel contínuo ---------- */
.home-segments .seg-track{display:flex;gap:16px;overflow-x:auto;padding:4px 2px 14px;scrollbar-width:none;-ms-overflow-style:none;cursor:grab;user-select:none;scroll-behavior:auto}
.home-segments .seg-track::-webkit-scrollbar{display:none}
.home-segments .seg-track:active{cursor:grabbing}
.home-segments .seg-card{display:flex;flex:0 0 150px;height:150px;min-height:0;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:10px;border:1px solid var(--line,rgba(0,0,0,.1));border-radius:18px;background:#fff;box-shadow:0 6px 18px rgba(7,26,52,.08)}
.home-segments .seg-card img{display:block;width:100%;height:68px;object-fit:contain;pointer-events:none;-webkit-user-drag:none}
.home-segments .seg-card strong{font-size:14px;font-weight:700;line-height:1.2;text-align:center}
@media(max-width:600px){
    .home-segments .seg-card{flex-basis:128px;height:128px}
    .home-segments .seg-card img{height:56px}
}

/* ---------- Cabeçalho: ao descer, sobem os contactos/logótipo e ficam só as abas ---------- */
@media(min-width:901px){
    .public-site-header{top:calc(var(--hdr-top, 0px) * -1)}
}

/* ---------- Banner: setas ---------- */
.home-hero__arrow{position:absolute;top:50%;z-index:3;display:grid;width:42px;height:42px;padding:0;place-items:center;transform:translateY(-50%);border:0;border-radius:50%;background:rgba(255,255,255,.88);color:#111;font-size:24px;line-height:1;box-shadow:0 2px 10px rgba(0,0,0,.25);cursor:pointer}
.home-hero__arrow:hover{background:#fff}
.home-hero__arrow--prev{left:16px}
.home-hero__arrow--next{right:16px}
@media(max-width:600px){.home-hero__arrow{width:34px;height:34px;font-size:20px}.home-hero__arrow--prev{left:8px}.home-hero__arrow--next{right:8px}}

/* ---------- Segmentos: cartões cinza claros, sem contorno (como a referência) ---------- */
.home-segments .seg-card{border:0;background:#f1f3f5;box-shadow:none}

/* ======================================================================
   Banner do topo — estilos escolhidos no backoffice (Site → Página inicial)
   classic = o atual (não faz nada) · floating · panel · vídeo do YouTube
   Os estilos novos só se aplicam em ecrãs > 900px; em telemóvel fica o clássico.
   ====================================================================== */

/* Vídeo do YouTube em fundo (cobre o banner sem barras) */
.home-hero__video{position:absolute;inset:0;overflow:hidden;pointer-events:none;container-type:size}
.home-hero__video iframe{position:absolute;top:50%;left:50%;width:max(100cqw,177.78cqh);height:max(100cqh,56.25cqw);transform:translate(-50%,-50%);border:0}

@media(min-width:901px){
    /* ---------- FLUTUANTE: cabeçalho em pílula por cima do banner ---------- */
    body.hero-style-floating .public-site-header{position:sticky;top:12px;z-index:300;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;column-gap:24px;width:min(calc(100% - 3rem),1370px);height:84px;margin:34px auto -118px;padding:0 28px;border-radius:20px;background:rgba(255,255,255,.97);box-shadow:0 12px 34px rgba(0,0,0,.2)}
    body.hero-style-floating .public-header-main,
    body.hero-style-floating .public-header-main__inner,
    body.hero-style-floating .public-menubar,
    body.hero-style-floating .public-menubar__inner{display:contents}
    body.hero-style-floating .home-nav{grid-column:1;grid-row:1;justify-self:start}
    body.hero-style-floating .public-logo{grid-column:2;grid-row:1;width:auto;max-width:230px;height:76px}
    body.hero-style-floating .public-logo img{height:100%;width:auto;max-width:100%;object-fit:contain}
    body.hero-style-floating .public-header-contacts{grid-column:3;grid-row:1;justify-self:end}
    body.hero-style-floating .public-header-cta,
    body.hero-style-floating .home-menu-toggle{display:none}
    body.hero-style-floating .home-hero{min-height:min(900px,calc(100vh - 32px));margin-top:16px;padding:8rem 4rem 8.5rem;justify-content:flex-end;border-radius:28px}
    body.hero-style-floating .home-hero__content{max-width:980px}
    /* Título em baixo à esquerda (por cima da pesquisa), como na referência — ignora o alinhamento do banner neste estilo */
    body.hero-style-floating .home-hero__copy.home-hero__content{max-width:none;justify-content:flex-end;align-items:flex-start;text-align:left;padding:8rem 4rem 9.6rem}
    body.hero-style-floating .home-hero__copy .home-hero__subtitle{margin-inline:0!important}
    body.hero-style-floating .home-hero__content h1{font-size:clamp(48px,5.4vw,92px);line-height:.98}
    body.hero-style-floating .home-search{position:relative;z-index:5;display:flex;align-items:center;width:fit-content;max-width:calc(100% - 2rem);margin:-96px auto 0 calc(max(1rem,(100% - var(--a1-width))/2) + 4rem);padding:.45rem .45rem .45rem 1.2rem;border:0;border-radius:999px;background:#fff;color:#111;box-shadow:0 14px 36px rgba(0,0,0,.25)}
    body.hero-style-floating .home-search__fields{display:flex;align-items:center;gap:.25rem}
    body.hero-style-floating .home-search label{display:block}
    body.hero-style-floating .home-search label span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
    body.hero-style-floating .home-search select,
    body.hero-style-floating .home-search input[type=search]{min-height:0;min-width:130px;padding:.85rem 1rem;border:0;border-radius:0;background:transparent;color:#111;font-size:15px;font-weight:600}
    body.hero-style-floating .home-search button[type=submit]{width:54px;height:54px;padding:0;border:0;border-radius:50%;background:#111;color:transparent;font-size:0;overflow:hidden;position:relative}
    body.hero-style-floating .home-search button[type=submit]::after{content:"⌕";position:absolute;inset:0;display:grid;place-items:center;color:#fff;font-size:26px}
    body.hero-style-floating .home-search__toggle{display:none}

    /* ---------- PAINEL: banner em cartão + pesquisa num painel de cor por cima ---------- */
    body.hero-style-panel .home-hero{min-height:640px;padding:4rem 4rem 9.5rem;justify-content:center;border-radius:20px}
    body.hero-style-panel .home-hero__content{max-width:900px}
    body.hero-style-panel .home-hero__content h1{font-size:clamp(44px,4.6vw,80px);line-height:1}
    body.hero-style-panel .home-search{position:relative;z-index:5;display:flex;align-items:center;width:min(calc(100% - 8rem),1120px);margin:-86px auto 0;padding:1.1rem 1.3rem;border:0;border-radius:16px;background:var(--navy,#0f2a56);color:#fff;box-shadow:0 18px 40px rgba(0,0,0,.28)}
    body.hero-style-panel .home-search__fields{display:flex;flex:1;align-items:center;gap:0}
    body.hero-style-panel .home-search label{flex:1 1 0;display:block;padding:0 1rem;border-left:1px solid rgba(255,255,255,.18)}
    body.hero-style-panel .home-search label:first-child{border-left:0}
    body.hero-style-panel .home-search label span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
    body.hero-style-panel .home-search select,
    body.hero-style-panel .home-search input[type=search]{width:100%;min-height:0;padding:.7rem .2rem;border:0;border-radius:0;background:transparent;color:#fff;font-size:15px;font-weight:600}
    body.hero-style-panel .home-search select option{color:#111}
    body.hero-style-panel .home-search button[type=submit]{flex:0 0 auto;margin-left:1rem;padding:.95rem 2.2rem;border:0;border-radius:10px;background:#fff;color:var(--navy,#0f2a56);font-size:15px;font-weight:700}
    body.hero-style-panel .home-search__toggle{display:none}
}

/* Vídeo carregado (ficheiro do servidor) e respeito por "reduzir movimento" */
.home-hero__video-file{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
@media(prefers-reduced-motion:reduce){.home-hero__video{display:none}}

/* Bateria (viaturas elétricas) — dentro do cartão da viatura */
.vehicle-hero__battery{display:flex;gap:10px;margin:0 0 16px}
.vehicle-hero__battery>div{flex:1;display:flex;flex-direction:column;gap:1px;padding:10px 14px;border-radius:10px;background:#eefcf6;border:1px solid #4ffeaa}
.vehicle-hero__battery strong{font-size:1.15rem;line-height:1.1}
.vehicle-hero__battery span{font-size:.75rem;opacity:.75}
