/* ==========================================================================
   Escolha por nicho (21/11/2026) · inc/nichos.php + page-nicho.php
   Home (tiles herdam .marca-tile--area, de ajuda.css) e coluna Nichos do rodapé.
   A página do nicho tem CSS próprio (page-nicho.php · pacotes.php), desde 23/11/2026.
   ========================================================================== */

/* ---------- 0. Rodapé: 3 colunas (Funcionalidades · Nichos · Ajuda) ---------- */
@media (min-width: 768px) {
  .rodape__miolo--nichos.rodape__miolo--sem-lista { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rodape__miolo--nichos:not(.rodape__miolo--sem-lista) { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.25fr); }
}

/* ---------- 1. Home ---------- */
.marcas--nichos { padding-top: 0; }

/* 23/11/2026: preço do pacote no tile e link para todos os nichos */
.marca-tile__pac {
  display: inline-block; margin-top: .35rem; padding: .2rem .6rem;
  border-radius: var(--raio-pill); background: var(--loja-destaque-suave);
  color: var(--loja-destaque-texto); font-size: var(--fs-xs); font-weight: 700; white-space: nowrap;
}
.marcas__mais {
  display: table; margin: var(--sp-3) auto 0;
  font-size: var(--fs-sm); font-weight: 600; color: var(--cor-texto); text-decoration: underline;
  text-decoration-color: var(--loja-destaque); text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.marcas__mais:hover { color: var(--loja-destaque-texto); }

/* 23/11/2026: no celular, seções e nichos mostram que tem mais para o lado: o 4º tile aparece
   cortado na borda e a direita esmaece (some no fim; a esquerda esmaece depois de rolar). JS no rodapé (inc/nichos.php). */
@media (max-width: 767px) {
  .marcas--areas .marcas__row { scroll-snap-type: x mandatory; scroll-padding-inline: 2px; }
  .marcas--areas .marca-tile { width: calc((100% + var(--sp-2)) / 3.4 - var(--sp-2)); scroll-snap-align: start; }   /* 3 inteiros + 40% do 4º */
  .marca-tile--nicho .marca-tile__pac { margin-top: auto; padding: .15rem .45rem; font-size: 11px; }   /* etiquetas alinhadas na base, mesmo com nome em 2 linhas */
  .marcas--areas .marcas__row.is-rola {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 86%, transparent 100%);
            mask-image: linear-gradient(90deg, #000 0, #000 86%, transparent 100%);
  }
  .marcas--areas .marcas__row.is-rola.is-meio {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 86%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 86%, transparent 100%);
  }
  .marcas--areas .marcas__row.is-rola.is-fim {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 100%);
  }
}

/* Botões de nicho da página do nicho e de /pacotes/ (celular): mesmo esmaecido das faixas da home. */
@media (max-width: 899px) {
  .pacotes__nichos.is-rola {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 82%, transparent 100%);
            mask-image: linear-gradient(90deg, #000 0, #000 82%, transparent 100%);
  }
  .pacotes__nichos.is-rola.is-meio {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 82%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 82%, transparent 100%);
  }
  .pacotes__nichos.is-rola.is-fim {
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 100%);
  }
}

/* 23/11/2026 (menu-seta): topo do computador com 2 itens (Funcionalidades · Pacotes por nicho):
   letra maior e setinha ▾ para mostrar que abrem uma lista; a seta vira ao abrir.
   `body` na frente: o ajuda.css carrega depois deste arquivo e tem a mesma regra com 14px. */
@media (min-width: 992px) {
  body .cabecalho--ilha .cabecalho__nav > ul { gap: 6px; }
  body .cabecalho--ilha .cabecalho__nav > ul > li > a { font-size: 15.5px; padding: 10px 14px 10px 16px; display: inline-flex; align-items: center; gap: 6px; }
  .cabecalho__nav > ul > li.tem-mega > a::after {
    content: ""; width: 13px; height: 13px; flex: none;
    background: currentColor; opacity: .9;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform .2s ease;
  }
  .cabecalho__nav > ul > li.tem-mega:hover > a::after,
  .cabecalho__nav > ul > li.tem-mega:focus-within > a::after { transform: rotate(180deg); }
}

/* 23/11/2026: mega do topo em painel largo, grade de 4 colunas (ícone + nome + descrição + quantidade).
   Ícone e quantidade de cada item vêm do <style id="loja-mega-largo"> (inc/nichos.php). */
@media (min-width: 992px) {
  body .cabecalho.cabecalho--ilha .cabecalho__nav .mega.mx:has(.mx-lista) { left: 0; right: 0; width: auto; min-width: 0; }
  body .cabecalho__nav .mx .mx-lista[data-mx-lista] {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; padding-left: 0; height: auto;
  }
  body .cabecalho__nav .mx .mx-lista[data-mx-lista] .mx-lista__marca { display: none; }
  body .cabecalho__nav .mx a.mx-linha {
    position: relative; display: block; min-height: 84px;
    padding: 14px 14px 14px 64px; border-radius: 14px; border: 1px solid transparent;
    white-space: normal; background: transparent;
    transition: background var(--t-rapida), border-color var(--t-rapida);
  }
  body .cabecalho__nav .mx a.mx-linha.is-on { background: transparent; }
  body .cabecalho__nav .mx a.mx-linha:hover { background: var(--cinza-100); border-color: var(--cor-borda); }
  body .cabecalho__nav .mx a.mx-linha::before {
    content: ""; position: absolute; left: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%;
    background: var(--loja-destaque-suave) center / 19px no-repeat;
  }
  body .cabecalho__nav .mx a.mx-linha strong { font-size: 14px; text-transform: none; letter-spacing: 0; line-height: 1.25; }
  body .cabecalho__nav .mx a.mx-linha span { font-size: 12.5px; line-height: 1.35; margin-top: 3px; }
  body .cabecalho__nav .mx a.mx-linha::after {
    display: inline-block; margin-top: 7px; padding: .12rem .55rem; border-radius: var(--raio-pill);
    background: var(--loja-destaque-suave); color: var(--loja-destaque-texto);
    font-size: 11.5px; font-weight: 700; line-height: 1.5;
  }
  body .cabecalho__nav .mx .mx-lista[data-mx-lista] .mx-todos { grid-column: 1 / -1; margin-top: 6px; }
  body .cabecalho.cabecalho--ilha .mega.mx .mx__grade:has(.mx-lista[data-mx-lista]) { min-height: 0; }   /* o tema reservava a altura da lista vertical antiga */
}
