/* SP: Bộ lọc trang chủ tách riêng - v117: giữ chiều cao sheet khi gõ tìm kiếm, không co vì bàn phím. */
.homeKeywordSearchWrap{
  position:relative;
  padding:2px 12px 8px; /* SP sửa khoảng cách ô tìm kiếm đầu trang tại đây - v184 giảm khoảng trống với top bar */
  margin:0 -12px 0;
  background:transparent;
}
.homeKeywordSearchInput{
  width:100%;
  height:38px; /* SP sửa chiều cao ô tìm kiếm đầu trang tại đây */
  border:1.5px solid var(--pink); /* SP v297: viền ô tìm kiếm màu hồng */
  border-radius:999px;
  background:#fff;
  padding:0 18px; /* SP sửa khoảng cách chữ trong ô tìm kiếm tại đây */
  color:#000;
  font-size:14px; /* SP sửa cỡ chữ ô tìm kiếm đầu trang tại đây */
  font-weight:400; /* SP sửa độ đậm chữ ô tìm kiếm đầu trang tại đây */
  outline:none;
  box-shadow:0 1px 4px rgba(0,0,0,.04);
  -webkit-appearance:none;
  appearance:none;
}

.homeKeywordSearchClear{
  position:absolute;
  right:24px; /* SP sửa vị trí ngang nút x xoá tìm kiếm tại đây */
  left:auto;
  top:21px; /* SP v196: canh nút x đúng tâm chiều cao ô tìm kiếm */
  transform:translateY(-50%);
  z-index:2;
  width:22px; /* SP sửa kích thước nút x xoá tìm kiếm tại đây */
  height:22px;
  border:0;
  border-radius:50%;
  background:rgba(0,0,0,.12);
  color:rgba(0,0,0,.62);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:18px; /* SP sửa cỡ chữ nút x xoá tìm kiếm tại đây */
  font-weight:500;
  line-height:1;
  padding:0 0 2px; /* SP v196: canh dấu x vào giữa vòng tròn */
  -webkit-appearance:none;
  appearance:none;
}
.homeKeywordSearchInput::-webkit-search-cancel-button,
.homeKeywordSearchInput::-webkit-search-decoration{display:none;-webkit-appearance:none;} /* SP v196: tắt nút xoá mặc định iOS/Safari để chỉ còn 1 nút x tự canh */
.homeKeywordSearchClear[hidden]{display:none;}
.homeKeywordSearchClear:active{transform:translateY(-50%) scale(.94);}

