/* ==========================================================================
   Loja Autocávado — acessórios originais.

   A loja fala a mesma língua do resto do site (homepage, /carros): fundo
   quase-preto, herói com fotografia, barra de filtros fixa com desfoque,
   superfícies mates sem sombra. Antes era clara e com sombras — destoava de
   tudo o resto e era o que se via primeiro.

   Namespaced `acv-` para não tocar no DOM/estilos das outras páginas.
   ========================================================================== */
:root {
    /* Superfícies e texto — os mesmos valores de /carros. */
    --acv-bg: #0f0f10;
    --acv-surface: #141415;
    --acv-surface-2: #191a1b;
    --acv-line: rgba(255, 255, 255, .08);
    --acv-line-soft: rgba(255, 255, 255, .05);
    --acv-ink: rgba(255, 255, 255, .94);
    --acv-ink-soft: rgba(255, 255, 255, .68);
    --acv-muted: rgba(255, 255, 255, .50);
    --acv-accent: #ffffff;          /* ações principais: branco sobre escuro */
    --acv-accent-ink: #0f0f10;

    /* Estados de stock — os mesmos quatro em toda a loja. */
    --acv-ok: #34d399;
    --acv-warn: #fbbf24;
    --acv-err: #f87171;
    --acv-neutral: rgba(255, 255, 255, .45);

    --acv-radius: 14px;
    --acv-radius-sm: 10px;
    --acv-max: 1440px;
    /* Goteira da barra de filtros. É token porque a barra serve duas páginas com
       medidas de conteúdo diferentes: em /carros o `.vehicles-page` baixa este e
       o `--acv-max` para os valores de lá, e a barra alinha com o resto sem que
       as larguras tenham de ser copiadas para a folha dessa página. */
    --acv-gutter: 36px;
}

/* ── Bloco e-commerce no header (à direita do logo) ───────────────────────── */
.acv-ecom-nav { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.acv-ecom-nav > li { display: flex; }
.acv-ecom-li { display: inline-flex; align-items: center; list-style: none; }
.acv-ecom-link {
    display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; cursor: pointer;
    font-size: inherit; font-weight: 600; color: inherit; text-decoration: none; background: none; border: none;
    font-family: inherit; position: relative; opacity: .95;
}
.acv-ecom-link .ph-icon { font-size: 19px; }
.acv-ecom-link span { white-space: nowrap; }
.acv-ecom-link:hover { opacity: 1; }
/* A contagem de um ícone do cabeçalho: carrinho, favoritos, comparador.
   O desenho está na `acv-count`, e a `acv-cart-count` fica a marcar QUAL é o do
   carrinho, porque o `store.js` escreve a contagem dele em tudo o que a tiver.
   Enquanto os três partilhavam a classe, os badges dos favoritos e do
   comparador mostravam o número do carrinho.

   REDONDO PERFEITO até dois dígitos: a medida é a altura, e o `padding` fica
   pelos 2px que só servem para o número não encostar à borda. Com `0 5px`, um
   "12" empurrava a caixa para 21px de largura e o círculo saía oval. Acima de
   99 a caixa cresce, que é o único sítio onde deixa de ser redonda. */
.acv-count,
.acv-cart-count {
    /* Assenta sobre o canto superior direito do ícone, e tapa-lhe um pedaço de
       propósito: é assim que se lê como uma contagem daquele ícone e não como
       um número solto ao lado dele. */
    position: absolute;
    top: -8px;
    right: 0;
    min-width: 18px; height: 18px; padding: 0 2px; border-radius: 999px; background: var(--acv-accent);
    color: var(--acv-accent-ink); font-size: 11px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
    font-variant-numeric: tabular-nums; line-height: 1;
    pointer-events: none;
}
.acv-count[hidden],
.acv-cart-count[hidden] { display: none; }

/* O cabeçalho passa a branco ao abrir o menu e no hover, e aí um círculo branco
   com tinta escura confunde-se com o fundo. Inverte-se, com o mesmo gatilho que
   o `main-header.css` já usa para os ícones e o logótipo. */
#main-header:hover .ecom-actions .acv-count,
#main-header.is-open .ecom-actions .acv-count,
#main-header:hover .ecom-actions .acv-cart-count,
#main-header.is-open .ecom-actions .acv-cart-count {
    background: #1c1c1c;
    color: #fff;
}

/* ==========================================================================
   MONTRA
   ========================================================================== */
.acv-store {
    background: var(--acv-bg);
    color: var(--acv-ink);
    padding-bottom: calc(64px + var(--island-links-offset, 0px));
}

/* Herói: fotografia esbatida sob o título, como em /carros. */
.acv-store-hero {
    position: relative;
    padding: calc(var(--main-header-height, 72px) + 56px) 0 44px;
    overflow: hidden;
}
.acv-store-hero::before {
    content: '';
    position: absolute; inset: 0;
    /* Duas declarações de propósito. A primeira é o JPEG de sempre, e é a que
       fica em pé onde o `image-set()` não existe. A segunda serve a mesma
       fotografia em AVIF ou WebP a quem os saiba ler, e é a esmagadora maioria:
       1119 KB passam a 25 KB, num elemento que é o maior desenho da página e
       portanto o que a métrica de LCP mede. */
    background:
        linear-gradient(180deg, rgba(15, 15, 16, .72), rgba(15, 15, 16, .78) 40%, rgba(15, 15, 16, 1)),
        url('../../images/auto_parts.jpg') center 40% / cover no-repeat;
    background:
        linear-gradient(180deg, rgba(15, 15, 16, .72), rgba(15, 15, 16, .78) 40%, rgba(15, 15, 16, 1)),
        image-set(
            url('../../images/auto_parts-1920.avif') type('image/avif'),
            url('../../images/auto_parts-1920.webp') type('image/webp'),
            url('../../images/auto_parts.jpg') type('image/jpeg')
        ) center 40% / cover no-repeat;
    filter: saturate(.9) contrast(1.05);
}
.acv-store-hero-inner {
    position: relative; z-index: 1;
    width: min(var(--acv-max), calc(100% - 36px));
    margin: 0 auto;
}
.acv-kicker {
    display: block; font-size: 11px; font-weight: 700; letter-spacing: .18em;
    text-transform: uppercase; color: var(--acv-muted); margin-bottom: 12px;
}
.acv-store-hero h1 {
    margin: 0; font-size: clamp(30px, 4.2vw, 54px); font-weight: 800;
    letter-spacing: -.02em; line-height: 1.04;
}
.acv-store-hero p {
    margin: 14px 0 0; max-width: 60ch; font-size: 16px; line-height: 1.6; color: var(--acv-ink-soft);
}

