/* CASA3D — base comum. Cada conceito define as variáveis de cor no :root dele. */
:root {
  --bg: #fbfaf7; --fg: #15171a; --muted: #5d6168; --line: rgba(21,23,26,.12); --card: #ffffff;
  --accent: #ff5a0a; --on-accent: #15171a; --wa: #1fd28a; --on-wa: #0b1a12;
  --font-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --font-texto: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Martian Mono", ui-monospace, Consolas, monospace;
  --mola: cubic-bezier(.34,1.56,.64,1);
  --suave: cubic-bezier(.22,1,.36,1);
  --lado: max(clamp(20px, 3.5vw, 56px), env(safe-area-inset-left, 0px));
  --ladoD: max(clamp(20px, 3.5vw, 56px), env(safe-area-inset-right, 0px));
  --topo: calc(72px + env(safe-area-inset-top, 0px));
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--topo); }
/* trava sem mexer no overflow da página: nada de barra sumindo nem pulo */
.lj-prod, .lj-gav__itens { overscroll-behavior: contain; scrollbar-width: none; }
.lj-prod::-webkit-scrollbar, .lj-gav__itens::-webkit-scrollbar { display: none; }
.lj-veu { touch-action: none; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.55 var(--font-texto); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button { font-family: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* topo comum */
.topo { position: fixed; inset: 0 0 auto 0; z-index: 30; height: var(--topo); display: flex; align-items: center; gap: 28px; padding: env(safe-area-inset-top, 0px) var(--ladoD) 0 var(--lado); transition: transform .5s var(--suave), background .3s; }
.topo.some { transform: translateY(-100%); }
.topo__marca { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 17px/1 var(--font-display); letter-spacing: .02em; }
.topo__marca img { width: 40px; height: auto; }
.topo__nav { display: flex; gap: 28px; margin-left: auto; font: 600 14px/1 var(--font-texto); }
.topo__nav a { text-decoration: none; opacity: .75; transition: opacity .2s; }
.topo__nav a:hover { opacity: 1; }
.sacola { position: relative; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; border: 1px solid var(--line); background: var(--card); color: var(--fg); transition: transform .3s var(--mola); flex: none; }
.sacola:hover { transform: scale(1.06); }
.sacola__n { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 600 10px/1 var(--font-mono); }
.sacola.pula { animation: lj-pula .6s var(--mola); }
@keyframes lj-pula { 30% { transform: scale(1.3) rotate(-10deg); } }
@media (max-width: 720px) { .topo__nav { display: none; } .topo .sacola { margin-left: auto; } }

/* textos utilitários */
.lj-eti { margin: 0; font: 600 10.5px/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lj-spec { margin: 0; font: 400 12px/1.4 var(--font-mono); color: var(--muted); }
.lj-preco { margin: 0; font: 700 20px/1.1 var(--font-display); }

/* botões */
.lj-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 26px; border: 0; border-radius: 99px; cursor: pointer; text-decoration: none; white-space: nowrap;
  font: 700 15px/1 var(--font-texto); background: var(--accent); color: var(--on-accent); transition: transform .35s var(--mola), filter .2s; -webkit-tap-highlight-color: transparent; }
.lj-btn:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.05); }
.lj-btn:active { transform: scale(.97); }
.lj-btn--wa { background: var(--wa); color: var(--on-wa); }
.lj-btn--linha { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px currentColor; }

