/* Suldre Leilões — interface de marketplace de leilão. Mobile first, tema claro. */

:root {
  --brand: #0b3b66;
  --brand-600: #0e4a80;
  --brand-50: #eaf2fa;
  --accent: #f6a700;
  --accent-600: #dd9400;
  --ink: #15202b;
  --ink-2: #33414f;
  --muted: #5e6b7a;
  --line: #e3e8ee;
  --line-2: #eef1f5;
  --bg: #f4f6f9;
  --white: #ffffff;
  --ok: #0f7a3d;
  --ok-50: #e7f6ed;
  --warn: #9a6200;
  --warn-50: #fdf3e2;
  --live: #c62828;
  --live-50: #fdecec;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(16, 32, 48, .06);
  --sh-2: 0 2px 8px rgba(16, 32, 48, .08);
  --sh-3: 0 10px 28px rgba(16, 32, 48, .12);
  --tap: 46px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --wrap: 1280px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: calc(72px + var(--safe-b));
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.22; color: var(--ink); letter-spacing: -.015em; }
h1 { font-size: 1.55rem; font-weight: 800; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); font-size: .86rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
main#app:focus, main#app:focus-visible { outline: none; }

.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;
}
.skip { position: absolute; left: -9999px; top: 0; background: var(--white); padding: 10px 14px; z-index: 99; border-radius: 0 0 var(--r-sm) 0; }
.skip:focus { left: 0; top: 0; }

.sprite { display: none; }
.ic {
  width: 20px; height: 20px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic-sm { width: 16px; height: 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-inline: 16px; }

/* ====================================================== Cabeçalho */
.hdr {
  position: sticky; top: 0; z-index: 40;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.hdr-main {
  max-width: var(--wrap); margin: 0 auto;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: 0 0 auto; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 10px; flex: 0 0 auto;
  background: var(--brand); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: .95rem; letter-spacing: .02em;
}
.brand-mark .brand-ic { width: 23px; height: 23px; fill: currentColor; stroke: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; }
.brand-text span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* No celular a busca ocupa uma linha própria, abaixo da marca. */
.hdr-search { display: block; order: 9; flex: 1 0 100%; max-width: none; position: relative; margin-top: 2px; }
.hdr-search input {
  width: 100%; height: 44px; padding: 0 48px 0 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #f7f9fb; color: var(--ink); font: inherit; font-size: .93rem;
}
.hdr-search input:focus { background: var(--white); border-color: var(--brand-600); outline: none; box-shadow: 0 0 0 3px var(--brand-50); }
.hdr-search button {
  position: absolute; right: 4px; top: 4px; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; cursor: pointer;
}
.hdr-search button:hover { background: var(--brand-600); }

.hdr-links { display: none; gap: 20px; margin-left: auto; }
.hdr-links a { color: var(--ink-2); font-size: .92rem; font-weight: 600; }
.hdr-links a:hover { color: var(--brand); text-decoration: none; }

.hdr-right { margin-left: auto; display: flex; align-items: center; gap: 6px; order: 1; }
.hdr-fav {
  position: relative; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; color: var(--ink-2);
}
.hdr-fav:hover { background: var(--line-2); text-decoration: none; }
.hdr-fav.on { color: var(--live); }
.hdr-fav.on .ic { fill: var(--live); stroke: var(--live); }
.fav-count {
  position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--live); color: #fff;
  font-size: .68rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--white);
}
.fav-count[hidden] { display: none; }
.hdr-account { display: none; align-items: center; gap: 8px; }
.hdr-user {
  display: flex; align-items: center; gap: 8px; color: var(--ink-2);
  padding: 4px 10px; border-radius: var(--r-sm);
}
.hdr-user:hover { background: var(--line-2); text-decoration: none; }
.hdr-user span { display: flex; flex-direction: column; line-height: 1.15; font-size: .78rem; }
.hdr-user span strong { font-size: .88rem; color: var(--ink); }
.hdr-burger {
  width: 42px; height: 42px; border: 0; background: transparent; border-radius: 50%;
  color: var(--ink); display: grid; place-items: center; cursor: pointer;
}
.hdr-burger:hover { background: var(--line-2); }

