/* =============================================================
   regio.immo — Discovery Page Styles (.rg-* cascade)
   Hero · Search · Filters · Hot Deals · Featured · Marketplace
   ============================================================= */

/* ── Section header (used across all 4 blocks) ──────────────── */
.rg-section { padding: var(--s-7) var(--s-6); max-width: 1440px; margin: 0 auto; }
.rg-secthead {
  display: flex; align-items: end; justify-content: space-between;
  gap: var(--s-5); margin-bottom: var(--s-5);
  padding-bottom: var(--s-4); border-bottom: 1px solid var(--line);
}
.rg-secthead__n { color: var(--accent); font-size: var(--fs-2xs); margin-bottom: 4px; }
.rg-secthead__t { font-size: var(--fs-2xl); font-weight: 700; color: var(--text-hi); letter-spacing: -0.02em; }
.rg-secthead__sub { color: var(--text-mid); font-size: var(--fs-sm); margin-top: 4px; }

/* ── 01 HERO ─────────────────────────────────────────────────── */
.rg-hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-base);
}
.rg-hero__bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 75% 30%, rgba(167,139,250,.10), transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(96,165,250,.06), transparent 50%);
}
.rg-hero__inner {
  position: relative; z-index: 1;
  max-width: 1440px; margin: 0 auto;
  padding: var(--s-8) var(--s-6) var(--s-7);
  display: grid; grid-template-columns: 1fr auto; gap: var(--s-7);
  align-items: center;
}
@media (max-width: 880px) {
  .rg-hero__inner { grid-template-columns: 1fr; }
  .rg-hero__device { display: none; }
}

.rg-hero__copy { min-width: 0; }
.rg-hero__eyebrow {
  display: inline-block; color: var(--accent);
  font-size: var(--fs-2xs); margin-bottom: var(--s-4);
  padding: 4px 10px; background: var(--accent-wash);
  border: 1px solid var(--accent-wash); border-radius: 999px;
}
.rg-hero__title {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700; line-height: 1.05; letter-spacing: -0.03em;
  color: var(--text-hi); margin: 0 0 var(--s-4);
}
.rg-hero__title em { font-style: italic; color: var(--accent); font-weight: 600; }
.rg-hero__lead {
  color: var(--text-mid); font-size: var(--fs-md); line-height: 1.5;
  max-width: 56ch; margin: 0 0 var(--s-5);
}

/* Search bar */
.rg-search {
  display: flex; align-items: center; gap: var(--s-3);
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 6px 6px 6px var(--s-4);
  margin-bottom: var(--s-3); max-width: 640px;
  transition: border-color .15s, box-shadow .15s;
}
.rg-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.rg-search__icon { display: flex; color: var(--accent); flex-shrink: 0; }
.rg-search__icon svg { width: 20px; height: 20px; }
.rg-search__input {
  flex: 1; background: transparent; border: 0; outline: 0;
  color: var(--text-hi); font-size: var(--fs-md); font-family: inherit;
  padding: 10px 0;
}
.rg-search__input::placeholder { color: var(--text-faint); }
.rg-search__chips {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-5);
  max-width: 640px;
}

/* Hero stats */
.rg-hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3);
  max-width: 640px; margin-top: var(--s-5);
  padding-top: var(--s-5); border-top: 1px solid var(--line);
}
.rg-stat__v { font-size: var(--fs-xl); color: var(--text-hi); font-weight: 700; }
.rg-stat__k { color: var(--text-lo); font-size: var(--fs-2xs); margin-top: 2px; }

.rg-hero__device { flex-shrink: 0; }

/* ── 02 HOT DEALS — 4-up grid ─────────────────────────────────── */
.rg-hot-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--s-4);
}
.rg-hot {
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.rg-hot:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.4);
}
.rg-hot__media {
  position: relative; height: 160px;
  background: var(--bg-elev) center/cover no-repeat;
}
.rg-hot__live {
  position: absolute; top: 10px; left: 10px;
  font-size: var(--fs-2xs); font-family: var(--font-mono);
}
.rg-hot__bids {
  position: absolute; top: 10px; right: 10px;
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  background: rgba(0,0,0,.6); color: #fff;
  padding: 3px 8px; border-radius: var(--r-xs);
  letter-spacing: var(--tr-mono);
}
.rg-hot__progress {
  position: absolute; bottom: 0; left: 0; right: 0; height: 3px;
  background: rgba(255,255,255,.1);
}
.rg-hot__progress-fill { height: 100%; background: var(--accent); }
.rg-hot__body { padding: var(--s-4); display: flex; flex-direction: column; gap: 6px; }
.rg-hot__title { color: var(--text-hi); font-weight: 600; font-size: var(--fs-md); line-height: 1.3; }
.rg-hot__id { color: var(--text-lo); font-size: var(--fs-2xs); }
.rg-hot__row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; }
.rg-hot__price { color: var(--text-hi); font-size: var(--fs-lg); font-weight: 700; }
.rg-hot__alt { color: var(--text-mid); font-size: var(--fs-xs); }
.rg-hot__reserve {
  display: flex; align-items: center; gap: 8px;
  margin-top: 6px; padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-2xs); color: var(--text-mid);
}
.rg-hot__reserve-bar {
  flex: 1; height: 4px; background: var(--bg-elev);
  border-radius: 2px; overflow: hidden;
}
.rg-hot__reserve-fill { height: 100%; background: var(--accent); }

