/* ════ ACELERARTE — Catálogo de Produtos ════ */

.cat-head {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  gap: 16px; padding: 18px 48px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--white) 90%, transparent);
  backdrop-filter: blur(18px);
}
.cat-back {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; color: var(--ink2); font-family: var(--f-body);
  font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--line); transition: all .2s;
}
.cat-back:hover { box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--gold-h); }
.cat-head .logo { justify-self: center; }
.cat-head-right { justify-self: end; display: flex; align-items: center; gap: 10px; }

/* ── HERO BUSCA ── */
.cat-hero {
  padding: 56px 48px 40px;
  border-bottom: 1px solid var(--line);
}
.cat-hero h1 {
  font-family: var(--f-display); font-size: clamp(44px, 6vw, 72px);
  font-weight: 400; line-height: .95; color: var(--ink);
  margin: 0 0 28px; text-wrap: balance;
}
.cat-hero h1 span { color: var(--gold-h); }
.cat-search-row { display: flex; gap: 12px; max-width: 640px; min-width: 0; }
.cat-search {
  flex: 1; display: flex; align-items: center; gap: 12px;
  padding: 0 20px; height: 52px; border-radius: 999px;
  background: var(--bg-card); box-shadow: inset 0 0 0 1.5px var(--line);
  transition: box-shadow .2s;
  min-width: 0; /* sem isso, o <input> força o flex a crescer além da tela
                   no Android de verdade (largura mínima "de fábrica" do
                   input) -- achado 2026-07-07, não reproduzia no emulador
                   mobile do Chrome desktop */
}
.cat-search:focus-within { box-shadow: inset 0 0 0 2px var(--gold); }
.cat-search svg { color: var(--ink2); flex-shrink: 0; }
.cat-search input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  font-family: var(--f-body); font-size: 16px; color: var(--ink);
}
.cat-search input::placeholder { color: var(--ink2); }
.cat-search-clear {
  background: none; border: none; cursor: pointer; color: var(--ink2);
  display: flex; align-items: center; padding: 2px; transition: color .2s;
}
.cat-search-clear:hover { color: var(--ink); }

/* ── LAYOUT PRINCIPAL ── */
.cat-body { display: grid; grid-template-columns: 260px 1fr; gap: 0; min-height: 60vh; }
/* páginas sem sidebar de filtro (ex: /promocoes) — largura toda pro grid */
.cat-body--full { grid-template-columns: 1fr; }

/* ── SIDEBAR FILTROS ── */
.cat-sidebar {
  padding: 32px 24px 40px;
  border-right: 1px solid var(--line);
  position: sticky; top: 73px; height: fit-content;
  max-height: calc(100vh - 73px); overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.cat-sidebar-title {
  font-family: var(--f-body); font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--ink2);
  margin: 0 0 20px;
}
.cat-filter-group { margin-bottom: 28px; }
.cat-filter-label {
  font-family: var(--f-body); font-size: 13px; font-weight: 700;
  color: var(--ink); margin-bottom: 12px; display: block;
}
.cat-filter-options { display: flex; flex-direction: column; gap: 6px; }
.cat-filter-opt {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: var(--f-body); font-size: 14px; color: var(--ink2);
  padding: 7px 10px; border-radius: 10px; transition: background .15s, color .15s;
  user-select: none;
}
.cat-filter-opt:hover { background: var(--bg-card); color: var(--ink); }
.cat-filter-opt input[type="checkbox"] { display: none; }
.cat-filter-check {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0;
  box-shadow: inset 0 0 0 1.5px var(--line);
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; background: var(--white);
}
.cat-filter-opt.active .cat-filter-check {
  background: var(--gold); box-shadow: none;
}
.cat-filter-opt.active .cat-filter-check::after {
  content: ""; display: block; width: 5px; height: 8px;
  border-right: 2px solid #15140F; border-bottom: 2px solid #15140F;
  transform: rotate(45deg) translate(-1px, -1px);
}
.cat-filter-opt.active { color: var(--ink); }
.cat-filter-opt.dead { opacity: .32; cursor: not-allowed; pointer-events: none; }

/* grid de bolinhas de cor -- sem nome escrito, o nome + contagem viram
   tooltip (title) e aria-label; consistente com o padrão visual do grid
   de Tamanho (.cat-size-grid), só que redondo */