.hdr-cats { border-top: 1px solid var(--line-2); background: var(--white); display: none; }
.hdr-cats.open { display: block; }
.hdr-cats-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 16px;
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
}
.hdr-cats-inner::-webkit-scrollbar { display: none; }
.hdr-cats a {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  padding: 12px 12px; font-size: .9rem; font-weight: 600; color: var(--ink-2);
  border-bottom: 3px solid transparent;
}
.hdr-cats a:hover { color: var(--brand); text-decoration: none; border-bottom-color: var(--accent); }
.hdr-cats a.active { color: var(--brand); border-bottom-color: var(--brand); }
.hdr-cats .ic { width: 18px; height: 18px; }

.demo-strip {
  margin: 0; padding: 8px 16px; background: var(--warn-50); color: var(--warn);
  font-size: .8rem; text-align: center; border-bottom: 1px solid #f4e3c4;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.demo-strip .ic { width: 16px; height: 16px; }

/* ====================================================== Barra inferior (mobile) */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--white); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 62px; font-size: .7rem; font-weight: 600; color: var(--muted);
}
.tabbar a:hover { text-decoration: none; }
.tabbar a.active { color: var(--brand); }
.tabbar a.active .ic { stroke-width: 2.2; }

/* ====================================================== Layout de página */
main { min-height: 62vh; outline: none; }
main#app, .page { max-width: var(--wrap); margin: 0 auto; padding: 18px 16px 34px; }
.page-narrow { max-width: 860px; margin: 0 auto; }
.loading { color: var(--muted); padding: 32px 16px; text-align: center; }
.section { margin-bottom: 34px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px;
}
.section-head h2 { margin: 0; }
.section-head a { font-size: .9rem; font-weight: 700; white-space: nowrap; }

.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.crumbs .ic { width: 14px; height: 14px; opacity: .6; }

.page-title { margin-bottom: 4px; }
.lead { color: var(--muted); font-size: .98rem; margin-bottom: 18px; }

/* ====================================================== Home */
.hero {
  background: linear-gradient(135deg, #0b3b66 0%, #0e4a80 55%, #13619f 100%);
  color: #fff; border-radius: var(--r-lg); padding: 28px 22px; margin-bottom: 26px;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px;
  border-radius: 50%; background: rgba(246, 167, 0, .14);
}
.hero h1 { color: #fff; font-size: 1.75rem; max-width: 18ch; position: relative; }
.hero p { color: #cfe0f0; max-width: 54ch; position: relative; }
.hero-search { display: flex; gap: 8px; margin-top: 18px; position: relative; flex-wrap: wrap; }
.hero-search input {
  flex: 1 1 220px; height: 50px; padding: 0 16px; border: 0; border-radius: var(--r);
  font: inherit; font-size: .95rem; color: var(--ink);
}
.hero-search .btn { height: 50px; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; position: relative; }
.hero-tags a {
  font-size: .82rem; font-weight: 600; color: #fff; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22); padding: 6px 12px; border-radius: 999px;
}
.hero-tags a:hover { background: rgba(255,255,255,.24); text-decoration: none; }

.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 30px; }
.stat {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px;
}
.stat strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.stat span { font-size: .8rem; color: var(--muted); }

.cat-tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.cat-tile {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 12px; text-align: center; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cat-tile:hover { text-decoration: none; border-color: var(--brand); box-shadow: var(--sh-2); transform: translateY(-2px); }
.cat-tile .ic { width: 30px; height: 30px; color: var(--brand); stroke-width: 1.6; }
.cat-tile strong { font-size: .95rem; }
.cat-tile small { color: var(--muted); }

.steps { display: grid; gap: 12px; counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 16px 16px 60px; position: relative;
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 16px; top: 15px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-50); color: var(--brand); font-weight: 800; font-size: .9rem;
  display: grid; place-items: center;
}
.steps strong { display: block; }

.trust { display: grid; gap: 12px; grid-template-columns: 1fr; }
.trust-item {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px;
}
.trust-item .ic { width: 24px; height: 24px; color: var(--brand); }
.trust-item strong { display: block; margin-bottom: 2px; }

/* ====================================================== Catálogo */
.catalog { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }

.filters-toggle {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: var(--tap); border: 1px solid var(--line); border-radius: var(--r);
  background: var(--white); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer;
}
.filters-toggle .count {
  background: var(--brand); color: #fff; border-radius: 999px; font-size: .72rem;
  padding: 1px 7px; font-weight: 800;
}

.filters { display: grid; gap: 14px; }
.filters[hidden] { display: none; }
.fcard {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px;
}
.fcard > h3 { font-size: .98rem; margin-bottom: 12px; }
.fcard-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.fcard-head h3 { margin: 0; }
.link-btn {
  border: 0; background: transparent; color: var(--brand-600); font: inherit; font-size: .84rem;
  font-weight: 700; cursor: pointer; padding: 2px 4px; border-radius: 6px;
}
.link-btn:hover { text-decoration: underline; }

.sel-list { display: grid; gap: 6px; }
.sel-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--brand-50); border-radius: var(--r-sm); padding: 7px 10px; font-size: .85rem; font-weight: 600;
}
.sel-item button {
  width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--brand);
  display: grid; place-items: center; cursor: pointer; flex: 0 0 auto;
}
.sel-item button:hover { background: rgba(11, 59, 102, .12); }
.sel-item .ic { width: 14px; height: 14px; stroke-width: 2.4; }