/* ── 03 FEATURED — editorial 3-up ─────────────────────────────── */
.rg-feat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--s-5);
}
.rg-feat {
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; cursor: pointer;
  transition: transform .2s, border-color .2s;
}
.rg-feat:hover { transform: translateY(-3px); border-color: var(--accent); }
.rg-feat__media {
  position: relative; height: 220px;
  background: var(--bg-elev) center/cover no-repeat;
}
.rg-feat__tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--accent); color: var(--text-on-accent);
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  padding: 4px 10px; border-radius: var(--r-xs); font-weight: 600;
  letter-spacing: var(--tr-mono);
}
.rg-feat__yld {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0,0,0,.7); color: #fff;
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  padding: 4px 10px; border-radius: var(--r-xs);
  letter-spacing: var(--tr-mono);
}
.rg-feat__body {
  padding: var(--s-4) var(--s-5);
  display: flex; align-items: end; justify-content: space-between; gap: var(--s-4);
}
.rg-feat__title { color: var(--text-hi); font-weight: 600; font-size: var(--fs-md); line-height: 1.3; }
.rg-feat__id { color: var(--text-lo); font-size: var(--fs-2xs); margin-top: 4px; }
.rg-feat__price { color: var(--text-hi); font-size: var(--fs-lg); font-weight: 700; flex-shrink: 0; }

/* ── 04 MARKETPLACE — Filters + Grid ──────────────────────────── */
.rg-filters {
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s-4);
  margin-bottom: var(--s-5);
}
.rg-filters__row {
  display: flex; gap: var(--s-3); align-items: end; flex-wrap: wrap;
}
.rg-filters__spacer { flex: 1; }

.rg-segctrl {
  display: inline-flex; background: var(--bg-elev);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 2px;
}
.rg-segctrl__btn {
  background: transparent; border: 0; color: var(--text-mid);
  padding: 6px 14px; font-family: inherit; font-size: var(--fs-sm);
  cursor: pointer; border-radius: 4px; font-weight: 500;
  transition: all .12s;
}
.rg-segctrl__btn.is-on {
  background: var(--accent); color: var(--text-on-accent);
}

.rg-filterfield { display: flex; flex-direction: column; gap: 4px; min-width: 110px; }
.rg-filterfield__label { color: var(--text-lo); font-size: var(--fs-2xs); }
.rg-input {
  background: var(--bg-elev); border: 1px solid var(--line); color: var(--text-hi);
  padding: 7px 10px; border-radius: var(--r-sm);
  font-family: inherit; font-size: var(--fs-sm); outline: 0;
  transition: border-color .12s;
}
.rg-input:focus { border-color: var(--accent); }

/* Listing grid (Marketplace) */
.rg-list-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-4);
}
.rg-prop {
  background: var(--bg-raised); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; cursor: pointer;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.rg-prop:hover {
  transform: translateY(-2px); border-color: var(--accent);
  box-shadow: 0 8px 24px -8px rgba(0,0,0,.4);
}
.rg-prop__media {
  position: relative; height: 180px;
  background: var(--bg-elev) center/cover no-repeat;
}
.rg-prop__tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(0,0,0,.7); color: #fff;
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  padding: 3px 8px; border-radius: var(--r-xs);
  letter-spacing: var(--tr-mono);
}
.rg-prop__status {
  position: absolute; bottom: 10px; left: 10px;
  font-family: var(--font-mono); font-size: var(--fs-2xs);
  padding: 3px 8px; border-radius: var(--r-xs);
  background: rgba(0,0,0,.7); color: #fff;
  letter-spacing: var(--tr-mono);
}
.rg-prop__status.is-active { color: var(--ok); }
.rg-prop__status.is-pending { color: var(--accent); }
.rg-prop__status.is-sold { color: var(--text-faint); }

.rg-prop__fav {
  position: absolute; top: 8px; right: 8px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(0,0,0,.6); border: 0; color: #fff;
  display: grid; place-items: center; cursor: pointer;
  transition: background .15s, color .15s;
}
.rg-prop__fav:hover { background: var(--accent); color: var(--text-on-accent); }
.rg-prop__fav svg { width: 16px; height: 16px; }

.rg-prop__body { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.rg-prop__head { display: flex; justify-content: space-between; gap: var(--s-3); align-items: start; }
.rg-prop__title { color: var(--text-hi); font-weight: 600; font-size: var(--fs-md); line-height: 1.3; }
.rg-prop__addr { color: var(--text-lo); font-size: var(--fs-2xs); margin-top: 3px; }
.rg-prop__price { color: var(--text-hi); font-size: var(--fs-md); font-weight: 700; flex-shrink: 0; white-space: nowrap; }
.rg-prop__specs {
  display: flex; gap: var(--s-3); flex-wrap: wrap;
  font-size: var(--fs-xs); color: var(--text-mid);
}
.rg-prop__specs strong { color: var(--text-hi); font-weight: 600; }
.rg-prop__energy {
  margin-left: auto; padding: 2px 8px;
  background: var(--ok-wash); color: var(--ok);
  border-radius: var(--r-xs); font-family: var(--font-mono);
  font-size: var(--fs-2xs);
}
.rg-prop__foot {
  display: flex; justify-content: space-between;
  padding-top: var(--s-3); border-top: 1px solid var(--line);
  font-size: var(--fs-2xs);
}
.rg-prop__id { color: var(--text-lo); }
.rg-prop__score { color: var(--accent); font-weight: 600; }

.rg-empty {
  grid-column: 1 / -1;
  padding: var(--s-7); text-align: center;
  color: var(--text-mid); font-size: var(--fs-md);
  background: var(--bg-raised); border: 1px dashed var(--line);
  border-radius: var(--r-md);
}
.rg-empty__btn {
  display: inline-block; margin-left: var(--s-3);
  background: var(--accent); color: var(--text-on-accent);
  border: 0; padding: 6px 12px; border-radius: var(--r-sm);
  cursor: pointer; font-family: inherit;
}

/* Skeleton shimmer */
@keyframes rg-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