.homeKeywordSearchWrap.is-keyword-has-value .homeKeywordSearchInput{padding-right:49px; /* SP chừa khoảng trống cho nút x, chữ cách nút x tối thiểu 5px */}
.homeKeywordSearchInput:focus{border-color:#ef5da8;box-shadow:none;}
.homeKeywordSearchInput::placeholder{color:rgba(0,0,0,.52);font-weight:400;}
.homeFilters{
  display:flex;
  flex-wrap:nowrap;
  align-items:center;
  gap:10px;
  padding:10px 12px 0; /* SP v185: giảm khoảng cách bộ lọc ngang với nút danh mục còn 5px */
  margin:0;
  overflow-x:auto;
  overflow-y:hidden;
  overscroll-behavior-x:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  scroll-snap-type:x proximity;
}
.homeFilters::-webkit-scrollbar{display:none;}
.homeFilterBtn{
  flex:0 0 auto;
  min-width:max-content;
  height:36px; /* SP sửa cỡ cao nút lọc tại đây */
  padding:0 16px; /* SP sửa khoảng cách ngang nút lọc tại đây */
  border:1.5px solid rgba(255,45,117,.72);
  border-radius:999px;
  background:#fff;
  color:#000;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  width:auto;
  max-width:100%;
  white-space:nowrap;
  font-size:14px; /* SP sửa cỡ chữ nút lọc tại đây */
  font-weight:400; /* SP sửa độ đậm chữ nút lọc tại đây */
  line-height:1;
  scroll-snap-align:start;
  transition:transform .14s ease, background .14s ease, color .14s ease, border-color .14s ease, opacity .14s ease;
}
.homeFilterBtn:active{transform:scale(.98);}
.homeFilterBtn.is-active{background:#000;color:#fff;border-color:#000;}
.homeFilterBtn:disabled{opacity:.48;cursor:not-allowed;}
.homeFilterBtn__text{display:inline-flex;align-items:center;min-width:0;}
.homeFilterBtn__arrow{display:inline-flex;align-items:center;justify-content:center;font-size:16px;line-height:1;transform:translateY(0);}
.homeFilterBtn__clear{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  margin-left:1px;
  border-radius:50%;
  font-size:18px;
  font-weight:500;
  line-height:18px;
  color:inherit;
  opacity:.9;
}
.homeFilterBtn__clear:active{transform:scale(.94);}
.homeFilterBtn--clear,
#filterBtnClear{padding-inline:18px;}
.homeFilterModal{
  position:fixed;
  inset:0;
  z-index:9000;
  background:rgba(0,0,0,.12);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding-bottom:0;
}
.homeFilterModal[hidden]{display:none;}
.homeFilterModal__sheet{
  width:100%;
  max-width:100%;
  height:78vh; /* SP sửa chiều cao khung lọc tại đây - cố định để bàn phím không làm co tab */
  max-height:78vh;
  background:#fff;
  border-radius:34px 34px 0 0;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  padding-bottom:calc(14px + env(safe-area-inset-bottom));
}
.homeFilterModal__head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 24px 16px;border-bottom:1px solid rgba(0,0,0,.08);}
.homeFilterModal__title{font-size:18px;font-weight:588;line-height:1.2;color:#000;}
.homeFilterModal__close{border:0;background:transparent;color:#000;width:auto;height:auto;padding:0;font-size:28px;font-weight:600;line-height:1;}
.homeFilterModeTabs{display:flex;gap:10px;padding:12px 24px 0;background:#fff;}
.homeFilterModeTabs[hidden]{display:none;}
.homeFilterModeTab{flex:1;min-width:0;height:36px;border-radius:999px;border:1.5px solid rgba(0,0,0,.18);background:#fff;color:#000;font-size:14px;font-weight:400;}
.homeFilterModeTab.is-active{background:#000;color:#fff;border-color:#000;}
.homeFilterModal__searchWrap{padding:16px 24px 12px;border-bottom:1px solid rgba(0,0,0,.06);}
.homeFilterModal__search{width:100%;height:40px;border:1.5px solid rgba(0,0,0,.12);border-radius:999px;background:#fff;padding:0 18px;font-size:14px;font-weight:400;color:#000;outline:none;box-shadow:none;}
.homeFilterModal__search:focus{border-color:#ef5da8;box-shadow:none;} /* SP v195: bỏ viền ngoài ô tìm kiếm bộ lọc */
.homeFilterModal__search::placeholder{color:rgba(0,0,0,.34);font-weight:400;}
.homeFilterModal__list{flex:1;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;padding-bottom:6px;}
.homeFilterModal__item{width:100%;border:0;border-bottom:1px solid rgba(0,0,0,.08);background:#fff;color:#000;padding:0 24px;min-height:58px;display:flex;align-items:center;justify-content:space-between;gap:16px;text-align:left;font-size:14px;font-weight:400;}
.homeFilterModal__itemText{display:block;flex:1;line-height:1.35;}
.homeFilterModal__radio{width:24px;height:24px;border-radius:50%;border:2px solid rgba(0,0,0,.16);flex:0 0 24px;position:relative;}
.homeFilterModal__item.is-selected .homeFilterModal__radio{border-color:#000;}
.homeFilterModal__item.is-selected .homeFilterModal__radio::after{content:'';position:absolute;inset:4px;border-radius:50%;background:#000;}
.homeFilterModal__empty{padding:28px 24px;font-size:14px;font-weight:400;color:rgba(0,0,0,.5);}
.homeFilterModal__footer{display:flex;gap:16px;padding:14px 24px 0;padding-bottom:calc(2px + env(safe-area-inset-bottom));}
.homeFilterModal__action{flex:1;min-width:0;height:40px;border-radius:999px;border:1.5px solid rgba(0,0,0,.22);background:#fff;color:#000;font-size:14px;font-weight:400;}
.homeFilterModal__action:active{transform:scale(.985);}
.homeFilterPrice{
  padding:16px 24px 14px;
  border-bottom:1px solid rgba(0,0,0,.08);
  background:#fff;
}
.homeFilterPrice__inputs{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.homeFilterPrice__inputWrap{position:relative;}
.homeFilterPrice__input{
  width:100%;
  height:36px;
  border:1.5px solid rgba(0,0,0,.12);
  border-radius:12px;
  background:#fff;
  padding:0 42px 0 12px;
  font-size:14px;
  font-weight:400;
  color:#000;
  outline:none;
  box-shadow:none;
}
.homeFilterPrice__input:focus{border-color:#ef5da8;box-shadow:none;} /* SP v195: bỏ viền ngoài ô nhập giá/diện tích */
.homeFilterPrice__suffix{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  font-size:14px;
  font-weight:400;
  color:rgba(0,0,0,.72);
  pointer-events:none;
}
.homeFilterPrice__input::placeholder{color:rgba(0,0,0,.38);}
.homeFilterPrice__sliderWrap{position:relative;height:44px;display:flex;align-items:center;}
.homeFilterPrice__track,
.homeFilterPrice__active{position:absolute;left:0;right:0;top:50%;height:8px;border-radius:999px;transform:translateY(-50%);}
.homeFilterPrice__track{background:rgba(0,0,0,.12);}
.homeFilterPrice__active{background:#000;}
.homeFilterPrice__range{position:absolute;left:0;top:50%;width:100%;height:44px;margin:0;transform:translateY(-50%);appearance:none;-webkit-appearance:none;background:transparent;pointer-events:none;}
.homeFilterPrice__range::-webkit-slider-runnable-track{height:8px;background:transparent;}
.homeFilterPrice__range::-moz-range-track{height:8px;background:transparent;}
.homeFilterPrice__range::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:29px;height:29px;border-radius:50%;border:3px solid #000;background:#fff;margin-top:-10.5px;pointer-events:auto;}
.homeFilterPrice__range::-moz-range-thumb{width:29px;height:29px;border-radius:50%;border:3px solid #000;background:#fff;pointer-events:auto;box-sizing:border-box;}
body.keyboard-open .bottomNav{opacity:0;pointer-events:none;transform:translateY(calc(100% + env(safe-area-inset-bottom)));}
body.keyboard-open .searchwrap{z-index:30;}
@media (max-width:420px){.homeFilterBtn{padding-inline:15px;}.homeFilters{padding-left:12px;padding-right:12px;}}
/* SP: Popup thông báo tạm thời khi chọn/xoá bộ lọc - thêm ở v116. */
.homeFilterToast{
  position:fixed;
  left:50%;
  bottom:calc(86px + env(safe-area-inset-bottom));
  transform:translateX(-50%) translateY(8px);
  z-index:1400;
  max-width:calc(100vw - 48px);
  padding:10px 16px;
  border-radius:999px;
  background:rgba(0,0,0,.86);
  color:#fff;
  font-size:14px;
  font-weight:400;
  line-height:1.2;
  text-align:center;
  opacity:0;
  pointer-events:none;
  transition:opacity .16s ease, transform .16s ease;
}
.homeFilterToast.is-show{opacity:1;transform:translateX(-50%) translateY(0);}

/* SP v179: Khoảng cách 8px giữa tiêu đề Kết quả tìm kiếm và card đầu tiên */
#searchResultsPostList .homeSection__title{margin:0 0 8px;}

/* SP v197: Chuẩn chung nút X trong ô nhập, lấy mẫu nút xoá tìm kiếm v196 */
.appInputClear,
.homeKeywordSearchClear,
.homeFilterModal__searchClear{
  width:22px;
  height:22px;
  border:0;
  border-radius:50%;
  background:rgba(0,0,0,.12);
  color:rgba(0,0,0,.62);
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:Arial, sans-serif;
  font-size:20px;
  font-weight:500;
  line-height:22px;
  text-align:center;
  padding:0;
  -webkit-appearance:none;
  appearance:none;
  -webkit-tap-highlight-color:transparent;
}
.appInputClear[hidden],
.homeKeywordSearchClear[hidden],
.homeFilterModal__searchClear[hidden]{display:none;}

/* SP v197: Canh lại nút X ô tìm kiếm đúng tâm ô nhập */
.homeKeywordSearchClear{
  right:24px;
  top:21px;
  transform:translateY(-50%);
}
.homeKeywordSearchClear:active{transform:translateY(-50%) scale(.94);}
.homeKeywordSearchInput::-webkit-search-cancel-button,
.homeKeywordSearchInput::-webkit-search-decoration{display:none;-webkit-appearance:none;}

/* SP v197: Nút X trong ô tìm kiếm của sheet bộ lọc dùng chung mẫu v196 */
.homeFilterModal__searchWrap{position:relative;}
.homeFilterModal__searchClear{
  position:absolute;
  right:36px;
  top:50%;
  transform:translateY(-50%);
  z-index:2;
}
.homeFilterModal__searchClear:active{transform:translateY(-50%) scale(.94);}
.homeFilterModal__search{padding-right:48px;}
.homeFilterModal__search::-webkit-search-cancel-button,
.homeFilterModal__search::-webkit-search-decoration{display:none;-webkit-appearance:none;}

/* SP v197: Hạ tiêu đề Kết quả tìm kiếm xuống, không dính hàng bộ lọc */
#searchResultsPostList .homeSection__title{margin:10px 0 8px;}

/* SP v410: mobile dùng nút chữ Tìm giống mẫu PC, nằm bên phải trong ô tìm kiếm */
.homeKeywordSearchInput{
  padding-right:82px; /* SP sửa khoảng trống bên phải cho nút chữ Tìm tại đây */
}
.homeKeywordSearchSubmit{
  position:absolute;
  right:20px; /* SP sửa vị trí ngang nút Tìm mobile tại đây */
  top:21px; /* SP sửa vị trí dọc nút Tìm mobile tại đây */
  transform:translateY(-50%);
  z-index:2;
  min-width:50px; /* SP sửa chiều ngang nút Tìm mobile tại đây */
  height:30px; /* SP sửa chiều cao nút Tìm mobile tại đây */
  border:0;
  border-radius:999px;
  background:#ff2f86;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 12px;
  font-size:13px; /* SP sửa cỡ chữ nút Tìm mobile tại đây */
  font-weight:588;
  line-height:1;
  cursor:pointer; /* SP v411: rê/bấm nút Tìm có cảm giác là nút bấm */
  transition:transform .12s ease, filter .12s ease; /* SP v411: hiệu ứng nhấn nút Tìm */
  -webkit-tap-highlight-color:transparent;
  -webkit-appearance:none;
  appearance:none;
}
.homeKeywordSearchSubmit:hover{filter:brightness(.98);}
.homeKeywordSearchSubmit:active{transform:translateY(-50%) scale(.94);}
.homeKeywordSearchSubmit__icon{display:none;}
.homeKeywordSearchSubmit__text{display:inline;}
.homeKeywordSearchWrap.is-keyword-has-value .homeKeywordSearchInput{padding-right:112px; /* SP chừa chỗ cho nút x + nút Tìm */}
.homeKeywordSearchWrap.is-keyword-has-value .homeKeywordSearchClear{right:74px;}
