 /* ── Page Loader Overlay ── */
  #pageLoader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.4s ease;
  }

  #pageLoader.fade-out {
    opacity: 0;
    pointer-events: none;
  }

  .page-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .loader-logo img {
    height: 48px;
    width: auto;
    object-fit: contain;
  }

  .loader-spinner svg {
    animation: loader-spin 0.9s linear infinite;
    display: block;
  }

  @keyframes loader-spin {
    from {
      transform: rotate(0deg);
    }

    to {
      transform: rotate(360deg);
    }
  }

  .loader-text {
    font-family: "Helvetica Neue LT Arabic", Helvetica, Arial, sans-serif;
    font-size: 13px;
    color: #999;
    margin: 0;
    letter-spacing: 0.04em;
    animation: loader-pulse 1.6s ease-in-out infinite;
  }

  @keyframes loader-pulse {

    0%,
    100% {
      opacity: 1;
    }

    50% {
      opacity: 0.4;
    }
  }

  /* ── Map Toggle Button ── */
  .map-toggle-wrap {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: all;
  }

  .map-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid #D1D5DC;
    border-radius: 20px;
    padding: 6px 14px 6px 8px;
    cursor: pointer;
    font-size: 12px;
    color: #555;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: border-color 0.2s, box-shadow 0.2s;
    white-space: nowrap;
  }

  .map-toggle-btn.active {
    border-color: #C5A479;
    color: #C5A479;
    box-shadow: 0 2px 10px rgba(197, 164, 121, 0.25);
  }

  .map-toggle-knob {
    width: 32px;
    height: 18px;
    background: #ccc;
    border-radius: 9px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s;
  }

  .map-toggle-knob::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: left 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  }

  .map-toggle-btn.active .map-toggle-knob {
    background: #C5A479;
  }

  .map-toggle-btn.active .map-toggle-knob::after {
    left: 17px;
  }

  /* ── Map Panel needs relative positioning for the button ── */
  .map-panel {
    position: sticky;
    top: 0;
    width: 50%;
    height: 100vh;
    flex-shrink: 0;
    position: relative;
    /* add this */
  }

  /* ── Bounds Bar ── */
  .map-bounds-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f4ee;
    border: 1px solid #e8d5b0;
    border-radius: 6px;
    padding: 8px 14px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #6b5a3e;
    gap: 12px;
  }

  .btn-reset-bounds {
    background: #C5A479;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .btn-reset-bounds:hover {
    background: #b89449;
  }

  /* ── Header ── */
  .page-template-property-listing-php .main-header.sticky-top {
    /* position: unset; */
    background: #000;
  }

  /* ── Single-scroll layout ── */
  .listing-page-wrapper {
    display: flex;
    align-items: flex-start;
    min-height: 100vh;
    margin-top: 70px;
  }