/* ── Barra de filtros: fica colada ao header ao rolar ──────────────────────
   Serve a Loja e a listagem de viaturas (`/carros`). O nome do ficheiro engana:
   esta folha entra no pacote de todas as páginas, e é daqui que as duas barras
   tiram o desenho, para não haver duas anatomias para a mesma ideia.

   O `z-index` é 99, um abaixo do cabeçalho (100), pelas mesmas razões da
   `.page-secondary-nav`: quando os dois se cruzam durante a transição, quem fica
   por cima é o cabeçalho. */
.acv-filterbar {
    position: sticky; top: var(--main-header-height, 0px); z-index: 99;
    background: rgba(15, 15, 16, .86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--acv-line-soft);
    border-bottom: 1px solid var(--acv-line-soft);
    transition: top .5s;
}

/* O cabeçalho esconde-se ao rolar para baixo, e a barra sobe para o lugar dele
   em vez de deixar passar uma faixa de conteúdo por cima. É a mesma mecânica da
   `.page-secondary-nav`: lê-se o `.is-hidden` que o MainMenu.js já escreve, sem
   JavaScript novo. */
body:has(#main-header.is-hidden) .acv-filterbar {
    top: 0;
}

@media (prefers-reduced-motion: reduce) {
    .acv-filterbar { transition: none; }
}
.acv-filterbar-inner {
    width: min(var(--acv-max), calc(100% - var(--acv-gutter)));
    margin: 0 auto;
    display: flex; align-items: center; gap: 16px;
    min-height: 60px; flex-wrap: wrap;
}
.acv-filters-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: none; cursor: pointer; font-family: inherit;
    font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--acv-ink); padding: 18px 0;
}
.acv-filters-toggle .ph-icon { font-size: 15px; transition: transform .2s ease; }
.acv-filterbar.is-open .acv-filters-toggle .ph-icon { transform: rotate(180deg); }
.acv-filters-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px;
    background: var(--acv-accent); color: var(--acv-accent-ink);
    font-size: 11px; font-weight: 800; letter-spacing: 0;
}

/* Pesquisa, sempre à vista — é o atalho mais usado. */
.acv-store-search {
    display: flex; align-items: center; gap: 9px; flex: 1 1 240px; max-width: 380px;
    background: var(--acv-surface); border: 1px solid var(--acv-line);
    border-radius: 999px; padding: 9px 16px;
}
.acv-store-search .ph-icon { font-size: 17px; color: var(--acv-muted); flex: 0 0 auto; }
/* O foco de um campo lê-se na BORDA do próprio campo, e nunca num anel por
   fora. Num grupo (lupa mais campo, indicativo mais número) quem o mostra é a
   caixa que os junta, porque é essa que a pessoa vê como controlo.

   O traço vai em `outline` encostado por dentro (`outline-offset: -2px`), e não
   em `box-shadow`: engrossa a borda sem mexer no tamanho da caixa, e a folha de
   formulários do site impõe `box-shadow: none !important` a todos os campos,
   portanto por aí não passava nada. */
.acv-store-search:focus-within {
    border-color: var(--acv-ink);
    outline: 2px solid var(--acv-ink);
    outline-offset: -2px;
}
/* O campo não desenha nada: quem mostra o foco é a caixa, com o
   `outline-offset` da regra logo acima. */
.acv-store-search input {
    flex: 1 1 auto; border: none; outline: none; background: none;
    font-size: 14px; font-family: inherit; color: var(--acv-ink);
}

.acv-store-search input::placeholder { color: var(--acv-muted); }

/* Painel dos filtros, em grelha.

   Tem tecto e rolagem própria porque a barra é sticky: o painel desce a partir
   dela e, quando os filtros são muitos, o fim ficava por baixo da barra de ilhas
   que assenta no fundo do ecrã. Em /carros, que tem oito filtros numa coluna a
   390px, era o "Limpar filtros" a ficar tapado, e nada indicava que estava lá.

   A conta desconta o que ocupa o ecrã acima e abaixo: o cabeçalho, a cabeça da
   barra (60px de altura mínima mais as duas bordas) e a faixa de ilhas do fundo.

   A reserva das ilhas é um número e não o `--island-links-offset`: essa variável
   só existe em /carros, quem a escreve é o vehicles.js, e chega vazia com as
   ilhas à vista, porque só é preenchida quando elas tocam a borda inferior. Com
   ela o tecto dava 732px e sobravam 24px de painel por baixo das ilhas, que era
   exactamente onde estava o "Limpar filtros". Os 84px são os 74px que as ilhas
   medem a 390px, com folga.

   `dvh` e não `vh`: no telemóvel a barra do browser entra e sai, e `vh` mede
   sempre o ecrã maior, ou seja, o tecto ficava alto de mais logo onde é preciso. */
