/* Property listing page styles */
/* --- Corrected Property Grid Section --- */
.property-listing-header {
  margin-top: 78px;
  overflow: hidden;
  padding: 72px 0 52px;
  position: relative;
}

.property-listing-header::before {
  background:
    linear-gradient(135deg, rgba(0, 46, 110, 0.94), rgba(0, 46, 110, 0.76)),
    url("https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1600&q=80") center/cover;
  content: "";
  inset: 0;
  position: absolute;
}

.property-listing-header .container {
  position: relative;
  z-index: 1;
}

.property-listing-hero {
  align-items: flex-end;
  color: #fff;
  display: flex;
  gap: 28px;
  justify-content: space-between;
}

.property-listing-hero h2 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
  margin: 8px 0 12px;
  max-width: 780px;
}

.property-listing-hero p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
  max-width: 640px;
}

.property-listing-stats,
.property-listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.property-listing-stats {
  margin-top: 22px;
}

.property-listing-stats span {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 10px 13px;
}

.property-listing-stats strong {
  color: #ffdc00;
  margin-right: 4px;
}

.property-listing-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.property-listing-actions a {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  white-space: nowrap;
}

.property-results-layout {
  align-items: start;
  display: grid;
  gap: 28px;
  grid-template-columns: 292px minmax(0, 1fr);
  max-width: none;
  width: 100%;
}

.property-results-layout.is-loading {
  opacity: 0.62;
  pointer-events: none;
}

.property-filter-panel {
  background: #fff;
  border: 1px solid rgba(0, 46, 110, 0.1);
  border-radius: 10px;
  box-shadow: 0 18px 42px rgba(0, 46, 110, 0.08);
  padding: 20px;
  position: sticky;
  top: 95px;
  width: 100%;
}

.filter-panel-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.filter-panel-title strong {
  color: #172335;
  font-size: 1rem;
}