/* filtros */
.lj-filtros { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 8px; }
.lj-filtros::-webkit-scrollbar { display: none; }
.lj-filtro { flex: none; height: 42px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line); background: transparent; cursor: pointer; font: 600 14px/1 var(--font-texto); transition: background .25s, color .25s, border-color .25s; }
.lj-filtro span { margin-left: 8px; font: 500 10px/1 var(--font-mono); opacity: .55; }
.lj-filtro[aria-selected="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* grade e cartões */
.lj-grade { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; transition: opacity .2s; }
.lj-grade.troca { opacity: 0; }
.lj-card { display: flex; flex-direction: column; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; min-width: 0; -webkit-tap-highlight-color: transparent; }
.lj-card__foto { position: relative; aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #fff; }
.lj-card__foto::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.lj-card__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--suave); }
@media (hover: hover) { .lj-card:hover .lj-card__foto img { transform: scale(1.09); } }
.lj-card__corpo { display: flex; flex-direction: column; gap: 6px; padding: 14px 2px 0; }
.lj-card__nome { font: 700 15px/1.3 var(--font-texto); }
.lj-card__pe { display: flex; align-items: center; gap: 8px; }
.lj-card__cor { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px var(--line); }
.js .lj-card { opacity: 0; transform: translateY(36px); transition: opacity .7s var(--suave), transform .9s var(--suave); transition-delay: calc(mod(var(--k), 4) * 70ms); }
.js .lj-card.vis { opacity: 1; transform: none; }
@media (max-width: 900px) { .lj-grade { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } .js .lj-card { transition-delay: calc(mod(var(--k), 2) * 70ms); } }
@media (max-width: 480px) { .lj-card__nome { font-size: 13.5px; } .lj-card__foto { border-radius: 14px; } }

/* revelação genérica */
.js .rev { opacity: 0; transform: translateY(40px); transition: opacity .8s var(--suave), transform 1s var(--suave); }
.js .rev.vis { opacity: 1; transform: none; }

/* véu, produto e gaveta */
.lj-veu { position: fixed; inset: 0; z-index: 40; background: rgba(10,11,13,.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: lj-fade .3s ease both; }
@keyframes lj-fade { from { opacity: 0; } }
.lj-x { position: absolute; top: 14px; right: 14px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.9); color: #15171a; font-size: 16px; cursor: pointer; transition: transform .3s var(--mola); }
.lj-x:hover { transform: rotate(90deg); }
.lj-x--rel { position: static; background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.lj-prod { position: fixed; z-index: 50; left: 50%; top: 50%; width: min(940px, calc(100% - 32px)); max-height: calc(100svh - 48px); overflow: auto; translate: -50% -50%;
  display: grid; grid-template-columns: 1.1fr 1fr; background: var(--card); color: var(--fg); border-radius: 28px; box-shadow: 0 30px 80px rgba(0,0,0,.35); animation: lj-entra .6s var(--mola) both; }
@keyframes lj-entra { from { transform: translateY(50px) scale(.94); opacity: 0; } }
.lj-prod__foto { aspect-ratio: 1; overflow: hidden; background: #fff; cursor: zoom-in; }
.lj-prod__foto img { width: 100%; height: 100%; object-fit: cover; transform-origin: var(--ox, 50%) var(--oy, 50%); transition: transform .3s ease-out; }
@media (hover: hover) and (pointer: fine) { .lj-prod__foto:hover img { transform: scale(1.9); } }
@media (hover: none) { .lj-prod__foto { cursor: default; touch-action: pan-y; } .lj-prod__foto img { transform-origin: 50% 50%; } }
.lj-prod__info { display: flex; flex-direction: column; gap: 12px; padding: 56px 36px 36px; }
.lj-prod__info .lj-eti::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 8px; vertical-align: -1px; }
.lj-prod__nome { margin: 0; font: 700 clamp(24px, 3vw, 34px)/1.08 var(--font-display); text-wrap: balance; }
.lj-prod__acao { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: auto; padding-top: 24px; }
.lj-qtd { display: inline-flex; align-items: center; height: 48px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line); flex: none; }
.lj-qtd button { width: 44px; height: 100%; border: 0; background: none; font: 700 18px/1 var(--font-texto); cursor: pointer; }
.lj-qtd output { min-width: 24px; text-align: center; font: 600 14px/1 var(--font-mono); font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .lj-prod { left: 0; right: 0; top: auto; bottom: 0; width: 100%; translate: none; grid-template-columns: 1fr; border-radius: 26px 26px 0 0; max-height: 92svh; animation: lj-sobe .5s var(--suave) both; }
  @keyframes lj-sobe { from { transform: translateY(100%); } }
  .lj-prod__foto { aspect-ratio: 5/4; }
  .lj-prod__info { padding: 22px 20px calc(22px + env(safe-area-inset-bottom, 0px)); }
  .lj-prod__acao .lj-btn { flex: 1; }
}

.lj-gav { position: fixed; z-index: 60; top: 0; right: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--card); color: var(--fg);
  padding: calc(20px + env(safe-area-inset-top, 0px)) var(--ladoD) calc(20px + env(safe-area-inset-bottom, 0px)) 24px; box-shadow: -20px 0 60px rgba(0,0,0,.25); animation: lj-gav .5s var(--suave) both; }