.acv-filters-panel {
    --acv-island-reserve: 84px;
    width: min(var(--acv-max), calc(100% - var(--acv-gutter)));
    margin: 0 auto; padding: 4px 0 22px;
    border-top: 1px solid var(--acv-line-soft);
    max-height: calc(100vh - var(--main-header-height, 0px) - 62px - var(--acv-island-reserve));
    max-height: calc(100dvh - var(--main-header-height, 0px) - 62px - var(--acv-island-reserve));
    overflow-y: auto;
}
.acv-filters-panel[hidden] { display: none; }
.acv-filter-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding-top: 18px;
}
.acv-filter { display: grid; gap: 7px; min-width: 0; }
.acv-filter-label {
    font-size: 10.5px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--acv-muted);
}
.acv-filter select {
    appearance: none; -webkit-appearance: none;
    width: 100%; padding: 11px 36px 11px 14px;
    background: var(--acv-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='rgba(255,255,255,.5)' stroke-width='1.6'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center / 15px;
    border: 1px solid var(--acv-line); border-radius: var(--acv-radius-sm);
    color: var(--acv-ink); font-size: 14px; font-family: inherit; cursor: pointer;
}
.acv-filter select:focus {
    border-color: var(--acv-ink);
    outline: 2px solid var(--acv-ink);
    outline-offset: -2px;
}

.acv-filter select:disabled { opacity: .4; cursor: not-allowed; }
.acv-filter select option { background: #17181a; color: var(--acv-ink); }

.acv-filters-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.acv-filters-clear {
    background: none; border: none; cursor: pointer; font-family: inherit;
    font-size: 13px; color: var(--acv-muted); text-decoration: underline; text-underline-offset: 3px;
}
.acv-filters-clear:hover { color: var(--acv-ink); }

/* ── Corpo da montra ─────────────────────────────────────────────────────── */
.acv-store-main {
    width: min(var(--acv-max), calc(100% - 36px));
    margin: 0 auto; padding-top: 26px;
}

/* Aviso da viatura escolhida (o filtro de compatibilidade em cima da grelha). */
.acv-fitnote {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: var(--acv-surface); border: 1px solid var(--acv-line);
    border-radius: var(--acv-radius); padding: 12px 16px; margin-bottom: 18px;
    font-size: 14px; color: var(--acv-ink-soft);
}
.acv-fitnote[hidden] { display: none; }
.acv-fitnote .ph-icon { font-size: 18px; color: var(--acv-ink); }
.acv-fitnote strong { color: var(--acv-ink); font-weight: 700; }
.acv-fitnote button {
    margin-left: auto; background: none; border: none; cursor: pointer; font-family: inherit;
    font-size: 13px; color: var(--acv-muted); text-decoration: underline; text-underline-offset: 3px;
}
.acv-fitnote button:hover { color: var(--acv-ink); }

/* Barra de resultados: contagem, ordenação e vista */
.acv-results-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    flex-wrap: wrap; margin-bottom: 20px;
}
.acv-results-count { font-size: 13px; color: var(--acv-muted); }
.acv-results-count strong { color: var(--acv-ink); font-weight: 700; }
.acv-results-tools { display: flex; align-items: center; gap: 12px; }
.acv-sort {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--acv-muted);
}
.acv-sort select {
    appearance: none; -webkit-appearance: none;
    padding: 8px 30px 8px 12px;
    background: var(--acv-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='rgba(255,255,255,.5)' stroke-width='1.6'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
    border: 1px solid var(--acv-line); border-radius: var(--acv-radius-sm);
    color: var(--acv-ink); font-size: 13px; font-family: inherit; cursor: pointer;
}
.acv-sort select:focus {
    border-color: var(--acv-ink);
    outline: 2px solid var(--acv-ink);
    outline-offset: -2px;
}

.acv-sort select option { background: #17181a; }

.acv-view-toggle {
    display: inline-flex; border: 1px solid var(--acv-line); border-radius: var(--acv-radius-sm); overflow: hidden;
}
.acv-view-toggle button {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; background: var(--acv-surface); border: none; cursor: pointer;
    color: var(--acv-muted); font-size: 16px;
}
.acv-view-toggle button + button { border-left: 1px solid var(--acv-line); }
.acv-view-toggle button.is-active { background: var(--acv-surface-2); color: var(--acv-ink); }

/* ── Grelha de artigos ───────────────────────────────────────────────────── */
.acv-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 18px;
}

.acv-card {
    /* O cartão é o bloco-contentor do botão de favoritos, que assenta no canto
       com `position: absolute`. Sem isto, os botões sobem ao ecrã e vão todos
       parar ao mesmo pixel no canto superior direito da página, empilhados por
       baixo do cabeçalho: na montra eram 36 corações no mesmo sítio, e o clique
       calhava sempre ao último produto da lista. */
    position: relative;
    display: flex; flex-direction: column;
    background: var(--acv-surface); border: 1px solid var(--acv-line);
    border-radius: var(--acv-radius); overflow: hidden;
    transition: border-color .18s ease, transform .18s ease;
}
.acv-card:hover { border-color: rgba(255, 255, 255, .22); transform: translateY(-2px); }

/* As fotografias do catálogo vêm com fundo branco. Sobre o cartão escuro
   ficavam a flutuar como um quadrado; a moldura clara resolve-o e é o que as
   lojas de produto fazem — imagem em campo claro, ficha em campo escuro. */
.acv-card-img {
    position: relative; display: flex; align-items: center; justify-content: center;
    aspect-ratio: 4 / 3; background: #f4f4f5; overflow: hidden;
}
.acv-card-img img {
    width: 100%; height: 100%; object-fit: cover; object-position: center;
    transition: transform .35s ease;
}
.acv-card:hover .acv-card-img img { transform: scale(1.04); }
.acv-card-img .ph-icon { font-size: 44px; color: rgba(0, 0, 0, .14); }
.acv-card-disc {
    position: absolute; top: 12px; left: 12px; z-index: 1;
    background: var(--acv-accent); color: var(--acv-accent-ink);
    font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
}

.acv-card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px; flex: 1 1 auto; }
.acv-card-cat {
    font-size: 10px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--acv-muted);
}
.acv-card-name-link { text-decoration: none; color: inherit; }
.acv-card-name {
    margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--acv-ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.acv-card-name-link:hover .acv-card-name { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.acv-card-ref { font-size: 12px; color: var(--acv-muted); font-variant-numeric: tabular-nums; }

/* O cartão simples, das páginas de acessórios dos modelos: fotografia e nome, e
   mais nada. Sem o pé com o preço, o corpo deixa de precisar de o empurrar para
   baixo e o cartão fecha logo a seguir ao nome. */
.acv-card--simples .acv-card-body { gap: 4px; }
.acv-card--simples .acv-card-name { -webkit-line-clamp: 3; }

.acv-card-foot {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
    margin-top: auto; padding-top: 14px;
}
.acv-card-price { font-size: 17px; font-weight: 700; line-height: 1.15; color: var(--acv-ink); }
.acv-card-price small { display: block; font-size: 10.5px; font-weight: 500; color: var(--acv-muted); margin-top: 2px; }
.acv-old { color: var(--acv-muted); text-decoration: line-through; font-size: 13px; font-weight: 500; }
.acv-onreq { font-size: 14px; font-weight: 600; color: var(--acv-ink-soft); white-space: nowrap; }

.acv-add-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--acv-accent); color: var(--acv-accent-ink);
    border: none; border-radius: 999px; padding: 9px 15px;
    font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
    transition: opacity .15s ease;
}
.acv-add-btn:hover { opacity: .86; }
.acv-add-btn:disabled { opacity: .3; cursor: not-allowed; }
.acv-add-btn .ph-icon { font-size: 14px; }

