:root {
  --roxo-escuro: #310635;
  --roxo: #3c004f;
  --roxo-medio: #650a6b;
  --roxo-texto: #3c004f;
  --magenta: #650a6b;
  --laranja: #ff6633;
  --laranja-claro: #ff8962;
  --branco: #ffffff;
  --cinza-claro: #f2f2f2;
  --lavanda: #f1ecf6;
  --mauve: #8a7d93;
  --texto: #2a0a30;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow: 0 10px 30px rgba(60, 0, 79, .10);
  --font: 'Nekst', 'Segoe UI', sans-serif;
}

/* =========== BASE =========== */
.anuncios-page { font-family: var(--font); color: var(--texto); background: var(--branco); line-height: 1.5; -webkit-font-smoothing: antialiased; }
.anuncios-page * { margin: 0; padding: 0; box-sizing: border-box; }
.anuncios-page .sprite { display: none; }
.anuncios-page .ic { width: 1em; height: 1em; flex: 0 0 auto; fill: currentColor; overflow: visible; }
.anuncios-page img { max-width: 100%; display: block; }
.anuncios-page .container { width: min(1240px, 92%); margin-inline: auto; }
.anuncios-page .text-orange { color: var(--laranja); }
.anuncios-page .section-title { font-size: clamp(24px, 3vw, 36px); font-weight: 700; color: var(--roxo); line-height: 1.2; }
.anuncios-page .section-title--center { text-align: center; }
.anuncios-page .section-subtitle { font-size: 15px; color: var(--mauve); margin-top: 6px; }