@keyframes lj-gav { from { transform: translateX(100%); } }
.lj-gav.fecha { animation: lj-gavSai .28s ease-in both; }
@keyframes lj-gavSai { to { transform: translateX(100%); } }
.lj-gav__cab { display: flex; align-items: center; justify-content: space-between; padding-bottom: 12px; }
.lj-gav__cab h2 { margin: 0; font: 700 24px/1 var(--font-display); }
.lj-gav__itens { flex: 1; overflow-y: auto; }
.lj-gav__pe { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.lj-gav__pe .lj-btn { width: 100%; }
.lj-total { display: flex; justify-content: space-between; align-items: baseline; }
.lj-total span { font: 600 11px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lj-total strong { font: 700 20px/1 var(--font-display); }
.lj-nota { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.lj-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); animation: lj-item .5s var(--suave) both; }
@keyframes lj-item { from { transform: translateX(24px); opacity: 0; } }
.lj-item img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: #fff; }
.lj-item__nome { margin: 0 0 2px; font: 700 14px/1.3 var(--font-texto); }
.lj-item .lj-qtd { height: 40px; }
.lj-item .lj-qtd button { width: 34px; }
.lj-tira { margin-top: 4px; padding: 0; border: 0; background: none; font: 500 11px/1 var(--font-mono); color: var(--muted); text-decoration: underline; cursor: pointer; }
.lj-vazio { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 80px 0; color: var(--muted); text-align: center; }
.lj-voo { position: fixed; z-index: 70; border-radius: 50%; overflow: hidden; pointer-events: none; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.lj-voo img { width: 100%; height: 100%; object-fit: cover; }
.lj-aviso { position: fixed; z-index: 80; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; max-width: calc(100% - 32px);
  padding: 13px 20px; border-radius: 99px; background: var(--fg); color: var(--bg); font: 600 14px/1.2 var(--font-texto); box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: lj-aviso .5s var(--mola) both; }
@keyframes lj-aviso { from { transform: translateY(90px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js .rev, .js .lj-card { opacity: 1; transform: none; }
}

/* dica de pinça no celular */
.lj-prod__foto { position: relative; }
.lj-pinca { position: absolute; inset: 0; display: none; place-items: center; pointer-events: none; z-index: 3; }
.lj-pinca.on { display: grid; animation: lj-fade .4s ease both .5s; }
.lj-pinca.some { opacity: 0; transition: opacity .4s; }
.lj-pinca__seta { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(20,21,24,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lj-pinca__seta::before { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; border: solid #fff; border-width: 3px 3px 0 0; translate: -65% -35%; }
.lj-pinca__seta--a { animation: lj-pincaA 1.4s cubic-bezier(.45,0,.25,1) infinite; }
.lj-pinca__seta--b { animation: lj-pincaB 1.4s cubic-bezier(.45,0,.25,1) infinite; }
.lj-pinca__seta--b::before { rotate: 180deg; translate: -35% -65%; }
@keyframes lj-pincaA { 0%, 15% { transform: translate(-14px, 14px); } 60%, 100% { transform: translate(52px, -52px); } }
@keyframes lj-pincaB { 0%, 15% { transform: translate(14px, -14px); } 60%, 100% { transform: translate(-52px, 52px); } }
.lj-pinca__txt { position: absolute; bottom: 14px; left: 50%; translate: -50% 0; white-space: nowrap; padding: 8px 14px; border-radius: 99px; background: rgba(20,21,24,.72); color: #fff; font: 600 12px/1 var(--font-texto); }