/* ── Estado de stock: um ponto e um rótulo, iguais em toda a loja ────────── */
.acv-stock { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; }
.acv-stock::before {
    content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--acv-neutral); flex: 0 0 auto;
}
.acv-stock--green   { color: var(--acv-ok); }
.acv-stock--green::before   { background: var(--acv-ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .16); }
.acv-stock--amber   { color: var(--acv-warn); }
.acv-stock--amber::before   { background: var(--acv-warn); box-shadow: 0 0 0 3px rgba(251, 191, 36, .16); }
.acv-stock--red     { color: var(--acv-err); }
.acv-stock--red::before     { background: var(--acv-err); box-shadow: 0 0 0 3px rgba(248, 113, 113, .16); }
.acv-stock--neutral { color: var(--acv-muted); }

/* ── Vista de lista ──────────────────────────────────────────────────────── */
.acv-grid.is-list { grid-template-columns: 1fr; gap: 12px; }
.acv-grid.is-list .acv-card { flex-direction: row; align-items: stretch; }
.acv-grid.is-list .acv-card-img { flex: 0 0 190px; aspect-ratio: auto; }
.acv-grid.is-list .acv-card-body { flex-direction: row; align-items: center; gap: 24px; }
.acv-grid.is-list .acv-card-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 5px; }
.acv-grid.is-list .acv-card-name { -webkit-line-clamp: 1; }
.acv-grid.is-list .acv-card-foot { margin: 0; padding: 0; flex: 0 0 auto; align-items: center; gap: 20px; }
@media (max-width: 720px) {
    .acv-grid.is-list .acv-card { flex-direction: column; }
    .acv-grid.is-list .acv-card-img { flex: none; aspect-ratio: 4 / 3; }
    .acv-grid.is-list .acv-card-body { flex-direction: column; align-items: stretch; gap: 6px; }
}

/* ── Rodapé da grelha: contagem e "Ver mais" ─────────────────────────────── */
.acv-grid-foot { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 34px 0 8px; }
.acv-grid-foot:empty { display: none; }
.acv-grid-count { margin: 0; font-size: 13px; color: var(--acv-muted); }

.acv-empty {
    grid-column: 1 / -1; text-align: center; padding: 60px 20px;
    color: var(--acv-muted); font-size: 15px;
}

/* ==========================================================================
   BOTÕES E PÁGINAS INTERIORES
   ========================================================================== */
.acv-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
    font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer; text-decoration: none;
    transition: opacity .15s ease, border-color .15s ease;
}
.acv-btn-primary { background: var(--acv-accent); color: var(--acv-accent-ink); }
.acv-btn-primary:hover { opacity: .86; }
.acv-btn-primary:disabled { opacity: .35; cursor: not-allowed; }
.acv-btn-ghost { background: transparent; color: var(--acv-ink); border-color: var(--acv-line); }
.acv-btn-ghost:hover { border-color: rgba(255, 255, 255, .3); }
.acv-grid-foot .acv-btn { width: auto; min-width: 210px; }

.acv-page {
    background: var(--acv-bg); color: var(--acv-ink);
    padding-bottom: calc(64px + var(--island-links-offset, 0px));
}
.acv-page-inner {
    width: min(var(--acv-max), calc(100% - 36px));
    margin: 0 auto; padding-top: calc(var(--main-header-height, 72px) + 40px);
}
.acv-page-inner--narrow { max-width: 1080px; }
.acv-page-title { font-size: clamp(26px, 3vw, 38px); font-weight: 800; letter-spacing: -.02em; margin: 0 0 18px; }

.acv-hero {
    position: relative; padding: calc(var(--main-header-height, 72px) + 44px) 0 34px;
    background: #0b0b0c; border-bottom: 1px solid var(--acv-line-soft);
}
.acv-hero-inner { width: min(var(--acv-max), calc(100% - 36px)); margin: 0 auto; }
.acv-hero h1 { margin: 0; font-size: clamp(26px, 3.4vw, 42px); font-weight: 800; letter-spacing: -.02em; }
.acv-hero-note { margin: 10px 0 0; font-size: 15px; color: var(--acv-ink-soft); }
.acv-hero-note[hidden] { display: none; }
/* Com herói, o espaço já vem dele; sem herói, o padding tem de descer abaixo
   do header fixo, senão o conteúdo nasce por trás do menu. */
.acv-hero + .acv-page-inner { padding-top: 34px; }

/* ── Cabeçalho de categoria ────────────────────────────────────────────────
   Sem fotografia: a fotografia é do herói da montra, e repeti-la em cada
   categoria só empurra os acessórios para fora do primeiro ecrã. */
