/* ==========================================================
   Barganhas & Vendas — identidade visual
   Inspirada em feiras e brechós: papel kraft, etiquetas de
   preço penduradas em barbante, tipografia de caderneta.
   ========================================================== */

:root {
  --paper:        #F1E7D0;
  --paper-white:  #FFFDF8;
  --ink:          #21201C;
  --ink-soft:     #5C5645;
  --teal:         #1F5A54;
  --teal-dark:    #123B37;
  --mustard:      #E2A63B;
  --mustard-soft: #F3D9A4;
  --brick:        #C1442C;
  --brick-dark:   #9B331F;
  --line:         #D9C9A3;
  --shadow: 0 6px 18px rgba(33, 32, 28, 0.10);
  --shadow-lift: 0 14px 28px rgba(33, 32, 28, 0.16);
  --radius: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Work Sans', -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
  margin: 0 0 .4em;
  line-height: 1.1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  color: var(--brick);
  font-weight: 700;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: .95rem;
  background: var(--paper-white);
  color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-block { width: 100%; }
.btn-brick { background: var(--brick); border-color: var(--brick-dark); color: #fff; }
.btn-teal { background: var(--teal); border-color: var(--teal-dark); color: #fff; }
.btn-outline { background: transparent; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Header ---------- */
.site-header {
  background: var(--paper-white);
  border-bottom: 2px solid var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 9px;
  padding-bottom: 9px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.logo-tag { font-size: 1.5rem; transform: rotate(-8deg); }
.logo-icon { height: 40px; width: auto; display: block; flex-shrink: 0; }
.logo-text {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -.01em;
}
.logo-text em { color: var(--brick); font-style: normal; }

.header-search {
  flex: 1;
  display: flex;
  max-width: 480px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper);
  position: relative;
}
.header-search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 11px 18px;
  font-family: 'Work Sans', sans-serif;
  font-size: .95rem;
  color: var(--ink);
  outline: none;
  min-width: 0;
}
.header-search-uf {
  border: 0;
  border-left: 2px solid var(--ink);
  background: var(--paper-white);
  padding: 11px 6px;
  font-family: 'Work Sans', sans-serif;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  width: 78px;
  flex-shrink: 0;
}
.header-search button {
  border: 0;
  background: var(--mustard);
  padding: 0 18px;
  font-size: 1rem;
}

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-link { font-weight: 600; padding: 8px 4px; }

.mobile-toggle {
  display: none;
  border: 2px solid var(--ink);
  background: var(--paper-white);
  border-radius: 8px;
  font-size: 1.1rem;
  padding: 6px 10px;
}

.user-menu { position: relative; }
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--ink);
  background: var(--paper-white);
  border-radius: 999px;
  padding: 6px 12px 6px 6px;
}
.avatar-chip {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}
.avatar-chip-img { object-fit: cover; background: var(--paper); }
.user-menu-name { font-weight: 600; font-size: .9rem; }
.chevron { font-size: .7rem; }
.user-menu-dropdown {
  display: none;
  position: absolute;
  right: 0; top: calc(100% + 8px);
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lift);
  min-width: 180px;
  overflow: hidden;
  z-index: 60;
}
.user-menu-dropdown.open { display: block; }
.user-menu-dropdown a {
  display: block;
  padding: 12px 16px;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.user-menu-dropdown a:last-child { border-bottom: 0; color: var(--brick); }
.user-menu-dropdown a:hover { background: var(--paper); }

.category-strip { background: var(--teal); overflow-x: auto; border-top: 6px solid var(--brick); }
.category-strip-inner {
  display: flex;
  gap: 8px;
  padding: 10px 24px;
  white-space: nowrap;
}
.cat-pill {
  color: #fff;
  font-size: .85rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  flex-shrink: 0;
}
.cat-pill:hover { background: rgba(255,255,255,.15); }

/* ---------- Alerts ---------- */
.alert {
  margin-top: 18px;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-weight: 500;
  border: 2px solid var(--ink);
}
.alert-success { background: #DCEEE0; }
.alert-error { background: #F6D9D2; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 64px 0 48px;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 700;
}
.hero h1 .underline {
  background: linear-gradient(transparent 65%, var(--mustard) 65%);
  padding: 0 2px;
}
.hero p.lede {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 24px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-checks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 22px 0 0;
  padding: 0;
}
.hero-checks li {
  font-size: .88rem;
  font-weight: 600;
  color: var(--teal-dark);
}

.trust-strip {
  background: var(--ink);
  padding: 12px 0;
}
.trust-strip-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 34px;
}
.trust-strip-inner span {
  color: var(--paper);
  font-family: 'Space Mono', monospace;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.hero-tags {
  position: relative;
  height: 340px;
}
.float-tag {
  position: absolute;
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 14px 18px 14px 26px;
  box-shadow: var(--shadow);
  font-family: 'Space Mono', monospace;
  font-size: .8rem;
}
.float-tag::before {
  content: '';
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper);
}
.float-tag .price { display: block; font-weight: 700; font-size: 1.15rem; color: var(--brick); margin-top: 2px; }
.float-tag.t1 { top: 0; left: 10%; transform: rotate(-6deg); }
.float-tag.t2 { top: 40%; right: 4%; transform: rotate(4deg); }
.float-tag.t3 { bottom: 4%; left: 22%; transform: rotate(-3deg); background: var(--mustard-soft); }

.hero-stamp {
  position: absolute;
  top: -38px;
  left: 42%;
  width: 190px;
  transform: rotate(-8deg);
  filter: drop-shadow(0 10px 16px rgba(33, 32, 28, 0.22));
  z-index: 4;
}

/* ---------- Carrossel promocional ---------- */
.carousel-section { padding-top: 0; }
.carousel {
  position: relative;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.carousel-track {
  display: flex;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.carousel-slide {
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 44px 56px;
  color: #fff;
}
.slide-brick { background: linear-gradient(120deg, var(--brick), var(--brick-dark)); }
.slide-teal { background: linear-gradient(120deg, var(--teal), var(--teal-dark)); }
.slide-mustard { background: linear-gradient(120deg, var(--mustard), #c98423); color: var(--ink); }
.slide-ink { background: linear-gradient(120deg, #33322A, var(--ink)); }
.slide-teal-dark { background: linear-gradient(120deg, #0F2E2B, var(--teal-dark)); }

.carousel-text { max-width: 440px; }
.carousel-eyebrow {
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .72rem;
  font-weight: 700;
  opacity: .85;
}
.carousel-text h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.7rem;
  color: inherit;
  margin: 8px 0 6px;
}
.carousel-text p { margin: 0 0 18px; opacity: .92; font-size: .95rem; }
.carousel-img { width: 150px; flex-shrink: 0; filter: drop-shadow(0 10px 16px rgba(0,0,0,.25)); }
.carousel-emoji { font-size: 5.5rem; flex-shrink: 0; filter: drop-shadow(0 10px 16px rgba(0,0,0,.2)); }

.btn-block-mini {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  font-size: .88rem;
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--ink);
}
.btn-block-mini-light { background: rgba(255,255,255,.15); color: #fff; border-color: rgba(255,255,255,.6); }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper-white);
  font-size: 1.3rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  z-index: 5;
}
.carousel-arrow.prev { left: 16px; }
.carousel-arrow.next { right: 16px; }
.carousel-arrow:hover { background: var(--mustard); }

.carousel-dots {
  position: absolute;
  bottom: 14px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 5;
}
.carousel-dots .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(0,0,0,.2);
  cursor: pointer;
}
.carousel-dots .dot.active { background: #fff; }

@media (max-width: 640px) {
  .carousel-slide { flex-direction: column; text-align: center; padding: 32px 24px 46px; }
  .carousel-text { max-width: 100%; }
  .carousel-img, .carousel-emoji { width: 100px; font-size: 3.4rem; }
}

/* ---------- Section headings ---------- */
.section { padding: 40px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
}
.section-head h2 { font-size: 1.7rem; }
.section-head a:not(.btn) { font-weight: 600; color: var(--teal); white-space: nowrap; }

/* ---------- Category grid (home) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.cat-card {
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 20px 14px;
  text-align: center;
  transition: transform .15s ease;
}
.cat-card:hover { transform: translateY(-4px) rotate(-1deg); }
.cat-card .ic { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.cat-card .nm { font-weight: 600; font-size: .88rem; }
.cat-card .cat-count {
  display: block;
  margin-top: 4px;
  font-family: 'Space Mono', monospace;
  font-size: .72rem;
  color: var(--ink-soft);
}

/* ---------- Como funciona ---------- */
.how-it-works { padding-top: 10px; }
.steps-grid {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.step-card {
  flex: 1;
  min-width: 200px;
  position: relative;
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 30px 22px 24px;
  text-align: center;
}
.step-number {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--brick);
  color: #fff;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--ink);
}
.step-ic { font-size: 2.2rem; display: block; margin: 8px 0 10px; }
.step-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.step-card p { font-size: .88rem; color: var(--ink-soft); margin: 0; }
.step-arrow {
  font-size: 1.6rem;
  color: var(--line);
  flex-shrink: 0;
}
@media (max-width: 760px) {
  .steps-grid { flex-direction: column; }
  .step-arrow { transform: rotate(90deg); }
}

/* ---------- Ad card grid — the "price tag" signature ---------- */
.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}
.ad-card {
  position: relative;
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: visible;
  transition: transform .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
}
.ad-card:hover { transform: rotate(-1.2deg) translateY(-4px); box-shadow: var(--shadow-lift); z-index: 2; }
.ad-card .hole {
  position: absolute;
  top: -9px; left: 18px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  z-index: 3;
}
.ad-card .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
  border-radius: 8px 8px 0 0;
  background: var(--paper);
  position: relative;
}
.ad-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ad-card .thumb .noimg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--line);
}

/* ---------- Mini-carrossel de fotos nos cards ---------- */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: rgba(255, 253, 248, .9);
  font-size: 1rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  z-index: 4;
  padding: 0;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s ease;
}
.ad-card .thumb:hover .gallery-nav { opacity: 1; }
.gallery-nav.gallery-prev { left: 8px; }
.gallery-nav.gallery-next { right: 8px; }
.gallery-nav:hover { background: var(--mustard); }
.gallery-dots {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  z-index: 4;
}
.gallery-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(33,32,28,.4);
}
.gallery-dot.active { background: #fff; }
@media (hover: none) {
  .gallery-nav { opacity: 1; }
}
.badge {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: .74rem; text-transform: uppercase; letter-spacing: .03em;
  padding: 5px 11px;
  border-radius: 7px;
  border: 2px solid var(--ink);
  box-shadow: 0 3px 6px rgba(33,32,28,.25);
}
.badge-novo { background: var(--mustard); color: var(--ink); }
.badge-usado { background: var(--teal); color: #fff; }
.ad-card .badge { position: absolute; top: 10px; right: 10px; }

.badge-lg {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  font-size: .92rem;
  padding: 7px 16px;
  border-radius: 8px;
}
.quality-tag {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 8px;
}
.ad-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.ad-card .price {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brick);
}
.currency-symbol {
  font-family: 'Work Sans', sans-serif;
  font-weight: 800;
  font-size: .92em;
  letter-spacing: -.02em;
}
.ad-card .title {
  font-weight: 600;
  font-size: .96rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad-card .meta {
  margin-top: auto;
  font-size: .78rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
}
.ad-card .price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
.ad-card .quality-label {
  font-size: .74rem;
  color: var(--ink-soft);
  white-space: nowrap;
  flex-shrink: 0;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: var(--paper-white);
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-soft);
}
.empty-state .ic { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.empty-state .empty-ic { width: 130px; margin: 0 auto 14px; display: block; }
.empty-state-launch {
  background: linear-gradient(160deg, var(--paper-white), var(--mustard-soft));
  border-style: solid;
}
.empty-state-launch .ic { font-size: 3rem; }
.empty-state-launch h3 { font-size: 1.4rem; margin-bottom: 6px; }

/* ---------- Forms / cards ---------- */
.card {
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.card-narrow { max-width: 460px; margin: 40px auto; }
.card-wide { max-width: 760px; margin: 32px auto; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  margin-bottom: 6px;
}
.field .hint { font-size: .78rem; color: var(--ink-soft); margin-top: 4px; }
.field input[type=text],
.field input[type=email],
.field input[type=password],
.field input[type=tel],
.field input[type=number],
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-family: 'Work Sans', sans-serif;
  font-size: .95rem;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); }
.field select:disabled {
  opacity: .55;
  cursor: not-allowed;
  background: var(--line);
}
.field textarea { resize: vertical; min-height: 120px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-2.row-3-cols { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) {
  .row-2.row-3-cols { grid-template-columns: 1fr; }
}
.row-price-state-city { display: grid; grid-template-columns: 1fr 90px 2.6fr; gap: 14px; }
@media (max-width: 640px) {
  .row-price-state-city { grid-template-columns: 1fr; }
}
.radio-group { display: flex; gap: 18px; }
.radio-group label { display: flex; align-items: center; gap: 6px; font-weight: 500; }

.form-foot { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--ink-soft); }
.form-foot a { color: var(--teal); font-weight: 600; }

.divider-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--ink-soft);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.divider-or::before, .divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-google {
  background: var(--paper-white);
  border: 2px solid var(--line);
  color: var(--ink);
  gap: 10px;
}
.btn-google:hover { border-color: var(--ink); }

.image-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.image-upload-slot {
  aspect-ratio: 1;
  border: 2px dashed var(--line);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  position: relative;
  background: var(--paper);
}
.image-upload-slot img { width: 100%; height: 100%; object-fit: cover; }
.image-upload-slot input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.image-upload-slot .plus { font-size: 1.6rem; color: var(--line); }

/* ---------- Upload de avatar (foto de perfil) ---------- */
.avatar-upload-field { display: flex; flex-direction: column; align-items: center; text-align: center; }
.avatar-upload-slot {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px dashed var(--line);
  background: var(--paper);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.avatar-upload-slot img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload-placeholder { font-size: 2rem; color: var(--line); font-weight: 700; }
.avatar-upload-slot:has(img) .avatar-upload-placeholder { display: none; }
.avatar-upload-slot input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.avatar-upload-field .hint { max-width: 260px; }

/* ---------- Mostrar/ocultar senha ---------- */
.password-field { position: relative; }
.password-field input { padding-right: 44px !important; }
.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.05rem;
  padding: 8px;
  cursor: pointer;
  opacity: .55;
  line-height: 1;
}
.password-toggle:hover { opacity: 1; }

/* ---------- Single ad page ---------- */
.ad-detail { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; padding: 32px 0 60px; }
.ad-gallery-main {
  aspect-ratio: 4/3;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-white);
  margin-bottom: 10px;
}
.ad-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.ad-gallery-main .noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3rem; color: var(--line); }
.ad-gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.ad-gallery-thumbs img {
  width: 72px; height: 72px; object-fit: cover;
  border: 2px solid var(--ink); border-radius: 8px; cursor: pointer;
}
.ad-title-row h1 { font-size: 1.8rem; }
.ad-price-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--brick);
  margin: 10px 0 16px;
}
.ad-meta-line { font-size: .88rem; color: var(--ink-soft); margin-bottom: 18px; }
.ad-desc { white-space: pre-line; line-height: 1.7; margin-bottom: 24px; }