.filter-panel-title a {
  color: #f39c12;
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filter-chips span {
  background: #fff7e8;
  border: 1px solid #f5c36e;
  border-radius: 8px;
  color: #8a5700;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 10px;
}

.filter-chips .filter-chip-with-close {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  padding-right: 6px;
}

.filter-chip-with-close a {
  align-items: center;
  background: #8a5700;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  font-size: 0.62rem;
  height: 16px;
  justify-content: center;
  text-decoration: none;
  width: 16px;
}

.filter-chip-with-close a:hover,
.filter-chip-with-close a:focus-visible {
  background: #002e6e;
  outline: none;
}

.filter-group {
  border-top: 1px solid #edf1f5;
  padding: 16px 0;
}

.filter-group h4 {
  color: #172335;
  font-size: 0.94rem;
  margin-bottom: 12px;
}

.filter-pill-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.property-results-bar select {
  background: #fff;
  border: 1px solid #dfe5ec;
  border-radius: 6px;
  color: #536174;
  min-height: 38px;
  padding: 0 10px;
}

.budget-slider-form {
  display: grid;
  gap: 12px;
}

.budget-range-values {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.budget-range-values span {
  background: #fff7e8;
  border: 1px solid #f5c36e;
  border-radius: 999px;
  color: #8a5700;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 5px 9px;
}

.budget-slider-control {
  display: grid;
  gap: 6px;
}

.budget-slider-control span {
  color: #536174;
  font-size: 0.76rem;
  font-weight: 800;
}

.budget-slider-control input[type="range"] {
  accent-color: #f39c12;
  cursor: pointer;
  width: 100%;
}

.budget-apply-btn {
  background: #002e6e;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  min-height: 42px;
  padding: 0 12px;
  box-shadow: 0 10px 22px rgba(0, 46, 110, 0.18);
}

.budget-apply-btn:hover,
.budget-apply-btn:focus-visible {
  background: #f39c12;
  color: #002e6e;
  outline: none;
}

.filter-pill-row a,
.filter-check-list a {
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  color: #172335;
  display: flex;
  font-size: 0.84rem;
  font-weight: 700;
  min-height: 40px;
  padding: 9px 10px;
  text-decoration: none;
}

.filter-pill-row a {
  align-items: center;
  justify-content: center;
}

.filter-check-list {
  display: grid;
  gap: 9px;
}

.filter-check-list a {
  align-items: center;
  gap: 8px;
}

.filter-pill-row a.active,
.filter-check-list a.active {
  background: #fff7e8;
  border-color: #f39c12;
  color: #002e6e;
  box-shadow: inset 0 0 0 1px rgba(243, 156, 18, 0.2);
}

.filter-check-list i {
  color: #f39c12;
  font-size: 0.72rem;
}

.property-results-main {
  min-width: 0;
}

.property-map-panel {
  background: #fff;
  border: 1px solid rgba(0, 46, 110, 0.1);
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(0, 46, 110, 0.08);
  margin-bottom: 20px;
  overflow: hidden;
  padding: 18px;
}

.property-map-head {
  align-items: flex-end;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.property-map-head h3 {
  color: #172335;
  font-size: 1.08rem;
  margin: 4px 0 0;
}

.property-map-head > span {
  background: #eef5ff;
  border-radius: 8px;
  color: #002e6e;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 10px;
  white-space: nowrap;
}

.property-map {
  border: 1px solid #e6edf5;
  border-radius: 10px;
  height: 390px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.property-map .leaflet-control-container,
.property-map .leaflet-control,
.property-map .leaflet-pane,
.property-map .leaflet-top,
.property-map .leaflet-bottom {
  z-index: 20;
}

.property-map .leaflet-top.leaflet-left {
  bottom: 14px !important;
  left: 14px !important;
  top: auto !important;
}

.property-map .leaflet-bottom.leaflet-left {
  bottom: 14px !important;
  left: 14px !important;
}

.property-map .leaflet-control-zoom {
  border: 0;
  box-shadow: 0 10px 24px rgba(0, 46, 110, 0.18);
  margin: 0;
}

.property-map .leaflet-control-zoom a {
  align-items: center;
  background: #fff;
  border: 1px solid #d7e1ee;
  color: #002e6e;
  display: flex;
  font-size: 1.18rem;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.property-map .leaflet-control-zoom a:first-child {
  border-radius: 8px 8px 0 0;
}

.property-map .leaflet-control-zoom a:last-child {
  border-radius: 0 0 8px 8px;
}

.property-map .leaflet-control-zoom a:hover,
.property-map .leaflet-control-zoom a:focus {
  background: #002e6e;
  color: #fff;
}

.property-map-empty {
  color: #536174;
  font-size: 0.88rem;
  font-weight: 600;
  margin: 10px 0 0;
}

.property-map-marker {
  align-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(23, 35, 53, 0.26);
  color: #fff;
  display: flex !important;
  height: 34px !important;
  justify-content: center;
  position: relative;
  width: 34px !important;
}

.property-map-marker:hover {
  transform: translateY(-2px);
}

.property-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 12px;
  margin-top: 12px;
}

.property-map-legend span {
  align-items: center;
  background: #f7faff;
  border: 1px solid #e4edf8;
  border-radius: 999px;
  color: #172335;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 7px;
  padding: 6px 9px 6px 6px;
}

.property-map-legend .property-map-marker {
  border-width: 2px;
  box-shadow: 0 4px 10px rgba(23, 35, 53, 0.16);
  flex: 0 0 24px;
  font-size: 0.7rem;
  height: 24px !important;
  width: 24px !important;
}

.property-map-marker.residential {
  background: #002e6e;
}

.property-map-marker.commercial {
  background: #f39c12;
}

.property-map-marker.shop {
  background: #c2410c;
}

.property-map-marker.office {
  background: #475569;
}

.property-map-marker.plot {
  background: #2e7d32;
}

.property-map-marker.apartment {
  background: #2563eb;
}

.property-map-marker.villa {
  background: #7c3aed;
}

.property-map-marker.studio {
  background: #db2777;
}

.property-map-marker.rent {
  background: #00897b;
}

.property-map-marker.ready {
  background: #16a34a;
}

.property-map-popup {
  display: grid;
  gap: 7px;
  min-width: 210px;
}

.property-map-popup img {
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  width: 100%;
}

.property-map-popup strong {
  color: #172335;
  font-size: 0.92rem;
  line-height: 1.3;
}

.property-map-popup span {
  color: #002e6e;
  font-weight: 800;
}

.property-map-popup small {
  color: #536174;
}

.property-map-popup a {
  color: #f39c12;
  font-weight: 800;
  text-decoration: none;
}

.property-locality-panel {
  background: #fff;
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  box-shadow: none;
  margin-bottom: 20px;
  overflow: hidden;
  padding: 20px 20px 22px;
  position: relative;
}

.property-locality-head {
  border-bottom: 1px solid #d9d9d9;
  margin-bottom: 22px;
  padding-bottom: 20px;
}

.property-locality-head h3 {
  color: #172335;
  font-size: 1.32rem;
  margin: 0;
}

.property-locality-list {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 0 0 2px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.property-locality-list::-webkit-scrollbar {
  display: none;
}

.property-locality-card {
  border: 1px solid #dedede;
  border-radius: 8px;
  color: #fff;
  display: block;
  flex: 0 0 min(420px, calc(100% - 12px));
  min-height: 306px;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
  text-decoration: none;
}

.property-locality-image {
  inset: 0;
  position: absolute;
}

.property-locality-image::after {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 25, 60, 0.85)),
    linear-gradient(90deg, rgba(0, 46, 110, 0.28), transparent);
  content: "";
  inset: 0;
  position: absolute;
}

.property-locality-image img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  width: 100%;
}

.property-locality-image strong {
  color: #fff;
  font-size: 1.25rem;
  left: 22px;
  position: absolute;
  right: 22px;
  top: 24px;
  z-index: 1;
}

.property-locality-card > span {
  align-items: end;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  inset: auto 18px 18px;
  min-height: 92px;
  padding: 18px 16px;
  position: absolute;
  z-index: 1;
}

.property-locality-card b {
  color: #303030;
  display: block;
  font-size: 1.02rem;
}

.property-locality-card small {
  color: #646464;
  display: block;
  font-size: 0.92rem;
  margin-top: 4px;
}

.property-locality-card i {
  color: #303030;
  font-size: 1rem;
  grid-row: 1 / span 2;
}

.property-locality-card:hover {
  border-color: #f39c12;
  box-shadow: 0 16px 34px rgba(0, 46, 110, 0.1);
}

.property-locality-card:hover img {
  transform: scale(1.06);
}

.property-locality-card:hover > span {
  border-color: #f39c12;
}

.property-locality-scroll {
  align-items: center;
  background: #fff;
  border: 2px solid #002e6e;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(0, 46, 110, 0.18);
  color: #002e6e;
  cursor: pointer;
  display: inline-flex;
  height: 50px;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-10%);
  width: 50px;
  z-index: 2;
}

.property-locality-scroll.prev {
  left: -5px;
}

.property-locality-scroll.next {
  right: -5px;
}

.property-locality-scroll:hover,
.property-locality-scroll:focus-visible {
  background: #002e6e;
  border-color: #002e6e;
  color: #fff;
  outline: none;
}

.property-locality-scroll:disabled,
.property-locality-scroll[aria-disabled="true"] {
  background: #eef1f5;
  border-color: #c8d0da;
  box-shadow: none;
  color: #9aa5b3;
  cursor: not-allowed;
}

.property-locality-scroll:disabled:hover,
.property-locality-scroll[aria-disabled="true"]:hover {
  background: #eef1f5;
  border-color: #c8d0da;
  color: #9aa5b3;
}

.property-results-bar {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(0, 46, 110, 0.1);
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 46, 110, 0.06);
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 14px 16px;
}

