/* Complete Real Estate Marketplace — front (inherits site theme fonts) */
.re-plugin {
  --re-ink: inherit;
  --re-muted: #64748b;
  --re-accent: #0f6e56;
  --re-accent-2: #c45c26;
  --re-surface: transparent;
  --re-card: #fff;
  --re-line: rgba(15, 23, 42, 0.12);
  --re-radius: 12px;
  color: inherit;
  font-family: inherit;
}

.re-shell {
  background: var(--re-surface);
  border-radius: var(--re-radius);
  padding: 0 0 1.25rem;
  min-height: 50vh;
}

.re-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.re-topbar-left { display: flex; align-items: center; gap: 0.5rem; min-width: 0; }
.re-topbar-title {
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
}
.re-topbar-subtitle { color: var(--re-muted); font-size: 0.9rem; margin: 0.15rem 0 0; }
.re-topbar-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.btn-re-primary { background: var(--re-accent); border-color: var(--re-accent); color: #fff; }
.btn-re-primary:hover { background: #0c5a46; border-color: #0c5a46; color: #fff; }

.re-sidebar { background: var(--re-card); border: 1px solid var(--re-line); border-radius: var(--re-radius); padding: 1rem; }
.re-sidebar-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; margin-bottom: 1rem; }
.re-nav-item { display: flex; align-items: center; gap: 0.55rem; padding: 0.45rem 0.55rem; border-radius: 8px; color: inherit; text-decoration: none; }
.re-nav-item:hover, .re-nav-item.active { background: rgba(15, 110, 86, 0.1); color: var(--re-accent); text-decoration: none; }
.re-sidebar-section { margin-top: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--re-line); }
.re-sidebar-section-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--re-muted); margin-bottom: 0.4rem; }

/* Compact filters */
.re-filters { margin-bottom: 1rem; }
.re-filters-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
  padding: 0.65rem;
  background: var(--re-card);
  border: 1px solid var(--re-line);
  border-radius: var(--re-radius);
}
.re-filters-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
}
.re-filters-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--re-muted);
  pointer-events: none;
  font-size: 0.9rem;
}
.re-filters-q { padding-left: 2.1rem !important; height: 40px; }
.re-filters-select { flex: 0 1 160px; min-width: 140px; height: 40px; }
.re-filters-submit { flex: 0 0 auto; height: 40px; white-space: nowrap; }

.re-filters-toggle { position: relative; }
.re-filters-toggle.is-active {
  border-color: var(--re-accent);
  color: var(--re-accent);
  background: rgba(15, 110, 86, 0.08);
}
.re-filters-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--re-accent-2);
}
.re-filters-dot:not(.d-none) { display: inline-block !important; }

.re-filters-advanced {
  margin-top: 0.5rem;
  padding: 0.9rem 1rem 1rem;
  background: var(--re-card);
  border: 1px solid var(--re-line);
  border-radius: var(--re-radius);
}
.re-filters-advanced[hidden] { display: none !important; }
.re-filters-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem 0.85rem;
}
.re-filters-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--re-muted);
  margin-bottom: 0.3rem;
}
.re-filters-field .form-control { height: 38px; }
.re-filters-checks { grid-column: span 2; }
.re-filters-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  min-height: 38px;
}
.re-filters-advanced-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--re-line);
}

.re-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.re-card { background: var(--re-card); border: 1px solid var(--re-line); border-radius: var(--re-radius); overflow: hidden; display: flex; flex-direction: column; }
.re-card-media { position: relative; display: block; aspect-ratio: 4/3; background: #e8eef2; overflow: hidden; }
.re-card-media img { width: 100%; height: 100%; object-fit: cover; }
.re-card-placeholder { height: 100%; display: grid; place-items: center; color: var(--re-muted); font-size: 2rem; }
.re-badge { position: absolute; top: 0.6rem; left: 0.6rem; background: rgba(15,23,42,.85); color: #fff; font-size: 0.7rem; padding: 0.2rem 0.45rem; border-radius: 999px; }
.re-badge-featured { left: auto; right: 0.6rem; background: var(--re-accent-2); }
.re-card-body { padding: 0.85rem 0.95rem 1rem; }
.re-card-price { font-weight: 700; color: var(--re-accent); font-size: 1.05rem; }
.re-card-title { font-family: inherit; font-size: 1rem; margin: 0.25rem 0 0.5rem; line-height: 1.3; }
.re-card-title a { color: inherit; }
.re-card-meta { display: flex; flex-wrap: wrap; gap: 0.55rem; color: var(--re-muted); font-size: 0.82rem; }
.re-card-cat { margin-top: 0.45rem; font-size: 0.78rem; color: var(--re-muted); }
.re-empty { grid-column: 1 / -1; text-align: center; padding: 2.5rem 1rem; color: var(--re-muted); background: var(--re-card); border-radius: var(--re-radius); border: 1px dashed var(--re-line); }

.re-detail-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--re-radius); }
.re-thumb-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.re-thumb img, .re-thumb-wrap img { width: 88px; height: 66px; object-fit: cover; border-radius: 8px; }
.re-detail-grid { display: grid; grid-template-columns: 1fr 280px; gap: 1.25rem; margin-top: 1.25rem; }
.re-detail-price { font-size: 1.75rem; font-weight: 700; color: var(--re-accent); }
.re-detail-ppm2 { color: var(--re-muted); margin-bottom: 0.5rem; }
.re-chip { display: inline-block; background: rgba(15,110,86,.1); color: var(--re-accent); border-radius: 999px; padding: 0.2rem 0.55rem; font-size: 0.78rem; margin-right: 0.35rem; }
.re-chip-warn { background: rgba(196,92,38,.15); color: var(--re-accent-2); }
.re-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.65rem; margin: 1rem 0; }
.re-specs div { background: var(--re-card); border: 1px solid var(--re-line); border-radius: 10px; padding: 0.55rem 0.7rem; }
.re-specs strong { display: block; font-size: 0.72rem; color: var(--re-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.re-agent-card { background: var(--re-card); border: 1px solid var(--re-line); border-radius: var(--re-radius); padding: 1rem; }
.re-agent-head { display: flex; gap: 0.75rem; margin-bottom: 0.75rem; }
.re-agent-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.re-agent-avatar-lg { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin-right: 1rem; }
.re-agent-name { font-weight: 700; color: inherit; }
.re-stat-line { color: var(--re-muted); font-size: 0.85rem; margin-top: 0.45rem; }
.re-agent-cover { height: 160px; background-size: cover; background-position: center; border-radius: var(--re-radius); margin-bottom: 1rem; }
.re-form .form-group { margin-bottom: 0.85rem; }
.re-check-row { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; }
.re-form-preview { max-width: 180px; border-radius: 8px; }
.re-table { background: var(--re-card); }
.re-sidebar-toggle { border: 1px solid var(--re-line); background: #fff; border-radius: 8px; width: 40px; height: 40px; margin-right: 0.5rem; }

@media (max-width: 991px) {
  .re-detail-grid { grid-template-columns: 1fr; }
  .re-filters-checks { grid-column: span 1; }
}
@media (max-width: 767px) {
  .re-sidebar-col { display: none; }
  .re-sidebar-col.is-open { display: block; position: fixed; z-index: 1050; inset: 0 auto 0 0; width: min(86vw, 320px); overflow: auto; background: #fff; padding: 1rem; box-shadow: 8px 0 30px rgba(0,0,0,.2); }
  .re-sidebar-backdrop.is-open { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 1040; }
  .re-filters-select { flex: 1 1 100%; }
  .re-filters-submit { flex: 1 1 auto; }
}
