/* ==========================================================================
   Página de listagem (produtos.html)
   ========================================================================== */

.nav-sempre-solida main { padding-top: var(--nav-h); }

/* Cabeçalho vermelho com o mascote saindo pela borda */
/* O respiro acima do banner é maior que o quanto o mascote sobe (48px): ele nunca encosta no menu. */
.lista-topo { padding-top: 76px; }
.lista-topo__banner {
  position: relative; overflow: visible;
  display: flex; align-items: center; gap: 24px;
  min-height: clamp(200px, 20vw, 250px);
  padding: clamp(28px, 4vw, 48px) clamp(24px, 4vw, 56px);
  padding-right: clamp(190px, 24vw, 320px);
  border-radius: var(--r-l);
  background:
    radial-gradient(ellipse 50% 120% at 85% 100%, rgba(255, 207, 132, .18), transparent 60%),
    linear-gradient(115deg, var(--vermelho) 0%, var(--vermelho-escuro) 70%, var(--vinho) 100%);
  color: var(--creme);
  margin-bottom: clamp(56px, 6vw, 72px);
}
.lista-topo__ondas { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.lista-topo__ondas svg { position: absolute; right: -5%; bottom: -35%; width: 70%; opacity: .16; }
.lista-topo .migalhas { color: rgba(255, 248, 242, .72); margin-bottom: 10px; }
.lista-topo .migalhas a:hover { color: var(--dourado); }
.lista-topo h1 { color: var(--creme); font-size: clamp(1.9rem, 3.6vw, 3rem); margin-bottom: 8px; }
.lista-topo__sub { color: rgba(255, 248, 242, .8); font-size: 15px; }
.lista-topo__marca {
  display: grid; place-items: center; flex-shrink: 0;
  width: clamp(84px, 9vw, 120px); aspect-ratio: 1; border-radius: 24px;
  background: var(--superficie); padding: 12px;
}
.lista-topo__marca.branca { background: var(--vinho-profundo); }
.lista-topo__marca img { max-width: 100%; max-height: 100%; object-fit: contain; }
/* Altura presa à do banner: passa 48px acima e 36px abaixo, sem cortar no menu. */
.lista-topo__mascote {
  position: absolute; right: clamp(8px, 3vw, 40px); bottom: -36px;
  height: calc(100% + 84px); width: auto; max-width: none;
  filter: drop-shadow(0 22px 24px rgba(42, 10, 18, .35));
  pointer-events: none;
}
.js .lista-topo__mascote { opacity: 0; transform: translateY(30px); animation: mascote-entra 1s .15s var(--ease) forwards; }
@keyframes mascote-entra { to { opacity: 1; transform: none; } }

/* Chips de categoria com miniaturas */
.chips-cat {
  display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1); padding: 8px var(--gutter);
}
.lista-topo__chips { margin-bottom: 28px; }
.chips-cat::-webkit-scrollbar { display: none; }
.chip-cat {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 18px 0 6px; border-radius: 999px;
  background: var(--superficie); border: 1.5px solid var(--linha);
  font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: border-color .25s, background-color .25s, color .25s, transform .3s var(--ease);
}
.chip-cat img { width: 40px; height: 40px; border-radius: 50%; object-fit: contain; background: var(--bg-2); padding: 2px; transition: transform .45s var(--ease-mola); }
.chip-cat:hover { border-color: var(--vermelho); transform: translateY(-2px); }
.chip-cat:hover img { transform: rotate(-8deg) scale(1.1); }
.chip-cat[aria-current="true"] { background: var(--vermelho); border-color: var(--vermelho); color: #fff; }
.chip-cat[aria-current="true"] img { background: rgba(255, 255, 255, .9); }
.chip-cat--todos { padding-left: 18px; }

/* Layout: filtros + resultados */
.lista { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: clamp(24px, 3vw, 40px); align-items: start; padding-bottom: var(--secao); }

.filtros {
  position: sticky; top: calc(var(--nav-h) + 16px);
  max-height: calc(100vh - var(--nav-h) - 32px); overflow-y: auto; scrollbar-width: thin;
  padding: 20px; border-radius: 24px; background: var(--superficie); border: 1px solid var(--linha);
}
.filtros__topo { display: none; }
.filtro { border: 0; margin: 0; padding: 0; min-width: 0; }
.filtro + .filtro { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--linha); }
.filtro h2 { font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--texto); margin-bottom: 12px; }
.filtro__busca {
  display: flex; align-items: center; height: 42px; padding: 0 12px; gap: 8px;
  border-radius: 12px; border: 1.5px solid var(--linha); background: var(--bg);
}
.filtro__busca:focus-within { border-color: var(--vermelho); }
.filtro__busca svg { width: 18px; height: 18px; color: var(--texto-3); flex-shrink: 0; }
.filtro__busca input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 14px; }
.filtro__busca input:focus { outline: none; }
.filtro__lista { display: grid; gap: 2px; margin-top: 10px; }
.opcao {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 10px;
  font-size: 14px; cursor: pointer; transition: background-color .2s;
}
.opcao:hover { background: var(--bg-2); }
.opcao input { position: absolute; opacity: 0; pointer-events: none; }
.opcao__caixa {
  display: grid; place-items: center; width: 20px; height: 20px; flex-shrink: 0;
  border: 2px solid var(--linha-forte); border-radius: 6px; color: #fff;
  transition: background-color .2s, border-color .2s;
}
.opcao--radio .opcao__caixa { border-radius: 50%; }
.opcao__caixa svg { width: 13px; height: 13px; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .3s var(--ease-mola); }
.opcao input:checked + .opcao__caixa { background: var(--vermelho); border-color: var(--vermelho); }
.opcao input:checked + .opcao__caixa svg { opacity: 1; transform: none; }
.opcao input:focus-visible + .opcao__caixa { outline: 3px solid var(--vermelho); outline-offset: 2px; }
.opcao__nome { flex: 1; line-height: 1.3; }
.opcao__logo { width: 26px; height: 26px; object-fit: contain; flex-shrink: 0; border-radius: 6px; }
.opcao__logo.branca { background: var(--vermelho-escuro); padding: 2px; }
.opcao__qtd { font-size: 12px; color: var(--texto-3); font-weight: 600; }
.opcao.sem-itens { opacity: .45; }
.filtro__mais { margin-top: 8px; font-size: 13.5px; font-weight: 700; color: var(--vermelho); padding: 6px 8px; }

