/* Map listings v2 — half-map + Meva search/cards (strips Residence half-map) */

body.mv-map-listings {
  --mm-header: 88px;
  background: var(--cream, #f7f4ee);
  color: var(--charcoal, #1c1915);
  overflow: hidden;
}

body.mv-map-listings .mv-foot {
  display: none !important;
}

body.mv-map-listings .master_header,
body.mv-map-listings #colophon,
body.mv-map-listings .theme_slider_wrapper,
body.mv-map-listings .adv-search-1,
body.mv-map-listings .advanced_search_shortcode,
body.mv-map-listings .half_map_section,
body.mv-map-listings #google_map_prop_list_wrapper,
body.mv-map-listings #google_map_prop_list_sidebar,
body.mv-map-listings .comparision-wrapper,
body.mv-map-listings #compare_widget_btn,
body.mv-map-listings .modal,
body.mv-map-listings .loginpop,
body.mv-map-listings .backtop {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.mv-map-listings .mv-header--solid {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 244, 238, .94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(28, 25, 21, .08);
}

.mm-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: calc(100vh - var(--mm-header));
  min-height: 560px;
  overflow: hidden;
}

.mm-map {
  position: relative;
  min-width: 0;
  background: #e8e2d6;
}

.mm-map__canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.mm-map .leaflet-container {
  width: 100%;
  height: 100%;
  font: inherit;
  background: #e8e2d6;
}

.mm-map__halo {
  display: block;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 148, 90, .35) 0%, rgba(184, 148, 90, 0) 70%);
}

.mm-map__marker {
  filter: drop-shadow(0 4px 10px rgba(28, 25, 21, .28));
}

.mm-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid rgba(28, 25, 21, .12);
  box-shadow: 0 6px 18px rgba(28, 25, 21, .16);
  color: var(--charcoal, #1c1915);
  font-family: Instrument Sans, system-ui, sans-serif;
  font-weight: 600;
  line-height: 1;
}

.mm-cluster span {
  display: block;
  text-align: center;
}

.mm-cluster--sm {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.mm-cluster--md {
  width: 44px;
  height: 44px;
  font-size: 13px;
  border-color: rgba(138, 109, 58, .35);
}

.mm-cluster--lg {
  width: 52px;
  height: 52px;
  font-size: 14px;
  background: var(--charcoal, #1c1915);
  color: #fff;
  border-color: var(--charcoal, #1c1915);
}

.mm-more-count {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--muted, #7a7266);
  text-align: center;
}

.mm-map .leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(28, 25, 21, .18);
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(28, 25, 21, .06);
}

.mm-map .leaflet-popup-tip {
  background: #fff;
  box-shadow: none;
  border: 0;
}

.mm-map .leaflet-popup-content {
  margin: 0 !important;
  width: 260px !important;
  min-width: 260px;
  line-height: 1.35;
}

.mm-map .leaflet-popup-close-button {
  top: 8px !important;
  right: 8px !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92) !important;
  color: var(--charcoal, #1c1915) !important;
  font: 18px/28px Instrument Sans, system-ui, sans-serif !important;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(28, 25, 21, .12);
  z-index: 3;
}

.mm-map .leaflet-popup-close-button:hover {
  background: #fff !important;
  color: var(--gold-dark, #8a6d3a) !important;
}

a.mm-popup,
.mm-popup {
  display: block;
  color: inherit !important;
  text-decoration: none !important;
  background: #fff;
}

a.mm-popup:hover,
a.mm-popup:focus,
.mm-popup:hover,
.mm-popup:focus {
  color: inherit !important;
  text-decoration: none !important;
}

.mm-popup *,
.mm-popup *:hover {
  text-decoration: none !important;
}

.mm-popup__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #ebe6dc;
}

.mm-popup__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.22, 1, .36, 1);
}

.mm-popup:hover .mm-popup__media img {
  transform: scale(1.04);
}

.mm-popup__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--charcoal, #1c1915);
}

.mm-popup__body {
  display: grid;
  gap: 5px;
  padding: 14px 16px 16px;
}

.mm-popup__title {
  margin: 0 !important;
  font-family: var(--serif, Fraunces, Georgia, serif);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--charcoal, #1c1915) !important;
  transition: color .2s ease;
}

.mm-popup:hover .mm-popup__title {
  color: var(--gold-dark, #8a6d3a) !important;
}

.mm-popup__meta {
  margin: 0 !important;
  font-size: 12.5px;
  color: var(--muted, #7a7266) !important;
}

.mm-popup__price {
  margin: 6px 0 0 !important;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal, #1c1915) !important;
}

.mm-popup__specs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 0;
  margin: 4px 0 0 !important;
  font-size: 12px;
  color: var(--muted, #7a7266) !important;
}

.mm-popup__specs i {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 0 8px;
  border-radius: 50%;
  background: #c9c0b2;
  vertical-align: middle;
}

.mm-popup__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--gold-dark, #8a6d3a) !important;
}

.mm-popup__cta svg {
  transition: transform .25s ease;
}

.mm-popup:hover .mm-popup__cta svg {
  transform: translateX(3px);
}

.mm-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--cream, #f7f4ee);
  border-left: 1px solid rgba(28, 25, 21, .08);
  overflow: hidden;
}

