:root {
  --tinta: #141311;
  --tinta-2: #2a2825;
  --papel: #f5f2ec;
  --cartao: #ffffff;
  --texto: #1c1b19;
  --suave: #6d675e;
  --linha: #e3ddd2;
  --couro: #a8742f;
  --couro-claro: #f3e6cf;
  --whats: #1c9e52;
  --whats-escuro: #15803f;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(20, 19, 17, .06), 0 6px 20px rgba(20, 19, 17, .06);
  --titulo: "Oswald", "Arial Narrow", sans-serif;
  --corpo: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --topo-h: 112px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topo-h) + 8px); }
body {
  margin: 0;
  background: var(--papel);
  color: var(--texto);
  font: 400 15px/1.5 var(--corpo);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--titulo); font-weight: 600; letter-spacing: .01em; line-height: 1.1; margin: 0; text-transform: uppercase; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pular { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
.pular:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--couro); outline-offset: 2px; }

/* ------------------------------------------------------------ topo */
.topo {
  position: sticky; top: 0; z-index: 20;
  background: var(--tinta);
  color: #fff;
  padding-top: env(safe-area-inset-top);
}
.topo-linha {
  display: flex; align-items: center; gap: 10px;
  max-width: 1240px; margin: 0 auto; padding: 10px 16px 8px;
}
.marca { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; flex: none; }
.marca img { width: 40px; height: 40px; border-radius: 50%; }
.marca-texto { display: none; line-height: 1; }
.marca-texto b { display: block; font: 600 19px/1 var(--titulo); text-transform: uppercase; letter-spacing: .03em; }
.marca-texto small { font: 500 11px/1 var(--corpo); letter-spacing: .14em; text-transform: uppercase; color: #bdb6aa; }
.busca {
  flex: 1; min-width: 0; position: relative; display: flex; align-items: center;
}
.busca svg { position: absolute; left: 12px; width: 18px; height: 18px; fill: #9a9388; pointer-events: none; }
.busca input {
  width: 100%; height: 42px; border: 0; border-radius: 999px;
  background: var(--tinta-2); color: #fff; padding: 0 14px 0 38px;
  outline: none; transition: background .15s;
}
.busca input::placeholder { color: #9a9388; }
.busca input:focus { background: #3a3733; box-shadow: 0 0 0 2px var(--couro); }
.bt-lista {
  flex: none; position: relative; width: 42px; height: 42px; border-radius: 50%;
  border: 0; background: var(--tinta-2); display: grid; place-items: center;
}
.bt-lista svg { width: 20px; height: 20px; fill: #fff; }
.contador {
  position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--couro); color: #fff;
  font: 600 11px/20px var(--corpo); text-align: center;
}
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  max-width: 1240px; margin: 0 auto; padding: 4px 16px 12px;
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start;
  border: 1px solid #3d3a35; background: transparent; color: #e9e4db;
  height: 34px; padding: 0 14px; border-radius: 999px;
  font: 500 13px/1 var(--corpo); white-space: nowrap;
}
.chip[aria-pressed="true"] { background: #fff; color: var(--tinta); border-color: #fff; }
.chip small { color: #9a9388; font-weight: 500; margin-left: 4px; }
.chip[aria-pressed="true"] small { color: var(--suave); }

/* ------------------------------------------------------------ hero */
.hero { position: relative; overflow: hidden; background: var(--tinta); color: #fff; }
.hero img { width: 100%; height: min(78vw, 460px); object-fit: cover; object-position: center 60%; opacity: .92; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,19,17,0) 25%, rgba(20,19,17,.88) 100%);
}
.hero-texto {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  max-width: 1240px; margin: 0 auto; padding: 0 16px 22px;
}
.hero h1 { font-size: clamp(30px, 8.5vw, 56px); font-weight: 700; max-width: 12ch; }
.hero-texto > p:last-child { margin: 10px 0 0; max-width: 46ch; color: #e8e2d8; font-size: 15px; }
.sobretitulo {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font: 600 11px/1 var(--corpo); letter-spacing: .12em; text-transform: uppercase; color: #f0d9b0;
}
.sobretitulo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5bd08a; box-shadow: 0 0 0 4px rgba(91,208,138,.2); }

/* ------------------------------------------------------------ seções */
main { max-width: 1240px; margin: 0 auto; padding-bottom: 96px; }
.faixa { padding: 26px 0 6px; }
.secao-topo {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 0 16px 12px;
}
.secao-topo h2 { font-size: 22px; }
.secao-topo h2 small { font: 500 13px var(--corpo); color: var(--suave); text-transform: none; margin-left: 6px; letter-spacing: 0; }
.link { border: 0; background: none; padding: 4px 0; color: var(--couro); font-weight: 600; font-size: 14px; }
.trilho {
  display: grid; grid-auto-flow: column; grid-auto-columns: 44%;
  gap: 12px; overflow-x: auto; padding: 0 16px 8px; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.trilho::-webkit-scrollbar { display: none; }
.trilho .card { scroll-snap-align: start; }
.bloco { padding-top: 26px; }
.grade {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; padding: 0 16px;
}
.filtros {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 18px 16px 0;
}
.resultado { margin: 0; color: var(--suave); font-size: 14px; }
.resultado b { color: var(--texto); }
.filtro-tamanho { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--suave); }
.filtro-tamanho select {
  height: 38px; border: 1px solid var(--linha); border-radius: 10px; background: var(--cartao);
  padding: 0 32px 0 12px; appearance: none; color: var(--texto); font-weight: 500;
  background-image: linear-gradient(45deg, transparent 50%, var(--suave) 50%), linear-gradient(135deg, var(--suave) 50%, transparent 50%);
  background-position: calc(100% - 17px) 16px, calc(100% - 12px) 16px; background-size: 5px 5px; background-repeat: no-repeat;
}
.vazio { text-align: center; color: var(--suave); padding: 48px 16px; }

/* ------------------------------------------------------------ card */
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--cartao); border-radius: var(--raio); overflow: hidden;
  border: 1px solid var(--linha); text-align: left; padding: 0; color: inherit; text-decoration: none;
  transition: transform .15s, box-shadow .15s;
}
.card:hover { box-shadow: var(--sombra); }
.card:active { transform: scale(.985); }
.card-foto { position: relative; aspect-ratio: 1; background: #fff; }
.card-foto img { width: 100%; height: 100%; object-fit: contain; }
.codigo {
  position: absolute; top: 0; right: 0; z-index: 1;
  width: 74px; height: 74px; pointer-events: none;
  background: linear-gradient(225deg, var(--tinta) 50%, transparent 50%);
}
.codigo span {
  position: absolute; top: 9px; right: 6px; width: 60px; text-align: right;
  font: 600 11px/1 var(--titulo); letter-spacing: .02em; color: #fff;
}
.selos { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 6px; }
.selo {
  font: 600 10px/1 var(--corpo); letter-spacing: .08em; text-transform: uppercase;
  padding: 5px 7px; border-radius: 6px; background: var(--tinta); color: #fff;
}
.selo-novo { background: var(--couro); }
.selo-ca { background: #fff; color: var(--tinta); border: 1px solid var(--linha); }
.card-info { padding: 10px 12px 12px; display: grid; gap: 4px; }
.card-nome {
  font-weight: 600; font-size: 14px; line-height: 1.3; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { font-size: 12.5px; color: var(--suave); margin: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.card-meta span + span::before { content: "·"; margin-right: 8px; color: #b9b2a6; }

/* ------------------------------------------------------------ folhas (dialog) */
.folha {
  border: 0; padding: 0; margin: 0; max-width: none; max-height: none;
  width: 100%; height: 100%; background: var(--papel); color: var(--texto);
}
.folha::backdrop { background: rgba(20, 19, 17, .55); }
.folha[open] { animation: subir .22s ease-out; }
@keyframes subir { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.folha-corpo:focus { outline: none; }
.folha-corpo { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.folha-barra {
  position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px; pointer-events: none;
}
.bt-redondo {
  pointer-events: auto; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.94); box-shadow: 0 2px 10px rgba(0,0,0,.12);
  display: grid; place-items: center;
}
.bt-redondo svg { width: 20px; height: 20px; fill: var(--tinta); }

.galeria { position: relative; margin-top: -62px; background: #fff; }
.galeria-trilho {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.galeria-trilho::-webkit-scrollbar { display: none; }
.galeria-trilho img { flex: none; width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; scroll-snap-align: center; background: #fff; }
.pontos { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.pontos i { width: 7px; height: 7px; border-radius: 50%; background: #d4cec4; transition: background .2s, width .2s; }
.pontos i.ativo { background: var(--tinta); width: 18px; border-radius: 4px; }
.miniaturas { display: none; }

.produto-info { padding: 18px 16px 0; display: grid; gap: 18px; }
.produto-cabeca .sku { font: 600 12px/1 var(--corpo); letter-spacing: .1em; color: var(--suave); text-transform: uppercase; margin: 0 0 8px; }
.produto-cabeca h2 { font-size: 28px; }
.produto-cabeca .linha-prod { margin: 8px 0 0; color: var(--suave); font-size: 14px; }
.rotulo { font: 600 12px/1 var(--corpo); letter-spacing: .1em; text-transform: uppercase; color: var(--suave); margin: 0 0 10px; display: flex; justify-content: space-between; }
.rotulo b { color: var(--texto); letter-spacing: 0; text-transform: none; font-size: 13px; }
.cores { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.cores::-webkit-scrollbar { display: none; }
.cor {
  flex: none; width: 72px; border: 1px solid var(--linha); border-radius: 12px; background: #fff;
  padding: 0 0 6px; overflow: hidden; text-align: center; color: var(--texto);
}
.cor img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.cor span { display: block; font-size: 11px; line-height: 1.2; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cor[aria-current="true"] { border-color: var(--tinta); box-shadow: 0 0 0 1px var(--tinta); }
.tamanhos { display: flex; flex-wrap: wrap; gap: 8px; }
.tam {
  min-width: 48px; height: 44px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--linha); background: #fff; font-weight: 600; font-size: 15px;
}
.tam[aria-pressed="true"] { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.nota { margin: 0; font-size: 13px; color: var(--suave); display: flex; gap: 8px; align-items: flex-start; }
.nota svg { flex: none; width: 16px; height: 16px; margin-top: 2px; fill: var(--couro); }
.descricao { background: var(--cartao); border: 1px solid var(--linha); border-radius: var(--raio); padding: 16px; font-size: 14px; }
.descricao h3 { font-size: 15px; margin: 14px 0 8px; }
.descricao h3:first-child { margin-top: 0; }
.descricao p { margin: 0 0 8px; color: #3b3833; }
.descricao dl { margin: 0 0 8px; display: grid; gap: 6px; }
.descricao dl div { display: grid; grid-template-columns: minmax(96px, 36%) 1fr; gap: 10px; padding-bottom: 6px; border-bottom: 1px solid #f0ebe3; }
.descricao dt { color: var(--suave); }
.descricao dd { margin: 0; font-weight: 500; }

.acoes {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4;
  display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(245,242,236,0), var(--papel) 28%);
}
.bt {
  height: 52px; border-radius: 14px; border: 0; padding: 0 18px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; text-decoration: none;
}
.bt svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.bt-whats { flex: 1; background: var(--whats); color: #fff; }
.bt-whats:hover { background: var(--whats-escuro); }
.bt-sec { background: #fff; color: var(--tinta); border: 1px solid var(--linha); }
.bt-sec[aria-pressed="true"] { background: var(--couro-claro); border-color: #e2c99c; }
.bt-sec.icone { width: 52px; padding: 0; }

/* lista */
.folha-lateral .folha-corpo { padding: 0 0 calc(110px + env(safe-area-inset-bottom)); }
.lista-cabeca {
  position: sticky; top: 0; z-index: 2; background: var(--papel);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 12px; border-bottom: 1px solid var(--linha);
}
.lista-cabeca h2 { font-size: 22px; }
.lista-cabeca .bt-redondo { box-shadow: none; border: 1px solid var(--linha); }
.lista-itens { list-style: none; margin: 0; padding: 8px 16px; display: grid; gap: 10px; }
.item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; align-items: center;
  background: #fff; border: 1px solid var(--linha); border-radius: 12px; padding: 8px;
}
.item img { width: 72px; height: 72px; object-fit: contain; border-radius: 8px; }
.item p { margin: 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
.item small { display: block; color: var(--suave); font-size: 12px; margin-top: 2px; }
.item select { margin-top: 6px; height: 32px; border: 1px solid var(--linha); border-radius: 8px; background: var(--papel); padding: 0 8px; font-size: 13px; }
.remover { border: 0; background: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; }
.remover svg { width: 18px; height: 18px; fill: var(--suave); }
.lista-vazia { padding: 40px 24px; text-align: center; color: var(--suave); }
.lista-vazia strong { display: block; color: var(--texto); font-size: 16px; margin-bottom: 6px; }

/* ------------------------------------------------------------ rodapé, fab, aviso */
.rodape { background: var(--tinta); color: #cfc8bc; padding: 32px 16px calc(100px + env(safe-area-inset-bottom)); font-size: 14px; }
.rodape-dentro { max-width: 1240px; margin: 0 auto; display: grid; gap: 14px; }
.rodape h2 { color: #fff; font-size: 20px; }
.rodape p { margin: 0; }
.rodape a { color: #fff; }
.rodape .fino { color: #8f887c; font-size: 12.5px; }
.fab-whats {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 15;
  display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px 0 14px;
  border-radius: 999px; background: var(--whats); color: #fff; text-decoration: none;
  font-weight: 600; font-size: 14px; box-shadow: 0 6px 20px rgba(21, 128, 63, .35);
}
.fab-whats svg { width: 24px; height: 24px; fill: #fff; }
.aviso {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--tinta); color: #fff; padding: 10px 16px; border-radius: 999px;
  font-size: 14px; font-weight: 500; transition: opacity .2s, transform .2s; white-space: nowrap;
}
.aviso.mostrar { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------ telas maiores */
@media (min-width: 600px) {
  .grade { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .trilho { grid-auto-columns: 29%; }
  .marca-texto { display: block; }
}
@media (min-width: 900px) {
  :root { --topo-h: 118px; }
  .topo-linha { padding: 12px 24px 10px; gap: 20px; }
  .busca { max-width: 520px; margin-left: auto; }
  .chips { padding: 4px 24px 14px; }
  .grade { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding: 0 24px; }
  .secao-topo, .filtros { padding-left: 24px; padding-right: 24px; }
  .trilho { grid-auto-columns: calc((100% - 48px - 48px) / 4.3); padding: 0 24px 8px; gap: 16px; }
  .hero img { height: auto; aspect-ratio: 2000 / 618; object-position: center; }
  .hero::after { background: linear-gradient(90deg, rgba(20,19,17,.82) 0%, rgba(20,19,17,.45) 42%, rgba(20,19,17,0) 70%); }
  .hero-texto { padding: 0 24px 34px; }
  .hero h1 { max-width: none; font-size: 50px; }
  .card-nome { font-size: 15px; }

  .folha { width: min(1040px, calc(100% - 48px)); height: min(720px, calc(100% - 48px)); margin: auto; border-radius: 20px; overflow: hidden; }
  .folha-lateral { width: 440px; height: 100%; margin: 0 0 0 auto; border-radius: 0; }
  .folha[open] { animation: aparecer .18s ease-out; }
  @keyframes aparecer { from { transform: scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
  .produto-layout { display: grid; grid-template-columns: 1.05fr 1fr; height: 100%; }
  #dialog-produto .folha-corpo { overflow: hidden; padding: 0; }
  .produto-layout .galeria { margin: 0; height: 100%; display: flex; flex-direction: column; }
  .produto-layout .galeria-trilho { flex: 1; }
  .produto-layout .galeria-trilho img { height: 100%; aspect-ratio: auto; }
  .produto-layout .pontos { display: none; }
  .miniaturas { display: flex; gap: 8px; padding: 12px; justify-content: center; border-top: 1px solid var(--linha); }
  .miniaturas button { width: 60px; height: 60px; border: 1px solid var(--linha); border-radius: 10px; background: #fff; padding: 2px; }
  .miniaturas button[aria-current="true"] { border-color: var(--tinta); }
  .miniaturas img { width: 100%; height: 100%; object-fit: contain; }
  #dialog-produto .folha-barra { position: absolute; top: 0; right: 0; left: auto; padding: 14px 16px; }
  .produto-lado { overflow-y: auto; position: relative; display: flex; flex-direction: column; }
  .produto-lado .produto-info { padding: 72px 32px 8px; flex: 1; }
  .produto-layout .acoes, .folha-lateral .acoes { position: sticky; background: linear-gradient(180deg, rgba(245,242,236,0), var(--papel) 24%); padding: 16px 32px 20px; }
  .folha-lateral .acoes { padding: 16px; }
  .fab-whats { right: 24px; bottom: 24px; }
}
@media (min-width: 1200px) {
  .grade { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
