/* =========================================================
   Tutu 3D Studio, tema tutu3d-vitrine 0.1.0
   Depende de tokens.css v2.6.1 (D-038). Mobile first.
   Linguagem de movimento: "peça por peça" (encaixe, --ease-snap)
   e "camada por camada" (impressão, --ease-print).
   ========================================================= */

:root {
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --bar-h: 64px;
  --bar-h-small: 56px;
  --gutter: 16px;
  --plate-line: rgba(255, 255, 255, .07);
  --sheet-radius: 24px;
}
@media (min-width: 768px) {
  :root { --gutter: 32px; --bar-h: 72px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
:root { color-scheme: dark; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h-small) + 72px);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--font-body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: 1.04;
  letter-spacing: -.02em;
}
p { margin: 0; }

.wrap { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -120px; z-index: 200;
  padding: 12px 16px; border-radius: var(--radius-button);
  background: var(--color-lime); color: #000; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 8px; }

.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linejoin: round; stroke-linecap: round;
}
.icon--sm { width: 18px; height: 18px; }
.cube { aspect-ratio: 85 / 122; height: auto; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow::before {
  content: ""; width: 10px; height: 10px;
  background: var(--dot, var(--color-lime));
  border-radius: 0 0 4px 0;
}
.h2 { font-size: clamp(34px, 8vw, 60px); font-weight: 800; }
.lead { color: var(--text-muted); font-size: clamp(16px, 2.2vw, 19px); max-width: 52ch; }
.section { padding-block: clamp(72px, 11vw, 128px); }
.section__head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 44px); }

/* ---------- Botões ---------- */
.btn {
  --b: var(--color-lime); --f: #000;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px;
  border: 2px solid var(--b); border-radius: var(--radius-button);
  background: var(--b); color: var(--f);
  font: 700 16px/1 var(--font-display); text-decoration: none; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-snap),
              background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn--ghost { --b: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .08); color: var(--text-strong); } /* 0.9.1: mais contraste */
.btn--ghost:hover { --b: var(--color-cyan); }
.btn--cyan { --b: var(--color-cyan); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; flex: none;
  border: 1px solid var(--border); border-radius: var(--radius-button);
  background: var(--bg-raised); color: var(--text-strong); cursor: pointer; text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-snap), border-color var(--dur-fast);
}
.icon-btn:hover { border-color: var(--color-cyan); }
.icon-btn:active { transform: scale(.92); }