/* Buttons */
.anuncios-page .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 28px; border-radius: 999px; font-family: var(--font); font-size: 15px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; white-space: nowrap; }
.anuncios-page .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.anuncios-page .btn--primary { background: var(--laranja); color: var(--branco); }
.anuncios-page .btn--white { background: var(--branco); color: var(--texto); border-color: #e0d6e5; }
.anuncios-page .btn--dark { background: var(--roxo); color: var(--branco); }
.anuncios-page .btn--outline { background: transparent; color: var(--branco); border-color: var(--laranja); }
.anuncios-page .btn--full { width: 100%; }
.anuncios-page .btn--disabled { opacity: .45; pointer-events: none; }
.anuncios-page .btn .ic { font-size: 17px; }

/* Reveal animation */
.anuncios-page .reveal { opacity: 0; transform: translateY(24px); transition: opacity .5s ease, transform .5s ease; }
.anuncios-page .reveal.in-view { opacity: 1; transform: translateY(0); }

/* =========== 1. FILTER HERO =========== */
.filter-hero { background: linear-gradient(135deg, var(--roxo-escuro) 0%, var(--roxo) 60%, var(--roxo-medio) 100%); padding: 48px 0 40px; position: relative; overflow: hidden; }
.filter-hero::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 60px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,.05)); pointer-events: none; }
.filter-hero__header { text-align: center; margin-bottom: 32px; }
.filter-hero__title { font-size: clamp(26px, 4vw, 42px); font-weight: 800; color: var(--branco); line-height: 1.15; margin-bottom: 12px; }
.filter-hero__subtitle { font-size: 16px; color: rgba(255,255,255,.7); max-width: 620px; margin: 0 auto; }
.filter-hero__form { background: rgba(255,255,255,.08); backdrop-filter: blur(16px); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg); padding: 28px; }
.filter-hero__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.filter-hero__grid .field label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.65); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.filter-hero__grid .field label .ic { font-size: 14px; }
.filter-hero__grid .field select,
.filter-hero__grid .field input { width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.1); color: var(--branco); font-family: var(--font); font-size: 14px; outline: none; transition: border-color .2s, background .2s; appearance: none; }
.filter-hero__grid .field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-6-6h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.filter-hero__grid .field select option { background: var(--roxo-escuro); color: #fff; }
.filter-hero__grid .field input::placeholder { color: rgba(255,255,255,.4); }
.filter-hero__grid .field select:focus,
.filter-hero__grid .field input:focus { border-color: var(--laranja); background: rgba(255,255,255,.14); }
.filter-hero__grid .field--submit { display: flex; align-items: flex-end; }
.filter-hero__grid .field--submit .btn { height: 48px; border-radius: 12px; font-size: 15px; }
.filter-hero__bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 18px; flex-wrap: wrap; gap: 12px; }
.filter-hero__chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-hero__chips-label { font-size: 13px; color: rgba(255,255,255,.5); font-weight: 600; }
.filter-hero__chips .chip { padding: 6px 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s; font-family: var(--font); }
.filter-hero__chips .chip:hover { background: var(--laranja); color: #fff; border-color: var(--laranja); }
.filter-hero__clear { font-size: 13px; color: var(--laranja); text-decoration: none; display: flex; align-items: center; gap: 4px; font-weight: 600; }
.filter-hero__clear .ic { font-size: 14px; }

@media (max-width: 900px) { .filter-hero__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .filter-hero__grid { grid-template-columns: 1fr; } .filter-hero { padding: 32px 0 28px; } }

/* =========== 2. STATS BAR =========== */
.stats-bar { background: var(--branco); padding: 32px 0; border-bottom: 1px solid #f0eaf3; }
.stats-bar__grid { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-item__number { display: block; font-size: clamp(28px, 3.5vw, 40px); font-weight: 800; color: var(--roxo); line-height: 1; }
.stat-item__label { display: block; font-size: 13px; color: var(--mauve); margin-top: 4px; font-weight: 500; }

/* =========== 3. MAP SECTION =========== */
.map-section { padding: 48px 0; background: var(--cinza-claro); }
.map-section__inner { display: grid; grid-template-columns: 1fr 340px; gap: 24px; }
.map-box { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 440px; background: #e8e0ec; }
#anuncios-map { width: 100%; height: 100%; min-height: 440px; }
.map-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; min-height: 440px; gap: 12px; }
.map-placeholder p { color: var(--mauve); font-size: 14px; }
.map-recenter { position: absolute; bottom: 16px; right: 16px; width: 44px; height: 44px; border-radius: 50%; background: var(--branco); border: none; box-shadow: 0 2px 10px rgba(0,0,0,.18); cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 5; transition: transform .2s; }
.map-recenter:hover { transform: scale(1.1); }
.map-recenter .ic { font-size: 20px; color: var(--roxo); }

.map-side { display: flex; flex-direction: column; gap: 16px; }
.side-card { background: var(--branco); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.side-card__badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--laranja); background: rgba(255,102,51,.08); padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }

.buyers { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.buyer { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; transition: background .2s; }
.buyer:hover { background: var(--lavanda); }
.buyer__rank { width: 24px; height: 24px; border-radius: 50%; background: var(--lavanda); color: var(--roxo); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.buyer__name { flex: 1; font-size: 14px; font-weight: 600; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buyer__count { font-size: 12px; color: var(--mauve); white-space: nowrap; }

.trends { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.trend { cursor: pointer; padding: 6px 0; transition: opacity .2s; }
.trend:hover { opacity: .8; }
.trend__info { display: flex; justify-content: space-between; margin-bottom: 4px; }
.trend__info strong { font-size: 13px; color: var(--texto); }
.trend__info span { font-size: 12px; color: var(--mauve); }
.trend__bar { height: 6px; background: var(--lavanda); border-radius: 3px; overflow: hidden; }
.trend__bar i { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--laranja), var(--laranja-claro)); border-radius: 3px; transition: width .6s ease; }

@media (max-width: 900px) {
  .map-section__inner { grid-template-columns: 1fr; }
  .map-side { flex-direction: row; }
  .side-card { flex: 1; }
}
@media (max-width: 600px) { .map-side { flex-direction: column; } }

/* =========== 4. CARDS =========== */
.builders { padding: 48px 0; }
.builders__header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }
.builders__count { font-size: 14px; color: var(--mauve); font-weight: 600; background: var(--lavanda); padding: 6px 16px; border-radius: 999px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.cards__empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; }
.cards__empty h3 { font-size: 20px; color: var(--roxo); margin-top: 16px; }
.cards__empty p { color: var(--mauve); margin: 8px 0 20px; }

.card { background: var(--branco); border-radius: var(--radius); border: 1px solid #ece5f0; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(60,0,79,.12); }

/* ---- NEW CARD STYLES (v2 - improved) ---- */
.card__header { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; background: var(--lavanda); gap: 8px; flex-wrap: wrap; }
.card__badge { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; padding: 4px 10px; border-radius: 999px; }
.card__badge .ic { font-size: 13px; }
.card__badge--demand { color: var(--laranja); background: rgba(255,102,51,.1); }
.card__badge--verified { color: #16a34a; background: rgba(22,163,74,.1); }

.card__body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 0; }
.card__title { font-size: 16px; font-weight: 700; color: var(--roxo); margin-bottom: 4px; line-height: 1.3; }
.card__location { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--mauve); margin-bottom: 14px; }
.card__location .ic { font-size: 14px; flex-shrink: 0; }

/* Company section */
.card__company { background: #f9f7fb; border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.card__company-header { margin-bottom: 8px; }
.card__company-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: var(--mauve); }
.card__company-info { display: flex; align-items: center; gap: 10px; }
.card__company-avatar { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.card__company-avatar--placeholder { background: var(--lavanda); display: flex; align-items: center; justify-content: center; }
.card__company-avatar--placeholder .ic { font-size: 20px; color: var(--roxo); }
.card__company-details { flex: 1; min-width: 0; }
.card__company-name { display: block; font-size: 14px; font-weight: 700; color: var(--texto); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card__company-type { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--mauve); font-weight: 500; }
.ic--check-verified { font-size: 13px !important; color: #16a34a; }
.card__company-profile { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--laranja); text-decoration: none; padding: 5px 10px; border-radius: 8px; background: rgba(255,102,51,.08); white-space: nowrap; flex-shrink: 0; transition: background .2s; }
.card__company-profile:hover { background: rgba(255,102,51,.15); }
.card__company-profile .ic { font-size: 14px; }

/* Criteria */
.card__criteria { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.card__criterion { display: flex; flex-direction: column; gap: 2px; }
.card__criterion-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--mauve); }
.card__criterion-value { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--texto); }
.card__criterion-value .ic { font-size: 14px; color: var(--laranja); }

/* Updated date */
.card__updated { font-size: 11px; color: #aaa; margin-top: 4px; }

/* Remove old card__specs and card__builder styles that are no longer used */

.card__actions { display: flex; gap: 8px; padding: 14px 18px; border-top: 1px solid #ece5f0; background: #faf8fb; }

.action-btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 10px; font-size: 13px; font-weight: 600; text-decoration: none; border: none; cursor: pointer; transition: all .2s; font-family: var(--font); }
.action-btn .ic { font-size: 16px; }
.action-btn--whats { background: #25d366; color: #fff; }
.action-btn--whats:hover { background: #1db954; }
.action-btn--mail { background: var(--lavanda); color: var(--roxo); }
.action-btn--mail:hover { background: #e0d2eb; }
.action-btn--profile { background: var(--lavanda); color: var(--roxo); }
.action-btn--profile:hover { background: #e0d2eb; }
.action-btn--locked { background: var(--roxo); color: #fff; flex: 1; justify-content: center; }
.action-btn--locked:hover { background: var(--roxo-medio); }

.builders__pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.builders__page { font-size: 14px; color: var(--roxo); font-weight: 600; }

/* =========== 5. TERRENO FORM =========== */
.terreno-form { padding: 64px 0; background: var(--lavanda); }
.terreno-form__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.terreno-form__info { padding-top: 16px; }
.terreno-form__benefits { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.terreno-form__benefits li { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--texto); font-weight: 500; }
.terreno-form__benefits .ic { font-size: 20px; color: #25d366; flex-shrink: 0; }
.terreno-form__form { background: var(--branco); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); }
.terreno-form__form-title { font-size: 20px; font-weight: 700; color: var(--roxo); margin-bottom: 20px; }
.terreno-form__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.terreno-form__fields .field--full { grid-column: 1 / -1; }
.terreno-form__fields label { display: block; font-size: 13px; font-weight: 600; color: var(--texto); margin-bottom: 5px; }
.terreno-form__fields input,
.terreno-form__fields select,
.terreno-form__fields textarea { width: 100%; padding: 11px 14px; border: 1px solid #ddd5e0; border-radius: 10px; font-family: var(--font); font-size: 14px; color: var(--texto); outline: none; transition: border-color .2s; background: #fff; }
.terreno-form__fields select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%233c004f' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5l-6-6h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.terreno-form__fields input:focus,
.terreno-form__fields select:focus,
.terreno-form__fields textarea:focus { border-color: var(--laranja); }
.terreno-form__fields textarea { resize: vertical; min-height: 80px; }
.terreno-form__success { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 14px 18px; border-radius: 12px; background: #e6f9ec; color: #166534; font-size: 14px; font-weight: 600; }
.terreno-form__success .ic { font-size: 22px; color: #25d366; }
.terreno-form__error { margin-top: 16px; padding: 14px 18px; border-radius: 12px; background: #fef2f2; color: #991b1b; font-size: 14px; font-weight: 600; }

@media (max-width: 768px) {
  .terreno-form__inner { grid-template-columns: 1fr; gap: 32px; }
  .terreno-form__fields { grid-template-columns: 1fr; }
}

/* =========== 6. HOW IT WORKS =========== */
.how-it-works { padding: 64px 0; background: var(--branco); }
.how-it-works__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 36px; }
.how-step { text-align: center; position: relative; padding: 24px 16px; }
.how-step__number { position: absolute; top: 0; right: 16px; font-size: 48px; font-weight: 900; color: var(--lavanda); line-height: 1; }
.how-step__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--lavanda); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.how-step__icon .ic { font-size: 24px; color: var(--roxo); }
.how-step h3 { font-size: 17px; font-weight: 700; color: var(--roxo); margin-bottom: 8px; }
.how-step p { font-size: 14px; color: var(--mauve); line-height: 1.5; }

@media (max-width: 768px) { .how-it-works__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .how-it-works__grid { grid-template-columns: 1fr; } }

/* =========== 7. CTA FINAL =========== */
.cta-final { padding: 56px 0; background: linear-gradient(135deg, var(--roxo-escuro), var(--roxo)); }
.cta-final__inner { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.cta-final__content h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 800; color: var(--branco); margin-bottom: 8px; }
.cta-final__content p { font-size: 16px; color: rgba(255,255,255,.7); }
.cta-final__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* =========== MODAL =========== */
.geo-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.geo-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); }
.geo-modal__dialog { position: relative; background: var(--branco); border-radius: var(--radius-lg); padding: 36px; max-width: 440px; width: 100%; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.geo-modal__close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 28px; color: var(--mauve); cursor: pointer; }
.geo-modal__icon { margin-bottom: 16px; }
.geo-modal__title { font-size: 22px; font-weight: 700; color: var(--roxo); margin-bottom: 10px; }
.geo-modal__text { font-size: 15px; color: var(--mauve); margin-bottom: 24px; line-height: 1.5; }
.geo-modal__actions { display: flex; flex-direction: column; gap: 10px; }

/* =========== MAPBOX OVERRIDES =========== */
.mapboxgl-popup-content { border-radius: 12px !important; padding: 12px 16px !important; box-shadow: 0 4px 20px rgba(0,0,0,.15) !important; font-family: var(--font) !important; }
.mapboxgl-popup-close-button { font-size: 18px; padding: 4px 8px; }
