/* ========== 全局重置与基础样式（复用新房样式） ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "PingFang SC","Microsoft YaHei",Arial,sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: #f5f5f5;
  color: #333;
  font-size: 14px;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: #333;
  transition: all .2s ease;
}

.container {
  width: 1200px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .container {
    width: 100%;
    padding: 0 10px;
  }
}

/* ========== 骨架屏加载动画 ========== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  position: relative;
  overflow: hidden;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========== 头部导航样式 ========== */
.header {
  background-color: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 999;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-top {
  height: 35px;
  line-height: 35px;
  background-color: #f5f5f5;
  border-bottom: 1px solid #eee;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
}

.header-top-left a {
  margin-right: 15px;
  font-size: 12px;
  color: #666;
}

.header-top-left a:hover,
.header-top-left a.active {
  color: #f85959;
}

.header-top-right a {
  margin-left: 15px;
  font-size: 12px;
  color: #666;
}

.header-top-right a:hover {
  color: #f85959;
}

.header-top-right a i {
  color: #f85959;
  margin-right: 3px;
}

.header-main {
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.logo {
  width: 180px;
  height: 40px;
  background: url(https://img1.anjuke.com/ico/logo.gif) no-repeat center;
  background-size: contain;
  display: inline-block;
  text-indent: -9999px;
  overflow: hidden;
}

.nav-main {
  display: flex;
  margin-left: 30px;
}

.nav-main li {
  margin-right: 28px;
  position: relative;
  list-style: none;
}

.nav-main li a {
  font-size: 16px;
  font-weight: 500;
  padding: 5px 0;
  display: inline-block;
}

.nav-main li.active a {
  color: #f85959;
}

.nav-main li.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #f85959;
}

.header-search {
  margin-left: auto;
  position: relative;
  width: 280px;
}

.header-search input {
  width: 100%;
  height: 38px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 0 40px 0 15px;
  background-color: #f9f9f9;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.header-search input:focus {
  border-color: #f85959;
  background-color: #fff;
}

.header-search button {
  position: absolute;
  right: 0;
  top: 0;
  width: 38px;
  height: 38px;
  background-color: #f85959;
  color: #fff;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  font-size: 16px;
  border: none;
}

/* ========== 面包屑导航 ========== */
.breadcrumb {
  height: 50px;
  line-height: 50px;
  font-size: 12px;
  color: #999;
  background-color: #fff;
  margin-bottom: 15px;
  padding: 0 10px;
  border-bottom: 1px solid #eee;
}

.breadcrumb a {
  color: #666;
}

.breadcrumb a:hover {
  color: #f85959;
}

.breadcrumb span {
  margin: 0 8px;
  color: #ccc;
}

/* ========== 二手房类型切换标签 ========== */
.esf-type-tab {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  padding: 15px 20px;
  margin-bottom: 15px;
  display: flex;
  border-bottom: 2px solid #f85959;
}

.esf-type-item {
  padding: 10px 30px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-right: 10px;
}

.esf-type-item.active {
  color: #f85959;
  border-bottom: 3px solid #f85959;
}

/* ========== 筛选区样式 ========== */
.filter-box {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  padding: 20px;
  margin-bottom: 15px;
}

.filter-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  padding: 12px 0;
  border-bottom: 1px dashed #f0f0f0;
  align-items: center;
}

.filter-row:last-child {
  border-bottom: none;
}

.filter-label {
  width: 80px;
  text-align: right;
  line-height: 30px;
  color: #666;
  margin-right: 15px;
  flex-shrink: 0;
  font-weight: 500;
}

.filter-content {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.filter-item {
  margin: 0 10px 8px 0;
  padding: 0 12px;
  line-height: 30px;
  cursor: pointer;
  border-radius: 3px;
  font-size: 14px;
}

.filter-item.active {
  background-color: #f85959;
  color: #fff;
}

.filter-item:hover:not(.active) {
  background-color: #f9f9f9;
  color: #f85959;
}

/* 价格区间输入框 */
.price-range-wrap {
  display: flex;
  align-items: center;
  margin-left: 15px;
}

.price-input {
  width: 80px;
  height: 30px;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  text-align: center;
  margin: 0 5px;
  font-size: 13px;
  outline: none;
}

.price-input:focus {
  border-color: #f85959;
}

.price-unit {
  font-size: 12px;
  color: #999;
  margin-left: 5px;
}

.price-btn {
  width: 60px;
  height: 30px;
  background-color: #f85959;
  color: #fff;
  border-radius: 3px;
  cursor: pointer;
  margin-left: 10px;
  font-size: 13px;
  border: none;
}

.price-btn:hover {
  background-color: #f63838;
}

/* ========== 主内容区布局 ========== */
.esf-main {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.esf-list-wrap {
  flex: 8;
}

.esf-sidebar {
  flex: 4;
}

/* ========== 排序栏 ========== */
.sort-bar {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  padding: 12px 20px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sort-left {
  display: flex;
}

.sort-item {
  margin-right: 20px;
  font-size: 14px;
  cursor: pointer;
}

.sort-item.active {
  color: #f85959;
  font-weight: 500;
}

.sort-item:hover:not(.active) {
  color: #f85959;
}

.sort-right {
  display: flex;
  align-items: center;
}

.view-type {
  display: flex;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  margin-left: 15px;
}

.view-item {
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  cursor: pointer;
}

.view-item.active {
  background-color: #f85959;
  color: #fff;
}

/* ========== 加载提示 ========== */
.loading-tip {
  text-align: center;
  padding: 30px 0;
  color: #999;
  font-size: 14px;
  display: none;
}

.loading-tip.active {
  display: block;
}

/* ========== 二手房列表样式 ========== */
.esf-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}

.esf-card {
  width: 50%;
  padding: 0 8px;
  margin-bottom: 16px;
}

/* 列表视图样式 */
.list-view .esf-card {
  width: 100%;
}

.list-view .esf-img {
  width: 220px;
  height: 160px;
}

/* 响应式：小屏强制1列 */
@media (max-width: 992px) {
  .esf-card {
    width: 100%;
  }
}

/* 二手房卡片容器 */
.esf-card-inner {
  background-color: #fff;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all .3s ease;
  display: flex;
  height: 100%;
}

.esf-card-inner:hover {
  box-shadow: 0 8px 16px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.esf-img {
  width: 180px;
  height: 135px;
  object-fit: cover;
  flex-shrink: 0;
  loading: lazy;
}

.esf-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 房源标签 */
.esf-tag {
  margin-bottom: 8px;
}

.esf-tag-item {
  display: inline-block;
  padding: 2px 6px;
  font-size: 12px;
  color: #fff;
  border-radius: 2px;
  margin-right: 5px;
}

.tag-person {
  background-color: #f85959; /* 个人房源 */
}

.tag-agent {
  background-color: #0088ff; /* 经纪人房源 */
}

.tag-tax {
  background-color: #ff9500; /* 满五唯一/满二 */
}

.tag-hot {
  background-color: #ff3b30; /* 热门房源 */
}

/* 房源标题 */
.esf-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.esf-title:hover {
  color: #f85959;
}

/* 小区名称 */
.esf-community {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

.esf-community i {
  color: #999;
  margin-right: 3px;
}

/* 房源元信息 */
.esf-meta {
  font-size: 12px;
  color: #999;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 8px;
  line-height: 1.4;
}

.esf-meta span {
  margin-right: 12px;
}

.esf-meta i {
  margin-right: 3px;
}

/* 房源特色标签 */
.esf-feature {
  font-size: 12px;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.feature-item {
  margin-right: 10px;
  padding: 2px 6px;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  color: #666;
}

/* 价格+收藏区 */
.esf-price-box {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
}

.esf-price {
  font-size: 18px;
  font-weight: 700;
  color: #f85959;
  line-height: 1;
}

.esf-unit-price {
  font-size: 12px;
  color: #999;
  margin-top: 3px;
}

/* 收藏按钮 */
.esf-favorite {
  color: #ccc;
  cursor: pointer;
  font-size: 16px;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 50%;
  transition: all .2s;
  margin-left: 10px;
}

.esf-favorite.active {
  color: #f85959;
  background-color: #fef0f0;
}

.esf-favorite:hover {
  color: #f85959;
  background-color: #fef0f0;
}

/* ========== 分页样式 ========== */
.pagination {
  display: flex;
  justify-content: center;
  margin: 40px 0;
  align-items: center;
}

.page-item {
  width: 38px;
  height: 38px;
  line-height: 38px;
  text-align: center;
  border: 1px solid #e0e0e0;
  margin: 0 4px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  transition: all .2s;
}

.page-item.active {
  background-color: #f85959;
  color: #fff;
  border-color: #f85959;
}

.page-item:hover:not(.active):not(:disabled) {
  border-color: #f85959;
  color: #f85959;
}

.page-prev, .page-next {
  width: 88px;
}

.page-item:disabled {
  color: #ccc;
  border-color: #e0e0e0;
  cursor: not-allowed;
}

/* ========== 侧边栏样式 ========== */
.sidebar-module {
  background-color: #fff;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  padding: 20px;
  margin-bottom: 15px;
}

.module-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

/* 房价走势图表容器 */
.price-trend-chart {
  width: 100%;
  height: 200px;
  border-radius: 3px;
  margin-bottom: 15px;
  position: relative;
  background-color: #f9f9f9;
}

/* 走势描述文本 */
.trend-desc {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

.trend-desc strong {
  color: #f85959;
  font-weight: 500;
}

/* 热门小区 */
.hot-community-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hot-community-item {
  width: calc(50% - 5px);
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 10px;
  cursor: pointer;
  transition: all .2s;
}

.hot-community-item:hover {
  border-color: #f85959;
}

.community-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 5px;
}

.community-price {
  color: #f85959;
  font-size: 14px;
}

.community-price span {
  font-size: 12px;
  color: #999;
}

/* 购房指南 */
.guide-list {
  margin-top: 10px;
}

.guide-item {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
}

.guide-item:last-child {
  border-bottom: none;
}

.guide-img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 3px;
  margin-right: 10px;
  flex-shrink: 0;
  loading: lazy;
}

.guide-content {
  flex: 1;
}

.guide-title {
  font-size: 14px;
  margin-bottom: 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.guide-title:hover {
  color: #f85959;
}

.guide-time {
  font-size: 12px;
  color: #999;
}

/* 本周精选房源 */
.hot-sale-list {
  margin-top: 10px;
}

.hot-sale-item {
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
}

.hot-sale-item:last-child {
  border-bottom: none;
}

.sale-name {
  font-size: 14px;
}

.sale-price {
  color: #f85959;
  font-weight: 500;
}

/* ========== 底部样式 ========== */
.footer {
  background-color: #333;
  color: #999;
  padding: 40px 0 20px;
  margin-top: 30px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 30px;
  border-bottom: 1px solid #444;
  padding-bottom: 20px;
}

.footer-link-item {
  width: 20%;
  padding: 0 10px;
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .footer-link-item {
    width: 50%;
  }
}

.footer-link-title {
  font-size: 16px;
  color: #fff;
  margin-bottom: 15px;
  position: relative;
  padding-bottom: 8px;
  font-weight: 500;
}

.footer-link-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30px;
  height: 2px;
  background-color: #f85959;
}

.footer-link-list li {
  margin-bottom: 8px;
  font-size: 13px;
  list-style: none;
}

.footer-link-list li a {
  color: #999;
}

.footer-link-list li a:hover {
  color: #f85959;
}

.footer-copyright {
  text-align: center;
  font-size: 12px;
  padding-top: 20px;
  color: #999;
  line-height: 1.6;
}
.pagination { margin: 20px 0; text-align: center; }
.pagination-list { display: inline-block; padding: 0; margin: 0; list-style: none; }
.pagination-item { display: inline-block; margin: 0 2px; }
.pagination-item a { display: inline-block; padding: 4px 12px; border: 1px solid #ddd; border-radius: 4px; color: #333; text-decoration: none; }
.pagination-item.active a { background: #f85959; color: #fff; border-color: #f85959; }
.pagination-item.disabled a { color: #999; cursor: not-allowed; background: #f5f5f5; }
.pagination-info { margin-top: 10px; color: #666; font-size: 12px; }
.esf-list-item { display: flex; align-items: center; padding: 10px; border-bottom: 1px solid #eee; }
.esf-list-img { width: 100px; margin-right: 15px; }
.esf-list-img img { width: 100%; height: 80px; object-fit: cover; border-radius: 4px; }
.esf-list-info { flex: 1; }
.esf-list-title { margin: 0 0 8px; font-size: 16px; }
.esf-list-meta { margin-bottom: 5px; font-size: 12px; color: #666; }
.esf-list-meta span { margin-right: 10px; }
.esf-list-feature { font-size: 12px; color: #999; }
.esf-list-price { text-align: right; min-width: 120px; }
.esf-list-total { font-size: 18px; color: #f85959; font-weight: bold; }
.esf-list-unit { font-size: 12px; color: #999; }