/* ==========================================================================
   Forest — Catálogo (loja.html)
   L1 banner · L2 atalhos · L3 barra · L4 filtros · L5 grade
   ========================================================================== */

@media (min-width: 1024px) { .so-mob { display: none !important; } }
@media (max-width: 1023px) { .so-desk { display: none !important; } }

/* ---------- L1 · Banner ---------- */
.banner {
  margin-top: var(--inset);
  height: max(60svh, 520px);
  overflow: hidden;
  background: #1F3A30;
  transform-origin: 50% 0;
}
@media (min-width: 768px) { .banner { height: max(56svh, 460px); } }
.banner__cena { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; }
.banner__fundo, .banner__modelo { position: absolute; inset: 0; }
.banner__fundo img, .banner__modelo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.banner__modelo { z-index: 2; }
.banner__palavra {
  position: absolute; z-index: 1; left: 0; right: 0;
  top: 22%;
  margin: 0; padding: 0 var(--m);
  font-family: var(--f-display); font-weight: 700; text-transform: uppercase;
  font-size: var(--t-display-xl); line-height: .9; letter-spacing: -.02em;
  color: #EAE1DC; white-space: nowrap; text-align: center;
  overflow: clip; overflow-clip-margin: 4px; padding-block: .04em;
}
.banner__palavra-in { display: inline-block; }
@media (max-width: 767px) { .banner__palavra { top: 13%; font-size: 14vw; } }
.banner__veu { position: absolute; inset: auto 0 0 0; height: 55%; z-index: 3; background: linear-gradient(to top, rgba(21, 40, 31, .78), rgba(21, 40, 31, 0)); pointer-events: none; }
.banner__base {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 0 calc(var(--m) - var(--inset) + 8px) 24px;
  color: #EAE1DC;
}
@media (min-width: 1024px) { .banner__base { padding-bottom: 32px; } }
.banner__titulo { display: grid; gap: 6px; max-width: 34rem; }
.banner .migalha { color: rgba(234, 225, 220, .75); }
.banner__apoio { color: rgba(234, 225, 220, .85); font-size: 15px; line-height: 1.45; }
.banner__conta { color: #C2A266; }
.banner__coord { color: rgba(234, 225, 220, .7); text-align: right; white-space: nowrap; }
@media (max-width: 767px) { .banner__coord { display: none; } }

/* ---------- L2 · Atalhos ---------- */
.atalhos { margin-top: 20px; }
.atalhos__lista {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
  padding: 4px var(--m); max-width: 1440px; margin: 0 auto;
}
.atalhos__lista::-webkit-scrollbar { display: none; }
.atalho {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px 0 6px; border-radius: 999px;
  border: 1px solid var(--linha); background: var(--superficie); white-space: nowrap; font-size: 14px; font-weight: 500;
  transition: background-color .25s, color .25s, border-color .25s;
}
.atalho:hover { border-color: var(--linha-forte); }
.atalho img, .atalho__folha { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--foto); flex: none; }
.atalho__folha { display: grid; place-items: center; background: #20362E; color: #DCD7CA; }
.atalho__folha .ic { width: 16px; height: 20px; }
.atalho span { color: var(--texto-3); font-size: 12px; font-weight: 600; }
.atalho[aria-current="true"] { background: #20362E; border-color: #20362E; color: #EAE1DC; }
.atalho[aria-current="true"] span { color: rgba(234, 225, 220, .65); }

/* ---------- L3 · Barra ---------- */
.barra {
  position: sticky; z-index: 30;
  top: calc(var(--cab-topo) + var(--cab-h) + 8px);
  margin-top: 16px;
  transition: top .45s var(--ease);
}
body:has(.cab.escondido) .barra { top: var(--inset); }
.barra__in {
  display: flex; align-items: center; gap: 12px; min-height: 56px;
  background: var(--fundo);
  border-bottom: 1px solid var(--linha);
}
.barra.grudada .barra__in { box-shadow: 0 10px 18px -16px rgba(21, 40, 31, .35); }
.barra__esq { display: flex; align-items: center; gap: 16px; flex: none; }
.barra__btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--linha-forte); font-size: 14px; font-weight: 600; transition: border-color .2s, background-color .2s; }
.barra__btn:hover { border-color: var(--texto); }
.barra__btn .ic { width: 18px; height: 18px; }
.barra__conta { font-size: 14px; color: var(--texto-2); white-space: nowrap; }
.barra__chips { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.barra__chips::-webkit-scrollbar { display: none; }
.chip-f { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 6px 0 12px; border-radius: 999px; background: rgba(32, 54, 46, .08); font-size: 13px; font-weight: 500; white-space: nowrap; flex: none; }
.chip-f:hover { background: rgba(32, 54, 46, .14); }
.chip-f .ic { width: 14px; height: 14px; }
.chip-f__x { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; }
.barra__limpar { font-size: 13px; font-weight: 600; white-space: nowrap; flex: none; margin-left: 4px; }
.barra__dir { display: flex; align-items: center; gap: 12px; flex: none; margin-left: auto; }
.select {
  appearance: none; -webkit-appearance: none;
  height: 40px; padding: 0 40px 0 16px; border-radius: 999px; border: 1px solid var(--linha-forte); background-color: transparent;
  font-size: 14px; font-weight: 600; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 23 17'%3E%3Cpath fill='%2325261D' d='M22.6 8.4c0-.3-.1-.7-.4-.9-.9-.8-1.8-1.5-2.6-2-1.8-1.4-3.7-2.6-5.6-3.6-.8-.4-1.9-1-3.1-1.4C10.1.3 9.1 0 8.1 0 5.5.1 3 1.5 1.4 3.7.6 4.8.1 6.2 0 7.6l16.5.8L0 9.2c.1 1.6.7 3.1 1.7 4.4.2.3.5.5.7.8 1 1 2.2 1.7 3.5 2.1.9.3 1.7.4 2.4.4 1.1-.1 2.2-.4 3.1-.7 2.1-.8 4.1-2 5.9-3.2 1.9-1.2 3.5-2.4 4.8-3.6.3-.2.5-.6.5-1Z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: 14px 11px; background-position: right 16px center;
  transition: border-color .2s;
}
.select:hover { border-color: var(--texto); }
.colunas { display: flex; gap: 2px; padding: 3px; border-radius: 999px; border: 1px solid var(--linha); }
.colunas button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--texto-3); transition: background-color .2s, color .2s; }
.colunas button .ic { width: 18px; height: 18px; }
.colunas button:hover { color: var(--texto); }
.colunas button[aria-pressed="true"] { background: #20362E; color: #EAE1DC; }
@media (max-width: 1023px) {
  .barra { margin-top: 12px; }
  .barra__chips { display: none; }
  .barra__in { min-height: 52px; }
}

/* ---------- L4 + L5 ---------- */
.loja { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gutter); padding-top: 24px; }
@media (min-width: 1024px) {
  .loja { grid-template-columns: repeat(12, minmax(0, 1fr)); padding-top: 32px; }
  .filtros { grid-column: 1 / 4; }
  .vitrine { grid-column: 4 / 13; }
  .loja.sem-filtros .filtros { display: none; }
  .loja.sem-filtros .vitrine { grid-column: 1 / -1; }
}
.vitrine { min-width: 0; }

