/**
 * H5移动端列表页公共样式
 * 文件用途: 二手房、租房、新房、小区列表页通用样式
 */

/* ========== 筛选栏 ========== */
.filter-section {
    position: fixed;
    top: 10px;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 90;
    border-bottom: 1px solid #e9e9e9;
}

.filter-bar {
    display: flex;
    height: 44px;
    line-height: 44px;
}

.filter-item {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #444;
    position: relative;
}

.filter-item span {
    position: relative;
    padding-right: 15px;
}

.filter-item span:after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #999;
    right: 0;
    top: 50%;
    margin-top: -2px;
}

.filter-item.active span {
    color: #ff6b6b;
}

.filter-item.active span:after {
    border-top-color: #ff6b6b;
    transform: rotate(180deg);
}

/* ========== 筛选下拉面板 ========== */
.filter-panel {
    display: none;
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    background: #fff;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.filter-panel.show {
    display: block;
}

.panel-content {
    display: none;
    padding: 10px 15px;
}

.panel-content.show {
    display: block;
}

.panel-list {
    display: flex;
    flex-wrap: wrap;
}

.panel-list a {
    display: inline-block;
    padding: 8px 15px;
    margin: 5px;
    background: #f5f5f5;
    border-radius: 3px;
    font-size: 13px;
    color: #666;
}

.panel-list a.active {
    background: #ff6b6b;
    color: #fff;
}

/* ========== 搜索框 ========== */
.search-section {
    padding: 10px 15px;
    background: #fff;
    margin-top: 20px;
    border-bottom: 1px solid #f4f4f4;
}

.search-section .search-box {
    padding: 0;
}

.search-section .search-input {
    display: flex;
    align-items: center;
    background: #f0f3f6;
    border-radius: 20px;
    padding: 8px 12px;
}

.search-section .search-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background: url(../img/search.png) no-repeat center;
    background-size: contain;
    flex-shrink: 0;
}

.search-section .search-input input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #333;
}

.search-section .search-input input::placeholder {
    color: #999;
}

.search-section .search-btn {
    padding: 5px 12px;
    background: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 15px;
    font-size: 13px;
    margin-left: 8px;
}

/* ========== 列表区域 ========== */
.list-section {
    padding-bottom: 60px;
    background: #fff;
}

/* ========== 房源列表 ========== */
.house-list {
    background: #fff;
}

.house-list .house-item {
    padding: 15px;
    border-bottom: 1px solid #E9E9E9;
    display: flex;
}

.house-list .house-item:last-child {
    border-bottom: none;
}

.house-list .house-img {
    width: 120px;
    height: 90px;
    margin-right: 12px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
}

.house-list .house-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.house-list .house-info {
    flex: 1;
    min-height: 90px;
    position: relative;
}

.house-list .house-title {
    font-size: 15px;
    color: #101D37;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    margin-bottom: 8px;
    white-space: normal;
}

.house-list .house-desc {
    font-size: 12px;
    color: #9399A5;
    margin-bottom: 5px;
}

.house-list .house-desc .divider {
    margin: 0 5px;
    color: #ccc;
}

.house-list .house-address {
    font-size: 12px;
    color: #9399A5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    margin-bottom: 5px;
    max-width: 15em;
    white-space: normal;
}

/* 地址+价格同行 */
.house-address-price {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 5px;
}

.house-address-price .house-address {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    color: #9399A5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    max-width: 15em;
    white-space: normal;
    margin-bottom: 0;
}

.house-address-price .house-price {
    flex-shrink: 0;
    font-size: 15px;
    color: #FA5741;
    font-weight: 600;
    margin-top: 0;
}

.house-list .house-tags {
    margin-top: 5px;
}

.house-list .house-tags span {
    display: inline-block;
    font-size: 11px;
    color: #849AAE;
    background: #F4F7F9;
    padding: 2px 6px;
    border-radius: 2px;
    margin-right: 5px;
}

.house-list .house-tags span.owner-cert-tag {
    background: #ff4d4f;
    color: #fff;
}

.house-list .house-price {
    position: static;
    font-size: 15px;
    color: #FA5741;
    font-weight: 600;
    margin-top: 4px;
}

.house-list .house-price i {
    font-size: 11px;
    font-style: normal;
}

/* ========== 小区列表 ========== */
.xiaoqu-list {
    background: #fff;
}

.xiaoqu-list .xiaoqu-item {
    padding: 15px;
    border-bottom: 1px solid #E9E9E9;
    display: flex;
}

.xiaoqu-list .xiaoqu-item:last-child {
    border-bottom: none;
}

.xiaoqu-list .xiaoqu-img {
    width: 100px;
    height: 75px;
    margin-right: 12px;
    flex-shrink: 0;
    border-radius: 5px;
    overflow: hidden;
}

.xiaoqu-list .xiaoqu-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.xiaoqu-list .xiaoqu-info {
    flex: 1;
}

.xiaoqu-list .xiaoqu-title {
    font-size: 15px;
    color: #101D37;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 8px;
}

.xiaoqu-list .xiaoqu-address {
    font-size: 12px;
    color: #9399A5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    margin-bottom: 5px;
    max-width: 15em;
    white-space: normal;
}

.xiaoqu-list .xiaoqu-price {
    font-size: 14px;
    color: #FA5741;
    font-weight: 600;
}

.xiaoqu-list .xiaoqu-price i {
    font-size: 11px;
    font-style: normal;
}

.xiaoqu-list .xiaoqu-year {
    font-size: 11px;
    color: #9399A5;
    margin-left: 10px;
}

/* ========== 经纪人列表 ========== */
.agent-list {
    background: #fff;
}

.agent-list .agent-item {
    padding: 15px;
    border-bottom: 1px solid #E9E9E9;
    display: flex;
    align-items: center;
}

.agent-list .agent-item:last-child {
    border-bottom: none;
}

.agent-list .agent-avatar {
    width: 60px;
    height: 60px;
    margin-right: 12px;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
}

.agent-list .agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-list .agent-info {
    flex: 1;
}

.agent-list .agent-name {
    font-size: 15px;
    color: #101D37;
    font-weight: 600;
    margin-bottom: 5px;
}

.agent-list .agent-company {
    font-size: 12px;
    color: #9399A5;
    margin-bottom: 5px;
}

.agent-list .agent-stats {
    font-size: 12px;
    color: #666;
}

.agent-list .agent-stats span {
    margin-right: 15px;
}

.agent-list .agent-stats i {
    color: #ff6b6b;
    font-style: normal;
}

.agent-list .agent-contact {
    padding: 8px 15px;
    background: #ff6b6b;
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
}

/* ========== 加载更多 ========== */
.load-more {
    text-align: center;
    padding: 15px;
    color: #999;
    font-size: 13px;
}

.load-more.loading:after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #999;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 空数据提示 ========== */
.empty-tip {
    text-align: center;
    padding: 50px 15px;
    color: #999;
    font-size: 14px;
}

.empty-tip img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* ========== 遮罩层 ========== */
.mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 80;
}

.mask.show {
    display: block;
}