.cat-color-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-color-swatch {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  border: none; padding: 0; cursor: pointer;
  box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.15);
  transition: all .15s;
}
.cat-color-swatch:hover:not(.dead):not(.active) { transform: scale(1.12); }
.cat-color-swatch.active {
  box-shadow: inset 0 0 0 1.5px rgba(0,0,0,.15), 0 0 0 3px var(--gold-soft), 0 0 0 1.5px var(--gold);
  transform: scale(1.08);
}
.cat-color-swatch.dead { opacity: .25; cursor: not-allowed; }
.cat-filter-count {
  margin-left: auto; font-size: 12px; color: var(--ink2);
  background: var(--bg-card); padding: 2px 7px; border-radius: 999px;
}

/* preço slider */
/* radio (ordenar = seleção única) */
.cat-filter-radio { border-radius: 999px; }
.cat-filter-opt.active .cat-filter-radio::after {
  content: ""; width: 8px; height: 8px; border: none; transform: none;
  border-radius: 999px; background: #15140F;
}

/* hint de ajuda sob o label */
.cat-filter-hint {
  font-family: var(--f-body); font-size: 11.5px; color: var(--ink2);
  margin: -6px 0 12px;
}

/* grade de tamanhos */
.cat-size-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-size-btn {
  height: 42px; border-radius: 10px; cursor: pointer;
  background: var(--white); box-shadow: inset 0 0 0 1.5px var(--line);
  font-family: var(--f-body); font-size: 12px; font-weight: 700; color: var(--ink);
  border: none; transition: all .15s; white-space: nowrap; padding: 0 2px;
}
.cat-size-btn:hover:not(.dead):not(.active) { box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--gold-h); }
.cat-size-btn.active { background: var(--gold); color: #15140F; box-shadow: none; }
.cat-size-btn.dead { opacity: .3; cursor: not-allowed; text-decoration: line-through; }

.cat-price-range { display: flex; flex-direction: column; gap: 10px; }
.cat-price-vals {
  display: flex; justify-content: space-between;
  font-family: var(--f-body); font-size: 13px; font-weight: 600; color: var(--ink2);
}
.cat-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 999px;
  background: linear-gradient(to right, var(--gold) var(--pct, 100%), var(--line) var(--pct, 100%));
  outline: none; cursor: pointer;
}
.cat-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px; border-radius: 999px;
  background: var(--gold); box-shadow: 0 2px 8px rgba(232,180,0,.4); cursor: pointer;
}
.cat-slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 999px; border: none;
  background: var(--gold); box-shadow: 0 2px 8px rgba(232,180,0,.4);
}

.cat-divider { border: none; border-top: 1px solid var(--line); margin: 8px 0 24px; }

.cat-reset {
  width: 100%; padding: 10px; border-radius: 999px;
  background: none; border: none; cursor: pointer;
  font-family: var(--f-body); font-size: 13px; font-weight: 600; color: var(--ink2);
  box-shadow: inset 0 0 0 1.5px var(--line); transition: all .2s;
}
.cat-reset:hover { box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--gold-h); }

/* ── GRID PRODUTOS ── */
.cat-main { padding: 28px 40px 80px; }
.cat-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.cat-count {
  font-family: var(--f-body); font-size: 14px; color: var(--ink2);
}
.cat-count strong { color: var(--ink); font-weight: 700; }
.cat-toolbar-right { display: flex; align-items: center; gap: 10px; }
.cat-sort {
  padding: 9px 16px; border-radius: 999px;
  background: var(--bg-card); box-shadow: inset 0 0 0 1.5px var(--line);
  font-family: var(--f-body); font-size: 13px; font-weight: 600; color: var(--ink);
  border: none; cursor: pointer; outline: none; transition: box-shadow .2s;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 34px;
}
.cat-sort:focus { box-shadow: inset 0 0 0 2px var(--gold); }

/* chips de filtros ativos */
.cat-active-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--gold-soft); color: var(--gold-h);
  font-family: var(--f-body); font-size: 12px; font-weight: 700;
  border: none; cursor: pointer; transition: background .15s;
}
.cat-chip:hover { background: color-mix(in srgb, var(--gold) 20%, transparent); }
.cat-chip svg { flex-shrink: 0; }
.cat-chip-clear { background: none; color: var(--ink2); box-shadow: inset 0 0 0 1.5px var(--line); }
.cat-chip-clear:hover { color: var(--ink); background: var(--bg-card); }