/* Filtros: coluna grudada no desktop */
.filtros { min-width: 0; }
@media (min-width: 1024px) {
  .filtros {
    position: sticky; top: calc(var(--cab-topo) + var(--cab-h) + 8px + 56px + 16px);
    align-self: start; max-height: calc(100svh - var(--cab-topo) - var(--cab-h) - 96px);
    display: flex; flex-direction: column;
  }
  body:has(.cab.escondido) .filtros { top: calc(var(--inset) + 56px + 16px); max-height: calc(100svh - 96px); }
  .filtros__corpo { overflow-y: auto; overscroll-behavior: contain; padding-right: 12px; scrollbar-width: thin; }
}
.filtros__topo { display: flex; align-items: center; gap: 12px; padding-bottom: 8px; }
.filtros__titulo { font-family: var(--f-display); font-weight: 500; font-size: 16px; text-transform: uppercase; letter-spacing: .02em; }
.filtros__limpar { margin-left: auto; font-size: 13px; font-weight: 600; min-height: 32px; }
.grupo > summary .grupo__n { margin-left: auto; margin-right: 12px; font-size: 12px; font-weight: 500; color: var(--texto-2); }
.grupo .tamanhos { gap: 6px; }
.grupo .tam { min-width: 48px; height: 40px; font-size: 14px; border-radius: 10px; }
.grupo__sub { font-size: 12px; color: var(--texto-2); margin: 12px 0 6px; }
.grupo__sub:first-child { margin-top: 0; }
.grupo .bolinhas { gap: 12px; padding: 4px 2px; }
.grupo .bolinha { --tam: 28px; --fundo-bolinha: var(--fundo); }