.facet { border-top: 1px solid var(--line-2); }
.facet:first-of-type { border-top: 0; }
.facet > summary {
  list-style: none; cursor: pointer; padding: 12px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-weight: 700; font-size: .92rem;
}
.facet > summary::-webkit-details-marker { display: none; }
.facet > summary .ic { width: 18px; height: 18px; color: var(--muted); transition: transform .15s; }
.facet[open] > summary .ic { transform: rotate(180deg); }
.facet-body { padding-bottom: 12px; max-height: 208px; overflow-y: auto; }
.facet-body::-webkit-scrollbar { width: 6px; }
.facet-body::-webkit-scrollbar-thumb { background: #d4dbe3; border-radius: 999px; }

.opt {
  display: flex; align-items: center; gap: 10px; padding: 7px 2px; cursor: pointer; font-size: .89rem;
}
.opt:hover { color: var(--brand); }
.opt input { width: 17px; height: 17px; accent-color: var(--brand); flex: 0 0 auto; margin: 0; }
.opt .n { margin-left: auto; color: var(--muted); font-size: .8rem; }

.range { display: flex; align-items: center; gap: 8px; }
.range input {
  width: 100%; min-width: 0; height: 40px; padding: 0 10px; font: inherit; font-size: .88rem;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--white); color: var(--ink);
}