/* grid */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cat-empty {
  grid-column: 1/-1; text-align: center; padding: 80px 0;
  font-family: var(--f-body); font-size: 16px; color: var(--ink2);
}
.cat-empty strong { display: block; font-family: var(--f-head); font-size: 28px; color: var(--ink); margin-bottom: 8px; }

/* load more */
.cat-load-more {
  display: flex; justify-content: center; margin-top: 48px;
}
.cat-load-btn {
  padding: 14px 40px; border-radius: 999px;
  background: none; box-shadow: inset 0 0 0 1.5px var(--line);
  font-family: var(--f-body); font-size: 14px; font-weight: 700; color: var(--ink2);
  border: none; cursor: pointer; transition: all .2s;
}
.cat-load-btn:hover { box-shadow: inset 0 0 0 1.5px var(--gold); color: var(--gold-h); }

.cat-foot-policy {
  text-align: center; padding: 32px 0 40px;
  font-family: var(--f-body); font-size: 13px; color: var(--ink2);
  border-top: 1px solid var(--line); margin-top: 40px;
}
.cat-foot-policy a { color: var(--gold-h); font-weight: 600; text-decoration: none; }
.cat-foot-policy a:hover { text-decoration: underline; }

/* ── FILTRO MOBILE ── */
.cat-filter-fab {
  display: none; position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 100; padding: 14px 28px; border-radius: 999px;
  background: #212121; color: #fff;
  font-family: var(--f-body); font-size: 14px; font-weight: 700;
  border: none; cursor: pointer; box-shadow: 0 8px 28px rgba(0,0,0,.25);
  display: none; align-items: center; gap: 8px; transition: transform .2s;
  white-space: nowrap;
}
[data-theme="dark"] .cat-filter-fab { background: var(--gold); color: #15140F; }
[data-theme="dark"] .cat-drawer { background: #17171A; }
[data-theme="dark"] .cat-head { background: color-mix(in srgb, #0D0D0F 90%, transparent); }
[data-theme="dark"] .cat-filter-check { background: #17171A; }
[data-theme="dark"] .cat-size-btn { background: #17171A; color: var(--ink); }
[data-theme="dark"] .cat-size-btn.active { background: var(--gold); color: #15140F; }
.cat-filter-fab:hover { transform: translateX(-50%) translateY(-2px); }
/* 72px nao subia o suficiente pra limpar o texto do rodape (~92px de
   altura: padding 32px+40px + linha de texto) -- o botao Filtros ficava
   em cima de "Política de Trocas.../Página Inicial" (achado 2026-07-07) */
.cat-filter-fab.fab-above { bottom: calc(100px + env(safe-area-inset-bottom)); transition: bottom .25s ease, transform .2s; }

.cat-drawer-overlay {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
}
.cat-drawer-overlay.open { display: block; }
.cat-drawer {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 201;
  background: var(--white); border-radius: 24px 24px 0 0;
  max-height: 85vh;
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .32s cubic-bezier(.4,0,.2,1);
}
.cat-drawer-scroll {
  flex: 1; overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 24px 8px;
}
.cat-drawer-footer {
  padding: 12px 24px calc(16px + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: 1px solid var(--line);
}
[data-theme="dark"] .cat-drawer-footer { background: #17171A; }
.cat-drawer.open { transform: translateY(0); }
.cat-drawer-handle {
  width: 40px; height: 4px; border-radius: 999px;
  background: var(--line); margin: 14px auto 24px;
}
.cat-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.cat-drawer-title { font-family: var(--f-head); font-size: 22px; font-weight: 700; color: var(--ink); }
.cat-drawer-close {
  background: none; border: none; cursor: pointer; color: var(--ink2);
  display: flex; padding: 4px; transition: color .2s;
}
.cat-apply-btn {
  width: 100%; margin-top: 24px; padding: 16px;
  border-radius: 999px; background: var(--gold); color: #15140F;
  font-family: var(--f-body); font-size: 15px; font-weight: 800;
  border: none; cursor: pointer; transition: background .2s;
}
.cat-apply-btn:hover { background: var(--gold-h); }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-body { grid-template-columns: 220px 1fr; }
}
@media (max-width: 768px) {
  .cat-head { padding: 14px 20px; grid-template-columns: auto auto; }
  .cat-head .logo { display: none; }
  .cat-hero { padding: 36px 20px 28px; }
  .cat-body { grid-template-columns: 1fr; }
  .cat-sidebar { display: none; }
  /* 120px de folga embaixo era mais do que o FAB de Filtros precisa (ele
     mede uns 70px de altura+distância do rodapé) -- sobrava uma área
     preta grande vazia entre o "Ver mais" e o rodapé (achado 2026-07-07) */
  .cat-main { padding: 20px 16px 88px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cat-filter-fab { display: inline-flex; }

  /* cards estreitos no mobile: empilha info e esconde texto do botão */
  .cat-grid .pcard { overflow: hidden; }
  .cat-grid .pcard-img {
    width: 100%; max-width: 100%; flex-shrink: 0;
    min-height: 140px;         /* fallback para aspect-ratio no Safari */
    aspect-ratio: 1;
  }
  .cat-grid .pcard-img img { transform: rotate(-4deg) scale(.9); }
  .cat-grid .pcard-info { flex-direction: column; align-items: flex-start; gap: 10px; }
  .cat-grid .pcard-buy-btn { width: 100%; justify-content: center; padding: 10px 12px; font-size: 13px; }
  .cat-grid .pcard-name { font-size: 13px; }
  .cat-grid .pcard-price { font-size: 13px; margin-top: 4px; }
  .cat-grid .pcard-cat { font-size: 10px; }
  /* último card ímpar: mantido na esquerda (comportamento natural do grid) */
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-hero h1 { font-size: 40px; }
  .cat-size-grid { grid-template-columns: repeat(3, 1fr); }
  /* em telas muito estreitas esconde o botão e mostra seta */
  .cat-grid .pcard-buy-btn { padding: 10px; font-size: 12px; }
  .cat-head { grid-template-columns: auto auto; gap: 8px; }
  .nav-store-loc { padding: 8px 10px; font-size: 12px; }
}

/* ── LIQUIDAÇÃO ASX (landing de tráfego pago, ver js/promo-asx.jsx) ──
   Mobile-first de propósito: essa página só recebe clique de anúncio do
   Instagram, então o layout parte do celular e ganha colunas na tela
   grande, ao contrário do resto do site (que parte do desktop). */
.asx-head {
  display: flex; justify-content: center; padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--white) 90%, transparent);
  backdrop-filter: blur(18px);
}
[data-theme="dark"] .asx-head { background: color-mix(in srgb, #0D0D0F 90%, transparent); }
.asx-hero { padding: 32px 20px 24px; text-align: center; }
.asx-hero h1 {
  font-family: var(--f-display); font-size: clamp(32px, 8vw, 56px);
  font-weight: 400; line-height: 1; color: var(--ink); margin: 0 0 10px; text-wrap: balance;
}
.asx-hero p { font-family: var(--f-body); font-size: 14px; color: var(--ink2); }
.asx-hero p b { color: var(--ink); }

.asx-grid {
  /* minmax(0, 1fr) em vez de só "1fr" -- sem isso, o navegador usa o
     tamanho intrínseco da FOTO (500px) como minimo da coluna em vez do
     que sobra de espaço, e a 2ª coluna vaza pra fora da tela no mobile
     (achado 2026-07-16: grid tentava caber 439px numa viewport de 390px) */
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  padding: 0 16px 40px; max-width: 1200px; margin: 0 auto;
}
.asx-grid .pcard { cursor: default; }
.asx-grid .pcard-info { flex-direction: column; align-items: stretch; gap: 10px; }
.asx-grid .pcard-buy-btn { width: 100%; }
.asx-badge-estoque {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: #c0392b; color: #fff;
  font-family: var(--f-body); font-size: 10px; font-weight: 800;
  letter-spacing: .3px; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px;
}
.asx-price-note {
  font-family: var(--f-body); font-size: 11px; font-weight: 600;
  color: var(--ink2); margin: 2px 0 0;
}
@media (min-width: 640px) {
  .asx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding: 0 32px 48px; }
  .asx-hero { padding: 44px 20px 32px; }
}
@media (min-width: 1000px) {
  .asx-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
