body.real-estate-page {
  background: #f6f4f1;
}

.re-shell {
  width: min(1440px, calc(100% - 56px));
  margin: 0 auto;
}

/* SEARCH BAND */
.re-search-band {
  background: #b61e60;
  padding: 132px 0 46px;
}

.re-search-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(160px, 1fr) minmax(140px, 0.8fr) minmax(320px, 1.45fr) auto;
  align-items: end;
  gap: 24px;
}

.re-search-field label,
.re-search-price__head span {
  display: block;
  margin-bottom: 9px;
  font-family: "Montserrat", serif;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.56);
}

.re-search-field select {
  width: 100%;
  height: 42px;
  padding: 0 0 9px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-family: "Montserrat", serif;
  font-size: 15px;
  line-height: 1.2;
  outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #fff 50%), linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position: calc(100% - 13px) 14px, calc(100% - 8px) 14px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.re-search-field select option {
  color: #111;
}

.re-search-price {
  min-width: 0;
}

.re-search-price__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 17px;
}

.re-search-price__head span {
  margin-bottom: 0;
}

.re-search-price__head strong {
  font-family: "Montserrat", serif;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}

.re-range-slider {
  position: relative;
  height: 22px;
}

.re-range-slider__track,
.re-range-slider__fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 2px;
  border-radius: 999px;
}

.re-range-slider__track {
  background: rgba(255, 255, 255, 0.26);
}

.re-range-slider__fill {
  background: #fff;
}

.re-range-slider input[type="range"] {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  pointer-events: none;
  appearance: none;
}

.re-range-slider input[type="range"]::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  pointer-events: auto;
  appearance: none;
}

.re-range-slider input[type="range"]::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.08);
  cursor: pointer;
  pointer-events: auto;
}

.re-search-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-bottom: 1px;
}

.re-search-actions button {
  height: 42px;
  padding: 0 28px;
  border: 1px solid #fff;
  background: #fff;
  color: #000;
  font-family: "Montserrat", serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.25s ease, color 0.25s ease;
}

.re-search-actions button:hover {
  background: transparent;
  color: #fff;
}

.re-search-actions a {
  color: rgba(255, 255, 255, 0.62);
  font-family: "Montserrat", serif;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
}

.re-search-actions a:hover {
  color: #fff;
}

.re-listing-hero {
  background: #fff;
  padding: 78px 0 54px;
}

.re-listing-hero__inner {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.re-listing-hero__copy {
  max-width: 900px;
}

.re-listing-hero__eyebrow {
  font-family: "Montserrat", serif;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.52);
  margin-bottom: 18px;
}

.re-listing-hero__title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(52px, 6vw, 96px);
  line-height: 0.92;
  font-weight: 500;
  letter-spacing: -0.035em;
  color: #111;
}

.re-listing-hero__lead {
  max-width: 780px;
  margin: 22px 0 0;
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.5;
  font-weight: 300;
  color: #222;
}

.re-listing-hero__meta {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.58);
}

.re-listing-section {
  background: #f6f4f1;
  padding: 24px 0 90px;
}

.re-listing-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.re-listing-toolbar__left {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #151515;
}

.re-listing-toolbar__label {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.56);
}

.re-listing-toolbar__left strong {
  font-size: 18px;
  font-weight: 600;
}

.re-listing-toolbar__right {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.re-listing-toolbar__link {
  font-size: 14px;
  color: #222;
  text-decoration: none;
}

.re-listing-toolbar__link:hover {
  color: #000;
  text-decoration: underline;
}

.re-listing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 28px;
}

.re-card {
  background: transparent;
  border: 0;
}

.re-card__media {
  display: block;
  position: relative;
  overflow: hidden;
  background: #ddd;
  aspect-ratio: 1.55 / 1;
}

.re-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.re-card:hover .re-card__media img {
  transform: scale(1.03);
}

.re-card__badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 7px 12px;
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.re-card__body {
  padding: 20px 0 4px;
}

