/* Catálogo 3D · vitrine pública
   Cor da loja vem de --accent (definida no layout a partir das configurações). */
:root {
  --bg: #F3F5F6;
  --surface: #FFFFFF;
  --surface-2: #E9EDEF;
  --ink: #111B24;
  --ink-2: #56636E;
  --line: #DCE1E5;
  --accent-soft: color-mix(in srgb, var(--accent) 9%, #fff);
  --wa: #128C47;
  --wa-ink: #FFFFFF;
  --layer: rgba(17, 27, 36, .05);
  --shadow-sm: 0 1px 2px rgba(17, 27, 36, .06);
  --shadow-md: 0 2px 6px rgba(17, 27, 36, .06), 0 14px 30px rgba(17, 27, 36, .10);
  --r: 16px;
  --f-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --f-body: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding-left: var(--gutter); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; text-decoration: none; text-align: center; transition: transform .12s, background .15s, box-shadow .15s; }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 42px; padding: 0 16px; font-size: 15px; }
.btn-lg { min-height: 54px; font-size: 17px; width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-wa { background: var(--wa); color: var(--wa-ink); }
.btn-wa:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink-2); }

/* Cabeçalho */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 20px var(--f-display); position: relative; overflow: hidden; flex: none; }
.brand-mark::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .22) 0 1px, transparent 1px 4px); }
.brand-logo { height: 42px; width: auto; max-width: 160px; object-fit: contain; flex: none; }
.brand-text { display: grid; line-height: 1.15; min-width: 0; }
.brand-text strong { font: 700 18px var(--f-display); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-text small { color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .brand-text small { display: none; } }

/* Abertura da vitrine */
.intro { padding: 28px 0 8px; }
.eyebrow { font: 600 12px var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.intro h1 { font: 700 clamp(28px, 6vw, 44px)/1.05 var(--f-display); letter-spacing: -.02em; text-wrap: balance; max-width: 18ch; }
.intro-sum { color: var(--ink-2); margin-top: 12px; max-width: 60ch; }
.search { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 20px; max-width: 640px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 5px 5px 5px 14px; box-shadow: var(--shadow-sm); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.search .ic { color: var(--ink-2); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; min-height: 44px; outline: none; color: var(--ink); }
.search input::placeholder { color: #8493A0; }

/* Categorias */
.cats { margin-top: 18px; }
.cats-in { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; scroll-snap-type: x proximity; }
.cats-in::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-weight: 500; font-size: 15px; scroll-snap-align: start; white-space: nowrap; }
.chip span { font-size: 12px; color: var(--ink-2); }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip[aria-current="page"] span { color: rgba(255, 255, 255, .7); }

/* Lista e cards */
.list { padding: 20px 0 56px; }
.count { font-size: 14px; color: var(--ink-2); margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }

.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .18s, box-shadow .18s, border-color .18s; min-width: 0; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: transparent; }
.card:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.card-media { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(180deg, #F1F4F5, #E4E9EC); overflow: hidden; }
.card-media::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, var(--layer) 0 1px, transparent 1px 6px); pointer-events: none; z-index: 1; opacity: .6; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card-media img { transform: scale(1.05); }
.card-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #9AA8B2; }
.card-empty svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.badge { position: absolute; z-index: 2; top: 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; }
.badge-feat { left: 10px; background: var(--accent); color: var(--accent-ink); }
.badge-count { right: 10px; background: rgba(17, 27, 36, .78); color: #fff; backdrop-filter: blur(4px); }
.card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; flex: 1; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.card-title { font: 600 17px/1.22 var(--f-display); letter-spacing: -.005em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.card-link { text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* o card inteiro é clicável */
.card-sum { font-size: 14px; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.card-price { display: grid; gap: 6px; min-width: 0; }
.price { font: 700 18px var(--f-display); letter-spacing: -.01em; }
.price-ask { font-weight: 500; color: var(--ink-2); font-size: 16px; }
.dots { display: inline-flex; align-items: center; gap: 4px; }
.dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
.dots em { font-style: normal; font-size: 12px; color: var(--ink-2); margin-left: 2px; }
.share-btn { position: relative; z-index: 2; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; color: var(--ink-2); text-decoration: none; flex: none; }
.share-btn:hover { color: var(--wa); border-color: var(--wa); }

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 32px; color: var(--ink-2); font-size: 14px; }
.empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 64px 16px; color: var(--ink-2); }
.empty svg { width: 52px; height: 52px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.empty strong { font: 600 20px var(--f-display); color: var(--ink); }

/* Página do produto */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0 12px; font-size: 14px; color: var(--ink-2); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); overflow-wrap: anywhere; }
.prod { display: grid; gap: 22px; padding-bottom: 28px; }
@media (min-width: 900px) { .prod { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 44px; align-items: start; } .gallery { position: sticky; top: 90px; } }

.stage { position: relative; aspect-ratio: 1 / 1; background: linear-gradient(180deg, #F1F4F5, #E4E9EC); border-radius: 20px; overflow: hidden; cursor: zoom-in; border: 1px solid var(--line); user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.stage img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.stage-empty { display: grid; place-items: center; align-content: center; gap: 8px; color: #8493A0; cursor: default; }
.stage-empty svg { width: 54px; height: 54px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linejoin: round; }
.zoom-hint { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; background: rgba(17, 27, 36, .78); color: #fff; font-size: 13px; font-weight: 600; }
.zoom-hint .ic { width: 16px; height: 16px; }
.nav { position: absolute; top: 50%; width: 44px; height: 44px; margin-top: -22px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); box-shadow: var(--shadow-sm); display: grid; place-items: center; }
.nav-prev { left: 12px; } .nav-next { right: 12px; }
.thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 12px 2px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb { position: relative; flex: 0 0 76px; height: 76px; padding: 0; border-radius: 14px; overflow: hidden; border: 2px solid transparent; background: var(--surface-2); scroll-snap-align: start; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb span { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 4px 3px; font-size: 10px; font-weight: 600; line-height: 1.1; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb[aria-current="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }

.info { display: grid; gap: 14px; align-content: start; min-width: 0; }
.info h1 { font: 700 clamp(28px, 5vw, 40px)/1.08 var(--f-display); letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; }
.price-lg { font-size: 32px; }
.lead { color: var(--ink-2); font-size: 17px; max-width: 60ch; }
.variant { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 10px; }
.variant-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.variant-head strong { font: 600 17px var(--f-display); text-align: right; overflow-wrap: anywhere; }
.label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 14px 0 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 14px; }
.sw .dot { width: 20px; height: 20px; }
.sw[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); font-weight: 700; box-shadow: 0 0 0 1px var(--accent); }
.hint { font-size: 13px; color: var(--ink-2); }
.actions { display: grid; gap: 10px; }
.actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.about h2 { font: 600 18px var(--f-display); margin-bottom: 6px; }
.about p { color: #2B3944; max-width: 62ch; }
.specs { display: grid; margin: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.specs div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 12px; padding: 12px 16px; }
.specs div + div { border-top: 1px solid var(--line); }
.specs dt { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); align-self: center; }
.specs dd { margin: 0; overflow-wrap: anywhere; }
.related { padding: 12px 0 60px; }
.related h2 { font: 700 24px var(--f-display); letter-spacing: -.01em; margin-bottom: 16px; }

.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: none; align-items: center; gap: 14px; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.buybar-price { font: 700 19px var(--f-display); white-space: nowrap; }
.buybar .btn { flex: 1; }
@media (max-width: 899px) { .buybar { display: flex; } body:has(.buybar) .foot { padding-bottom: 80px; } }

/* Rodapé */
.foot { background: var(--ink); color: #D3DCE2; padding: 40px 0 24px; margin-top: 8px; }
.foot-in { display: grid; gap: 24px; }
@media (min-width: 760px) { .foot-in { grid-template-columns: 1.3fr 1fr; } }
.foot-brand strong { font: 700 20px var(--f-display); color: #fff; }
.foot-brand p { margin-top: 8px; max-width: 46ch; color: #AAB8C1; }
.foot-contact { display: grid; gap: 10px; }
.foot-contact li { display: grid; grid-template-columns: 6.5rem 1fr; gap: 10px; }
.foot-contact span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #8FA0AB; align-self: center; }
.foot-contact a { color: #fff; overflow-wrap: anywhere; }
.foot-copy { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; color: #8FA0AB; }

/* Aviso rápido */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 120; max-width: min(92vw, 420px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; box-shadow: var(--shadow-md); font-weight: 500; text-align: center; }
body:has(.buybar) .toast { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }

/* Erro */
.err { padding: 72px 0; }
.err h1 { font: 700 36px var(--f-display); margin: 4px 0 10px; }
.err p { color: var(--ink-2); margin-bottom: 20px; max-width: 52ch; }

/* Zoom em tela cheia */
.lb { position: fixed; inset: 0; z-index: 90; background: #05080B; color: #fff; display: flex; flex-direction: column; }
.lb[hidden] { display: none; }
.lb-top { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px)); }
.lb-count { flex: 1; min-width: 0; color: #B8C4CC; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-zoom { min-width: 48px; text-align: right; color: #B8C4CC; font-size: 13px; font-variant-numeric: tabular-nums; }
.lb-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; }
.lb-btn:hover { background: rgba(255, 255, 255, .16); }
.lb-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.lb-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 50%; will-change: transform; pointer-events: none; }
.lb-bot { display: grid; gap: 8px; padding: 10px max(12px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); background: rgba(255, 255, 255, .04); }
.lb-cap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; min-height: 22px; }
.lb-cap strong { font: 600 16px var(--f-display); }
.lb-cap .c { display: inline-flex; align-items: center; gap: 6px; color: #D5DEE4; }
.lb-thumbs { padding: 2px; }
.lb-thumbs .thumb { flex-basis: 56px; height: 56px; border-radius: 10px; }
.lb-thumbs .thumb span { display: none; }
.lb-thumbs .thumb[aria-current="true"] { border-color: #fff; box-shadow: none; }
.lb-help { font-size: 12px; color: #8FA0AB; }
@media (hover: hover) { .lb-help { display: none; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