.mm-panel__search {
  flex: 0 0 auto;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(28, 25, 21, .08);
  background: linear-gradient(180deg, #faf7f1 0%, var(--cream, #f7f4ee) 100%);
}

.mm-search-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(28, 25, 21, .1);
  border-radius: 12px;
  background: #fff;
  color: var(--charcoal, #1c1915);
  cursor: pointer;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.mm-search-toggle:hover {
  border-color: rgba(28, 25, 21, .18);
  box-shadow: 0 6px 18px rgba(28, 25, 21, .06);
}

.mm-search-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--cream, #f7f4ee);
  color: var(--charcoal, #1c1915);
  flex: none;
}

.mm-search-toggle__label {
  flex: 1 1 auto;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
}

.mm-search-toggle__label em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--charcoal, #1c1915);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}

.mm-search-toggle__hint {
  flex: none;
  font-size: 12px;
  color: var(--muted, #7a7266);
}

.mm-search-toggle__chev {
  display: inline-flex;
  flex: none;
  color: var(--muted, #7a7266);
  transition: transform .25s ease;
}

.mm-panel__search.is-open .mm-search-toggle__chev {
  transform: rotate(180deg);
}

.mm-search-drawer {
  margin-top: 12px;
}

.mm-search-drawer[hidden] {
  display: none !important;
}

body.mv-map-listings .mm-search.ml-search {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  overflow: hidden;
}

body.mv-map-listings .mm-search .ml-search__submit {
  grid-column: 1 / -1;
  width: 100%;
  height: 44px;
  margin: 0;
  border-radius: 10px;
  transform: none !important;
}

body.mv-map-listings .mm-search .ml-search__submit:hover {
  transform: none !important;
  background: var(--forest, #3d4737);
}

body.mv-map-listings .mm-popular.ml-popular {
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

body.mv-map-listings .mm-popular .ml-popular__label {
  width: 100%;
  margin-bottom: 2px;
}

body.mv-map-listings a.ml-pill,
body.mv-map-listings a.ml-pill:hover,
body.mv-map-listings a.ml-pill:focus,
body.mv-map-listings a.ml-pill:visited {
  text-decoration: none !important;
}

body.mv-map-listings .mm-popular .ml-pill {
  font-size: 12px;
  padding: 6px 10px;
  text-decoration: none !important;
}

body.mv-map-listings .ml-more {
  margin-top: 10px;
}

.mm-panel__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 14px 20px 10px;
}

.mm-panel__title {
  margin: 4px 0 0;
  font-family: var(--serif, Fraunces, Georgia, serif);
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.01em;
}

body.mv-map-listings .mm-panel__head .ml-sort {
  flex-shrink: 0;
}

.mm-panel__list {
  flex: 1 1 auto;
  overflow: auto;
  padding: 4px 18px 28px;
  scroll-behavior: smooth;
}

.mm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.mm-card {
  border-radius: 12px;
}

.mm-card.is-active .mv-dev {
  box-shadow: 0 0 0 2px rgba(184, 148, 90, .55), 0 10px 28px rgba(28, 25, 21, .1);
}

body.mv-map-listings .mm-dev.mv-dev {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(28, 25, 21, .08);
  box-shadow: none;
  height: 100%;
  transition: box-shadow .3s ease, border-color .3s ease;
}

body.mv-map-listings .mm-dev.mv-dev:hover {
  transform: none;
  border-color: rgba(28, 25, 21, .12);
  box-shadow: 0 10px 28px rgba(31, 29, 24, .1);
}

body.mv-map-listings .mm-dev .mv-dev__media {
  aspect-ratio: 4 / 3;
}

body.mv-map-listings .mm-dev .mv-dev__body {
  padding: 14px 14px 16px;
}

body.mv-map-listings .mm-dev .mv-dev__title {
  font-size: 15.5px;
  margin-bottom: 4px;
}

body.mv-map-listings .mm-dev .mv-dev__loc {
  font-size: 12px;
}

body.mv-map-listings .mm-dev .mv-dev__price {
  margin-top: 10px;
  font-size: 13.5px;
}

body.mv-map-listings .mm-dev .mv-dev__specs {
  font-size: 12px;
  gap: 8px 12px;
}

body.mv-map-listings .mm-pager {
  margin-top: 22px;
}

/* Mobile: map on top, list below */
@media (max-width: 1100px) {
  body.mv-map-listings .mm-dev .mv-dev__title {
    font-size: 14.5px;
  }
}

@media (max-width: 960px) {
  body.mv-map-listings {
    overflow: auto;
  }

  .mm-page {
    grid-template-columns: 1fr;
    grid-template-rows: min(42vh, 360px) 1fr;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .mm-map {
    min-height: 280px;
  }

  .mm-map__canvas {
    position: relative;
    height: 100%;
    min-height: 280px;
  }

  .mm-panel {
    border-left: 0;
    border-top: 1px solid rgba(28, 25, 21, .08);
    max-height: none;
  }

  .mm-panel__list {
    overflow: visible;
  }

  body.mv-map-listings .mm-search.ml-search {
    grid-template-columns: 1fr;
  }
}

.mm-totop {
  display: none;
}

@media (max-width: 960px) {
  .mm-totop {
    position: fixed;
    right: 16px;
    bottom: 20px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(28, 25, 21, .1);
    border-radius: 999px;
    background: #fff;
    color: var(--charcoal, #1c1915);
    box-shadow: 0 10px 28px rgba(28, 25, 21, .16);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s ease, background .2s ease;
  }

  .mm-totop:not([hidden]) {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mm-totop:hover,
  .mm-totop:focus-visible {
    background: var(--charcoal, #1c1915);
    color: #fff;
    outline: none;
  }
}

@media (max-width: 560px) {
  .mm-grid {
    grid-template-columns: 1fr;
  }

  .mm-panel__head {
    flex-direction: column;
    align-items: stretch;
  }

  .mm-panel__search {
    padding: 12px 14px 8px;
  }

  .mm-panel__list {
    padding: 4px 14px 24px;
  }
}