.re-card__price {
  font-family: "Montserrat", serif;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.re-card__location {
  font-family: "Montserrat", serif;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(36, 27, 27, 0.62);
  margin-bottom: 10px;
}

.re-card__title {
  margin: 0;
  padding-bottom: 15px;
  border-bottom: 1px dotted rgba(0, 0, 0, 0.34);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(24px, 2.2vw, 39px);
  line-height: 0.98;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.re-card__title a {
  color: #231f20;
  text-decoration: none;
}

.re-card__title a:hover {
  color: #000;
}

.re-card__place {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.4;
  color: rgba(0, 0, 0, 0.7);
}

.re-card__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.re-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.re-stat__label {
  font-size: 12px;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0, 0, 0, 0.52);
}

.re-stat__value {
  font-size: 15px;
  line-height: 1.25;
  font-weight: 500;
  color: #202020;
}

.re-empty-state {
  max-width: 760px;
  padding: 56px 0 12px;
}

.re-empty-state__title {
  margin: 0 0 14px;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 0.95;
  font-weight: 500;
  color: #111;
}

.re-empty-state__text {
  margin: 0 0 20px;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 300;
  color: #222;
}

.re-empty-state__link {
  color: #111;
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 1200px) {
  .re-search-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .re-search-price {
    grid-column: span 2;
  }


  .re-shell {
    width: min(1440px, calc(100% - 40px));
  }

  .re-listing-grid {
    gap: 28px 22px;
  }

  .re-card__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .re-search-band {
    padding: 118px 0 38px;
  }

  .re-search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .re-search-price {
    grid-column: span 2;
  }


  .re-listing-hero {
    padding: 32px 0 32px;
  }

  .re-listing-grid {
    grid-template-columns: 1fr;
  }

  .re-listing-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .re-search-band {
    padding: 104px 0 30px;
  }

  .re-search-form {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .re-search-price {
    grid-column: auto;
  }

  .re-search-price__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 14px;
  }

  .re-search-actions {
    justify-content: space-between;
  }

  .re-search-actions button {
    min-width: 150px;
  }


  .re-shell {
    width: calc(100% - 24px);
  }

  .re-listing-hero {
    padding: 40px 0 34px;
  }

  .re-listing-hero__lead {
    margin-top: 18px;
    font-size: 18px;
  }

  .re-listing-section {
    padding-bottom: 64px;
  }

  .re-card__body {
    padding-top: 16px;
  }

  .re-card__location {
    font-size: 11px;
    letter-spacing: 0.18em;
  }

  .re-card__title {
    font-size: 28px;
  }

  .re-card__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
  }

  .re-stat__value {
    font-size: 16px;
  }
}

/* GRID SWITCHER */
.re-listing-toolbar__right {
  align-items: center;
}

.re-grid-switcher {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 8px;
}

.re-grid-switcher__btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: #ecebea;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.re-grid-switcher__btn span {
  display: block;
  width: 2px;
  height: 15px;
  background: #111;
  border-radius: 999px;
}

.re-grid-switcher__btn:hover,
.re-grid-switcher__btn.is-active {
  background: #111;
}

.re-grid-switcher__btn:hover span,
.re-grid-switcher__btn.is-active span {
  background: #fff;
}

.re-grid-switcher__btn:hover {
  transform: translateY(-1px);
}

/* COLONNE DINAMICHE */
.re-listing-grid[data-cols="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.re-listing-grid[data-cols="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.re-listing-grid[data-cols="4"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.re-listing-grid[data-cols="5"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* Riduzione elegante quando ci sono molte colonne */
.re-listing-grid[data-cols="3"] .re-card__title,
.re-listing-grid[data-cols="4"] .re-card__title,
.re-listing-grid[data-cols="5"] .re-card__title {
  font-size: clamp(22px, 1.55vw, 30px);
}

.re-listing-grid[data-cols="4"] .re-card__stats,
.re-listing-grid[data-cols="5"] .re-card__stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.re-listing-grid[data-cols="4"] .re-card__location,
.re-listing-grid[data-cols="5"] .re-card__location {
  font-size: 11px;
  letter-spacing: 0.16em;
}

.re-listing-grid[data-cols="5"] .re-card__place {
  font-size: 13px;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  .re-listing-grid[data-cols="4"],
  .re-listing-grid[data-cols="5"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .re-grid-switcher {
    display: none;
  }

  .re-listing-grid,
  .re-listing-grid[data-cols="2"],
  .re-listing-grid[data-cols="3"],
  .re-listing-grid[data-cols="4"],
  .re-listing-grid[data-cols="5"] {
    grid-template-columns: 1fr;
  }
}

/* =========================
   FILTRI MOBILE COMPATTI
========================= */

.re-mobile-filter-toggle,
.re-mobile-filter-close {
  display: none;
}

@media (max-width: 640px) {
  body.re-filter-open {
    overflow: hidden;
  }

  .re-search-band {
    padding: 112px 0 26px;
  }

  .re-mobile-filter-toggle {
    display: flex;
    width: 100%;
    height: 52px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.45);
    background: transparent;
    color: #fff;
    font-family: "Montserrat", serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
  }

  .re-search-form {
    position: fixed;
    inset: 0;
    z-index: 50000;
    display: none;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 24px;
    padding: 92px 28px 34px;
    background: #000;
    overflow-y: auto;
  }

  .re-search-form.is-mobile-open {
    display: grid;
  }

  .re-mobile-filter-close {
    display: block;
    position: fixed;
    top: 24px;
    right: 26px;
    z-index: 50001;
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 42px;
    line-height: 1;
    font-weight: 200;
  }

  .re-search-field label,
  .re-search-price__head span {
    font-size: 12px;
    letter-spacing: 0.22em;
  }

  .re-search-field select {
    height: 48px;
    font-size: 20px;
  }

  .re-search-price__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .re-range-slider {
    margin-top: 12px;
  }

  .re-search-actions {
    margin-top: 14px;
    justify-content: space-between;
    gap: 18px;
  }

  .re-search-actions button {
    flex: 1;
    height: 54px;
  }

  .re-search-actions a {
    min-width: 88px;
    text-align: right;
  }
}