.acv-cat-head {
    padding: calc(var(--main-header-height, 72px) + 28px) 0 20px;
    border-bottom: 1px solid var(--acv-line-soft);
}
.acv-cat-head-inner {
    width: min(var(--acv-max), calc(100% - var(--acv-gutter)));
    margin: 0 auto;
}
.acv-cat-head h1 {
    margin: 0; font-size: clamp(26px, 3.4vw, 40px); font-weight: 800;
    letter-spacing: -.02em; line-height: 1.08;
}
.acv-cat-head p {
    margin: 10px 0 0; max-width: 60ch; font-size: 15px; line-height: 1.6; color: var(--acv-ink-soft);
}

.acv-subcats {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px;
}
.acv-subcats a {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 14px; border: 1px solid var(--acv-line); border-radius: 999px;
    background: var(--acv-surface); color: var(--acv-ink-soft);
    font-size: 13px; font-weight: 600; text-decoration: none;
}
.acv-subcats a:hover { border-color: var(--acv-ink-soft); color: var(--acv-ink); }
.acv-subcats span { font-size: 11px; color: var(--acv-muted); font-weight: 700; }

/* ── Índice de categorias ──────────────────────────────────────────────────
   Fecha a montra e é por aqui que cada categoria recebe ligação de entrada,
   sem depender do menu do cabeçalho. */
.acv-cat-index {
    margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--acv-line-soft);
}
.acv-cat-index h2 {
    margin: 0 0 20px; font-size: 15px; font-weight: 700;
    letter-spacing: .04em; text-transform: uppercase; color: var(--acv-muted);
}
/* Colunas de texto, não grelha: as categorias têm de 1 a 20 subcategorias, e
   numa grelha a linha toma a altura da mais alta, o que abria buracos de meio
   ecrã. Em colunas, as listas encostam-se umas às outras. */
.acv-cat-index > ul {
    margin: 0; padding: 0; list-style: none;
    column-count: 1; column-gap: 32px;
}
.acv-cat-index > ul > li { break-inside: avoid; margin-bottom: 24px; }
.acv-cat-index > ul > li > a {
    display: inline-flex; align-items: baseline; gap: 8px;
    font-size: 15px; font-weight: 700; color: var(--acv-ink); text-decoration: none;
}
.acv-cat-index > ul > li > a:hover { text-decoration: underline; }
.acv-cat-index > ul > li > a > span { font-size: 11px; font-weight: 600; color: var(--acv-muted); }
.acv-cat-index ul ul {
    margin: 10px 0 0; padding: 0; list-style: none;
    display: flex; flex-direction: column; gap: 6px;
}
.acv-cat-index ul ul a {
    font-size: 13px; color: var(--acv-ink-soft); text-decoration: none;
}
.acv-cat-index ul ul a:hover { color: var(--acv-ink); text-decoration: underline; }

@media (min-width: 700px)  { .acv-cat-index > ul { column-count: 2; } }
@media (min-width: 1100px) { .acv-cat-index > ul { column-count: 4; } }

/* ==========================================================================
   FICHA DO ACESSÓRIO — galeria à esquerda, painel que acompanha à direita
   ========================================================================== */
.acv-prod {
    display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 56px; align-items: start;
    max-width: 1240px;
}
.acv-prod > * { min-width: 0; }
/* ── Trilho ────────────────────────────────────────────────────────────────
   Substituiu o botão "voltar": diz onde se está, e não só de onde se veio. É o
   mesmo caminho que o BreadcrumbList declara aos motores de busca. */
.acv-crumbs { margin: 0 0 20px; }
.acv-crumbs ol {
    display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
    margin: 0; padding: 0; list-style: none;
    font-size: 13px; color: var(--acv-muted);
}
.acv-crumbs li { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.acv-crumbs a { color: var(--acv-muted); text-decoration: none; }
.acv-crumbs a:hover { color: var(--acv-ink); text-decoration: underline; }
.acv-crumbs .ph-icon { font-size: 12px; opacity: .5; }
/* O nome da página atual pode ser longo: corta-se aqui e não deita o trilho
   para uma segunda linha em ecrãs estreitos. */
.acv-crumbs [aria-current] {
    color: var(--acv-ink-soft);
    max-width: 42ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.acv-prod-gallery { position: sticky; top: calc(var(--main-header-height, 72px) + 24px); }
.acv-prod-main {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 4 / 3; max-height: 560px; background: #f4f4f5;
    border: 1px solid var(--acv-line); border-radius: var(--acv-radius); overflow: hidden;
}
.acv-prod-main img { width: 100%; height: 100%; object-fit: cover; }
.acv-prod-main .ph-icon { font-size: 84px; color: rgba(0, 0, 0, .12); }
.acv-prod-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.acv-prod-thumb {
    width: 74px; height: 74px; padding: 0; cursor: pointer; overflow: hidden;
    background: #f4f4f5; border: 1px solid var(--acv-line); border-radius: var(--acv-radius-sm);
}
.acv-prod-thumb.is-active { border-color: rgba(255, 255, 255, .5); }
.acv-prod-thumb img { width: 100%; height: 100%; object-fit: cover; }

.acv-prod-info { padding-top: 4px; }
.acv-prod-cat {
    font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: var(--acv-muted);
}
.acv-prod-name {
    margin: 10px 0 6px; font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 700; letter-spacing: -.02em; line-height: 1.15;
}
.acv-prod-ref { font-size: 13px; color: var(--acv-muted); font-variant-numeric: tabular-nums; }
.acv-prod-price { margin: 26px 0 4px; font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.acv-prod-price small { display: block; font-size: 12px; font-weight: 500; color: var(--acv-muted); margin-top: 6px; }
.acv-prod-price--onreq { font-size: 24px; color: var(--acv-ink-soft); }
.acv-prod-short { margin: 20px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--acv-ink-soft); }

/* Disponibilidade: estado sempre; instalações a pedido. */
.acv-avail { margin: 24px 0 0; border-top: 1px solid var(--acv-line-soft); padding-top: 20px; }
.acv-avail-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.acv-avail .acv-stock { font-size: 13.5px; }
.acv-avail-total { font-size: 13px; color: var(--acv-muted); }
.acv-avail-toggle {
    display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
    background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
    font-size: 13px; color: var(--acv-muted); text-decoration: underline; text-underline-offset: 3px;
}
.acv-avail-toggle:hover { color: var(--acv-ink); }
.acv-avail-toggle .ph-icon { font-size: 13px; transition: transform .2s ease; }
.acv-avail.is-open .acv-avail-toggle .ph-icon { transform: rotate(180deg); }
.acv-avail-list { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 1px; background: var(--acv-line-soft); border-radius: var(--acv-radius-sm); overflow: hidden; }
.acv-avail-list[hidden] { display: none; }
.acv-avail-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    background: var(--acv-surface); padding: 11px 14px; font-size: 13.5px;
}
.acv-avail-list .acv-avail-place { color: var(--acv-ink-soft); }
.acv-avail-list .acv-avail-qty { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--acv-ink); }
.acv-avail-list .acv-avail-qty--none { color: var(--acv-muted); font-weight: 500; }