/* ---------- Sticker oficial (D-038): chapado, linha 3 px preta, recorte 9 px branco ---------- */
.sticker {
  --s: var(--color-lime);
  display: inline-flex; align-items: center; gap: 8px;
  margin: var(--stroke-cut);
  padding: 10px 16px;
  background: var(--s); color: #000;
  font: 800 18px/1 var(--font-display);
  border: var(--stroke-line) solid #000;
  outline: var(--stroke-cut) solid #fff;
  border-radius: var(--radius-button);
}
.sticker .icon { stroke: #000; }

/* Etiquetas pequenas de interface (não são stickers) */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 8px; border-radius: var(--radius-sm);
  background: #000; color: #fff;
  font: 700 11px/1 var(--font-mono); letter-spacing: .04em;
}
.tag--ready { background: var(--color-success); color: #000; }
.tag--age { background: #fff; color: #000; }
.tag--gift { background: #000; color: var(--color-lime); }

/* ---------- Faixa de prévia (só no protótipo) ---------- */
.demo-flag {
  padding: 8px var(--gutter); text-align: center;
  background: var(--color-warning); color: #000;
  font: 600 12px/1.3 var(--font-mono);
}

/* ---------- Barra superior ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  display: flex; align-items: center; gap: 12px;
  height: var(--bar-h); padding-inline: var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: height var(--dur-base) var(--ease-out), border-color var(--dur-base);
}
.topbar.is-scrolled { height: var(--bar-h-small); border-bottom-color: var(--border); }
.topbar__logo { display: block; text-decoration: none; border-radius: var(--radius-sm); }
.topbar__logo svg { height: 32px; width: auto; transition: height var(--dur-base) var(--ease-out); }
.topbar.is-scrolled .topbar__logo svg { height: 26px; }
.topbar__nav { display: none; gap: 2px; margin-inline: auto; }
.topbar__nav a {
  padding: 10px 14px; border-radius: var(--radius-button);
  color: var(--text-muted); text-decoration: none; font-weight: 500;
  transition: color var(--dur-fast), background-color var(--dur-fast);
}
.topbar__nav a:hover, .topbar__nav a[aria-current="true"] { color: var(--text-strong); background: var(--bg-raised); }
.bag-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
  min-height: 44px; padding: 0 12px 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius-button);
  background: var(--bg-raised); color: var(--text-strong);
  font-weight: 600; cursor: pointer;
  transition: border-color var(--dur-fast);
}
.bag-btn:hover { border-color: var(--color-lime); }
.bag-btn__label { display: none; }
.bag-btn__count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--color-lime); color: #000;
  font: 700 12px/24px var(--font-mono); text-align: center;
}
@media (min-width: 900px) {
  .topbar__nav { display: flex; }
  .bag-btn { margin-left: 0; }
  .bag-btn__label { display: inline; }
}

/* ---------- Topo (hero) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; align-items: center;
  min-height: calc(100svh - var(--bar-h));
  padding-block: 40px 88px;
}
.hero__plate {
  position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--plate-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--plate-line) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 42%, #000 35%, transparent 78%);
          mask-image: radial-gradient(ellipse 85% 70% at 50% 42%, #000 35%, transparent 78%);
}
/* Linha do bico: sobe uma vez, como a impressora fazendo as camadas */
.hero__nozzle {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: -1;
  height: 2px; background: var(--color-cyan);
  opacity: 0; pointer-events: none;
}
.js .hero__nozzle { animation: nozzle 1.6s var(--ease-out) .9s forwards; }
@keyframes nozzle {
  0% { opacity: .9; transform: translateY(0); }
  85% { opacity: .9; }
  100% { opacity: 0; transform: translateY(calc(-1 * (100svh - var(--bar-h)) + 40px)); }
}
.hero__inner { display: grid; gap: 22px; justify-items: start; }
.hero__logo { width: min(100%, 540px); height: auto; overflow: visible; margin-left: -4px; }
.hero__logo .pc { transform-box: fill-box; }
.js .hero__logo .pc {
  opacity: 0;
  transform: translate(var(--x), var(--y));
  animation: piece .64s var(--ease-snap) forwards;
  animation-delay: calc(var(--i) * 85ms + 120ms);
}
.js .hero__logo .logo-sub,
.js .hero__logo .logo-cube { opacity: 0; animation: fade .45s var(--ease-out) forwards; animation-delay: .82s; }
.js .hero__logo .logo-cube + .logo-cube { animation-delay: .9s; }
@keyframes piece { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }

.hero__concept {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 13px/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--color-cyan);
}
.hero__concept svg { width: 18px; height: auto; }
.hero__title { font-size: clamp(46px, 13vw, 112px); font-weight: 800; letter-spacing: -.035em; }
.hero__title .print { display: inline-block; }
.js .hero__title .print {
  clip-path: inset(100% 0 0 0);
  animation: print var(--dur-print) var(--ease-print) forwards;
  animation-delay: calc(1s + var(--i) * 180ms);
}
@keyframes print { to { clip-path: inset(0 0 0 0); } }
.hero__title .dot { color: var(--color-lime); }
.js .hero__lead, .js .hero__ctas, .js .hero__facts {
  opacity: 0; transform: translateY(16px);
  animation: rise .6s var(--ease-out) forwards;
}
.js .hero__lead { animation-delay: 1.75s; }
.js .hero__ctas { animation-delay: 1.9s; }
.js .hero__facts { animation-delay: 2.05s; }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__facts {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  margin: 6px 0 0; padding: 0; list-style: none;
  font: 500 13px/1.4 var(--font-mono); color: var(--text-muted);
}
.hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero__facts li::before { content: ""; width: 8px; height: 8px; background: var(--c); border-radius: 0 0 3px 0; }
.hero__bits { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__bit { position: absolute; width: var(--s, 56px); height: auto; opacity: .9; display: none; }
@media (min-width: 960px) { .hero__bit { display: block; } }
.js .hero__bit { opacity: 0; animation: fade .6s var(--ease-out) forwards, drift 7s ease-in-out 2.2s infinite alternate; animation-delay: 2.1s, 2.2s; }
@keyframes drift { to { transform: translateY(-12px); } }
.hero__scroll {
  position: absolute; left: 50%; bottom: 20px; translate: -50% 0;
  display: grid; place-items: center; width: 44px; height: 44px;
  color: var(--text-muted); text-decoration: none;
}
.hero__scroll .icon { animation: hint 1.8s ease-in-out infinite; }
@keyframes hint { 50% { transform: translateY(6px); } }
@media (min-width: 960px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    grid-template-areas: "concept logo" "title logo" "lead logo" "ctas logo" "facts logo";
    column-gap: 56px; align-items: center;
  }
  .hero__logo { grid-area: logo; justify-self: end; width: 100%; max-width: 560px; }
  .hero__concept { grid-area: concept; }
  .hero__title { grid-area: title; font-size: clamp(64px, 7vw, 100px); }
  .hero__lead { grid-area: lead; }
  .hero__ctas { grid-area: ctas; }
  .hero__facts { grid-area: facts; }
}

/* ---------- Entrada ao rolar ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px) scale(.97);
  transition: opacity .5s var(--ease-out), transform .64s var(--ease-snap);
  transition-delay: calc(var(--d, 0) * 70ms);
}
.js [data-reveal="snap"] { transform: translateY(44px) scale(.9); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Natal ---------- */
.natal { background: var(--bg-surface); border-block: 1px solid var(--border); overflow: hidden; }
.natal[hidden] { display: none; }
.natal__top { display: grid; gap: 18px; justify-items: start; }
.natal__deadline {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px;
  font: 500 14px/1.4 var(--font-mono); color: var(--text);
}
.natal__deadline strong { color: var(--color-lime); font-weight: 700; }
.countdown {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text-muted);
}
.rail-wrap { position: relative; margin-top: 8px; }
.rail {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: min(76%, 290px);
  gap: 14px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding: 16px max(var(--gutter), (100% - var(--container)) / 2) 20px;
  scroll-padding-inline: max(var(--gutter), (100% - var(--container)) / 2);
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
.rail__ui { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.rail__bar { flex: 1; height: 4px; border-radius: 2px; background: var(--color-neutral-700); overflow: hidden; }
.rail__bar span {
  display: block; height: 100%; width: calc(var(--w, .3) * 100%);
  background: var(--color-lime); border-radius: 2px;
  transform: translateX(var(--tx, 0%));
}
.rail__btns { display: none; gap: 8px; }
@media (min-width: 768px) { .rail__btns { display: flex; } .rail { grid-auto-columns: 280px; } }

/* ---------- Nichos ---------- */
.niches__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 900px) { .niches__grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.niche {
  --c: var(--collection-fun);
  position: relative; overflow: hidden;
  display: grid; align-content: space-between; gap: 22px;
  min-height: 196px; padding: 18px;
  border: 0; border-radius: var(--radius-card);
  background: var(--c); color: #000; text-align: left; cursor: pointer;
  transition: transform .4s var(--ease-snap);
}
.niche[data-niche="decor"] { --c: var(--collection-decor); }
.niche[data-niche="desk"] { --c: var(--collection-desk); }
.niche[data-niche="home"] { --c: var(--collection-home); }
.niche:hover { transform: translateY(-4px); }
.niche:focus-visible { outline-color: #fff; outline-offset: 4px; }
.niche__name { font: 800 clamp(30px, 7vw, 44px)/1 var(--font-display); letter-spacing: -.03em; }
.niche__phrase { font: 600 14px/1.3 var(--font-body); max-width: 18ch; }
.niche__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.niche__count { font: 500 12px/1 var(--font-mono); }
.niche__go {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--radius-button); background: #000; color: #fff;
  transition: transform .4s var(--ease-snap);
}
.niche__go .icon { transform: rotate(-45deg); transition: transform .4s var(--ease-snap); }
.niche:hover .niche__go .icon { transform: rotate(0); }
/* Peça que encaixa no canto do cartão */
.niche::after {
  content: ""; position: absolute; top: 0; right: 0;
  width: 34%; aspect-ratio: 1;
  background: #000; opacity: .1;
  border-radius: 0 0 0 24px;
  transform: translate(30%, -30%);
  transition: transform .5s var(--ease-snap);
}
.niche:hover::after { transform: none; }
.niche.is-pressed { animation: press .5s var(--ease-snap); }
@keyframes press { 30% { transform: scale(.94); } 70% { transform: scale(1.03); } }

/* ---------- Catálogo ---------- */
.tools {
  position: sticky; top: calc(var(--bar-h-small) + env(safe-area-inset-top, 0px)); z-index: 40;
  display: grid; gap: 10px;
  margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter);
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base);
}
.tools.is-stuck { border-bottom-color: var(--border); }
@media (min-width: 900px) { .tools { grid-template-columns: 1fr 300px; align-items: center; } }
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  --c: var(--color-white);
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 2px solid var(--border); border-radius: var(--radius-button);
  background: transparent; color: var(--text);
  font: 600 15px/1 var(--font-body); cursor: pointer;
  transition: background-color var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-fast) var(--ease-snap);
}
.chip::before { content: ""; width: 10px; height: 10px; background: var(--c); border-radius: 0 0 4px 0; transition: background-color var(--dur-fast); }
.chip[data-niche="fun"] { --c: var(--collection-fun); }
.chip[data-niche="decor"] { --c: var(--collection-decor); }
.chip[data-niche="desk"] { --c: var(--collection-desk); }
.chip[data-niche="home"] { --c: var(--collection-home); }
.chip:hover { border-color: var(--c); }
.chip:active { transform: scale(.95); }
.chip[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #000; }
.chip[aria-pressed="true"]::before { background: #000; }
.search { position: relative; }
.search .icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--text-muted); pointer-events: none; }
.search input {
  width: 100%; min-height: 46px; padding: 0 14px 0 46px;
  border: 1px solid var(--border); border-radius: var(--radius-button);
  background: var(--bg-raised); color: var(--text-strong);
}
.search input::placeholder { color: var(--color-neutral-500); }
.search input:focus-visible { outline-offset: 0; border-color: var(--color-cyan); }

.grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin-top: 18px;
}
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; } }
.grid__status { margin-top: 14px; font: 500 13px/1.4 var(--font-mono); color: var(--text-muted); }

.card {
  --c: var(--collection-fun);
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--border); border-radius: var(--radius-card);
  background: var(--bg-surface); overflow: hidden;
  transition: transform .4s var(--ease-snap), border-color var(--dur-fast);
}
.card[hidden] { display: none; }
.card[data-niche="decor"] { --c: var(--collection-decor); }
.card[data-niche="desk"] { --c: var(--collection-desk); }
.card[data-niche="home"] { --c: var(--collection-home); }
.card:hover { transform: translateY(-4px); border-color: var(--c); }
.card__link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; border-radius: inherit; }
.card__link:focus-visible { outline-offset: -3px; }
.card__media { position: relative; aspect-ratio: 4 / 5; background: var(--bg-raised); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.card:hover .card__media img, .card:hover .ph__mark { transform: scale(1.05); }
.card__tags { position: absolute; left: 10px; top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.card__body { display: grid; gap: 4px; padding: 12px 12px 4px; }
.card__niche { font: 500 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ct, var(--c)); }
.card[data-niche="fun"] { --ct: var(--color-purple-300); }
.card__name { font: 700 16px/1.2 var(--font-display); color: var(--text-strong); }
.card__eta { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font: 500 11px/1.2 var(--font-mono); color: var(--text-muted); }
.card__eta::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--color-neutral-500); }
.card__eta.is-ready { color: var(--color-success); }
.card__eta.is-ready::before { background: var(--color-success); }
.card__desc {
  font-size: 13px; line-height: 1.4; color: var(--text-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; }
.price { font: 700 18px/1 var(--font-display); color: var(--text-strong); white-space: nowrap; }
.swatches { display: flex; gap: 4px; margin-top: 6px; }
.swatches span { width: 12px; height: 12px; border-radius: 0 0 4px 0; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.card.is-enter { animation: card-in .5s var(--ease-snap) both; animation-delay: calc(var(--d, 0) * 40ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(18px) scale(.96); } }

/* Placeholder de foto (até a foto real chegar do catálogo) */
.ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 7px),
    var(--c);
  color: #000;
}
.ph__mark { width: 38%; height: auto; fill: currentColor; transition: transform .6s var(--ease-out); }
.ph__label {
  position: absolute; left: 0; right: 0; bottom: 10px; text-align: center;
  font: 600 10px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase;
}