.property-results-bar strong {
  color: #002e6e;
  font-size: 1.25rem;
}

.property-sort-form {
  margin: 0;
}

.property-results-back {
  grid-column: 1 / -1;
  margin-top: 8px;
  text-align: center;
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 20px 0;
}

.property-empty-state {
  background: #fff;
  border: 1px solid rgba(0, 46, 110, 0.1);
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(0, 46, 110, 0.08);
  color: #536174;
  font-weight: 700;
  grid-column: 1 / -1;
  padding: 54px 24px;
  text-align: center;
}

.property-empty-state > i {
  align-items: center;
  background: #fff7e8;
  border: 1px solid #f5c36e;
  border-radius: 50%;
  color: #f39c12;
  display: inline-flex;
  font-size: 1.7rem;
  height: 64px;
  justify-content: center;
  margin-bottom: 16px;
  width: 64px;
}

.property-empty-state h2 {
  color: #172335;
  font-size: 1.45rem;
  margin-bottom: 8px;
}

.property-empty-state p {
  color: #637083;
  font-weight: 500;
  margin: 0 auto;
  max-width: 520px;
}

.property-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}

.property-card {
  background: #fff;
  border: 1px solid rgba(0, 46, 110, 0.1);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 46, 110, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    box-shadow 0.22s ease,
    transform 0.22s ease,
    border-color 0.22s ease;
}