/* Quantidade, comprar e guardar. Quebra linha em ecrã estreito: os três lado a
   lado não cabem num telemóvel, e sem isto o botão de guardar saía da página. */
.acv-prod-buy { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin: 26px 0 0; }
.acv-prod-buy .acv-save { flex: 0 0 auto; }
.acv-qty {
    display: inline-flex; align-items: center;
    border: 1px solid var(--acv-line); border-radius: 999px; padding: 0 6px; background: var(--acv-surface);
}
.acv-qty button {
    width: 34px; height: 44px; background: none; border: none; cursor: pointer;
    color: var(--acv-ink); font-size: 18px; font-family: inherit;
}
.acv-qty button:hover { color: #fff; }
.acv-qty input {
    width: 46px; border: none; background: none; text-align: center;
    font-size: 15px; font-weight: 700; color: var(--acv-ink); font-family: inherit;
}
.acv-qty span { min-width: 26px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.acv-prod-buy .acv-btn { flex: 1 1 auto; }

.acv-prod-meta-list {
    display: grid; grid-template-columns: 116px 1fr; gap: 10px 16px;
    margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--acv-line-soft);
    font-size: 14px; color: var(--acv-ink-soft); line-height: 1.55;
}
.acv-prod-meta-label {
    font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--acv-muted); padding-top: 3px;
}
.acv-fit-model { margin-bottom: 8px; }
.acv-fit-model:last-child { margin-bottom: 0; }
.acv-fit-model strong { display: block; color: var(--acv-ink); font-weight: 600; font-size: 14px; }
.acv-fit-model span { font-size: 12.5px; color: var(--acv-muted); line-height: 1.5; }
.acv-fit-versions { display: block; }
.acv-fit-versions.is-clamped {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.acv-fit-more {
    background: none; border: none; padding: 0; margin-top: 3px; cursor: pointer; font-family: inherit;
    font-size: 12px; color: var(--acv-ink-soft); text-decoration: underline; text-underline-offset: 3px;
}
.acv-fit-more:hover { color: var(--acv-ink); }

.acv-prod-desc { margin-top: 34px; border-top: 1px solid var(--acv-line-soft); padding-top: 26px; }
.acv-prod-desc h2 {
    font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--acv-muted); margin: 0 0 14px;
}
.acv-prod-desc p { font-size: 14.5px; color: var(--acv-ink-soft); line-height: 1.7; margin: 0; }
.acv-prod-specs { width: 100%; border-collapse: collapse; }
.acv-prod-specs th, .acv-prod-specs td {
    padding: 11px 0; border-bottom: 1px solid var(--acv-line-soft); font-size: 14px; text-align: left;
}
.acv-prod-specs tr:last-child th, .acv-prod-specs tr:last-child td { border-bottom: none; }
.acv-prod-specs th { font-weight: 500; color: var(--acv-muted); width: 46%; }
.acv-prod-specs td { color: var(--acv-ink); font-weight: 600; }

/* Sugestões no fim da ficha */
.acv-related { margin-top: 64px; border-top: 1px solid var(--acv-line-soft); padding-top: 34px; }
.acv-related h2 {
    font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--acv-muted); margin: 0 0 20px;
}

@media (max-width: 1020px) {
    .acv-prod { grid-template-columns: 1fr; gap: 32px; }
    .acv-prod-gallery { position: static; }
    .acv-prod-main { aspect-ratio: 4 / 3; }
}

/* O mini-carrinho (slide-in do header) tem folha própria: `pages/cart.css`,
   carregada a seguir a esta. Fica lá, e não aqui, para não haver duas versões
   do mesmo painel a disputar a cascata. */

/* ==========================================================================
   PÁGINA DO CARRINHO
   ========================================================================== */
.acv-cart-list { border-top: 1px solid var(--acv-line-soft); }
.acv-cart-head, .acv-cart-row {
    display: grid; grid-template-columns: 82px 1fr 150px 132px 120px 44px;
    gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--acv-line-soft);
}
.acv-cart-head {
    font-size: 10.5px; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--acv-muted); padding: 14px 0;
}
.acv-cart-thumb {
    width: 82px; height: 82px; display: flex; align-items: center; justify-content: center;
    background: #f4f4f5; border: 1px solid var(--acv-line); border-radius: var(--acv-radius-sm); overflow: hidden;
}
.acv-cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.acv-cart-thumb .ph-icon { font-size: 26px; color: rgba(0, 0, 0, .18); }
.acv-cart-pname { font-size: 15px; font-weight: 600; }
.acv-cart-pref { font-size: 12.5px; color: var(--acv-muted); margin-top: 3px; }
.acv-cart-unit { font-size: 14px; font-weight: 600; }
.acv-cart-unit small { display: block; font-size: 11.5px; color: var(--acv-muted); font-weight: 500; margin-top: 2px; }
.acv-cart-total { font-size: 15px; font-weight: 700; text-align: right; }
.acv-cart-del { background: none; border: none; cursor: pointer; color: var(--acv-muted); font-size: 17px; }
.acv-cart-del:hover { color: var(--acv-err); }

