/* Bankas — componentes compartilhados dos mockups (depende de tokens.css) */
:root { --r-xl: 28px; --r-pill: 999px; --wash: #eceef2; --shadow: 0 1px 2px rgba(13,15,20,.06), 0 8px 24px -12px rgba(13,15,20,.18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --wash: #20242c; } }
:root[data-theme="dark"] { --wash: #20242c; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
a { color: inherit; }
img, svg { max-width: 100%; }

/* botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r-pill); border: 0; font: 700 1rem/1 var(--font-ui); text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), background-color .2s var(--ease); white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn-action { background: var(--action); color: var(--action-ink); }
.btn-action:hover { background: color-mix(in srgb, var(--action) 88%, #000); }
.btn-soft { background: var(--wash); color: var(--ink); }
.btn-soft:hover { background: var(--line); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-danger { background: var(--danger-wash); color: var(--danger); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: .9rem; }
.btn-block { width: 100%; }

/* chips de categoria */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: var(--r-pill); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: 600 .9rem/1 var(--font-ui); text-decoration: none; cursor: pointer; border: 0; }
.chip .ic { width: 22px; height: 22px; color: var(--ink-soft); }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); color: var(--ground); box-shadow: none; }
.chip[aria-pressed="true"] .ic, .chip.on .ic { color: var(--ground); }

/* busca */
.search { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border-radius: var(--r-pill); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink-soft); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: 500 1rem var(--font-ui); color: var(--ink); min-height: 44px; }
.search input:focus { outline: none; }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--action); }

/* placeholder de foto: um único tom neutro + ícone da categoria. A cor fica para ESTADO (selos, salvo, vendido).
   As fotos reais virão do grupo; o tracejado sinaliza que é placeholder. */
:root { --ph-bg: #eceef2; --ph-ink: #5a6070; --ph-edge: #c9ced8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --ph-bg: #20242c; --ph-ink: #a3a9b8; --ph-edge: #3a404c; } }
:root[data-theme="dark"] { --ph-bg: #20242c; --ph-ink: #a3a9b8; --ph-edge: #3a404c; }
.ph { position: relative; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; display: grid; place-items: center; color: var(--ph-ink); background: var(--ph-bg); box-shadow: inset 0 0 0 1.5px var(--ph-edge); }
.ph .ic { width: 42%; height: 42%; }
.ph[data-vazio] .ic { width: 34%; height: 34%; }
.ph-note { display: inline-flex; align-items: center; gap: 6px; font: 600 .8rem/1.3 var(--font-ui); color: var(--ink-soft); }
.ph-note::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 4px; background: var(--ph-bg); box-shadow: inset 0 0 0 1.5px var(--ph-edge); }

/* cartão de anúncio */
.lcard { position: relative; display: flex; flex-direction: column; gap: 8px; min-width: 0; text-decoration: none; color: inherit; }
.lcard .ph { border-radius: var(--r-lg); }
.lcard .save { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 0; background: rgba(255,255,255,.92); color: #0d0f14; cursor: pointer; }
.lcard .save[aria-pressed="true"] { color: #d6264f; }
.lcard .selo { position: absolute; top: 14px; left: 12px; }
.lcard .preco { font: 700 1.02rem/1.1 var(--font-code); letter-spacing: -.01em; }
.lcard .preco.combinar { font: 600 .92rem/1.1 var(--font-ui); color: var(--ink-soft); }
.lcard h4 { margin: 0; font: 600 .92rem/1.3 var(--font-ui); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.who { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); font-size: .8rem; }
.av { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 .7rem/1 var(--font-ui); background: var(--action-wash); color: var(--action); }
.av[data-tom="b"] { background: var(--warn-wash); color: var(--warn); }
.av[data-tom="c"] { background: var(--ok-wash); color: var(--ok); }
.av.lg { width: 40px; height: 40px; font-size: .95rem; }

/* faixa "dados de exemplo" */
.exemplo { display: inline-flex; align-items: center; gap: 6px; font: 700 .7rem/1 var(--font-code); letter-spacing: .06em; text-transform: uppercase; color: var(--warn); background: var(--warn-wash); padding: 6px 8px; border-radius: var(--r-sm); }
.hipotese { display: inline-block; font: 700 .68rem/1 var(--font-code); letter-spacing: .05em; text-transform: uppercase; color: var(--warn); background: var(--warn-wash); padding: 4px 6px; border-radius: var(--r-sm); vertical-align: middle; }

/* cabeçalho das páginas de documentação de mockups */
.doc-top { max-width: 1400px; margin: 0 auto; padding: 28px 24px 8px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.doc-top a.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; text-decoration: none; color: var(--ink-soft); }
.doc-top a.back:hover { color: var(--ink); }
.doc-head { max-width: 1400px; margin: 0 auto; padding: 8px 24px 40px; }
.doc-head h1 { font: 800 clamp(2.4rem, 7vw, 4.6rem)/.95 var(--font-display); letter-spacing: -.045em; margin: 0 0 14px; }
.doc-head p { max-width: 64ch; color: var(--ink-soft); font-size: 1.05rem; margin: 0; }
.doc-sec { max-width: 1400px; margin: 0 auto; padding: 8px 24px 20px; }
.doc-sec h2 { font: 800 1.6rem/1.1 var(--font-display); letter-spacing: -.03em; margin: 0 0 6px; }
.doc-sec > p { color: var(--ink-soft); margin: 0 0 8px; max-width: 70ch; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Fix round 1: pílula escura, erro sobre fundo escuro e moldura visível no tema escuro */
:root { --pill-dark: #0d0f14; --pill-dark-ink: #ffffff; --on-dark-danger: #ff8b82; --frame-edge: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --pill-dark: #2a2e38; --frame-edge: #4a5060; } }
:root[data-theme="dark"] { --pill-dark: #2a2e38; --frame-edge: #4a5060; }
.phone { outline: 1.5px solid var(--frame-edge); outline-offset: 0; }
/* Fix round 1: tons de texto para AA (auditoria de contraste) */
:root { --action-text: #1f45d6; --wa-name: #0f7a40; --wa-name-2: #9c3378; --ink-mute: #5a6070; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --action-text: #a9bcff; --wa-name: #5fd08f; --wa-name-2: #f08ccc; --ink-mute: #a3a9b8; } }
:root[data-theme="dark"] { --action-text: #a9bcff; --wa-name: #5fd08f; --wa-name-2: #f08ccc; --ink-mute: #a3a9b8; }
.av { color: var(--action-text); }