.rtl .payment-plan-modal .modal-header .btn-close {
    margin: 0;
}
.rtl .rent-form-header {
    text-align: right;
}
  /* Map: fixed to viewport, occupies left half */
  .map-panel {
    position: sticky;
    top: 0;
    width: 50%;
    height: 100vh;
    flex-shrink: 0;
  }

  .map-panel.hidden {
    display: none;
  }

  #map {
    width: 100%;
    height: 100%;
  }

  /* Listing: natural flow, scrolls with page */
  .listing-panel {
    width: 50%;
    min-height: 100vh;
    background: #fff;
  }

  .listing-panel.full-width {
    width: 100%;
  }

  .content-wrapper {
    padding: 20px 30px;
  }

  .page-header {
    margin-bottom: 20px;
  }

  .page-title {
    margin: 0;
    color: #333435;
    font-family: "Helvetica Neue LT Arabic";
    font-size: 20px;
    font-weight: 700;
  }

  /* ── Basic filters ── */
  .filters-section {
    margin-bottom: 20px;
  }

  .price-range-track-wrap {
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
  }

  .price-range-input {
    position: absolute;
    width: 100%;
    height: 4px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
  }

  .price-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #c9a55a;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    pointer-events: all;
    cursor: pointer;
    position: relative;
    z-index: 2;
  }

  .price-range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #c9a55a;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    pointer-events: all;
    cursor: pointer;
  }

  .price-range-track {
    position: absolute;
    height: 4px;
    background: #c9a55a;
    border-radius: 2px;
    z-index: 1;
    pointer-events: none;
  }

  /* Base track behind both thumbs */
  .price-range-track-wrap::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background: #e8d5b0;
    border-radius: 2px;
  }

  .price-range-values {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #666;
    margin-top: 6px;
  }

  .basic-filters .form-control,
  .basic-filters .form-select {
    height: 35px;
    border-radius: 5px;
    border: 1px solid #D1D5DC;
    color: #717182;
    font-family: "Helvetica Neue LT Arabic";
    font-size: 11px;
  }

  .basic-filters .btn-primary {
    height: 35px;
    border-radius: 5px;
    background: #C5A479;
    border-color: #C5A479;
    color: #fff;
    font-size: 13px;
  }

  .basic-filters .btn-primary:hover {
    background: #b89449;
    border-color: #b89449;
  }

  #advancedFilterToggle {
    height: 35px;
    border-radius: 5px;
    border: 1px solid #C5A479;
    background: #fff;
    padding: 0 13px;
  }

  #advancedFilterToggle i {
    color: #C5A479;
  }

  /* ── Custom multiselect ── */
  .custom-multiselect {
    position: relative;
    user-select: none;
  }

  .multiselect-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 35px;
    padding: 0 10px;
    border: 1px solid #D1D5DC;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    font-size: 11px;
    color: #717182;
    font-family: "Helvetica Neue LT Arabic";
    gap: 6px;
  }

  .multiselect-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .multiselect-arrow {
    font-size: 9px;
    color: #999;
    transition: transform 0.2s;
    flex-shrink: 0;
  }

  .custom-multiselect.open .multiselect-arrow {
    transform: rotate(180deg);
  }

  .multiselect-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    background: #fff;
    border: 1px solid #D1D5DC;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 999;
    padding: 6px 0;
  }

  .custom-multiselect.open .multiselect-panel {
    display: block;
  }

  .multiselect-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    transition: background 0.15s;
    margin: 0;
    font-weight: normal;
  }

  .multiselect-option:hover {
    background: #f8f4ee;
  }

  .multiselect-option input[type="checkbox"] {
    accent-color: #C5A479;
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  /* Price range panel */
  .price-panel {
    min-width: 220px;
  }

  .price-range-wrap {
    padding: 10px 12px;
  }

  .price-range-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .price-range-inputs .form-control {
    height: 32px;
    font-size: 12px;
  }

  .price-range-inputs span {
    color: #999;
    flex-shrink: 0;
  }

  /* ── Advanced filters ── */
  .advanced-filters {
    margin-top: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
  }

  .filter-panel h6 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #000;
  }

  .filter-panel .form-control {
    font-size: 13px;
    border: 1px solid #ddd;
    border-radius: 4px;
  }

  .filter-panel .form-check {
    margin-bottom: 8px;
  }

  .filter-panel .form-check-label {
    font-size: 13px;
    color: #666;
  }

  .filter-panel .btn {
    font-size: 13px;
    border-radius: 4px;
  }

  .filter-panel .btn-primary {
    background: #C5A479;
    border-color: #C5A479;
  }

  .filter-panel .btn-primary:hover {
    background: #b89449;
    border-color: #b89449;
  }

  /* ── View toggle ── */
  .view-toggle-section {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
    margin-bottom: 20px;
  }

  .btn-view {
    border: 1px solid #ddd;
    color: #fff;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 5px;
    background: #333435;
    transition: all 0.2s;
  }

  .btn-view.active {
    background: #C6A57A;
    border-color: #C6A57A;
    color: #fff;
  }

  .btn-view:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
  }

  .btn-view.active:hover {
    background: #b89449;
    border-color: #b89449;
  }

  /* ── Property grid ── */
  .properties-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }

  .properties-list.grid-2-col {
    grid-template-columns: repeat(2, 1fr);
  }

  .properties-list.grid-4-col {
    grid-template-columns: repeat(4, 1fr);
  }

  /* ── Property card ── */
  .property-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
  }

  .property-image-slider {
    position: relative;
    height: 220px;
    overflow: hidden;
  }

  .slider-images {
    display: flex;
    direction: ltr;
    transition: transform 0.3s ease;
    height: 100%;
  }

  .slider-image {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border-radius: 13px;
  }

  .slider-link {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #C5A479;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
  }

  .slider-nav i {
    color: #fff;
    font-size: 9px;
  }

  .slider-nav.prev {
    left: 10px;
  }

  .slider-nav.next {
    right: 10px;
  }

  .slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
  }

  .slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.2s;
  }

  .slider-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
  }

  .slider-images .slider-image:first-child {
    border: 1.5px solid rgb(242, 242, 242);
    border-radius: 13px;
  }

  .property-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #C5A479;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    z-index: 2;
  }

  .property-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 2;
  }

  .compare-action {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 2;
    border-radius: 7px;
    background: rgba(197, 164, 121, 0.8);
    color: #fff;
    font-size: 10px;
    padding: 5px 10px;
    display: flex;
    gap: 5px;
  }

  .action-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .action-btn i {
    font-size: 14px;
    color: #666;
  }

  .action-btn.active i {
    color: #c9a55a;
  }

  .property-details {
    padding-top: 16px;
  }

  .property-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
  }

  .property-location {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .property-specs {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #364153;
    border-top: 1px solid #F3F4F6;
    border-bottom: 1px solid #F3F4F6;
    padding: 8px 0;
    margin-top: 10px;
  }

  .spec-item {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .property-price {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    direction: ltr;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-start;
  }

  .property-price img {
    width: 15px;
  }

  .price-period {
    font-size: 13px;
    font-weight: 400;
    color: #888;
  }

  a.prop-detail-btn {
    border-radius: 10px;
    background: #C5A479;
    color: #fff;
    text-align: center;
    font-size: 14px;
    text-decoration: none;
    width: 100%;
    padding: 10px;
    display: block;
  }

  .prop-btn {
    display: flex;
    margin-top: 20px;
  }

  /* ── Popup ── */
  .property-popup {
    position: fixed;
    z-index: 1000;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    padding: 20px;
  }

  .popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
  }

  /* ── Responsive ── */
  @media (max-width: 1400px) {
    .properties-list.grid-4-col {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (max-width: 1024px) {
    .listing-page-wrapper {
      flex-direction: column;
      margin-top: 63px;
    }

    .map-panel {
      position: relative;
      width: 100%;
      height: 80vh;
    }

    .listing-panel {
      width: 100%;
    }

    .properties-list,
    .properties-list.grid-2-col {
      grid-template-columns: repeat(2, 1fr);
    }

    .properties-list.grid-4-col {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (max-width: 768px) {

    .properties-list,
    .properties-list.grid-2-col,
    .properties-list.grid-4-col {
      grid-template-columns: 1fr;
    }

    .content-wrapper {
      padding: 15px 20px;
    }

    .property-image-slider {
      height: 200px;
    }
  }

  @media (min-width: 769px) and (max-width:1024px) {
    .listing-page-wrapper {
      margin-top: 70px;
    }
  }

  .amenities-list.mb-3 {
    display: grid;
    grid-template-columns: repeat(2, 2fr);
}


 /* ================================================================
   MOBILE FILTER TOGGLE  (≤1024px)
   ================================================================ */
  .mobile-filter-bar {
    display: none;
    /* hidden on desktop */
  }

  /* Sort select shared styles */
  .sort-dropdown-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .sort-label {
    font-size: 13px;
    color: #555;
    white-space: nowrap;
  }

  .sort-select {
    appearance: none;
    -webkit-appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 7px 32px 7px 12px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    min-width: 170px;
    transition: border-color 0.2s;
  }

  .sort-select:focus {
    outline: none;
    border-color: #C5A479;
  }

  @media (max-width: 1024px) {

    /* Show the mobile filter bar */
    .mobile-filter-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 10px 0 6px;
    }

    /* Hide desktop sort in view-toggle-section */
    .sort-on-desktop {
      display: none !important;
    }

    /* Mobile filter toggle button */
    .mobile-filter-toggle-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      background: #fff;
      border: 1px solid #ddd;
      border-radius: 8px;
      padding: 8px 16px;
      font-size: 14px;
      font-weight: 500;
      color: #333;
      cursor: pointer;
      transition: border-color 0.2s, background 0.2s;
      white-space: nowrap;
    }
button#resetBtn {
    display: none;
}
    .mobile-filter-toggle-btn:hover,
    .mobile-filter-toggle-btn.active {
      border-color: #C5A479;
      color: #C5A479;
    }

    .mobile-filter-count {
      background: #C5A479;
      color: #fff;
      border-radius: 50%;
      width: 18px;
      height: 18px;
      font-size: 10px;
      font-weight: 700;
      display: inline-flex !important;
      align-items: center;
      justify-content: center;
      line-height: 1;
    }

    /* Filters section: hidden by default on mobile, slides in as overlay */
    .filters-section {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 9999;
      background: #fff;
      overflow-y: auto;
      padding: 16px 16px 100px;
      box-shadow: 0 4px 32px rgba(0, 0, 0, 0.15);
    }

    .filters-section.mobile-open {
      display: block !important;
      top: 61px;
    }
.filters-section.mobile-open button#searchBtn {
    display: none;
}
    /* Always show advanced filters inside mobile panel */
    .filters-section.mobile-open #advancedFilters {
      display: block !important;
    }

    /* Hide desktop-only advanced toggle inside mobile panel */
    .filters-section .d-none.d-lg-block {
      display: none !important;
    }

    /* Mobile close button */
    .mobile-filter-close-btn {
      display: flex;
      align-items: center;
      gap: 6px;
      background: none;
      border: none;
      font-size: 14px;
      font-weight: 600;
      color: #333;
      cursor: pointer;
      padding: 0;
      margin-bottom: 16px;
    }

    /* Sort in mobile bar */
    .sort-in-mobile-bar .sort-select {
      min-width: 0;
      flex: 1;
      font-size: 12px;
      padding: 7px 28px 7px 10px;
    }
  }

  @media (min-width: 1025px) {

    /* Always show filters on desktop */
    .filters-section {
      display: block !important;
    }

    /* Hide mobile close button on desktop */
    .mobile-filter-close-btn {
      display: none !important;
    }

    /* Hide mobile bar entirely */
    .mobile-filter-bar {
      display: none !important;
    }
  }