.property-card:hover {
  border-color: rgba(243, 156, 18, 0.5);
  box-shadow: 0 22px 54px rgba(0, 46, 110, 0.14);
  transform: translateY(-5px);
}

/* Image Container */
.property-card img {
  width: 100%;
  height: 215px;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.property-card:hover img {
  transform: scale(1.035);
}

/* Content Area */
.property-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 18px;
}

.property-tag {
  background:
    linear-gradient(135deg, rgba(var(--tag-rgb, 215, 164, 58), 0.9), rgba(var(--tag-rgb-dark, 138, 82, 0), 0.72)),
    rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 8px 18px rgba(0, 30, 70, 0.14);
  color: #fff;
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 900;
  margin-bottom: 10px;
  padding: 7px 13px;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(12px) saturate(150%);
}
.property-tag.tag-apartment { --tag-rgb: 214, 151, 42; --tag-rgb-dark: 132, 78, 8; }
.property-tag.tag-commercial,
.property-tag.tag-office { --tag-rgb: 123, 74, 226; --tag-rgb-dark: 62, 36, 128; }
.property-tag.tag-plot { --tag-rgb: 18, 132, 103; --tag-rgb-dark: 6, 86, 66; }
.property-tag.tag-land { --tag-rgb: 87, 123, 51; --tag-rgb-dark: 48, 82, 29; }
.property-tag.tag-villa { --tag-rgb: 168, 96, 36; --tag-rgb-dark: 111, 55, 20; }
.property-tag.tag-shop { --tag-rgb: 190, 91, 54; --tag-rgb-dark: 128, 47, 28; }
.property-tag.tag-rent { --tag-rgb: 12, 124, 158; --tag-rgb-dark: 5, 76, 103; }
.property-tag.tag-penthouse { --tag-rgb: 143, 85, 139; --tag-rgb-dark: 93, 45, 91; }
.property-tag.tag-property { --tag-rgb: 215, 164, 58; --tag-rgb-dark: 138, 82, 0; }

.property-content h3 {
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: inherit;
  color: #172335;
  display: -webkit-box;
  font-size: 1.12rem;
  line-height: 1.35;
  margin-bottom: 8px;
  overflow: hidden;
}