.results-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.results-count { font-weight: 700; font-size: .95rem; }
.results-count span { color: var(--muted); font-weight: 500; }
.results-tools { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.sort-wrap { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.sort-wrap select {
  border: 0; background: transparent; font: inherit; font-size: .88rem; font-weight: 700;
  color: var(--ink); cursor: pointer; padding: 6px 4px; max-width: 230px;
}
.view-toggle { display: flex; gap: 2px; background: var(--line-2); padding: 3px; border-radius: var(--r-sm); }
.view-toggle button {
  width: 32px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--muted);
  display: grid; place-items: center; cursor: pointer;
}
.view-toggle button[aria-pressed="true"] { background: var(--white); color: var(--brand); box-shadow: var(--sh-1); }

/* ====================================================== Card de lote */
.lots { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.lots.list { grid-template-columns: 1fr; }

.lot {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; color: var(--ink);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.lot:hover { text-decoration: none; border-color: #cfd8e3; box-shadow: var(--sh-2); transform: translateY(-2px); }

.lot-media { position: relative; aspect-ratio: 4 / 3; background: #eef2f6; overflow: hidden; }
.lot-media img { width: 100%; height: 100%; object-fit: cover; }
.lot-media .ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, hsl(var(--h, 210) 28% 46%), hsl(var(--h, 210) 30% 26%));
  display: grid; place-items: center; color: rgba(255,255,255,.75);
}
.lot-media .ph .ic { width: 44px; height: 44px; }

.tag-status {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 4px 9px; border-radius: 6px; background: rgba(21, 32, 43, .78); color: #fff;
  backdrop-filter: blur(2px);
}
.tag-status.aberto { background: var(--ok); }
.tag-status.agendado { background: var(--brand); }
.tag-status.arrematado { background: #4a3aa8; }

.fav-btn {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: var(--ink-2);
  display: grid; place-items: center; cursor: pointer; box-shadow: var(--sh-1);
}
.fav-btn:hover { background: #fff; color: var(--live); }
.fav-btn[aria-pressed="true"] { color: var(--live); }
.fav-btn[aria-pressed="true"] .ic { fill: var(--live); stroke: var(--live); }

.photo-count {
  position: absolute; bottom: 8px; right: 8px; z-index: 2;
  font-size: .7rem; font-weight: 700; color: #fff; background: rgba(21, 32, 43, .7);
  padding: 3px 8px; border-radius: 999px;
}

.tag-off {
  position: absolute; bottom: 8px; left: 8px; z-index: 2;
  font-size: .72rem; font-weight: 800; color: #fff; background: var(--live);
  padding: 4px 9px; border-radius: 6px; letter-spacing: .01em;
}
.lot-fipe { font-size: .76rem; color: var(--muted); display: block; }
.fipe-nota { font-size: .78rem; margin: 10px 0 0; }

.lot-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.lot-when {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  background: #fdf1dd; color: #8a5a00; font-size: .76rem; font-weight: 700;
  padding: 4px 9px; border-radius: 999px;
}
.lot-when .ic { width: 14px; height: 14px; }
.lot-when.live { background: var(--live-50); color: var(--live); }
.lot-ref { font-size: .76rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.lot-title {
  font-size: .95rem; font-weight: 700; line-height: 1.3; margin: 0; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lot-title a { color: inherit; }
.lot-title a:hover { color: var(--brand); text-decoration: none; }
.lot-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.lot-meta { display: flex; align-items: center; gap: 5px; font-size: .8rem; color: var(--muted); }
.lot-meta .ic { width: 14px; height: 14px; }
.lot-specs { font-size: .8rem; color: var(--muted); }
.lot-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-2); }
.lot-foot .label { font-size: .76rem; color: var(--muted); display: block; }
.lot-price { font-size: 1.26rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
.lot-bids { font-size: .76rem; color: var(--muted); display: block; }
.lot-bids b { color: var(--live); font-weight: 800; }
.pill .ic { width: 13px; height: 13px; margin-right: 3px; vertical-align: -2px; }
.cd { font-variant-numeric: tabular-nums; }
.cd.urgent { color: var(--live); font-weight: 800; }

/* Lista (toggle "Exibir") */
.lots.list .lot { flex-direction: row; }
.lots.list .lot-media { width: 38%; max-width: 280px; aspect-ratio: auto; min-height: 150px; }
.lots.list .lot-body { flex: 1; }
.lots.list .lot-title { -webkit-line-clamp: 3; font-size: 1rem; }

.empty {
  background: var(--white); border: 1px dashed var(--line); border-radius: var(--r);
  padding: 32px 20px; text-align: center; color: var(--muted); grid-column: 1 / -1;
}
.empty strong { display: block; color: var(--ink); margin-bottom: 4px; }

/* ====================================================== Página do lote */
.lot-layout { display: grid; gap: 18px; align-items: start; }

.gallery { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.gallery-main { position: relative; aspect-ratio: 4 / 3; background: #f1f4f7; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main .ph { width: 100%; height: 100%; background: linear-gradient(135deg, hsl(var(--h,210) 28% 46%), hsl(var(--h,210) 30% 26%)); display: grid; place-items: center; color: rgba(255,255,255,.8); }
.gal-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.9); color: var(--ink); display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--sh-1);
}
.gal-nav:hover { background: #fff; }
.gal-prev { left: 10px; }
.gal-next { right: 10px; }
.gal-index {
  position: absolute; bottom: 10px; right: 10px; z-index: 2;
  background: rgba(21,32,43,.62); color: #fff; font-size: .75rem; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
}
.thumbs { display: flex; gap: 8px; padding: 10px; overflow-x: auto; scrollbar-width: none; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button {
  flex: 0 0 auto; width: 78px; height: 58px; padding: 0; border-radius: var(--r-sm); overflow: hidden;
  border: 2px solid transparent; background: #eef2f6; cursor: pointer;
}
.thumbs button[aria-current="true"] { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.credit { font-size: .76rem; color: var(--muted); padding: 0 12px 12px; }

.lot-head { margin-top: 16px; }
.lot-head h1 { font-size: 1.4rem; }
.lot-head .sub { color: var(--muted); font-size: .9rem; }

.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 16px 0 0; }
.specs > div { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.specs dt { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.specs dd { margin: 2px 0 0; font-weight: 700; font-size: .92rem; }
.specs .wide { grid-column: 1 / -1; }
.specs .wide dd { font-weight: 600; }

.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px;
}
.panel + .panel { margin-top: 14px; }
.panel h2 { font-size: 1.05rem; }

.bid-panel {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; display: grid; gap: 14px; box-shadow: var(--sh-2);
}
.bid-panel .panel-title { font-size: 1.12rem; margin: 0 0 2px; }
.bid-now .label { font-size: .78rem; color: var(--muted); }
.bid-now .big { font-size: 1.9rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.bid-now .next { font-size: .82rem; color: var(--muted); }
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--line-2); color: var(--ink-2);
}
.pill.aberto { background: var(--ok-50); color: var(--ok); }
.pill.agendado { background: var(--brand-50); color: var(--brand); }
.pill.live { background: var(--live-50); color: var(--live); }
.bid-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bid-quick .btn { min-height: 42px; font-size: .84rem; padding: 8px 6px; }
.bid-form { display: grid; gap: 10px; }
.bid-form input {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  font: inherit; font-size: 1.1rem; font-weight: 700;
}

.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.history li {
  display: flex; justify-content: space-between; gap: 8px; padding: 9px 12px;
  background: #f8fafc; border-radius: var(--r-sm); font-size: .88rem;
}
.history li.top { background: var(--ok-50); color: var(--ok); font-weight: 700; }

/* ====================================================== Botões / formulários */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 11px 18px; border-radius: var(--r-sm); border: 1px solid transparent;
  font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer;
  background: var(--brand); color: #fff; text-align: center; transition: background .15s, border-color .15s;
}
.btn:hover { text-decoration: none; background: var(--brand-600); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #2b1d00; }
.btn-primary:hover { background: var(--accent-600); }
.btn-outline { background: transparent; color: var(--brand); border-color: #c6d3e0; }
.btn-outline:hover { background: var(--brand-50); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--line-2); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: .85rem; }
.btn-danger { background: #b42318; }
.btn-success { background: var(--ok); }

form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea, .inp {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--white); color: var(--ink); font: inherit; font-size: .95rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-50);
}
.field textarea { min-height: 96px; }
.field .hint { font-size: .8rem; color: var(--muted); }
.field .err { font-size: .84rem; color: #b42318; }
.row-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--brand); }

.card-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.narrow { max-width: 520px; margin: 0 auto; }

.alert { border-radius: var(--r-sm); padding: 12px 14px; font-size: .92rem; margin-bottom: 12px; border: 1px solid transparent; }
.alert-info { background: var(--brand-50); border-color: #cfe0f0; color: #0a3356; }
.alert-ok { background: var(--ok-50); border-color: #c6e8d4; color: #0b5c2e; }
.alert-warn { background: var(--warn-50); border-color: #f4e3c4; color: var(--warn); }
.alert-err { background: var(--live-50); border-color: #f5cfcf; color: #92201f; }

.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(80px + var(--safe-b)); z-index: 60;
  background: var(--ink); color: #fff; border-radius: var(--r-sm); padding: 13px 16px;
  box-shadow: var(--sh-3); max-width: 540px; margin: 0 auto; font-size: .92rem;
}
.toast.err { background: #b42318; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: .89rem; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { font-size: .76rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: #f8fafc; }
tr:last-child td { border-bottom: 0; }

.kpi { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-bottom: 18px; }
.kpi > div { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.kpi strong { display: block; font-size: 1.4rem; font-weight: 800; color: var(--brand); }
.kpi span { font-size: .8rem; color: var(--muted); }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 16px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 0 0 auto; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--white); font: inherit; font-weight: 700; font-size: .88rem; color: var(--ink-2); cursor: pointer;
}
.tabs button[aria-selected="true"] { background: var(--brand); color: #fff; border-color: var(--brand); }

.list-cards { display: grid; gap: 12px; }
.list-cards .item { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 8px; }
.item-actions { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.item-actions .btn { min-height: 40px; font-size: .85rem; }

.doc-item { gap: 10px; }
.doc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.doc-ok {
  display: flex; align-items: center; gap: 10px;
  background: var(--ok-50); border: 1px solid #c6e8d4; border-radius: var(--r-sm); padding: 10px 12px;
}
.doc-ok .ic { width: 20px; height: 20px; color: var(--ok); stroke-width: 2.4; }
.doc-ok strong { display: block; font-size: .9rem; color: var(--ok); }
.doc-ok .muted { font-size: .8rem; word-break: break-word; }
.doc-escolher { align-self: flex-start; cursor: pointer; }
label.btn { cursor: pointer; }
.doc-item .err:empty, .doc-item [data-doc-estado]:empty { display: none; }

.feature-list { display: grid; gap: 10px; padding: 0; margin: 0 0 12px; list-style: none; }
details.qa { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; }
details.qa summary { font-weight: 700; cursor: pointer; }

/* ====================================================== Rodapé */
.footer { background: #0a2d4d; color: #c3d4e4; margin-top: 30px; }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 32px 16px 20px;
  display: grid; gap: 26px; grid-template-columns: 1fr;
}
.footer-col { display: grid; gap: 8px; align-content: start; }
.footer-col h3 { color: #fff; font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 4px; }
.footer-col a { color: #c3d4e4; font-size: .9rem; }
.footer-col a:hover { color: #fff; }
.footer .muted { color: #8da8c0; font-size: .82rem; }
.footer .brand-footer { color: #fff; margin-bottom: 4px; }
.footer .brand-footer .brand-mark { background: #fff; color: var(--brand); }
.footer .brand-footer .brand-text span { color: #8da8c0; }
.seals {
  max-width: var(--wrap); margin: 0 auto; padding: 4px 16px 22px;
  display: grid; gap: 10px; grid-template-columns: 1fr;
}
.seal {
  display: flex; align-items: flex-start; gap: 11px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: var(--r-sm); padding: 12px 14px;
}
.seal-img { width: 30px; height: 30px; flex: 0 0 auto; margin-top: 1px; }
.seal strong { display: block; color: #fff; font-size: .86rem; margin-bottom: 1px; }
.seal span { display: block; font-size: .76rem; color: #8da8c0; line-height: 1.4; }
/* Sem HTTPS no acesso atual: o selo fica apagado em vez de afirmar algo falso. */
.seal.off { opacity: .6; }
.seal.off .seal-img { filter: grayscale(1) brightness(1.5); opacity: .7; }

.footer-base {
  border-top: 1px solid rgba(255,255,255,.12);
  max-width: var(--wrap); margin: 0 auto; padding: 16px 16px 26px; font-size: .8rem; color: #8da8c0;
}
.footer-base p { margin: 0 0 6px; }

/* ====================================================== Tablet / desktop */
@media (min-width: 640px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .row-2 { grid-template-columns: 1fr 1fr; }
  .kpi { grid-template-columns: repeat(4, 1fr); }
  .item-actions { grid-template-columns: repeat(3, 1fr); }
  .trust { grid-template-columns: repeat(3, 1fr); }
  .cat-tiles { grid-template-columns: repeat(3, 1fr); }
  .hero { padding: 36px 32px; }
  .hero h1 { font-size: 2.1rem; }
  .specs { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
  .seals { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .hdr-search { order: 0; flex: 1 1 auto; max-width: 460px; margin-top: 0; }
  .hdr-links { display: flex; margin-left: 10px; }
  .hdr-right { margin-left: 14px; }
  .hdr-account { display: flex; }
  .hdr-burger { display: none; }
  .hdr-cats { display: block; }
  main#app, .page { padding: 24px 24px 48px; }
  .wrap { padding-inline: 24px; }
  .catalog { grid-template-columns: 262px 1fr; gap: 26px; }
  .filters-toggle { display: none; }
  .filters { position: sticky; top: 124px; }
  .filters[hidden] { display: grid; }
  .lot-layout { grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 26px; }
  .bid-panel { position: sticky; top: 124px; }
  .footer-inner { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; }
  .cat-tiles { grid-template-columns: repeat(5, 1fr); }
  .seals { grid-template-columns: repeat(4, 1fr); padding-inline: 24px; }
  h1 { font-size: 1.85rem; }
  .lot-head h1 { font-size: 1.6rem; }
}

@media (min-width: 1100px) {
  .lots { grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); }
}

/* No celular o painel de lance aparece antes da galeria. */
@media (max-width: 899px) {
  .lot-layout > .bid-panel { order: -1; }
  .lots.list .lot { flex-direction: column; }
  .lots.list .lot-media { width: 100%; max-width: none; aspect-ratio: 4 / 3; }
}

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