/* Faixa de preço: slider duplo */
.faixa { position: relative; height: 36px; margin: 6px 10px 10px; }
.faixa__trilho { position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--linha-forte); border-radius: 2px; }
.faixa__sel { position: absolute; top: 50%; height: 2px; margin-top: -1px; background: #20362E; }
.faixa input[type="range"] {
  position: absolute; left: -10px; right: -10px; width: calc(100% + 20px); top: 0; height: 36px; margin: 0;
  appearance: none; -webkit-appearance: none; background: none; pointer-events: none;
}
.faixa input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; border-radius: 50%; background: #FAFAF7; border: 2px solid #20362E; box-shadow: var(--sombra-curta); cursor: grab; }
.faixa input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 20px; height: 20px; border-radius: 50%; background: #FAFAF7; border: 2px solid #20362E; cursor: grab; }
.faixa input[type="range"]:focus-visible { outline: none; }
.faixa input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--capim); outline-offset: 2px; }
.faixa__campos { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.faixa__campos .entrada { height: 44px; padding: 0 12px; font-size: 15px; border-radius: 12px; }

/* Grade de produtos */
.grade-p { --cols: 2; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 32px var(--gutter); }
.grade-p[data-cols="1"] { --cols: 1; }
.grade-p[data-cols="2"] { --cols: 2; }
.grade-p[data-cols="3"] { --cols: 3; }
.grade-p[data-cols="4"] { --cols: 4; }
@media (max-width: 767px) { .grade-p { row-gap: 24px; } }

/* Cartão editorial (E-01 / E-02) ocupa 2 colunas */
.editorial {
  grid-column: span 2; position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--r-card); background: #20362E; color: #EAE1DC;
  display: flex; flex-direction: column; justify-content: space-between; gap: 24px;
  padding: 28px; min-height: 100%;
}
.grade-p[data-cols="1"] .editorial { grid-column: span 1; aspect-ratio: 4 / 5; min-height: 0; }
.editorial::after { content: ""; position: absolute; inset: 0; background-image: var(--grao); opacity: .05; mix-blend-mode: screen; pointer-events: none; z-index: -1; }
.editorial__folha { position: absolute; z-index: -1; right: -6%; bottom: -14%; width: 52%; height: auto; color: #264336; transform: rotate(-18deg); }
.editorial__img { position: absolute; inset: 0; z-index: -2; }
.editorial__img img { width: 100%; height: 100%; object-fit: cover; }
.editorial .t-kicker { color: #C2A266; }
.editorial__frase { font-family: var(--f-display); font-weight: 500; text-transform: uppercase; font-size: clamp(1.375rem, 2.2vw, 2.25rem); line-height: 1.05; letter-spacing: -.01em; max-width: 14ch; }
.editorial--papel { background: #EAE1DC; color: #25261D; }
.editorial--papel .t-kicker { color: #7A4B30; }
.editorial--papel .editorial__folha { color: #DCD7CA; }
.editorial--papel::after { mix-blend-mode: multiply; }
.editorial .btn { align-self: flex-start; }
@media (max-width: 767px) { .editorial { padding: 22px; min-height: 0; } .editorial__frase { font-size: 1.375rem; } }
/* Com foto (E-01/E-02 reais): a foto cobre o cartão; kicker + frase em cima, botão embaixo; um véu do lado do texto
   (mata da esquerda no E-01, papel de cima no E-02, sobre o céu) garante a leitura sem apagar a estampa nem os rostos */
.editorial--foto { justify-content: flex-start; gap: 12px; }
.editorial--foto .btn { margin-top: auto; }
.editorial--foto .editorial__folha { display: none; }
.editorial--foto .editorial__img img { object-position: var(--foco, 50% 50%); }
.editorial--foto .editorial__frase { max-width: 24ch; }
.editorial--foto::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(21, 40, 31, .88) 0%, rgba(21, 40, 31, .62) 24%, rgba(21, 40, 31, 0) 48%),
    linear-gradient(0deg, rgba(21, 40, 31, .5) 0%, rgba(21, 40, 31, 0) 30%);
}
.editorial--foto.editorial--papel::before { background: linear-gradient(180deg, rgba(234, 225, 220, .94) 0%, rgba(234, 225, 220, .7) 20%, rgba(234, 225, 220, 0) 42%); }
.grade-p[data-cols="1"] .editorial--foto { aspect-ratio: 1 / 1; }
@media (max-width: 767px) {
  .editorial--foto { aspect-ratio: 1 / 1; }
  /* E-02 no celular: a foto inteira (1,5:1) na parte de baixo, o texto sobre o papel liso em cima (não cobre os rostos) */
  .editorial--foto.editorial--papel .editorial__img { top: 36%; }
  .editorial--foto.editorial--papel::before { background: linear-gradient(180deg, #EAE1DC 0%, #EAE1DC 36%, rgba(234, 225, 220, 0) 46%); }
}

/* Paginação */
.paginacao { display: grid; justify-items: center; gap: 14px; margin-top: 56px; }
.paginacao__txt { font-size: 14px; color: var(--texto-2); }
.paginacao__barra { width: min(240px, 60%); height: 2px; background: var(--linha); border-radius: 2px; overflow: hidden; }
.paginacao__barra i { display: block; height: 100%; width: 0; background: #20362E; transition: width .5s var(--ease); }

/* Vazio */
.vazio { display: grid; justify-items: start; gap: 16px; padding: 24px 0 8px; }
.vazio__sug { margin-top: 40px; }
.vazio .grade-p { width: 100%; }

/* Pílula dupla fixa (celular) */
.pilula-dupla {
  position: fixed; z-index: 40; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translate(-50%, 160%);
  display: flex; padding: 4px; border-radius: 999px; background: #20362E; color: #EAE1DC; box-shadow: 0 12px 32px rgba(21, 40, 31, .3);
  transition: transform .5s var(--ease);
}
.pilula-dupla.visivel { transform: translate(-50%, 0); }
.pilula-dupla button { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 999px; font-size: 15px; font-weight: 600; }
.pilula-dupla button + button { border-left: 1px solid rgba(234, 225, 220, .2); border-radius: 0 999px 999px 0; }
.pilula-dupla .ic { width: 18px; height: 18px; }
.pilula-dupla__n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #C2A266; color: #25261D; font-size: 12px; line-height: 20px; text-align: center; }
.pilula-dupla__n:empty { display: none; }

/* Filtros como folha inferior (celular e tablet) */
@media (max-width: 1023px) {
  .filtros {
    position: fixed; z-index: 88; left: 0; right: 0; bottom: 0; height: 88svh;
    display: flex; flex-direction: column;
    background: #EAE1DC; color: #25261D; border-radius: 20px 20px 0 0;
    box-shadow: 0 -16px 48px rgba(21, 40, 31, .2);
    transform: translateY(100%); visibility: hidden;
    transition: transform .5s var(--ease), visibility 0s .5s;
    --superficie: #FAFAF7; --fundo: #EAE1DC;
  }
  .filtros.aberta { transform: none; visibility: visible; transition: transform .5s var(--ease), visibility 0s; }
  .filtros__topo { padding: 14px 12px 8px 24px; border-bottom: 1px solid var(--linha); }
  .filtros__corpo { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px 24px; }
  .filtros__base { display: block; padding: 12px 24px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linha); }
}