/* Botão "+" que vira check */
.add {
  position: relative; display: grid; place-items: center; flex: none;
  width: 44px; height: 44px;
  border: 0; border-radius: var(--radius-button);
  background: var(--color-lime); color: #000; cursor: pointer;
  transition: transform .3s var(--ease-snap), background-color var(--dur-fast);
}
.add:hover { transform: scale(1.06); }
.add:active { transform: scale(.9); }
.add .icon { position: absolute; transition: transform .35s var(--ease-snap), opacity var(--dur-fast); }
.add .i-done { opacity: 0; transform: scale(.4); }
.add .i-done path { stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .35s var(--ease-out) .08s; }
.add.is-added { background: var(--color-success); }
.add.is-added .i-more { opacity: 0; transform: rotate(90deg) scale(.4); }
.add.is-added .i-done { opacity: 1; transform: none; }
.add.is-added .i-done path { stroke-dashoffset: 0; }

.empty {
  display: grid; justify-items: center; gap: 14px; text-align: center;
  margin-top: 18px; padding: 40px 20px;
  border: 1px dashed var(--border); border-radius: var(--radius-card);
}
.empty[hidden] { display: none; }

/* ---------- Painéis (ficha e sacola) ---------- */
dialog.sheet {
  position: fixed; inset: auto 0 0 0;
  width: 100%; max-width: none; max-height: 92svh; margin: 0; padding: 0;
  border: 0; border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  background: var(--bg-surface); color: var(--text);
  display: flex; flex-direction: column; overflow: hidden;
}
dialog.sheet:not([open]) { display: none; }
/* 0.5.3: no celular a ficha tem altura definida (o conteúdo é sempre maior que a tela) */
@media (max-width: 899px) { dialog.product { height: 92svh; height: 92dvh; max-height: 92svh; } }
dialog.sheet::backdrop { background: rgba(0, 0, 0, .72); }
dialog.sheet[open] { animation: sheet-up .44s var(--ease-stepper); }
dialog.sheet[open]::backdrop { animation: fade-in .3s var(--ease-out); }
dialog.sheet.is-closing { animation: sheet-down .26s var(--ease-out) forwards; }
dialog.sheet.is-closing::backdrop { animation: fade-out .26s var(--ease-out) forwards; }
dialog.sheet.no-anim { animation: none; }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.sheet__grab { display: grid; place-items: center; height: 22px; flex: none; touch-action: none; cursor: grab; }
.sheet__grab::before { content: ""; width: 44px; height: 5px; border-radius: 3px; background: var(--color-neutral-700); }
.sheet__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none;
  padding: 4px 20px 14px; border-bottom: 1px solid var(--border); touch-action: none;
}
.sheet__head h2 { font-size: 22px; }
/* 0.5.3: "flex: 1 1 auto" e min-height 0. Com "flex: 1" (base 0%) o Safari do iPhone calculava o miolo
   com altura zero dentro do painel sem altura fixa: a ficha abria como uma faixa fina no pé da tela. */
