.filter-mobile {
  display: none;
  position: relative;
  z-index: 50;
}

@media (max-width: 768px) {
  .filter-desktop {
    display: none;
  }

  .filter-mobile {
    display: block;
  }

  .filter-bottom-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: -100%;
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.15);
    transition: bottom 0.3s;
    z-index: 9999;
    max-height: 90vh;
    overflow-y: auto;
    padding-bottom: env(safe-area-inset-bottom, 16px);
    display: block;
  }
  .filter-bottom-sheet.active {
    display: block !important;
    bottom: 0 !important;
    z-index: 99999 !important;
    max-height: 90vh !important;
    height: auto !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  .filter-bottom-sheet .close-btn {
    position: absolute;
    right: 6px;
    top: 6px;
    font-size: 16px;
    cursor: pointer;
    z-index: 10001;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s, box-shadow 0.2s;
  }
  .filter-bottom-sheet .close-btn:hover {
    background: #e0e0e0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  }
  .filter-bottom-sheet .close-btn i {
    color: #222;
    font-size: 16px;
    margin: 0;
  }
  .filter-bottom-sheet .filter-panel {
    display: none;
    width: 100%;
    background: #fff;
    border-radius: 16px 16px 0 0;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: none;
    /* padding-bottom: 60px; */
  }
  .filter-bottom-sheet.active .filter-panel.active {
    display: block !important;
  }
  .filter-mobile .filter-panel {
    display: none !important;
  }

  #mobileFilterSheet .districts-section {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    background: #fff !important;
    z-index: 10001 !important;
    border-radius: 0 !important;
    display: none;
    overflow-y: auto;
    box-shadow: none;
    padding-bottom: 80px;
  }
  #mobileFilterSheet .districts-section.active {
    display: block !important;
  }
  #mobileFilterSheet .districts-section .mobile-section-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    padding: 20px 0 10px 0;
    border-bottom: 1px solid #eee;
  }
  #mobileFilterSheet .districts-section .mobile-location-back {
    position: absolute;
    left: 10px;
    top: 18px;
    font-size: 22px;
    background: none;
    border: none;
    z-index: 2;
    color: #222;
    cursor: pointer;
  }
  #mobileFilterSheet .districts-section .mobile-apply-btn {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #eee;
    z-index: 10;
    padding: 16px 0;
    display: flex;
    justify-content: center;
    /* gap: 32px; */
  }
  #mobileFilterSheet .mobile-district-list {
    max-height: none !important;
    overflow-y: visible !important;
  }
}

@media (min-width: 769px) {
  #mobileFilterSheet,
  .filter-bar-container.filter-mobile {
    display: none !important;
  }
}