.seller-card { background: var(--paper-white); border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px; }
.seller-card h3 { font-size: 1.1rem; }
.seller-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.seller-row .avatar-chip { width: 44px; height: 44px; font-size: 1.1rem; }

.owner-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- My ads / table-ish list ---------- */
.myad-row {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
}
.myad-row .thumb { width: 74px; height: 74px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.myad-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.myad-row .info { flex: 1; min-width: 0; }
.myad-row .info .t { font-weight: 600; }
.myad-row .info .p { color: var(--brick); font-family: 'Space Mono', monospace; font-weight: 700; }
.myad-row .status-chip {
  font-size: .7rem; font-family: 'Space Mono', monospace;
  padding: 3px 8px; border-radius: 6px; text-transform: uppercase;
}
.status-ativo { background: #DCEEE0; }
.status-vendido { background: #E4DCF4; }
.status-pausado { background: #F0E3C8; }
.myad-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--paper); margin-top: 60px; padding-top: 44px; }
.footer-row { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 30px; }
.footer-brand { max-width: 320px; }
.footer-brand .logo-icon { height: 46px; margin-bottom: 8px; }
.footer-brand .logo-text { color: var(--paper); }
.footer-brand p { color: #C9C3B0; font-size: .9rem; margin-top: 10px; }
.footer-cols { display: flex; gap: 44px; flex-wrap: wrap; }
.footer-cols h4 { color: var(--mustard); font-family: 'Space Mono', monospace; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.footer-cols a { display: block; color: #C9C3B0; font-size: .9rem; padding: 4px 0; }
.footer-cols a:hover { color: #fff; }
.footer-copy { border-top: 1px solid #3A392F; padding: 18px 24px; font-size: .8rem; color: #9C9684; }

/* ---------- Barra de filtros (busca) ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 14px;
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 22px;
}
.filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 140px;
  position: relative;
}
.filter-field label {
  font-size: .76rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.filter-field input, .filter-field select {
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-family: 'Work Sans', sans-serif;
  font-size: .9rem;
  color: var(--ink);
  outline: none;
}
.filter-field input:focus, .filter-field select:focus { border-color: var(--teal); }
.filter-hint {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  font-size: .72rem;
  color: var(--teal-dark);
  white-space: nowrap;
}
.filter-bar .btn { flex-shrink: 0; }
.filter-field-button { flex: 0 0 auto; min-width: 0; }
.filter-label-spacer { visibility: hidden; }
.filter-field-button .btn {
  padding-top: 10px;
  padding-bottom: 10px;
  box-sizing: border-box;
}
@media (max-width: 760px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
}

/* ---------- Páginas institucionais ---------- */
.static-page { max-width: 760px; }
.static-page .lede-static { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 20px; }
.static-page h3 { font-size: 1.3rem; margin-top: 32px; }
.static-page h4 { font-size: 1.05rem; margin-top: 20px; margin-bottom: 4px; }
.static-page p { line-height: 1.7; margin: 0 0 14px; }
.static-page a { color: var(--teal); font-weight: 600; }
.safety-list { padding-left: 22px; margin: 0 0 14px; }
.safety-list li { line-height: 1.7; margin-bottom: 8px; }
.static-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 30px; }
.pagination a, .pagination span {
  border: 2px solid var(--ink); border-radius: 8px;
  padding: 8px 14px; font-weight: 600; font-size: .85rem;
}
.pagination .active { background: var(--ink); color: var(--paper); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-tags { display: none; }
  .ad-detail { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .header-search { order: 3; max-width: 100%; width: 100%; }
  .header-row { flex-wrap: wrap; }
  .header-actions { display: none; }
  .header-actions.open { display: flex; width: 100%; order: 4; flex-direction: column; align-items: stretch; }
  .mobile-toggle { display: block; }
  .row-2 { grid-template-columns: 1fr; }
  .footer-row { flex-direction: column; }
}

/* ==========================================================
   Chat / Mensagens
   ========================================================== */
.avatar-chip-wrap { position: relative; display: inline-flex; }
.unread-dot {
  position: absolute;
  top: -2px; right: -2px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--brick);
  border: 2px solid var(--paper-white);
}
.menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brick);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  margin-left: 6px;
}
.header-msg-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--paper-white);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.header-msg-btn:hover { background: var(--mustard); }
.header-msg-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--brick);
  color: #fff;
  font-size: .64rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--paper-white);
}