.acv-cart-foot { display: flex; justify-content: flex-end; margin-top: 32px; }
.acv-cart-summary {
    width: min(420px, 100%);
    background: var(--acv-surface); border: 1px solid var(--acv-line);
    border-radius: var(--acv-radius); padding: 22px;
}
.acv-sum-line { display: flex; align-items: baseline; justify-content: space-between; font-size: 13.5px; color: var(--acv-ink-soft); margin-bottom: 9px; }
.acv-sum-save { color: var(--acv-ok); }
.acv-sum-total {
    display: flex; align-items: baseline; justify-content: space-between;
    border-top: 1px solid var(--acv-line-soft); margin-top: 14px; padding-top: 14px;
    font-size: 14px; color: var(--acv-muted);
}
.acv-sum-total span:last-child { font-size: 22px; font-weight: 700; color: var(--acv-ink); }
.acv-cart-actions { display: grid; gap: 10px; margin-top: 20px; }

@media (max-width: 900px) {
    .acv-cart-head { display: none; }
    .acv-cart-row { grid-template-columns: 72px 1fr 40px; grid-template-areas: 'img main del' 'img unit unit' 'img qty total'; gap: 10px 14px; }
    .acv-cart-thumb { grid-area: img; }
    .acv-cart-row > div:nth-child(2) { grid-area: main; }
    .acv-cart-unit { grid-area: unit; }
    .acv-cart-row .acv-qty { grid-area: qty; }
    .acv-cart-total { grid-area: total; text-align: right; }
    .acv-cart-del { grid-area: del; }
    .acv-cart-foot { justify-content: stretch; }
    .acv-cart-summary { width: 100%; }
}

/* ==========================================================================
   CHECKOUT
   ========================================================================== */
.acv-checkout-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; align-items: start; }
.acv-co-col { min-width: 0; }
.acv-co-title {
    font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--acv-muted); margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--acv-line-soft);
}
.acv-co-title.mt { margin-top: 34px; }
.acv-co-summary {
    position: sticky; top: calc(var(--main-header-height, 72px) + 24px);
    background: var(--acv-surface); border: 1px solid var(--acv-line);
    border-radius: var(--acv-radius); padding: 22px;
}
.acv-co-summary .acv-co-title { margin-top: 0; }

.acv-field { margin-bottom: 16px; }
.acv-field label {
    display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--acv-muted); margin-bottom: 7px;
}
.acv-field input, .acv-field select, .acv-field textarea {
    width: 100%; padding: 12px 14px; background: var(--acv-surface);
    border: 1px solid var(--acv-line); border-radius: var(--acv-radius-sm);
    color: var(--acv-ink); font-size: 14px; font-family: inherit;
}
.acv-field input:focus,
.acv-field select:focus,
.acv-field textarea:focus {
    border-color: var(--acv-ink);
    outline: 2px solid var(--acv-ink);
    outline-offset: -2px;
}

.acv-field select option { background: #17181a; }
.acv-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.req { color: var(--acv-err); }

.acv-radio-group { display: flex; gap: 20px; }
.acv-page, .acv-store, #cart_slide_container { color-scheme: dark; }
.acv-radio, .acv-check {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 14px; line-height: 1.5; color: var(--acv-ink-soft); cursor: pointer;
}
.acv-check > span { min-width: 0; }
.acv-check a { color: var(--acv-ink); text-underline-offset: 3px; }

/* O site público esconde as caixas e os rádios nativos (`forms.css`:
   `input[type=checkbox] { display: none }`, com o desenho a sair do `+label`).
   Esse mecanismo pressupõe um `<label>` IRMÃO, e aqui o input vive DENTRO do
   label — daí a caixa desaparecer sem deixar rasto. Desenha-se à mão, como já
   se faz nos formulários públicos (`request-forms.css`). */
.acv-radio input[type="radio"],
.acv-check input[type="checkbox"],
.acv-method-head input[type="radio"] {
    appearance: none !important; -webkit-appearance: none !important;
    display: inline-grid !important; place-content: center;
    position: static !important; opacity: 1 !important; pointer-events: auto !important;
    width: 18px !important; height: 18px !important; flex: 0 0 auto;
    margin: 1px 0 0 !important; padding: 0 !important;
    background: transparent !important; border: 1.5px solid rgba(255, 255, 255, .34) !important;
    cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.acv-check input[type="checkbox"] { border-radius: 5px; }
.acv-radio input[type="radio"],
.acv-method-head input[type="radio"] { border-radius: 50%; }

.acv-radio input[type="radio"]::before,
.acv-check input[type="checkbox"]::before,
.acv-method-head input[type="radio"]::before {
    content: ''; transform: scale(0); transition: transform .12s ease;
}
.acv-check input[type="checkbox"]::before {
    width: 10px; height: 10px; background: var(--acv-accent-ink);
    clip-path: polygon(14% 46%, 0 60%, 40% 100%, 100% 22%, 86% 8%, 38% 70%);
}
.acv-radio input[type="radio"]::before,
.acv-method-head input[type="radio"]::before {
    width: 8px; height: 8px; border-radius: 50%; background: var(--acv-accent-ink);
}
.acv-radio input:checked, .acv-check input:checked, .acv-method-head input:checked {
    background: var(--acv-accent) !important; border-color: var(--acv-accent) !important;
}
.acv-radio input:checked::before, .acv-check input:checked::before, .acv-method-head input:checked::before { transform: scale(1); }
.acv-radio input:focus-visible, .acv-check input:focus-visible, .acv-method-head input:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .5); outline-offset: 2px;
}

/* O reset global também esconde o `+label` que se segue a um checkbox. */
.acv-check input[type="checkbox"] + span, .acv-radio input[type="radio"] + span { display: inline; }