.sheet__body { flex: 1 1 auto; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 20px; }
.sheet__foot {
  flex: none; display: grid; gap: 10px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); background: var(--bg-surface);
}

@media (min-width: 900px) {
  dialog.sheet { --sheet-radius: 24px; }
  dialog.product {
    inset: 0; margin: auto; width: min(980px, 92vw); max-height: 88vh;
    border-radius: var(--radius-card);
  }
  dialog.product[open] { animation: pop .42s var(--ease-snap); }
  dialog.product.is-closing { animation: pop-out .22s var(--ease-out) forwards; }
  .sheet__grab { display: none; }
  .sheet__head { padding-top: 16px; }
}
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.95); } }
@keyframes pop-out { to { opacity: 0; transform: translateY(16px) scale(.97); } }

/* Ficha do produto */
.pd { display: grid; gap: 20px; }
@media (min-width: 900px) { .pd { grid-template-columns: 1.05fr 1fr; gap: 32px; align-items: start; } }
.gallery {
  position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  aspect-ratio: 1; border-radius: var(--radius-card); scrollbar-width: none;
  background: var(--bg-raised);
}
.gallery::-webkit-scrollbar { display: none; }
.gallery__slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots span { width: 8px; height: 8px; border-radius: 4px; background: var(--color-neutral-700); transition: width var(--dur-base) var(--ease-snap), background-color var(--dur-fast); }
.dots span.is-on { width: 22px; background: var(--color-lime); }
.pd__info { display: grid; gap: 16px; }
.pd__niche { font: 500 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ct, var(--c)); }
.pd__title { font-size: clamp(28px, 6vw, 38px); font-weight: 800; }
.pd__price { font: 800 28px/1 var(--font-display); color: var(--text-strong); }
.pd__summary { color: var(--text-muted); }
.pd__eta { display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.opt { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.opt legend { margin-bottom: 10px; font: 600 14px/1 var(--font-body); color: var(--text-strong); }
.colors { display: flex; flex-wrap: wrap; gap: 8px; }
.color-opt { position: relative; }
.color-opt input { position: absolute; left: 12px; top: 12px; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.color-opt label {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px 0 10px;
  border: 2px solid var(--border); border-radius: var(--radius-button);
  cursor: pointer; transition: border-color var(--dur-fast), transform var(--dur-fast) var(--ease-snap);
}
.color-opt label::before { content: ""; width: 18px; height: 18px; border-radius: 0 0 6px 0; background: var(--sw); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3); }
.color-opt input:checked + label { border-color: var(--color-lime); }
.color-opt input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.color-opt input:active + label { transform: scale(.96); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-button); }
.qty button { width: 44px; height: 44px; border: 0; background: transparent; color: var(--text-strong); cursor: pointer; display: grid; place-items: center; }
.qty output { min-width: 32px; text-align: center; font: 700 16px/1 var(--font-mono); }
.specs { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--border); }
.specs div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.specs dt { font: 500 12px/1.5 var(--font-mono); color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.specs dd { margin: 0; font-size: 15px; }
.notice {
  display: flex; gap: 12px; padding: 14px;
  border: 2px solid var(--color-warning); border-radius: var(--radius-card);
  font-size: 14px; line-height: 1.45;
}
.notice strong { color: var(--color-warning); }
.credit { font: 500 12px/1.4 var(--font-mono); color: var(--text-muted); }
.pd__actions { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
/* 0.5.2: no celular estreito o botão da sacola não quebra em duas linhas */
.pd__actions .btn { white-space: nowrap; min-width: 0; }
@media (max-width: 420px) { .pd__actions .btn { padding-inline: 14px; font-size: 15px; gap: 8px; } }
.btn.is-done { --b: var(--color-success); }

.toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 130;
  translate: -50% 0; max-width: calc(100% - 2 * var(--gutter));
  padding: 12px 16px; border-radius: var(--radius-button);
  background: var(--color-white); color: #000;
  font: 600 14px/1.3 var(--font-body);
  opacity: 0; transform: translateY(16px); pointer-events: none;
  transition: opacity var(--dur-fast), transform .35s var(--ease-snap);
}
.toast.is-on { opacity: 1; transform: none; }
@media (min-width: 900px) { .toast { bottom: 28px; } }

/* ---------- FAQ ---------- */
.faq__layout { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .faq__layout { grid-template-columns: 1fr 1.4fr; gap: 64px; }
  .faq__aside { position: sticky; top: calc(var(--bar-h-small) + 32px); align-self: start; }
}
.faq__aside { display: grid; gap: 18px; justify-items: start; }
.faq__item { border-bottom: 1px solid var(--border); }
.faq__item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 16px 0; cursor: pointer; list-style: none;
  font: 600 clamp(17px, 2.4vw, 20px)/1.3 var(--font-display); color: var(--text-strong);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:focus-visible { outline-offset: 0; }
.faq__icon {
  position: relative; flex: none; width: 32px; height: 32px;
  border-radius: var(--radius-button); background: var(--bg-raised);
  transition: background-color var(--dur-fast), transform .4s var(--ease-snap);
}
.faq__icon::before, .faq__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 14px; height: 2px; background: currentColor; translate: -50% -50%;
}
.faq__icon::after { rotate: 90deg; }
.faq__item[open] .faq__icon { transform: rotate(45deg); background: var(--color-lime); color: #000; }
.faq__answer { padding: 0 48px 20px 0; color: var(--text-muted); }
.faq__answer a { color: var(--color-cyan); }
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }
  .faq__item::details-content {
    block-size: 0; overflow: hidden;
    transition: block-size .38s var(--ease-out), content-visibility .38s allow-discrete;
  }
  .faq__item[open]::details-content { block-size: auto; }
}

