@media (max-width: 767px) {
  .re__advanced-filter-modal-container:not(.hidden) {
    display: block;
  }
  .filter-dropdown-container {
    overflow-y: scroll;
  }
  .re__advanced-filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fff;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    animation: slideInRight 0.3s ease forwards; /* Trượt từ phải sang giống app */
  }

  .re__advanced-filter-modal .header {
    display: flex;
    justify-content: center; /* Đưa title ra giữa */
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
    position: relative;
  }

  .re__advanced-filter-modal .title {
    font-size: 18px;
    font-weight: bold;
  }

  .re__close-advanced-modal {
    position: absolute;
    right: 16px;
    font-size: 20px;
    color: #666;
  }

  /* Vùng chứa nội dung lọc cuộn được */
  .re__advanced-filter-modal .body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 80px; /* Tránh bị che bởi footer */
  }

  /* Footer dính chặt dưới đáy */
  .re__advanced-filter-modal .footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    padding: 16px;
    background: #fff;
    border-top: 1px solid #eee;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    gap: 12px;
  }

  .re__advanced-filter-modal .footer button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
  }

  /* Đổi màu nút xem kết quả */
  .js__apply-filter {
    background-color: #e03c31;
    color: #fff;
    border: none;
  }
  .re__listing-search-select-dropdown {
    display: none;
  }
  .re__listing-search-select-dropdown .re__listing-search-select-list {
    max-height: calc(100vh - 443px - 59px + 130px);
  }
  .re__listing-search-select-list li.re__option > span {
    width: 100%;
    padding-right: 0;
  }
  /* Khi container có class 'open' -> Show dropdown full màn hình */
  .js__listing-search-select-container.open
    .re__listing-search-select-dropdown {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: unset;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    min-width: 100%;
    max-height: calc(100vh - 141px - 59px);
    height: auto;
    background-color: #fff;
    border-radius: 16px 16px 0px 0px;
    z-index: 99999;
    animation: slideUp 0.3s ease forwards;
  }

  /* Header của Dropdown */
  .re__listing-search-select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-weight: 600;
  }

  /* Nút X đóng */
  .re__listing-search-select-button-close {
    font-size: 20px;
    color: #999;
    cursor: pointer;
  }

  /* Phần danh sách cuộn ở giữa */
  .re__listing-search-select-list {
    flex: 1;
    overflow-y: auto; /* Cho phép cuộn danh sách */
    padding: 16px;
    margin: 0;
  }

  .re__listing-search-select-list .js__option {
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: center;
  }

  /* Footer chứa nút Đặt lại / Áp dụng */
  .re__listing-search-select-footer {
    display: flex;
    padding: 16px;
    border-top: 1px solid #eee;
    background: #fff;
    gap: 12px;
  }

  .re__listing-search-select-footer button,
  .re__listing-search-select-footer a {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
  }
}
@media only screen and (max-width: 601px) {
  #main-wrap form.houzez-search-form-js .houzez-ele-search-form-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  form.houzez-search-form-js
    .houzez-ele-search-form-wrapper
    .elementor-field-group:nth-child(-n + 4) {
    grid-column: span 2;
  }
}
@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}
