/* ---------- Catálogo ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.menu a[aria-current="page"] { color: var(--tinta); background: var(--azulejo); }

.cat-cab {
  background-color: var(--tinta);
  background-image:
    linear-gradient(rgba(43,90,128,.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43,90,128,.35) 1px, transparent 1px);
  background-size: 24px 24px;
  color: #A9C1D6;
  padding-block: clamp(40px, 6vw, 72px) 0;
}
.cat-cab h1 {
  color: #fff; font-size: clamp(56px, 8vw, 112px);
  font-weight: 900; font-variation-settings: "wdth" 62; line-height: .9; letter-spacing: -.02em;
  margin-bottom: 16px;
}
.cat-cab p { max-width: 40em; margin-bottom: 28px; }

.cat-filtros {
  position: sticky; top: 68px; z-index: 20;
  display: grid; gap: 14px;
  background: var(--papel);
  margin-inline: calc(var(--gutter) * -1);
  padding: 18px var(--gutter) 14px;
  border-radius: var(--raio-grande) var(--raio-grande) 0 0;
  transform: translateY(1px);
}
.busca {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--rejunte); border-radius: 999px;
  padding: 0 18px; max-width: 560px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.busca:focus-within { border-color: var(--azul); box-shadow: 0 0 0 3px rgba(11,79,138,.15); }
.busca svg { width: 20px; height: 20px; color: var(--texto-suave); flex: none; }
.busca input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; padding: 13px 0; color: var(--texto); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid var(--rejunte); background: #fff; color: var(--texto);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.chip span { color: var(--texto-suave); font-weight: 500; }
.chip:hover { border-color: var(--tinta); }
.chip[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.chip[aria-pressed="true"] span { color: #A9C1D6; }

.cat-corpo { padding-block: 12px clamp(64px, 9vw, 110px); }
.cat-status { color: var(--texto-suave); font-size: 14px; margin: 0 0 18px; }

.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.prod {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border-radius: var(--raio-grande); overflow: hidden;
  box-shadow: 0 0 0 1px var(--rejunte);
  transition: box-shadow .2s ease, transform .2s ease;
}
.prod:hover { box-shadow: 0 0 0 1px var(--rejunte), var(--sombra); transform: translateY(-3px); }
.prod__abrir {
  all: unset; cursor: pointer; display: flex; flex-direction: column; flex: 1;
}
.prod__abrir:focus-visible { outline: 3px solid var(--latao); outline-offset: -3px; border-radius: var(--raio-grande); }
.prod__foto { position: relative; aspect-ratio: 1; background: #fff; overflow: hidden; border-bottom: 1px solid var(--azulejo); }
.prod__foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 12px; transition: transform .4s cubic-bezier(.2,.8,.1,1); }
.prod:hover .prod__foto img { transform: scale(1.04); }
.prod__fotos-n {
  position: absolute; top: 10px; left: 10px;
  font-size: 12px; font-weight: 700; color: var(--texto-suave);
  background: var(--azulejo); padding: 3px 8px; border-radius: 999px;
}
.prod__txt { padding: 14px 16px 6px; }
.prod__marca { font-size: 13px; font-weight: 700; color: var(--cobre); margin: 0 0 4px; }
.prod__nome { font-size: 17px; line-height: 1.2; font-weight: 750; font-variation-settings: "wdth" 85; color: var(--tinta); margin: 0; }
.prod__add {
  margin: 10px 16px 16px; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--tinta); background: transparent; color: var(--tinta);
  border-radius: 999px; padding: 7px 14px;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.prod__add:hover { background: var(--tinta); color: #fff; }
.prod__add[aria-pressed="true"] { background: var(--latao); border-color: var(--latao); color: var(--tinta); }

.cat-vazio { text-align: center; max-width: 520px; margin: 40px auto 0; }
.cat-vazio h2 { font-size: clamp(26px, 3vw, 36px); margin-bottom: 10px; }
.cat-vazio p { color: var(--texto-suave); }

/* ficha (dialog) */
.ficha {
  width: min(980px, calc(100vw - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: var(--raio-grande);
  background: #fff; color: var(--texto);
  box-shadow: 0 40px 80px -20px rgba(15,34,51,.5);
}
.ficha::backdrop { background: rgba(15,34,51,.6); backdrop-filter: blur(4px); }
.ficha[open] { animation: ficha-entra .25s cubic-bezier(.2,.8,.1,1); }
@keyframes ficha-entra { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.ficha__in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.ficha__galeria { background: #fff; padding: 20px; border-right: 1px solid var(--azulejo); }
.ficha__foto { position: relative; aspect-ratio: 1; }
.ficha__foto img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.ficha__miniaturas { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; }
.ficha__miniaturas button {
  flex: none; width: 64px; height: 64px; padding: 4px; border-radius: var(--raio);
  border: 2px solid var(--azulejo); background: #fff; cursor: pointer;
}
.ficha__miniaturas button[aria-current="true"] { border-color: var(--latao); }
.ficha__miniaturas img { width: 100%; height: 100%; object-fit: contain; }
.ficha__txt { padding: 36px 32px 28px; display: flex; flex-direction: column; overflow-y: auto; }
.ficha__marca { font-weight: 700; color: var(--cobre); margin: 0 0 6px; }
.ficha__txt h2 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 8px; }
.ficha__modelo { color: var(--texto-suave); font-size: 14px; }
.ficha__desc { color: var(--texto); white-space: pre-line; margin-bottom: 24px; }
.ficha__acoes { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.ficha__fechar {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--azulejo); color: var(--tinta); font-size: 26px; line-height: 1; cursor: pointer;
}
.ficha__fechar:hover { background: var(--tinta); color: #fff; }
@media (max-width: 760px) {
  .ficha__in { grid-template-columns: 1fr; }
  .ficha__galeria { border-right: 0; border-bottom: 1px solid var(--azulejo); padding: 16px; }
  .ficha__foto { aspect-ratio: 4 / 3; }
  .ficha__txt { padding: 22px 18px 20px; }
}

/* botão da lista no topo */
.lista-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; border: 2px solid var(--tinta);
  background: var(--tinta); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.lista-btn svg { width: 18px; height: 18px; }
.lista-btn__n {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center;
  background: var(--latao); color: var(--tinta); font-size: 13px;
}
.lista-btn__n[hidden] { display: none; }
.lista-btn.is-pulso { animation: pulso-lista .5s ease; }
@keyframes pulso-lista { 40% { transform: scale(1.1); } }

/* gaveta da lista */
.lista {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 10000;
  width: min(420px, 100vw);
  background: #fff; box-shadow: -20px 0 60px -20px rgba(15,34,51,.5);
  display: flex; flex-direction: column;
  animation: lista-entra .25s cubic-bezier(.2,.8,.1,1);
}
.lista[hidden] { display: none; }
@keyframes lista-entra { from { transform: translateX(100%); } }
.lista-fundo { position: fixed; inset: 0; z-index: 9999; background: rgba(15,34,51,.5); }
.lista-fundo[hidden] { display: none; }
.lista__cab { position: relative; padding: 22px 20px 14px; border-bottom: 1px solid var(--azulejo); }
.lista__cab h2 { font-size: 30px; }
.lista__itens { list-style: none; margin: 0; padding: 8px 20px; overflow-y: auto; flex: 1; }
.lista__item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--azulejo); }
.lista__item img { width: 56px; height: 56px; object-fit: contain; border-radius: var(--raio); background: var(--papel); }
.lista__item-nome { font-weight: 700; font-size: 15px; line-height: 1.25; color: var(--tinta); }
.lista__item-marca { font-size: 13px; color: var(--texto-suave); }
.qtd { display: inline-flex; align-items: center; border: 1.5px solid var(--rejunte); border-radius: 999px; }
.qtd button { width: 32px; height: 32px; border: 0; background: transparent; font: inherit; font-size: 18px; cursor: pointer; color: var(--tinta); border-radius: 50%; }
.qtd button:hover { background: var(--azulejo); }
.qtd output { min-width: 22px; text-align: center; font-weight: 700; }
.lista__vazia { padding: 24px 20px; color: var(--texto-suave); margin: 0; }
.lista__rodape { padding: 16px 20px 20px; border-top: 1px solid var(--azulejo); display: grid; gap: 12px; }
.lista__obs { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--tinta); }
.lista__obs textarea { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: var(--raio); border: 1.5px solid var(--rejunte); resize: vertical; }
.lista__rodape .btn { justify-content: center; }
.lista__rodape .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.lista__limpar { justify-self: center; border: 0; background: none; color: var(--texto-suave); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }

@media (max-width: 960px) { .lista-btn span:first-of-type { display: none; } }