/* ---------- Caixa de entrada ---------- */
.conversation-list { display: flex; flex-direction: column; gap: 10px; }
.conversation-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 12px 16px;
  position: relative;
}
.conversation-row.has-unread { background: var(--mustard-soft); }
.conversation-thumb {
  width: 56px; height: 56px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
}
.conversation-thumb img { width: 100%; height: 100%; object-fit: cover; }
.conversation-info { flex: 1; min-width: 0; }
.conversation-top { display: flex; justify-content: space-between; gap: 10px; }
.conversation-name { font-weight: 700; font-size: .92rem; }
.conversation-time { font-size: .74rem; color: var(--ink-soft); flex-shrink: 0; }
.conversation-ad { font-size: .8rem; color: var(--teal-dark); font-weight: 600; margin-top: 1px; }
.conversation-preview {
  font-size: .84rem;
  color: var(--ink-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.conversation-badge {
  flex-shrink: 0;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--brick);
  color: #fff;
  font-size: .74rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* ---------- Conversa (chat) ---------- */
.chat-section { max-width: 760px; margin: 0 auto; padding-top: 24px; padding-bottom: 50px; }
.chat-back { display: inline-block; margin-bottom: 14px; font-weight: 600; color: var(--teal); }
.chat-card {
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.chat-header {
  border-bottom: 2px solid var(--ink);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-header-ad { display: flex; align-items: center; gap: 12px; }
.chat-header-thumb {
  width: 44px; height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.chat-header-thumb img { width: 100%; height: 100%; object-fit: cover; }
.chat-header-title { font-weight: 700; font-size: .92rem; }
.chat-header-with { font-size: .8rem; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.chat-whatsapp-btn { background: #25D366; border-color: #1DA851; }
.chat-locked-hint {
  font-size: .82rem;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: center;
}

.chat-messages {
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 420px;
  overflow-y: auto;
  background: var(--paper);
}
.chat-empty-hint { text-align: center; color: var(--ink-soft); font-size: .88rem; margin: 20px 0; }
.chat-bubble-row { display: flex; flex-direction: column; max-width: 78%; }
.chat-bubble-row.mine { align-self: flex-end; align-items: flex-end; }
.chat-bubble {
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: 12px 12px 12px 2px;
  padding: 9px 13px;
  font-size: .9rem;
  line-height: 1.5;
  word-break: break-word;
}
.chat-bubble-row.mine .chat-bubble {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal-dark);
  border-radius: 12px 12px 2px 12px;
}
.chat-bubble-time { font-size: .68rem; color: var(--ink-soft); margin-top: 3px; padding: 0 4px; }

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-top: 2px solid var(--ink);
  background: var(--paper-white);
}
.chat-input-row textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 100px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  font-family: 'Work Sans', sans-serif;
  font-size: .9rem;
  background: var(--paper);
  outline: none;
}
.chat-input-row textarea:focus { border-color: var(--teal); }
.chat-input-row .btn { flex-shrink: 0; align-self: flex-end; }

.chat-safety-note { margin-top: 18px; font-size: .82rem; }
.chat-safety-note a { color: var(--teal-dark); font-weight: 700; text-decoration: underline; }

@media (max-width: 600px) {
  .chat-messages { max-height: 340px; }
  .chat-bubble-row { max-width: 90%; }
}

/* ---------- Busca inteligente (autocomplete) ---------- */
.search-suggestions {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: var(--paper-white);
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: var(--shadow-lift);
  z-index: 60;
  overflow: hidden;
  text-align: left;
}
.search-suggestions.open { display: block; }
.search-suggestion-item {
  padding: 10px 14px;
  font-size: .88rem;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.search-suggestion-item:last-child { border-bottom: 0; }
.search-suggestion-item:hover,
.search-suggestion-item.active { background: var(--mustard-soft); }

/* ============================================
   LAYOUT DIVIDIDO DE MENSAGENS (estilo WhatsApp Web)
   Adicione este bloco ao final do seu style.css
   ============================================ */

.messages-layout {
  display: flex;
  gap: 0;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  overflow: hidden;
  min-height: 560px;
  max-height: 78vh;
  background: #fff;
}

/* Coluna esquerda: lista de conversas */
.messages-sidebar {
  width: 510px;
  flex-shrink: 0;
  border-right: 1px solid rgba(0,0,0,0.1);
  overflow-y: auto;
  background: inherit;
}

.messages-sidebar .conversation-list {
  display: flex;
  flex-direction: column;
}

/* Reaproveita o .conversation-row que já existe, só ajusta pra caber na coluna */
.messages-sidebar .conversation-row {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin: 0;
}

.messages-sidebar .conversation-row.active {
  background: rgba(0,0,0,0.05);
}

/* Coluna direita: painel do chat aberto */
.messages-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.messages-panel .chat-panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* O chat-card já existe no seu CSS original; aqui só tiramos margens/sombra
   duplicadas já que agora ele vive dentro do painel, não numa página isolada */
.messages-panel .chat-card-flat {
  border: none;
  border-radius: 0;
  box-shadow: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.messages-panel .chat-messages {
  flex: 1;
  overflow-y: auto;
}

.messages-panel .chat-safety-note {
  margin: 12px;
}

/* Estado vazio: nenhuma conversa selecionada ainda */
.chat-empty-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  opacity: 0.6;
  height: 100%;
}

.chat-empty-panel-ic {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  opacity: 0.5;
}

/* Botão "voltar" que só aparece no mobile, dentro do chat aberto */
.chat-back-mobile {
  display: none;
  margin-right: 10px;
  font-size: 1.3rem;
  text-decoration: none;
}

/* ============================================
   RESPONSIVO: no celular, mostra só uma coluna por vez
   ============================================ */
@media (max-width: 860px) {
  .messages-layout {
    max-height: none;
    min-height: 0;
    border: none;
    border-radius: 0;
    position: relative;
  }

  .messages-sidebar {
    width: 100%;
    border-right: none;
    max-height: none;
  }

  .messages-panel {
    display: none;
  }

  /* Quando uma conversa está aberta, esconde a lista e mostra o painel */
  .messages-layout.has-active .messages-sidebar {
    display: none;
  }

  .messages-layout.has-active .messages-panel {
    display: flex;
    min-height: 70vh;
  }

  .chat-back-mobile {
    display: inline-block;
  }
}

.messages-layout {
  display: flex;
  gap: 0;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  overflow: hidden;
  min-height: 560px;
  max-height: 78vh;
  background: #fff;
}

/* Coluna esquerda: lista de conversas */
.messages-sidebar {
  width: 510px;
  flex-shrink: 0;
  border-right: 3px solid var(--brick, #b3392c);
  overflow-y: auto;
  background: inherit;
}

.messages-sidebar .conversation-list {
  display: flex;
  flex-direction: column;
}

/* Reaproveita o .conversation-row que já existe, só ajusta pra caber na coluna */
.messages-sidebar .conversation-row {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin: 0;
}

.messages-sidebar .conversation-row.active {
  background: rgba(0,0,0,0.05);
}

/* Coluna direita: painel do chat aberto */
.messages-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border: 3px solid var(--brick, #b3392c);
  border-top: none;
  border-right: none;
  border-bottom: none;
}

.messages-panel .chat-panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* O chat-card já existe no seu CSS original; aqui só tiramos margens/sombra
   duplicadas já que agora ele vive dentro do painel, não numa página isolada */
.messages-panel .chat-card-flat {
  border: none;
  border-radius: 0;
  box-shadow: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.messages-panel .chat-header {
  border-bottom: 2px solid var(--brick, #b3392c);
}
 
.messages-panel .chat-input-row {
  border-top: 2px solid var(--brick, #b3392c);
}

.messages-panel .chat-messages {
  flex: 1;
  overflow-y: auto;
}

.messages-panel .chat-safety-note {
  margin: 12px;
}

/* Estado vazio: nenhuma conversa selecionada ainda */
.chat-empty-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  opacity: 0.6;
  height: 100%;
}

.chat-empty-panel-ic {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  opacity: 0.5;
}

/* Botão "voltar" que só aparece no mobile, dentro do chat aberto */
.chat-back-mobile {
  display: none;
  margin-right: 10px;
  font-size: 1.3rem;
  text-decoration: none;
}

/* ============================================
   RESPONSIVO: no celular, mostra só uma coluna por vez
   ============================================ */
@media (max-width: 860px) {
  .messages-layout {
    max-height: none;
    min-height: 0;
    border: none;
    border-radius: 0;
    position: relative;
  }

  .messages-sidebar {
    width: 100%;
    border-right: none;
    max-height: none;
  }

  .messages-panel {
    display: none;
  }

  /* Quando uma conversa está aberta, esconde a lista e mostra o painel */
  .messages-layout.has-active .messages-sidebar {
    display: none;
  }

  .messages-layout.has-active .messages-panel {
    display: flex;
    min-height: 70vh;
  }

  .chat-back-mobile {
    display: inline-block;
  }
}
* ============================================
   LAYOUT DIVIDIDO DE MENSAGENS (estilo WhatsApp Web)
   Adicione este bloco ao final do seu style.css
   ============================================ */
 
.messages-layout {
  display: flex;
  gap: 16px;
  border: none;
  border-radius: 0;
  overflow: visible;
  min-height: 560px;
  max-height: 78vh;
  background: transparent;
}
 
/* Coluna esquerda: lista de conversas */
.messages-sidebar {
  width: 510px;
  flex-shrink: 0;
  border: 2px solid var(--brick, #b3392c);
  border-radius: 14px;
  overflow-y: auto;
  background: #fff;
}
 
.messages-sidebar .conversation-list {
  display: flex;
  flex-direction: column;
}
 
/* Reaproveita o .conversation-row que já existe, só ajusta pra caber na coluna */
.messages-sidebar .conversation-row {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin: 0;
}
 
.messages-sidebar .conversation-row.active {
  background: rgba(0,0,0,0.05);
}
 
/* Coluna direita: painel do chat aberto */
.messages-panel {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border: 2px solid var(--brick, #b3392c);
  border-radius: 14px;
  background: #fff;
}
 
.messages-panel .chat-panel-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}
 
/* O chat-card já existe no seu CSS original; aqui só tiramos margens/sombra
   duplicadas já que agora ele vive dentro do painel, não numa página isolada */
.messages-panel .chat-card-flat {
  border: none;
  border-radius: 0;
  box-shadow: none;
  height: 100%;
  display: flex;
  flex-direction: column;
}
 
.messages-panel .chat-header {
  border-bottom: 2px solid var(--brick, #b3392c);
}
 
.messages-panel .chat-input-row {
  border-top: 2px solid var(--brick, #b3392c);
}
 
.messages-panel .chat-messages {
  flex: 1;
  overflow-y: auto;
}
 
.messages-panel .chat-safety-note {
  margin: 12px;
}
 
/* Estado vazio: nenhuma conversa selecionada ainda */
.chat-empty-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  opacity: 0.6;
  height: 100%;
}
 
.chat-empty-panel-ic {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  opacity: 0.5;
}
 
/* Botão "voltar" que só aparece no mobile, dentro do chat aberto */
.chat-back-mobile {
  display: none;
  margin-right: 10px;
  font-size: 1.3rem;
  text-decoration: none;
}
 
/* ============================================
   RESPONSIVO: no celular, mostra só uma coluna por vez
   ============================================ */
@media (max-width: 860px) {
  .messages-layout {
    max-height: none;
    min-height: 0;
    border: none;
    border-radius: 0;
    position: relative;
  }
 
  .messages-sidebar {
    width: 100%;
    max-height: none;
  }
 
  .messages-panel {
    display: none;
  }
 
  /* Quando uma conversa está aberta, esconde a lista e mostra o painel */
  .messages-layout.has-active .messages-sidebar {
    display: none;
  }
 
  .messages-layout.has-active .messages-panel {
    display: flex;
    min-height: 70vh;
  }
 
  .chat-back-mobile {
    display: inline-block;
  }
}