/* ---------- Rodapé ---------- */
.footer { border-top: 1px solid var(--border); padding-block: 56px calc(96px + env(safe-area-inset-bottom)); }
.footer__grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .footer__grid { grid-template-columns: auto 1fr 1fr 1fr; gap: 48px; } .footer { padding-bottom: 56px; } }
.footer__mono { width: 64px; height: auto; }
.footer h3 { font: 500 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.footer ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.footer a { text-decoration: none; color: var(--text); }
.footer a:hover { color: var(--color-cyan); }
.footer__legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border);
  font: 500 12px/1.5 var(--font-mono); color: var(--text-muted);
}

/* ---------- View Transitions (troca de filtro e abertura da ficha) ---------- */
::view-transition-group(*) { animation-duration: .42s; animation-timing-function: var(--ease-stepper); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important;
  }
  html { scroll-behavior: auto; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero__nozzle, .hero__bit { display: none; }
}

/* ---------- Páginas legais (page.php) ---------- */
.legal-content { display: grid; gap: 16px; color: var(--text); }
.legal-content h2 { font-size: 24px; margin-top: 16px; }
.legal-content h3 { font-size: 19px; margin-top: 8px; }
.legal-content a { color: var(--color-cyan); }
.legal-content ul, .legal-content ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }

/* 0.3.1: sem cores cadastradas, sem a faixa de bolinhas */
.swatches:empty { display: none; }

/* =========================================================
   0.4.0: Pix, banners, galeria, impressão da foto e cookies
   ========================================================= */

/* Preço no Pix */
.price { display: inline-flex; flex-direction: column; gap: 4px; }
.price__pix { font: 500 12px/1.1 var(--font-mono); color: var(--color-lime); letter-spacing: .02em; }
.pd__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.pd__pix { font: 600 16px/1.2 var(--font-mono); color: var(--color-lime); }
.pd__pix em { font-style: normal; font-size: 12px; padding: 2px 6px; margin-left: 4px; border-radius: var(--radius-sm); background: var(--color-lime); color: #000; }

/* Foto publicitária imprimindo em 8 camadas, com o bico subindo (--ease-print, --dur-print) */
.card__media.will-print img { clip-path: inset(100% 0 0 0); }
.card__media.is-printing img { animation: print var(--dur-print) var(--ease-print) forwards; animation-duration: 1.4s; }
.card__media.is-printed img { clip-path: none; }
.card__media.will-print::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 1; pointer-events: none;
  background: var(--color-lime); box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); opacity: 0;
}
.card__media.is-printing::after { animation: print-head 1.4s var(--ease-print) forwards; }
.card__media.is-printing::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 2px, transparent 2px 6px);
  animation: print-lines 1.6s ease-out forwards;
}
@keyframes print-head { 0% { opacity: 1; bottom: 0; } 92% { opacity: 1; bottom: calc(100% - 3px); } 100% { opacity: 0; bottom: calc(100% - 3px); } }
@keyframes print-lines { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }

/* Banners */
.banners { position: relative; box-sizing: border-box; width: 100%; margin: 24px auto 0; padding: 0 var(--gutter, 16px); max-width: 1280px; }
.banners__track { width: 100%; }
.banners__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius-card, 20px); }
.banners__track::-webkit-scrollbar { display: none; }
.banner { position: relative; flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1600 / 560; background: var(--bg-raised); overflow: hidden; }
.banner a { display: block; height: 100%; color: inherit; text-decoration: none; }
.banner picture, .banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.banner__txt { position: absolute; left: 0; bottom: 0; max-width: 560px; padding: 24px 28px; display: grid; gap: 8px; background: linear-gradient(0deg, rgba(0, 0, 0, .78), transparent); }
.banner__txt h2 { font: 800 clamp(22px, 3.4vw, 38px)/1.05 var(--font-display); color: #fff; }
.banner__txt p { color: var(--text-muted); }
.banner__cta { justify-self: start; padding: 10px 16px; border-radius: var(--radius-button); background: var(--color-lime); color: #000; font-weight: 700; }
.banners__dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.banners__dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--color-neutral-700); cursor: pointer; transition: width var(--dur-base) var(--ease-snap); }
.banners__dots button[aria-current] { width: 22px; background: var(--color-lime); }
@media (max-width: 700px) { .banner { aspect-ratio: 1 / 1; } .banner__txt { padding: 16px; } }

/* Galeria da ficha */
.gallery-wrap { position: relative; }
.gallery { cursor: grab; touch-action: pan-x pan-y; }
.gallery.is-drag { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.gallery img { -webkit-user-drag: none; user-select: none; }
.gallery__nav {
  position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff;
  font: 400 28px/1 var(--font-body); cursor: pointer; transition: background-color var(--dur-fast);
}
.gallery__nav:hover { background: rgba(0, 0, 0, .85); }
.gallery__nav:focus-visible { outline: 2px solid var(--color-lime); outline-offset: 2px; }
.gallery__nav--prev { left: 10px; }
.gallery__nav--next { right: 10px; }
.dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 4px; background: var(--color-neutral-700); cursor: pointer; transition: width var(--dur-base) var(--ease-snap), background-color var(--dur-fast); }
.dots button.is-on { width: 22px; background: var(--color-lime); }
.dots { padding: 6px 0; }
@media (hover: none) { .gallery__nav { width: 36px; height: 36px; font-size: 22px; } }

/* Aviso de cookies */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 560px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius-card); background: var(--bg-raised); color: var(--text-muted);
  font-size: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); transition: opacity .3s, translate .3s var(--ease-out);
}
.cookie-bar p { flex: 1 1 260px; margin: 0; }
.cookie-bar a { color: var(--color-cyan); }
.cookie-bar__ok { padding: 10px 18px; border: 0; border-radius: var(--radius-button); background: var(--color-lime); color: #000; font-weight: 700; cursor: pointer; }
.cookie-bar.is-out { opacity: 0; translate: 0 20px; }

@media (prefers-reduced-motion: reduce) {
  .card__media.will-print img { clip-path: none; }
  .card__media.will-print::after, .card__media.is-printing::before { display: none; }
}
