:root {
  --ink: #111;
  --muted: #6b6b6b;
  --line: #e7e7e7;
  --soft: #f4f4f4;
  --pill: #d9d9d9;
  --wa: #1fae55;
  --wa-dark: #178a43;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: #fff; line-height: 1.4; }
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* topo */
.top {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center; height: 64px; padding: 0 56px;
  padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--line);
}
.brand img { height: 34px; width: auto; }
.ig-top { position: absolute; right: 14px; bottom: 14px; width: 36px; height: 36px; padding: 6px; border-radius: 50%; }
.ig-top:hover { background: var(--soft); }
.ig-top .dot { fill: currentColor; stroke: none; }

/* categorias */
.cats {
  position: sticky; top: calc(64px + env(safe-area-inset-top)); z-index: 19; background: #fff;
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 16px; scrollbar-width: none; border-bottom: 1px solid var(--line);
}
.cats::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px;
  font-size: 14px; font-weight: 600; letter-spacing: .02em; white-space: nowrap;
}
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* lista */
.wrap { max-width: 1200px; margin: 0 auto; padding: 16px 12px 40px; min-height: 60vh; }
.status { text-align: center; color: var(--muted); padding: 60px 16px; }
.group { margin-bottom: 28px; }
.group h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .14em; margin: 8px 4px 12px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } .wrap { padding: 24px 20px 56px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { display: flex; flex-direction: column; min-width: 0; }
.card-link { text-decoration: none; display: block; flex: 1; }
.card-img { aspect-ratio: 3 / 4; background: var(--soft); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transition: transform .35s; }
.card-link:hover .card-img img { transform: scale(1.03); }
.noimg { font-weight: 800; letter-spacing: .12em; color: #bdbdbd; font-size: 14px; }
.card-info { padding: 10px 2px 8px; }
.card-info h3 { font-size: 14px; font-weight: 600; margin: 0 0 6px; line-height: 1.3; overflow-wrap: anywhere; }
.card-colors { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.card-colors .sw { width: 14px; height: 14px; }
.more { font-size: 11px; color: var(--muted); margin-left: 2px; }
.card-sizes { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.card-price { margin: -2px 0 6px; font-size: 15px; font-weight: 700; }
.sheet-price { margin: -8px 0 16px; font-size: 22px; font-weight: 700; }
.sw { display: inline-block; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.sw.light { box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }

.ico { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ico .ph { fill: currentColor; stroke: none; }
.wa-mini {
  display: flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
  border: 1.5px solid var(--wa); color: var(--wa-dark); border-radius: 10px; padding: 8px 6px;
  font-size: 12.5px; font-weight: 700;
}
.wa-mini:hover { background: var(--wa); color: #fff; }

/* rodapé */
.foot { border-top: 1px solid var(--line); padding: 28px 16px calc(28px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); }
.foot img { height: 28px; width: auto; margin: 0 auto 14px; }
.foot-links { display: flex; justify-content: center; gap: 18px; margin-bottom: 10px; }
.foot-links a { font-weight: 600; color: var(--ink); }

/* detalhe do modelo */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .2s; }
.sheet-panel {
  position: relative; background: #fff; width: 100%; max-height: 100%; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 18px 18px 0 0; transform: translateY(24px); opacity: 0; transition: transform .22s, opacity .22s;
}
.sheet.open .sheet-backdrop { opacity: 1; }
.sheet.open .sheet-panel { transform: none; opacity: 1; }
.sheet-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; padding: 9px; border: 0;
  border-radius: 50%; background: rgba(255,255,255,.92); box-shadow: 0 1px 6px rgba(0,0,0,.15);
}
.gallery-wrap { position: relative; }
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: var(--soft); }
.gallery::-webkit-scrollbar { display: none; }
/* altura fixa + contain: a foto aparece inteira (sem cortar cabeça/pés), qualquer proporção */
.gallery figure {
  flex: 0 0 100%; margin: 0; scroll-snap-align: start; height: min(72vh, 177.78vw);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.gallery img { width: 100%; height: 100%; object-fit: contain; }
.dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.6); box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.dots button.on { background: #fff; width: 20px; border-radius: 4px; }
.sheet-body { padding: 18px 18px calc(22px + env(safe-area-inset-bottom)); }
.sheet-cat { margin: 0 0 4px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sheet-body h2 { margin: 0 0 16px; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.sheet-desc { margin: -6px 0 18px; color: #444; font-size: 15px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.opt { margin-bottom: 18px; }
.opt h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 10px; }
.opt h3 span { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }
.swatches, .sizes { display: flex; flex-wrap: wrap; gap: 10px; }
.color-opt { padding: 3px; border: 2px solid transparent; border-radius: 50%; background: none; line-height: 0; }
.color-opt .sw { width: 30px; height: 30px; }
.color-opt.on { border-color: var(--ink); }
.size-opt { min-width: 48px; height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-weight: 600; }
.size-opt.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.size-opt:disabled { color: #b5b5b5; background: #f6f6f6; border-style: dashed; text-decoration: line-through; cursor: not-allowed; }
.color-opt.dim { opacity: .35; }
.size-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; text-decoration: none;
  background: var(--wa); color: #fff; border-radius: 12px; padding: 15px; font-weight: 700; font-size: 16px;
}
.wa-btn:hover { background: var(--wa-dark); }
.wa-btn .ico { width: 22px; height: 22px; }

@media (min-width: 820px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-panel { display: grid; grid-template-columns: 1.05fr 1fr; max-width: 980px; max-height: 92vh; border-radius: 18px; overflow: hidden; }
  .gallery-wrap { min-height: 0; }
  .gallery figure { height: min(92vh, 900px); }
  .sheet-body { overflow-y: auto; padding: 36px 32px; }
  .sheet-body h2 { font-size: 26px; padding-right: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* --- app (PWA): barra de menu inferior, aviso de instalação, folhas simples --- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar > * {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: 58px; border: 0; background: none; color: #8a8a8a; text-decoration: none; font-size: 11px; font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.tabbar svg { width: 24px; height: 24px; }
.tabbar .dot { fill: currentColor; stroke: none; }
.tabbar .on { color: var(--ink); }
.tabbar .tab-wa { color: var(--wa-dark); }
.tabbar > [hidden] { display: none !important; }
body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
.ig-top { display: none; }

.install-banner {
  position: fixed; left: 10px; right: 10px; z-index: 29; bottom: calc(68px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 16px; padding: 10px 10px 10px 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.18); border: 1px solid var(--line); animation: rise .3s ease-out;
}
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }
.install-banner img { width: 48px; height: 48px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); flex: none; }
.ib-text { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.ib-text strong { font-size: 14px; }
.ib-text span { font-size: 12.5px; color: var(--muted); }
.ib-go { border: 0; background: var(--ink); color: #fff; font-weight: 700; font-size: 13.5px; border-radius: 999px; padding: 9px 14px; white-space: nowrap; }
.ib-close { width: 30px; height: 30px; padding: 7px; border: 0; background: none; color: var(--muted); flex: none; }

.sheet.simple .sheet-panel { padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); }
.grab { width: 40px; height: 5px; border-radius: 3px; background: #d6d6d6; margin: 2px auto 14px; }
.pop-title { margin: 0 0 12px; font-size: 19px; }
.menu-list { display: grid; }
.menu-item {
  display: flex; justify-content: space-between; align-items: center; border: 0; border-bottom: 1px solid var(--line);
  background: none; padding: 16px 4px; font-size: 16px; font-weight: 600; text-align: left;
}
.menu-item:last-child { border-bottom: 0; }
.menu-item small { color: var(--muted); font-weight: 500; font-size: 13px; }
.menu-item.on span::before { content: "• "; }
.install-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.install-head img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 0 0 1px var(--line); flex: none; }
.install-head .pop-title { margin: 0 0 2px; }
.install-sub { margin: 0; color: var(--muted); font-size: 14px; }
.install-steps { margin: 0 0 18px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 12px; }
.install-steps li { counter-increment: s; position: relative; padding: 2px 0 0 38px; min-height: 26px; font-size: 15px; line-height: 1.45; }
.install-steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.kbd { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 0 5px; font-size: 13px; color: #1a73e8; }
.btn-dark { width: 100%; border: 0; background: var(--ink); color: #fff; font-weight: 700; font-size: 16px; border-radius: 12px; padding: 14px; }

@media (min-width: 820px) {
  .tabbar { display: none; }
  body { padding-bottom: 0; }
  .ig-top { display: block; }
  .install-banner { left: auto; right: 20px; bottom: 20px; width: 400px; }
  .sheet.simple .sheet-panel { display: block; max-width: 440px; border-radius: 18px; padding: 20px 24px 24px; }
  .grab { display: none; }
}
