[hidden] { display: none !important; }
:root {
  --green: #6CAC2C; --green-d: #548a20; --dark: #16181A; --dark2: #23262a;
  --bg: #f3f4f2; --card: #fff; --text: #16181A; --muted: #6b7075; --line: #e3e5e1;
  --warn-bg: #fff6d6; --warn: #7a5b00; --sold: #c0392b;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
button { font: inherit; cursor: pointer; }
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 10px; background: var(--dark); color: #fff; }
.top .logo { height: 26px; }
.top .title { flex: 1; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .back, .top .add { background: none; border: 0; color: #fff; font-size: 30px; line-height: 1; padding: 0 6px; }
.top .add { color: var(--green); font-size: 28px; }
main { padding: 12px 12px calc(env(safe-area-inset-bottom) + 24px); max-width: 900px; margin: 0 auto; }

/* PIN */
.pin { max-width: 320px; margin: 12vh auto 0; text-align: center; }
.pin h2 { margin: 0 0 6px; }
.pin p { color: var(--muted); margin: 0 0 18px; }
.pin input { width: 100%; font-size: 28px; letter-spacing: 10px; text-align: center; padding: 12px;
  border: 2px solid var(--line); border-radius: 12px; }
.pin input:focus { outline: none; border-color: var(--green); }
.pin .err { color: var(--sold); min-height: 22px; margin-top: 10px; }

/* Lista */
.search { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; background: #fff; }
.chips { display: flex; gap: 8px; margin: 10px 0 12px; overflow-x: auto; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; white-space: nowrap; font-size: 14px; }
.chip.on { background: var(--dark); color: #fff; border-color: var(--dark); }
.count { color: var(--muted); font-size: 13px; margin: 0 2px 8px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.car { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); border: 0; padding: 0; text-align: left; color: inherit; position: relative; }
.car img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; background: #ddd; }
.car .info { padding: 8px 10px 10px; }
.car .name { font-weight: 700; font-size: 14px; line-height: 1.25; }
.car .meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.car .price { color: var(--green-d); font-weight: 800; font-size: 16px; margin-top: 4px; }
.badge { position: absolute; top: 8px; left: 8px; background: var(--sold); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.badge.res { background: #e08e0b; }
.car.sold img { filter: grayscale(.8); opacity: .7; }

/* Ficha */
.hero { width: calc(100% + 24px); margin: -12px -12px 0; aspect-ratio: 4/3; object-fit: cover; display: block; background: #ddd; }
.head { padding: 14px 2px 4px; }
.head h1 { margin: 0; font-size: 22px; line-height: 1.2; }
.head .price { color: var(--green-d); font-size: 30px; font-weight: 800; margin-top: 4px; }
.status { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 6px; background: #e6f2da; color: var(--green-d); }
.status.Vendido { background: #f8dcd8; color: var(--sold); }
.status.Reservado { background: #fdebc8; color: #8a5a00; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.btn { border: 0; border-radius: 12px; padding: 14px 10px; font-weight: 700; font-size: 15px; background: #fff; color: var(--dark); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.btn.big { grid-column: 1 / -1; background: var(--green); color: #fff; font-size: 18px; letter-spacing: 1px; }
.btn.dark { background: var(--dark); color: #fff; }
.btn.danger { background: #fff; color: var(--sold); }
.specs { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.specs div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.specs div:last-child { border-bottom: 0; }
.specs span:first-child { color: var(--muted); }
.specs span:last-child { font-weight: 600; text-align: right; word-break: break-all; }
.sec { margin: 18px 2px 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.feats { background: #fff; border-radius: 14px; padding: 6px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.feats p { margin: 8px 0; }
.notes { background: var(--warn-bg); color: var(--warn); border-radius: 14px; padding: 12px 14px; white-space: pre-wrap; }
.notes b { display: block; font-size: 12px; text-transform: uppercase; margin-bottom: 4px; }
.upd { color: var(--muted); font-size: 12px; text-align: center; margin-top: 18px; }

/* Formulário */
.form label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin: 14px 2px 5px; }
.form input, .form select, .form textarea { width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 16px; background: #fff; font-family: inherit; }
.form textarea { min-height: 90px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hint { font-size: 12px; color: var(--muted); margin: 4px 2px 0; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.thumb { position: relative; }
.thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; display: block; }
.thumb.cover img { outline: 3px solid var(--green); outline-offset: -3px; }
.thumb .tb { position: absolute; bottom: 4px; display: flex; gap: 4px; left: 4px; right: 4px; justify-content: space-between; }
.thumb .tb button { border: 0; border-radius: 6px; font-size: 11px; padding: 3px 6px; background: rgba(0,0,0,.65); color: #fff; }
.upl { display: block; margin-top: 10px; text-align: center; padding: 14px; border: 2px dashed var(--green); border-radius: 12px; color: var(--green-d); font-weight: 700; }
.upl input { display: none; }
.formbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }

/* Galeria */
.gallery { position: fixed; inset: 0; background: #000; z-index: 20; display: flex; flex-direction: column; }
.gtop { display: flex; align-items: center; gap: 8px; padding: calc(env(safe-area-inset-top) + 8px) 10px 8px; color: #fff; }
.gtop span { flex: 1; font-size: 14px; }
.gbtn { background: rgba(255,255,255,.15); color: #fff; border: 0; border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.gtrack { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.gtrack img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; scroll-snap-align: center; }

.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 24px); transform: translateX(-50%);
  background: var(--dark); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 30; font-size: 15px; max-width: 90vw; text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.top .lang, .top .staff { background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 8px; padding: 6px 9px; font-size: 13px; font-weight: 700; }
.pitch { background: var(--dark); color: #e9ece6; border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; font-size: 14px; line-height: 1.6; }
.pitch b { color: #fff; }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact a { text-decoration: none; text-align: center; display: block; }
.btn.wa { background: #25D366; }
.hero { max-height: 62vh; }
@media (min-width: 700px) { .hero { width: 100%; margin: 0; border-radius: 14px; } }
.gnav { position: fixed; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.18); color: #fff; border: 0; border-radius: 50%; width: 48px; height: 48px; font-size: 26px; z-index: 21; }
.gnav.prev { left: 12px; } .gnav.next { right: 12px; }
@media (hover: none) { .gnav { display: none; } }
.ptr { height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: var(--muted); transition: height .15s; }
html, body { overscroll-behavior-y: contain; }
