/* Explore section — filters, map/list split, listing cards */

.explore {
  padding: 0 0 90px;
}

.explore-head {
  padding: 56px 0 24px;
}

.explore-head .eyebrow {
  color: var(--blue);
  display: block;
  margin-bottom: 12px;
}

.explore-head h2 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}

.explore-search {
  flex: 1 1 240px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid rgba(3, 7, 18, 0.18);
  border-radius: 999px;
  padding: 11px 18px;
  min-width: 0;
}

.explore-search:focus-within {
  border-color: var(--ink);
}

.explore-search svg {
  color: var(--blue);
  flex-shrink: 0;
}

.explore-search input {
  border: none;
  outline: none;
  background: transparent;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  color: var(--ink);
  width: 100%;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  position: relative;
}

.result-count {
  font-size: 14px;
  color: var(--n5);
  margin-left: 4px;
}

html[dir="rtl"] .result-count {
  margin-left: 0;
  margin-right: 4px;
}

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(3, 7, 18, 0.18);
  background: #fff;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-toggle:hover {
  border-color: var(--ink);
}

.filter-toggle svg {
  color: var(--blue);
}

.filter-toggle .fcount {
  background: var(--blue);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
}

.filter-toggle.has-active .fcount {
  display: inline-flex;
}

.filter-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  left: auto;
  z-index: 30;
  width: min(560px, calc(100vw - 40px));
  background: #fff;
  border: 1px solid rgba(3, 7, 18, 0.1);
  border-radius: 20px;
  box-shadow: 0 30px 70px -25px rgba(3, 7, 18, 0.35);
  padding: 26px;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-height: 78vh;
  overflow: auto;
}

html[dir="rtl"] .filter-panel {
  right: auto;
  left: 0;
}

@media (max-width: 560px) {
  .filter-bar {
    position: static;
  }

  .filter-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 22px 22px 0 0;
    max-height: 82vh;
  }
}

.filter-panel.open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.fgroup {
  margin-bottom: 22px;
}

.fgroup > label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--n5);
  display: block;
  margin-bottom: 12px;
  font-family: "Inter", sans-serif;
}

.fbtns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.fbtn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(3, 7, 18, 0.16);
  background: transparent;
  font-size: 14px;
  font-family: "Inter", sans-serif;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.fbtn:hover {
  border-color: var(--ink);
}

.fbtn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--ink);
  font-weight: 500;
}

.price-slider {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-slider input[type="range"] {
  width: 100%;
  accent-color: var(--blue);
  cursor: pointer;
}

.filter-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(3, 7, 18, 0.08);
}

.filter-reset {
  background: none;
  border: none;
  color: var(--n5);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}

.filter-reset:hover {
  color: var(--ink);
}

/* Map + listings split — aligned with .container-wide content (search bar edges) */
.explore-split {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(20px, 2.5vw, 32px);
  align-items: start;
  width: 100%;
  margin-top: 26px;
}

.explore-map-col {
  min-width: 0;
  align-self: start;
}

.explore-list-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: visible;
  overscroll-behavior-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding: 0 6px 0 0;
  box-sizing: border-box;
}

.explore-list-col.is-scrollable {
  overflow-y: auto;
}

html[dir="rtl"] .explore-list-col {
  padding: 0 0 16px 6px;
}

.map-panel {
  position: relative;
  top: 0;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  aspect-ratio: 3 / 4;
  height: auto;
  max-height: calc(100vh - 108px);
  min-height: 420px;
  overflow: hidden;
  background: var(--blue-lightest);
  border: none;
  border-radius: 0;
}

.explore-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 0 0 auto;
  min-height: 0;
  padding: 0;
  overflow: visible;
  box-sizing: border-box;
  justify-content: flex-start;
}

.explore-list-col .elist-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 0;
  align-items: stretch;
  border: 1px solid rgba(3, 7, 18, 0.1);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  position: relative;
}

.explore-list-col .elist-card.is-paged-out {
  display: none;
}

.explore-list-col .elist-card:hover,
.explore-list-col .elist-card.active {
  border-color: var(--blue);
  box-shadow: 0 12px 28px -20px rgba(3, 7, 18, 0.28);
}

.explore-list-col .elist-media {
  position: relative;
  width: 112px;
  min-width: 112px;
  height: 100%;
  min-height: 112px;
  align-self: stretch;
  background: var(--n2);
  overflow: hidden;
}

.explore-list-col .elist-media > img,
.explore-list-col .elist-media > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.explore-list-col .elist-media--empty {
  overflow: hidden;
}

.explore-list-col .listing-media-placeholder {
  padding: 16%;
}

.explore-list-col .listing-media-placeholder img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.explore-list-col .elist-body {
  padding: 10px 10px 10px 10px;
  align-self: stretch;
  min-width: 0;
  overflow: visible;
}

html[dir="rtl"] .explore-list-col .elist-body {
  padding: 8px 10px 10px 10px;
}

.explore-list-col .elist-price {
  font-family: "Urbanist", sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  margin-bottom: 2px;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  line-height: 1.15;
}

.explore-list-col .elist-price .cur {
  display: inline-flex;
  align-items: center;
  font-size: 1em;
  font-weight: 700;
  margin-left: -0.1em;
  line-height: 1;
}

html[dir="rtl"] .explore-list-col .elist-price .cur {
  margin-left: 0;
  margin-right: -0.1em;
}

.explore-list-col .elist-price .riyal,
.explore-list-col .elist-price .cur .riyal {
  width: 1.65em;
  height: 1.95em;
  vertical-align: middle;
  margin: 0;
  flex-shrink: 0;
}

.explore-list-col .elist-price .per {
  font-family: "Inter", sans-serif;
  font-size: 0.65em;
  font-weight: 500;
  color: var(--n5);
  margin-left: 0.35em;
  align-self: center;
  white-space: nowrap;
}

html[dir="rtl"] .explore-list-col .elist-price .per {
  margin-left: 0;
  margin-right: 0.35em;
}

.explore-list-col .elist-title {
  font-family: "Urbanist", sans-serif;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.explore-list-col .elist-loc {
  font-size: 12px;
  color: var(--n5);
  margin-bottom: 4px;
  line-height: 1.35;
}

.explore-list-col .elist-specs {
  font-size: 11px;
  color: var(--n5);
  line-height: 1.35;
}

.explore-list-col .elist-fav {
  padding: 4px;
}

.explore-list-col .elist-fav svg {
  width: 22px;
  height: 22px;
}

.explore-list-col .elist-price-line .elist-status {
  font-size: 9px;
}

.explore-empty {
  display: none;
  padding: 50px 20px;
  text-align: center;
  color: var(--n5);
  font-size: 16px;
}

.explore-empty.show {
  display: block;
}

@media (max-width: 920px) {
  .explore-split {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .explore-map-col {
    order: -1;
  }

  .explore-list-col {
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 16px 0 56px;
  }

  .map-panel {
    position: relative;
    top: 0;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    aspect-ratio: auto;
    height: 360px;
    max-height: none;
    min-height: 0;
  }
}