.acv-methods { display: grid; gap: 10px; }
.acv-method {
    background: var(--acv-surface); border: 1px solid var(--acv-line);
    border-radius: var(--acv-radius-sm); padding: 14px 16px; cursor: pointer;
}
.acv-method.is-active { border-color: rgba(255, 255, 255, .38); background: var(--acv-surface-2); }
.acv-method-head { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.acv-method-head input { accent-color: #fff; }
.acv-method-desc { font-size: 12.5px; color: var(--acv-muted); margin-top: 8px; line-height: 1.55; padding-left: 26px; }

.acv-co-rows { margin-bottom: 18px; }
.acv-co-row { display: flex; justify-content: space-between; gap: 14px; font-size: 13.5px; padding: 10px 0; border-bottom: 1px solid var(--acv-line-soft); }
.acv-co-row small { color: var(--acv-muted); }
.acv-co-msg { display: block; margin-top: 10px; font-size: 13px; color: var(--acv-muted); }
.acv-coupon { display: flex; gap: 8px; margin-top: 16px; }
.acv-coupon input {
    flex: 1 1 auto; padding: 11px 13px; background: var(--acv-surface);
    border: 1px solid var(--acv-line); border-radius: var(--acv-radius-sm);
    color: var(--acv-ink); font-size: 13px; font-family: inherit; text-transform: uppercase;
}
.acv-coupon input:focus {
    border-color: var(--acv-ink);
    outline: 2px solid var(--acv-ink);
    outline-offset: -2px;
}

.acv-coupon .acv-btn { width: auto; flex: 0 0 auto; padding: 11px 18px; }

/* Aviso do modo orçamento */
.acv-quote-note {
    display: flex; align-items: flex-start; gap: 10px;
    background: var(--acv-surface-2); border: 1px solid var(--acv-line);
    border-radius: var(--acv-radius-sm); padding: 14px 16px; margin: 4px 0 0;
    font-size: 13.5px; line-height: 1.6; color: var(--acv-ink-soft);
}
.acv-quote-note .ph-icon { font-size: 17px; flex: 0 0 auto; margin-top: 1px; color: var(--acv-ink); }

.acv-pay-box {
    background: var(--acv-surface); border: 1px solid var(--acv-line);
    border-radius: var(--acv-radius); padding: 24px; margin-top: 24px; text-align: left;
}
.acv-pay-box h3 { margin: 0 0 12px; font-size: 15px; font-weight: 700; }
.acv-pay-box p { font-size: 14px; color: var(--acv-ink-soft); line-height: 1.6; margin: 0 0 12px; }
.acv-pay-ref { display: grid; gap: 10px; margin: 16px 0; }
.acv-pay-ref > div { display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; background: var(--acv-surface-2); border-radius: var(--acv-radius-sm); font-size: 14px; }
.acv-pay-ref span { color: var(--acv-muted); }
.acv-pay-status { display: flex; align-items: center; justify-content: center; gap: 9px; font-size: 13.5px; color: var(--acv-muted); margin-top: 14px; }
.acv-pay-spin { width: 14px; height: 14px; border: 2px solid var(--acv-line); border-top-color: var(--acv-ink); border-radius: 50%; animation: acv-spin .8s linear infinite; }
@keyframes acv-spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
    .acv-checkout-grid { grid-template-columns: 1fr 1fr; }
    .acv-co-summary { grid-column: 1 / -1; position: static; }
}
@media (max-width: 760px) {
    .acv-checkout-grid { grid-template-columns: 1fr; gap: 30px; }
    .acv-field-row { grid-template-columns: 1fr; }
    .acv-filter-grid { grid-template-columns: 1fr 1fr; }
    /* Em ecrãs estreitos os dois seletores ficavam com meia palavra à vista:
       a barra empilha e cada um ocupa a linha. */
    .acv-results-bar { gap: 14px; align-items: stretch; }
    .acv-results-tools { flex-wrap: wrap; gap: 10px; }
    .acv-sort { flex: 1 1 100%; justify-content: space-between; }
    .acv-sort select { flex: 1 1 auto; min-width: 0; margin-left: 10px; }
    .acv-view-toggle { flex: 0 0 auto; margin-left: auto; }
}
@media (max-width: 520px) {
    .acv-filter-grid { grid-template-columns: 1fr; }
    .acv-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .acv-card-body { padding: 12px; }
    .acv-card-foot { flex-direction: column; align-items: stretch; gap: 10px; }
    .acv-add-btn { justify-content: center; }
}

/* ==========================================================================
   GUARDAR: favoritos e comparador

   O mesmo botão serve as viaturas e os acessórios, na ficha e no cartão, e por
   isso vive aqui e não na folha de uma página. Duas formas: o botão redondo que
   assenta sobre a fotografia de um cartão, e o botão com texto que acompanha a
   ação principal numa ficha.
   ========================================================================== */
.acv-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--acv-line);
    background: transparent;
    color: var(--acv-ink-soft);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease;
}

.acv-save .ph-icon { font-size: 17px; }

.acv-save:hover {
    color: var(--acv-ink);
    border-color: rgba(255, 255, 255, .26);
}

.acv-save:disabled { opacity: .6; cursor: progress; }

/* Guardado: o ícone enche e ganha cor. A cor sozinha não chega, por isso o
   rótulo também muda (`data-label-on`). */
.acv-save.is-saved {
    color: var(--acv-ink);
    border-color: rgba(255, 255, 255, .3);
}

.acv-save.is-saved .ph-icon::before { font-weight: 700; }

.acv-save[data-saved-toggle="favourite"].is-saved .ph-icon { color: #f87171; }
.acv-save[data-saved-toggle="compare"].is-saved .ph-icon { color: var(--acv-ink); }

/* Sobre a fotografia de um cartão: redondo, sem texto, com fundo que o separa
   da imagem seja ela clara ou escura. */
.acv-save--round {
    position: relative;
    width: 36px;
    min-height: 36px;
    height: 36px;
    padding: 0;
    border-color: transparent;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    backdrop-filter: blur(6px);
}

.acv-save--round:hover {
    background: rgba(0, 0, 0, .7);
    border-color: transparent;
}

.acv-save--round.is-saved { background: rgba(0, 0, 0, .7); }

/* A pilha de botões que assenta no canto de um cartão. */
.acv-card-saves {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (prefers-reduced-motion: reduce) {
    .acv-save { transition: none; }
}