/* Barra de resultados */
.resultados__barra {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; justify-content: space-between;
  margin-bottom: 20px;
}
.resultados__qtd { font-size: 15px; color: var(--texto-2); }
.resultados__qtd strong { color: var(--texto); }
.resultados__acoes { display: flex; align-items: center; gap: 10px; }
.ordenar {
  position: relative; display: flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 14px 0 16px; border-radius: 999px;
  background: var(--superficie); border: 1.5px solid var(--linha); font-size: 14px;
}
.ordenar:focus-within { border-color: var(--vermelho); }
.ordenar span { color: var(--texto-3); font-weight: 600; white-space: nowrap; }
.ordenar select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent;
  font-weight: 700; padding-right: 22px; cursor: pointer; color: var(--texto);
}
.ordenar select:focus { outline: none; }
.ordenar svg { position: absolute; right: 14px; width: 16px; height: 16px; pointer-events: none; color: var(--texto-2); }
.btn-filtros {
  display: none; align-items: center; gap: 8px; height: 46px; padding: 0 18px;
  border-radius: 999px; background: var(--texto); color: var(--bg); font-weight: 700; font-size: 14px;
}
.btn-filtros svg { width: 18px; height: 18px; }
.btn-filtros b { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--dourado); color: var(--vinho-profundo); font-size: 11.5px; display: grid; place-items: center; }

.ativos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ativo {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 14px;
  border-radius: 999px; background: rgba(190, 1, 55, .08); color: var(--vermelho-escuro);
  font-size: 13px; font-weight: 600;
}
.ativo svg { width: 16px; height: 16px; }
.ativo:hover { background: rgba(190, 1, 55, .16); }
.limpar-tudo { font-size: 13px; font-weight: 700; color: var(--texto-2); text-decoration: underline; text-underline-offset: 3px; padding: 0 6px; }

.lista .grade-produtos { grid-template-columns: repeat(auto-fill, minmax(min(200px, 42vw), 1fr)); }
.grade-produtos.trocando { animation: grade-troca .45s var(--ease); }
@keyframes grade-troca { from { opacity: 0; transform: translateY(12px); } }
.mais-produtos { display: grid; justify-items: center; gap: 10px; margin-top: 36px; }
.mais-produtos p { font-size: 13.5px; color: var(--texto-3); }

@media (max-width: 1023px) {
  .lista { grid-template-columns: 1fr; }
  .btn-filtros { display: inline-flex; }
  .filtros {
    position: fixed; inset: auto 0 0 0; top: auto; z-index: 105;
    max-height: 86vh; border-radius: 28px 28px 0 0; padding: 0 20px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(105%); transition: transform .5s var(--ease);
    box-shadow: 0 -20px 60px -20px rgba(42, 10, 18, .45);
  }
  .filtros.aberto { transform: none; }
  .filtros__topo {
    position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
    padding: 18px 0 14px; background: var(--superficie); border-bottom: 1px solid var(--linha); margin-bottom: 18px;
  }
  .filtros__topo h2 { font-family: var(--fonte-titulo); font-weight: 900; font-size: 1.4rem; }
  .filtros__topo button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--linha); }
  .filtros__topo button svg { width: 20px; height: 20px; }
  .filtros__ver { position: sticky; bottom: 0; padding-top: 14px; background: var(--superficie); }
  .filtros-fundo { position: fixed; inset: 0; z-index: 104; background: rgba(42, 10, 18, .45); opacity: 0; pointer-events: none; transition: opacity .4s; }
  .filtros-fundo.aberto { opacity: 1; pointer-events: auto; }
}
@media (min-width: 1024px) { .filtros__ver, .filtros-fundo { display: none; } }
@media (max-width: 600px) {
  /* Sem o vão vermelho embaixo: o subtítulo fica mais estreito e o mascote vai à direita dele,
     passando um pouco da borda de baixo, como no desktop. Com o subtítulo em 3+ linhas, a cabeça
     do mascote para abaixo do título, que pode usar a largura toda. */
  .lista-topo__banner { min-height: 0; padding: 26px 22px 28px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .lista-topo { padding-top: 28px; }
  .lista-topo h1 { text-wrap: balance; }
  /* Entre 205 e 260px o subtítulo fica em 3 linhas em qualquer celular; o mascote, menor e mais
     à direita, deixa o texto chegar perto da mão dele. */
  .lista-topo__sub { max-width: min(100% - 76px, 214px); }
  .lista-topo__mascote { height: auto; width: 92px; right: 4px; bottom: -30px; filter: none; }
  .ordenar span { display: none; }
}
.filtro__nada { padding: 8px; }