/* Common styles */
.filter-bar-sticky-wrapper {
  position: sticky !important;
  top: 0 !important;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.filter-bar-container {
  margin-bottom: 20px;
  padding: 0;
  background: #f9f9f9;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Desktop version styles */
.filter-bar-desktop {
  display: flex;
  align-items: center;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
}

.search-box {
  display: flex;
  align-items: center;
  padding: 0 15px;
  border-right: 1px solid #eee;
  flex: 3;
  max-width: 40%;
  height: 46px;
  margin-right: 15px;
  background: #f8f8f8;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.search-box:hover {
  background: #f4f4f4;
}

.search-box i {
  color: #888;
  margin-right: 10px;
  font-size: 16px;
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  height: 100%;
  width: 100%;
  font-size: 14px;
  padding: 10px 0;
  color: #333;
}

.filter-item {
  position: relative;
  border-right: 1px solid #eee;
  padding: 0 15px;
  cursor: pointer;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 120px;
  height: 46px;
  transition: background 0.15s ease;
}

.filter-item:hover {
  background: #f9f9f9;
}

.filter-item:last-of-type {
  border-right: none;
}

.filter-label, .filter-value {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.filter-label {
  font-size: 12px;
  color: #777;
  /* margin-bottom: 3px; */
}

.filter-label i {
  font-size: 10px;
  margin-left: 4px;
}

.filter-value {
  font-size: 14px;
  font-weight: 500;
  color: #222;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  z-le: none;
  padding: 8px 0;
  margin: 8px 0 0;
}

.filter-bar-container .dropdown-menu li {
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.dropdown-menu li:hover {
  background: #f5f5f5;
}

.filter-item.dropdown.open .dropdown-menu,
.filter-item.dropdown.open .location-dropdown-content {
  display: block;
}

.filter-bar-desktop.has-suggestions-parent input#keyword-search {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-bottom: none !important;
}
/* Location dropdown specific styles */
.location-dropdown {
  position: relative;
}

.location-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 0 0 10px 10px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  width: 320px;
  z-index: 1000;
  margin: 14px 0 0;
  overflow: visible;
  padding: 0;
  height: auto;
}

.location-main-panel, 
.location-districts-panel {
  padding: 15px 0 0px ;
  position: relative;
}

.location-districts-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  min-height: 100%;
  background: #fff;
  display: none;
  z-index: 1001;
  border-radius: 12px;
}

.location-districts-panel.active {
  display: block;
}

.location-title {
  padding: 0 20px 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.location-back {
  padding: 10px 20px;
  color: #555;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-size: 14px;
  margin-bottom: 5px;
  transition: all 0.2s ease;
}

.location-back:hover {
  background: #f7f7f7;
  color: #333;
}

.location-back i {
  margin-right: 10px;
  font-size: 12px;
}

.district-search {
  padding: 12px 15px;
  margin-bottom: 5px;
}

.district-search input {
  width: 100%;
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  font-size: 14px;
  background: #f9f9f9;
  transition: all 0.2s ease;
}

.district-search input:focus {
  outline: none;
  border-color: #ccc;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.province-list, 
.district-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.province-list li, 
.district-list li {
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
  border-radius: 0;
  color: #444;
}

.province-list li:hover, 
.district-list li:hover {
  background: #f5f5f5;
  color: #000;
}

.province-list li.active {
  background: #f0f6ff;
  color: #1a73e8;
  font-weight: 500;
}

.filter-refresh {
  margin-left: 15px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f5f5f5;
  color: #555;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 0 0 auto;
}

.filter-refresh:hover {
  background: #ebebeb;
  transform: rotate(15deg);
}

.filter-refresh i {
  font-size: 16px;
}

/* Mobile version styles */
.filter-mobile .search-input {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.filter-mobile .search-input i {
  color: #888;
  margin-right: 10px;
  font-size: 16px;
}

.filter-mobile .search-input input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 15px;
  outline: none;
  padding: 3px 0;
}

.filter-mobile .filter-bar {
  display: flex;
  padding: 8px 8px;
  gap: 6px;
  overflow-x: auto;
  background: #fff;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.filter-mobile .filter-bar::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari/Opera */
}

.filter-mobile .filter-dropdown-toggle {
  border: 1px solid #eee;
  background: #ffff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 90px;
  align-items: flex-start;
}

.filter-mobile .filter-dropdown-toggle .filter-label {
  font-size: 10px;
}

.filter-mobile .filter-dropdown-toggle .filter-value {
  font-size: 13px;
}

.filter-mobile .filter-dropdown-toggle:hover {
  background: #f0f0f0;
}

/* Active state for mobile filter items */
.filter-mobile .filter-item.active .filter-dropdown-toggle {
  background: #e6f0ff;
  border-color: #1a73e8;
}

.filter-mobile .filter-item.active .filter-dropdown-toggle .filter-label {
  color: #1a73e8;
}

.filter-mobile .filter-item.active .filter-dropdown-toggle .filter-value {
  color: #1a73e8;
  font-weight: 600;
}

.filter-mobile .filter-item.active .filter-dropdown-toggle i {
  color: #1a73e8;
}

.filter-mobile .filter-panel {
  display: none;
  padding: 0;
  background: #fff;
  border-top: 1px solid #eee;
  position: absolute;
  width: 100%;
  left: 0;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 80vh;
  overflow-y: auto;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.filter-mobile .filter-panel ul {
  list-style: none;
  padding: 5px 0;
  margin: 0;
}

.filter-mobile .filter-panel ul li {
  padding: 14px 20px;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.2s;
}

.filter-mobile .filter-panel ul li:last-child {
  border-bottom: none;
}

.filter-mobile .filter-panel ul li:hover {
  background: #f7f7f7;
}

/* Active state for panel items */
.filter-mobile .filter-panel ul li.active {
  background: #e6f0ff;
  color: #1a73e8;
  font-weight: 600;
  border-left: 3px solid #1a73e8;
}

/* Mobile location selection */
.location-mobile-container {
  position: relative;
  padding: 0;

}

.mobile-section-title {
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid #eee;
}

.mobile-back-button {
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
  font-size: 14px;
  color: #444;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.mobile-back-button:hover {
  background: #f7f7f7;
}

.mobile-back-button i {
  margin-right: 10px;
  font-size: 12px;
}

.mobile-search {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-search input {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  font-size: 14px;
  background: #f8f8f8;
}

.mobile-search input:focus {
  outline: none;
  border-color: #ccc;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.mobile-province-list,
.mobile-district-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 350px;
  overflow-y: auto;
}

.mobile-province-list li,
.mobile-district-list li {
  padding: 14px 20px;
  border-bottom: 1px solid #f5f5f5;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.mobile-province-list li:hover,
.mobile-district-list li:hover,
.mobile-province-list li.active {
  background: #f7f7f7;
}

.mobile-province-list li.active {
  color: #1a73e8;
  font-weight: 500;
}

.filter-mobile {
  position: relative;
  z-index: 50;
}

#panel-area {
  left: 0;
  right: 0;
}

.filter-bar {
  position: relative;
}

#panel-area, #panel-price, #panel-type, #panel-status {
  top: 100%;
}

.filter-mobile .filter-bar button {
  position: relative;
  z-index: 1;
}

.mobile-location-section {
  width: 100%;
}

.provinces-section {
  display: block;
}

.districts-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: none;
  z-index: 10;
}

.districts-section.active {
  display: block;
}

/* Mobile version specific fixes */
.mobile-location-section.districts-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  min-height: 100%;
  background: #fff;
  display: none;
  z-index: 999;
  border-radius: 12px;
}

.mobile-location-section.districts-section.active {
  display: block;
}

.filter-panel#panel-area {
  max-height: 80vh;
  overflow-y: auto;
}


.glide-home .glide__slide .rounded-8 .p-8.p-xl-16.d-flex {
  flex-grow: 1;
  /* Ensure text content fills remaining space */
}

.autocomplete-suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  z-index: 9999;
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-height: 300px;
  overflow-y: auto;
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100% !important;
}
.autocomplete-suggestion-item {
  padding: 10px 15px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  background: #fff;
}
.autocomplete-suggestion-item:last-child {
  border-bottom: none;
}
.autocomplete-suggestion-item:hover {
  background: #f5f5f5;
}