.property-content .price {
  color: #002e6e;
  font-size: 1.34rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.property-content .location {
  color: #637083;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.property-content .specs {
  align-items: center;
  color: #253043;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 2px;
  min-height: 24px;
}

.property-content .specs span {
  align-items: center;
  color: #22324a;
  display: inline-flex;
  font-size: 0.94rem;
  font-weight: 700;
  gap: 5px;
  line-height: 1.25;
  min-width: 0;
  white-space: nowrap;
}

.property-content .specs i {
  color: #f39c12;
  font-size: 0.9rem;
}

.property-content .specs span + span::before {
  background: #7c8797;
  content: "";
  display: inline-block;
  height: 1.05em;
  margin: 0 8px;
  width: 1px;
}

.property-content .location i {
  color: #f39c12;
}

/* Button Alignment */
.view-btn {
  background: #002e6e;
  border-radius: 8px;
  color: #fff;
  display: block;
  font-weight: 800;
  margin-top: auto;
  padding: 12px;
  text-align: center;
  text-decoration: none;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.view-btn:hover {
  background: #f39c12;
  color: #002e6e;
}

@media (max-width: 768px) {
  .property-listing-header {
    margin-top: 72px;
    padding: 42px 0 34px;
  }

  .property-listing-hero {
    align-items: stretch;
    flex-direction: column;
    gap: 20px;
  }

  .property-listing-hero h2 {
    font-size: 2rem;
    line-height: 1.12;
    margin-bottom: 10px;
  }

  .property-listing-hero p {
    font-size: 0.94rem;
    line-height: 1.55;
  }

  .property-listing-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .property-listing-stats span {
    padding: 9px 10px;
    text-align: center;
  }

  .property-listing-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .property-listing-actions a {
    justify-content: center;
    min-height: 44px;
    width: 100%;
  }

  .property-results-layout {
    gap: 20px;
    grid-template-columns: minmax(0, 1fr);
  }

  .property-filter-panel {
    border-radius: 10px;
    padding: 16px;
    position: static;
  }

  .filter-panel-title {
    margin-bottom: 12px;
  }

  .filter-chips {
    margin-bottom: 12px;
  }

  .filter-group {
    padding: 14px 0;
  }

  .filter-pill-row {
    grid-template-columns: 1fr;
  }

  .filter-pill-row a,
  .filter-check-list a {
    min-height: 44px;
  }

  .budget-range-values {
    align-items: stretch;
    gap: 8px;
  }

  .budget-range-values span {
    flex: 1;
    text-align: center;
  }

  .property-map-panel,
  .property-locality-panel,
  .property-results-bar {
    border-radius: 10px;
    padding: 14px;
  }

  .property-map-head {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .property-map-head > span {
    text-align: center;
    white-space: normal;
  }

  .property-map {
    height: 300px;
  }

  .property-map-legend {
    gap: 8px;
  }

  .property-map-legend span {
    font-size: 0.72rem;
  }

  .property-locality-head {
    margin-bottom: 16px;
    padding-bottom: 14px;
  }

  .property-locality-head h3 {
    font-size: 1.1rem;
    line-height: 1.35;
  }

  .property-locality-list {
    gap: 12px;
  }

  .property-locality-card {
    flex-basis: min(310px, 88vw);
    min-height: 260px;
  }

  .property-locality-card > span {
    grid-template-columns: 1fr;
    inset: auto 12px 12px;
    min-height: auto;
    padding: 14px;
  }

  .property-locality-scroll {
    display: none;
  }

  .property-results-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .property-results-bar strong {
    font-size: 1.1rem;
  }

  .property-sort-form select {
    min-height: 44px;
    width: 100%;
  }

  .property-grid {
    gap: 18px;
    grid-template-columns: minmax(0, 1fr);
    padding: 12px 0;
  }

  .property-card {
    border-radius: 10px;
  }

  .property-card img {
    height: 210px;
  }

  .property-content {
    padding: 16px;
  }

  .property-content .price {
    font-size: 1.18rem;
  }

  .property-content h3 {
    -webkit-line-clamp: 2;
    line-clamp: inherit;
    font-size: 1rem;
  }

  .property-content .specs {
    gap: 0;
  }

  .property-content .specs span {
    line-height: 1.25;
  }
}

@media (max-width: 420px) {
  .property-listing-hero h2 {
    font-size: 1.75rem;
  }

  .property-listing-stats {
    grid-template-columns: 1fr;
  }

  .property-map {
    height: 260px;
  }

  .property-card img {
    height: 190px;
  }
}
