/**
 * H5移动端首页样式 - 参考旧系统风格
 * 文件用途: 首页专属样式
 * 参考来源: 旧系统/template/default/mobile/skin/css/index.css
 */

/* ========== 轮播图 ========== */
.banner-section {
    margin-top: 1px;
    background-color: #fff;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

.banner-section .swiper-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.banner-section .swiper-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

.banner-section .swiper-slide {
    flex-shrink: 0;
    width: 100% !important;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    overflow: hidden;
}

.banner-section .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.banner-section .swiper-pagination {
    bottom: 10px;
}

.banner-section .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.banner-section .swiper-pagination-bullet-active {
    background: #ff6b6b;
}

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

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

.search-section .search-input {
    display: flex;
    align-items: center;
    background-color: #f0f3f6;
    border-radius: 20px;
    padding: 10px 15px;
    color: #999;
    font-size: 14px;
}

.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;
}

/* ========== 分类导航 ========== */
.nav-section {
    background-color: #fff;
    padding: 15px 0 30px 0;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
}

.nav-section .swiper-container {
    width: 100%;
    overflow: hidden;
}

.nav-section .swiper-wrapper {
    display: flex;
    transition: transform 0.3s ease;
}

.nav-section .swiper-slide {
    flex-shrink: 0;
    width: 100%;
}

.nav-section .category-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding: 0 10px;
}

.nav-section .nav-item {
    width: 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
}

.nav-section .nav-item img {
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
    object-fit: contain;
}

.nav-section .nav-item span {
    font-size: 12px;
    color: #3c3f46;
}

/* 自定义分页指示器样式 */
.custom-pagination {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 9999;
}

.custom-pagination .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.custom-pagination .dot.active {
    background: #666;
    width: 14px;
    height: 14px;
}



/* ========== 头部区域 ========== */
.header-section {
    background-color: #fff;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-section .logo {
    display: flex;
    align-items: center;
}

.header-section .logo img {
    height: 30px;
    object-fit: contain;
}

.header-section .city-selector {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 14px;
    color: #3c3f46;
    cursor: pointer;
}

.header-section .city-selector:after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid #999;
    margin-left: 5px;
}

.header-section .search-box {
    flex: 1;
    margin: 0 10px;
}

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

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

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

.header-section .search-btn {
    width: 20px;
    height: 20px;
    background: url(../img/search.png) no-repeat center;
    background-size: contain;
    border: none;
    cursor: pointer;
}

.header-section .user-icon {
    width: 24px;
    height: 24px;
    background: url(../img/icon_my.png) no-repeat center;
    background-size: contain;
}

/* ========== 固定头部 ========== */
.header.fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.header.fixed .head-t {
    display: flex;
    align-items: center;
    padding: 8px 15px;
}

.header.fixed .cityChoo {
    padding: 0 10px;
    font-size: 14px;
    color: #3c3f46;
    white-space: nowrap;
}

.header.fixed .cityChoo span {
    position: relative;
    padding-right: 15px;
}

.header.fixed .cityChoo 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;
}

.header.fixed .sea-b {
    flex: 1;
    padding: 0 10px;
}

.header.fixed .input {
    display: flex;
    align-items: center;
    background: #F0F3F6;
    border-radius: 15px;
    padding: 6px 12px;
    font-size: 13px;
    color: #999;
}

.header.fixed .input i {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    background: url(../img/search.png) no-repeat center;
    background-size: contain;
}

.header.fixed .head-icon {
    display: flex;
    align-items: center;
}

.header.fixed .head-icon a {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 8px;
    text-decoration: none;
}

.header.fixed .head-icon a i {
    display: block;
    width: 22px;
    height: 22px;
    margin-bottom: 2px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.header.fixed .head-icon a.icon-my i {
    background-image: url(../img/icon_my.png);
}

.header.fixed .head-icon a.icon-map i {
    background-image: url(../img/icon_map.png);
}

.header.fixed .head-icon span {
    font-size: 10px;
    color: #666;
    line-height: 1;
}

/* ========== 顶部标签页导航 ========== */
.tab-nav-section {
    background-color: #fff;
    border-bottom: 1px solid #e9e9e9;
    position: sticky;
    top: 50px;
    z-index: 10;
}

.tab-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 44px;
}

.tab-item {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #9399A5;
    line-height: 44px;
    position: relative;
    cursor: pointer;
}

.tab-item.active {
    color: #101D37;
    font-weight: 600;
}

.tab-item.active:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: #ff6b6b;
    border-radius: 2px;
}

/* ========== 内容区域 ========== */
.tab-content-section {
    background-color: #f5f5f5;
    padding-bottom: 10px;
}

.tab-panel {
    display: none;
    background-color: #fff;
    padding: 15px;
    margin-bottom: 10px;
}

.tab-panel.active {
    display: block;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.panel-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #101D37;
    position: relative;
    padding-left: 10px;
}

.panel-header h2:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 14px;
    background-color: #ff6b6b;
    border-radius: 2px;
}

.panel-header a {
    font-size: 12px;
    color: #9399A5;
}

/* ========== 房源列表 ========== */
.house-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.house-item {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f4f4f4;
}

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

.house-img {
    width: 120px;
    height: 90px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.house-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

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

.house-address {
    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;
}

.house-desc {
    font-size: 12px;
    color: #9399A5;
    margin-top: 6px;
}

.house-tags {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.house-tag {
    font-size: 11px;
    color: #849AAE;
    background-color: #F0F3F6;
    padding: 2px 6px;
    border-radius: 2px;
}

.house-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-top: 6px;
}

/* 二手房、租房价格放右下角，新房保持默认 */
#panel-ershou .house-price,
#panel-zufang .house-price {
    position: absolute !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    margin-top: 0 !important;
}

.house-price .price-num {
    font-size: 16px;
    color: #ff6b6b;
    font-weight: 600;
}

.house-price .price-unit {
    font-size: 12px;
    color: #ff6b6b;
}

.house-price .price-total {
    font-size: 12px;
    color: #9399A5;
    margin-left: 8px;
}

/* ========== 小区列表 ========== */
.xiaoqu-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.xiaoqu-item {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f4f4f4;
}

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

.xiaoqu-img {
    width: 120px;
    height: 90px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.xiaoqu-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.xiaoqu-name {
    font-size: 15px;
    color: #101D37;
    font-weight: 500;
}

.xiaoqu-address {
    font-size: 12px;
    color: #9399A5;
    margin-top: 4px;
}

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

.xiaoqu-price span {
    font-size: 12px;
    color: #9399A5;
    font-weight: normal;
}

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

/* ========== 关于我们栏目 ========== */
.about-us-section {
    background-color: #fff;
    padding: 15px;
    margin-bottom: 10px;
    border-top: 1px solid #f4f4f4;
}

.about-us-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
}

.about-link {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    padding: 5px 10px;
    transition: color 0.3s;
}

.about-link:hover,
.about-link:active {
    color: #ff6b6b;
}

/* ========== 空状态 ========== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.empty-state img {
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
}

.empty-state p {
    font-size: 14px;
    color: #999;
}