.search-input {
  position: relative;
}

#mobileFilterSheet .mobile-location-section {
  display: none;
}
#mobileFilterSheet .mobile-location-section.active {
  display: block !important;
}

.mobile-filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-filter-item {
  display: flex;
  align-items: center;
  /* justify-content: space-between; */
  padding: 16px 20px;
  font-size: 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  background: #fff;
  transition: background 0.2s, color 0.2s;
}

.mobile-filter-item:last-child {
  border-bottom: none;
}

.mobile-filter-item:hover {
  background: #f5f8ff;
  color: #1a73e8;
}

.mobile-filter-item.active {
  background: #e6f0ff;
  color: #1a73e8;
  font-weight: 600;
}

.mobile-filter-item .check-icon {
  color: #1a73e8;
  font-size: 18px;
  margin-left: 8px;
}

.mobile-apply-btn {
  display: flex;
  /* justify-content: center; */
  gap: 32px;
  padding: 20px 24px;
  border-top: 1.5px solid #e3eaf3;
  background: #fff;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.mobile-btn-apply {
  background: #195736;
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px 40px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(26,115,232,0.10);
  transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  letter-spacing: 0.5px;
}
.mobile-btn-apply:hover {
  background: linear-gradient(90deg, #1760c4 0%, #2b7cd3 100%);
  box-shadow: 0 4px 18px rgba(26,115,232,0.16);
  transform: translateY(-2px) scale(1.03);
}

.mobile-btn-cancel {
  background: #fff;
  color: #1a73e8;
  border: 2px solid #b6d4fe;
  border-radius: 12px;
  padding: 14px 40px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s, transform 0.1s;
  letter-spacing: 0.5px;
}
.mobile-btn-cancel:hover {
  background: #f0f8ff;
  color: #1760c4;
  border-color: #1760c4;
  transform: translateY(-2px) scale(1.03);
}

.mobile-location-back {
  display: flex;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  color: #1a73e8;
  background: none;
  border: none;
  padding: 18px 20px 18px 8px;
  cursor: pointer;
  transition: color 0.2s;
}
.mobile-location-back i {
  font-size: 22px;
  margin-right: 8px;
  color: #1a73e8;
}
.mobile-location-back:hover {
  color: #1760c4;
}

.mobile-apply-btn {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid #eee;
  background: #fff;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.mobile-btn-apply {
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  box-shadow: 0 2px 8px rgba(26,115,232,0.08);
}
.mobile-btn-apply:hover {
  background: #1760c4;
}

.mobile-btn-cancel {
  background: #fff;
  color: #1a73e8;
  border: 1.5px solid #b6d4fe;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border 0.2s;
}
.mobile-btn-cancel:hover {
  background: #f0f8ff;
  color: #1760c4;
  border-color: #1760c4;
}

/* Checkbox cho panel giá mobile */
#mobileFilterSheet .mobile-filter-list li .checkbox {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid #adb5bd;
    border-radius: 4px;
    margin-right: 15px;
    position: relative;
    vertical-align: middle;
}
#mobileFilterSheet .mobile-filter-list li.active .checkbox {
    background-color: #ff0000;
    border-color: #ff0000;
}
#mobileFilterSheet .mobile-filter-list li.active .checkbox::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}