/* 区县筛选下拉（紧贴筛选栏下方，宽度与 .page 对齐） */
.loc-mask {
  position: fixed;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  pointer-events: none;
}

.loc-mask.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.filter-shared-mask {
  z-index: 150;
}

.filter-shared-mask.show {
  min-height: 100vh;
  min-height: 100dvh;
}

.loc-dropdown {
  position: fixed;
  background: #fff;
  z-index: 151;
  display: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.loc-dropdown.show {
  display: flex;
}

.loc-dropdown-inner {
  display: flex;
  width: 100%;
  max-height: 280px;
  min-height: 220px;
}

/* 左侧分类 */
.loc-categories {
  width: 110px;
  flex-shrink: 0;
  background: #f7f7f7;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.loc-category-item {
  padding: 14px 10px;
  font-size: 13px;
  color: #333;
  text-align: center;
  line-height: 1.4;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.loc-mode-district .loc-category-item {
  border-left: 3px solid transparent;
}

.loc-mode-district .loc-category-item.active {
  border-left-color: #e60012;
}

.loc-category-item.active {
  color: #e60012;
  background: #fff;
  font-weight: 600;
}

.loc-mode-food .loc-category-item {
  border-left: none;
}

.loc-mode-food .loc-category-item.active {
  color: #e60012;
  background: #fff;
  font-weight: 600;
}

/* 右侧区县列表 */
.loc-district-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.loc-district-item {
  padding: 14px 20px;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.loc-district-item:active {
  background: #fafafa;
}

.loc-district-item.active {
  color: #e60012;
  font-weight: 600;
}

/* 美食筛选（左侧分类 + 右侧子类） */
.loc-mode-food .loc-district-list {
  display: none;
}

.loc-mode-food .loc-categories {
  display: block;
}

.loc-food-list {
  display: none;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
}

.loc-mode-food .loc-food-list {
  display: block;
  overflow-y: auto;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.loc-mode-food .loc-dropdown-inner {
  min-height: 220px;
  max-height: 320px;
}

.loc-food-item {
  padding: 14px 20px;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.loc-mode-sort .loc-dropdown-inner,
.loc-mode-venue .loc-dropdown-inner {
  min-height: auto;
  max-height: none;
}

.loc-food-item:active {
  background: #fafafa;
}

.loc-food-item.active {
  color: #e60012;
  font-weight: 600;
}

/* 排序筛选（单列） */
.loc-mode-sort .loc-categories,
.loc-mode-sort .loc-district-list,
.loc-mode-sort .loc-food-list {
  display: none;
}

.loc-sort-list {
  display: none;
  width: 100%;
  overflow-y: auto;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.loc-mode-sort .loc-sort-list {
  display: block;
}

.loc-sort-item {
  padding: 14px 20px;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.loc-sort-item:active {
  background: #fafafa;
}

.loc-sort-item.active {
  color: #e60012;
  font-weight: 600;
}

.filter-item[data-filter="sort"].active-filter {
  color: var(--text, #1a1a1a);
}

.filter-item[data-filter="sort"].filter-open,
.filter-item[data-filter="sort"].active-filter {
  color: var(--text, #1a1a1a);
}

.filter-item[data-filter="sort"].filter-open svg,
.filter-item[data-filter="sort"].active-filter svg {
  color: var(--text-muted, #999);
}

.filter-item[data-filter="sort"].filter-open::after {
  display: none;
}

/* 场地类型筛选（单列） */
.loc-mode-venue .loc-categories,
.loc-mode-venue .loc-district-list,
.loc-mode-venue .loc-food-list,
.loc-mode-venue .loc-sort-list {
  display: none;
}

.loc-venue-list {
  display: none;
  width: 100%;
  overflow-y: auto;
  padding: 4px 0;
  -webkit-overflow-scrolling: touch;
}

.loc-mode-venue .loc-venue-list {
  display: block;
}

.loc-mode-venue .loc-dropdown-inner {
  min-height: auto;
  max-height: 280px;
}

.loc-venue-item {
  padding: 14px 20px;
  font-size: 15px;
  color: #333;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.loc-venue-item:active {
  background: #fafafa;
}

.loc-venue-item.active {
  color: #e60012;
  font-weight: 600;
}

.filter-item[data-filter="venue"].active-filter {
  color: #e60012;
}

/* 筛选栏展开时保持在上层 */
.filter-bar.has-dropdown-open {
  position: sticky;
  z-index: 152;
}

.filter-item[data-filter="district"] {
  position: relative;
}

.filter-item.filter-open,
.filter-item.active-filter {
  color: #e60012;
}

.filter-item[data-filter="food"].active-filter {
  color: #e60012;
}

.filter-item.filter-open svg,
.filter-item.active-filter svg {
  color: #e60012;
}

.location-bar {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.location-bar.locating .city-name {
  opacity: 0.6;
}

.merchant-empty {
  text-align: center;
  padding: 48px 20px;
  color: #999;
  font-size: 14px;
}

/* 弹窗打开时禁止页面滚动，但不影响底部导航 */
body.loc-panel-open {
  overflow: hidden;
}

body.loc-panel-open .tab-bar {
  z-index: 140;
}
