:root {
  --tinta: #292d32;
  --tinta-2: #5c6168;
  --fundo: #f2f3f5;
  --branco: #fff;
  --linha: #dfe1e5;
  --r-g: 28px;
  --r-m: 20px;
  --r-p: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  font-family: -apple-system, "SF Pro Display", "SF Pro Text", BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--tinta);
  background: var(--branco);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

@view-transition { navigation: auto; }
::view-transition-group(foto) { animation-duration: .38s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }

* { box-sizing: border-box; }
html { scroll-padding-top: 12px; }
body { margin: 0; min-height: 100svh; line-height: 1.45; font-size: 16px; }
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, p, dl, dd, ul, fieldset { margin: 0; padding: 0; border: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--tinta); color: var(--branco); }
:focus-visible { outline: 2px solid var(--tinta); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

.icone { width: 20px; height: 20px; flex: none; fill: currentColor; }
.icone-linha { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Botão principal */
.cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 0 22px; border-radius: var(--r-m);
  background: var(--tinta); color: var(--branco);
  font-size: 16px; font-weight: 600; text-decoration: none; letter-spacing: -.005em;
  box-shadow: 0 8px 24px rgb(41 45 50 / .22);
  transition: transform .25s var(--ease), background-color .2s;
}
.cta:hover { background: #1c1f23; }
.cta:active { transform: scale(.98); }
.cta:focus-visible { outline-color: var(--tinta); outline-offset: 3px; }

/* Home */
.topo { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; max-width: 1360px; margin: auto; }
.marca { font-size: 19px; font-weight: 600; letter-spacing: -.025em; text-decoration: none; }
.intro { padding: 26px 20px 24px; max-width: 1360px; margin: auto; }
.intro h1 { font-size: clamp(36px, 10.4vw, 72px); line-height: 1.02; font-weight: 400; letter-spacing: -.035em; text-wrap: balance; max-width: 13em; }
.intro p { margin-top: 12px; color: var(--tinta-2); font-size: 17px; }

.vitrine { background: var(--fundo); border-radius: var(--r-g) var(--r-g) 0 0; padding: 16px 0 112px; }
.vitrine-miolo { max-width: 1360px; margin: auto; }

.cats { display: flex; gap: 10px; overflow-x: auto; padding: 4px 16px 6px; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: 16px; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; width: 82px; scroll-snap-align: start; text-align: center; font-size: 14px; color: var(--tinta); }
.cat span.cat-foto { display: block; aspect-ratio: 1; border-radius: var(--r-m); overflow: hidden; background: var(--branco); margin-bottom: 7px; box-shadow: 0 0 0 0 var(--tinta); transition: box-shadow .2s var(--ease); }
.cat img { width: 100%; height: 100%; object-fit: cover; }
.cat[aria-pressed="true"] span.cat-foto { box-shadow: 0 0 0 2px var(--fundo), 0 0 0 4px var(--tinta); }
.cat[aria-pressed="true"] { font-weight: 600; }

.tams { display: flex; align-items: center; gap: 8px; overflow-x: auto; padding: 14px 16px 6px; scrollbar-width: none; }
.tams::-webkit-scrollbar { display: none; }
.tam {
  flex: none; min-width: 48px; min-height: 42px; padding: 0 14px; border-radius: var(--r-p);
  background: var(--branco); font-size: 15px; font-variant-numeric: tabular-nums;
  transition: background-color .15s, color .15s;
}
.tam[aria-pressed="true"] { background: var(--tinta); color: var(--branco); font-weight: 500; }

.contagem { padding: 10px 20px 12px; color: var(--tinta-2); font-size: 14px; }

.grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 10px; padding: 0 16px; }
.card { text-decoration: none; display: block; }
.card-foto { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-m); overflow: hidden; background: #e6e7ea; }
.card-foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.card:hover .card-foto img { transform: scale(1.03); }
.card-tam {
  position: absolute; top: 8px; right: 8px; min-width: 34px; height: 30px; padding: 0 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--branco); border-radius: 10px; font-size: 13px; font-weight: 500;
}
.card h2 { font-size: 15px; font-weight: 400; line-height: 1.25; margin-top: 10px; letter-spacing: -.005em; }
.card-preco { margin-top: 3px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

.vazio { padding: 48px 20px; text-align: center; color: var(--tinta-2); }
.vazio button { display: inline-block; margin-top: 12px; min-height: 44px; padding: 0 18px; border-radius: var(--r-p); background: var(--branco); color: var(--tinta); font-weight: 500; }

.flutuante { position: fixed; z-index: 5; left: 16px; right: 16px; bottom: calc(14px + env(safe-area-inset-bottom)); max-width: 420px; margin: auto; }

/* Página da peça */
.peca { background: var(--branco); }
.galeria { position: relative; }
.trilho {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  aspect-ratio: 3 / 4; max-height: 74svh; width: 100%; background: #e6e7ea;
  -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.trilho::-webkit-scrollbar { display: none; }
.foto { flex: 0 0 100%; scroll-snap-align: center; scroll-snap-stop: always; }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto:first-child img { view-transition-name: foto; }

.voltar {
  position: absolute; z-index: 3; top: calc(12px + env(safe-area-inset-top)); left: 12px;
  width: 44px; height: 44px; border-radius: var(--r-p);
  display: flex; align-items: center; justify-content: center;
  background: var(--branco); text-decoration: none;
  box-shadow: 0 2px 10px rgb(41 45 50 / .14);
}
.contador {
  position: absolute; z-index: 3; top: calc(12px + env(safe-area-inset-top)); right: 12px;
  height: 32px; padding: 0 11px; border-radius: 10px; display: flex; align-items: center;
  background: var(--branco); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.pontos { position: absolute; z-index: 3; left: 0; right: 0; bottom: 40px; display: flex; justify-content: center; }
.ponto { width: 28px; height: 28px; display: grid; place-items: center; }
.ponto::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--branco); opacity: .55; box-shadow: 0 0 3px rgb(41 45 50 / .5); transition: opacity .2s, transform .3s var(--ease); }
.ponto[aria-current="true"]::before { opacity: 1; transform: scale(1.3); }
.seta {
  display: none; position: absolute; z-index: 3; top: 50%; translate: 0 -50%;
  width: 46px; height: 46px; border-radius: 50%; background: var(--branco);
  align-items: center; justify-content: center; box-shadow: 0 2px 10px rgb(41 45 50 / .14);
  transition: opacity .2s;
}
.seta[disabled] { opacity: 0; pointer-events: none; }
.seta-esq { left: 14px; }
.seta-dir { right: 14px; }

.painel {
  position: relative; z-index: 4; margin-top: -28px; padding: 22px 20px calc(16px + env(safe-area-inset-bottom));
  background: var(--fundo); border-radius: var(--r-g) var(--r-g) 0 0;
}
.etiquetas { display: flex; flex-wrap: wrap; gap: 8px; }
.etiqueta { display: flex; align-items: center; height: 36px; padding: 0 15px; border-radius: 18px; background: var(--branco); font-size: 15px; }
.peca h1 { margin-top: 16px; font-size: clamp(30px, 8.2vw, 44px); line-height: 1.08; font-weight: 400; letter-spacing: -.03em; text-wrap: balance; }
.preco { margin-top: 8px; font-size: 24px; font-weight: 600; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.descricao { margin-top: 14px; font-size: 17px; line-height: 1.45; color: #40444a; max-width: 62ch; text-wrap: pretty; }
.aviso { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-p); background: var(--branco); font-size: 15px; }

.escolha { margin-top: 22px; }
.escolha legend { padding: 0; font-size: 16px; margin-bottom: 8px; }
.escolha-op { display: flex; gap: 8px; }
.escolha label { position: relative; }
.escolha input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.escolha label span { display: grid; place-items: center; min-width: 58px; height: 44px; padding: 0 14px; border-radius: var(--r-p); background: var(--branco); font-size: 15px; transition: background-color .15s, color .15s; }
.escolha input:checked + span { background: var(--tinta); color: var(--branco); font-weight: 500; }
.escolha input:focus-visible + span { outline: 2px solid var(--tinta); outline-offset: 2px; }

.medidas { display: flex; gap: 16px; align-items: flex-start; margin-top: 22px; }
.medidas-dados { flex: 1; min-width: 0; }
.grupo + .grupo { margin-top: 16px; }
.grupo-titulo { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.linha { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--linha); font-size: 16px; }
.linha dt { color: var(--tinta-2); flex: none; }
.linha dd { text-align: right; font-variant-numeric: tabular-nums; }
.guias { flex: none; width: 96px; display: grid; gap: 8px; }
.guia { background: var(--branco); border-radius: var(--r-p); padding: 6px; }
.guia img { width: 100%; height: auto; }

.acao { position: sticky; z-index: 5; bottom: calc(12px + env(safe-area-inset-bottom)); margin-top: 22px; }
.nota { margin-top: 14px; font-size: 14px; color: var(--tinta-2); text-align: center; }

/* Telas maiores */
@media (min-width: 640px) {
  .grade { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 14px; padding: 0 24px; }
  .cats { padding-inline: 24px; }
  .tams { padding-inline: 24px; }
  .contagem { padding-inline: 26px; }
  .topo, .intro { padding-inline: 28px; }
  .cat { width: 104px; }
  .card h2 { font-size: 16px; }
}
@media (min-width: 1000px) {
  .grade { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .peca-miolo { display: grid; grid-template-columns: minmax(0, min(52vw, calc((100svh - 48px) * .75))) minmax(380px, 520px); justify-content: center; gap: 48px; padding: 24px; align-items: start; }
  .galeria { position: sticky; top: 24px; }
  .trilho { border-radius: var(--r-g); max-height: calc(100svh - 48px); }
  .pontos { bottom: 12px; }
  .seta { display: flex; }
  .painel { margin: 0; padding: 28px; border-radius: var(--r-g); }
  .peca h1 { font-size: 44px; }
  .acao { position: static; }
}
@media (min-width: 1360px) { .grade { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
