/* ===== H5移动端样式 - 荆州好房子网 ===== */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    max-width: 480px;
    margin: 0 auto;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===== 顶部 Banner ===== */
.m-top-banner {
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: linear-gradient(135deg, #e74c3c, #f39c12);
}

.m-top-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.m-banner-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m-banner-placeholder svg {
    width: 100%;
    height: 100%;
}

/* ===== 顶部导航栏 ===== */
.m-header {
    background: #fff;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.m-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.m-header-close {
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 4px;
}

.m-header-title {
    text-align: center;
    flex: 1;
}

.m-header-name {
    font-size: 17px;
    font-weight: 600;
    color: #333;
}

.m-header-url {
    font-size: 11px;
    color: #999;
    margin-top: 1px;
}

.m-header-more {
    font-size: 20px;
    color: #333;
    letter-spacing: 2px;
    cursor: pointer;
    padding: 4px;
}

/* ===== 搜索栏 ===== */
.m-search {
    background: #fff;
    padding: 8px 12px 12px;
}

.m-search-inner {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 8px 14px;
}

.m-search-icon {
    flex-shrink: 0;
    margin-right: 8px;
}

.m-search-input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #333;
    width: 100%;
}

.m-search-input::placeholder {
    color: #bbb;
}

/* ===== 功能图标导航 ===== */
.m-nav-icons {
    display: flex;
    justify-content: space-around;
    padding: 16px 8px 8px;
    background: #fff;
}

.m-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.m-nav-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-adviser { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.icon-price { background: linear-gradient(135deg, #f5a623, #f7c948); }
.icon-agent { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.icon-tour { background: linear-gradient(135deg, #fa709a, #fee140); }
.icon-circle { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }

.m-nav-label {
    font-size: 12px;
    color: #333;
}

/* 分页指示器 */
.m-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 10px 0;
    background: #fff;
}

.m-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ddd;
}

.m-dot.active {
    background: #e74c3c;
    width: 16px;
    border-radius: 3px;
}

/* ===== 本月房价 ===== */
.m-price-section {
    background: #fff;
    margin-top: 8px;
    padding: 16px;
}

.m-price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.m-price-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.m-price-report {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #f5a623, #f7c948);
    color: #fff;
    padding: 6px 14px;
    border-radius: 18px;
    font-size: 13px;
    font-weight: 500;
}

.m-price-cards {
    display: flex;
    align-items: center;
    background: #fafafa;
    border-radius: 12px;
    padding: 16px;
}

.m-price-card {
    flex: 1;
    text-align: center;
}

.m-price-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.m-price-unit {
    font-size: 13px;
    font-weight: 400;
    color: #666;
}

.m-price-label {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.m-price-down {
    color: #27ae60;
    font-size: 12px;
}

.m-price-divider {
    width: 1px;
    height: 40px;
    background: #e0e0e0;
    margin: 0 12px;
}

/* ===== 资讯滚动 ===== */
.m-news-ticker {
    background: #fff;
    padding: 10px 16px;
}

.m-ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.m-ticker-tag {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    color: #fff;
    flex-shrink: 0;
}

.tag-follow {
    background: #3498db;
}

.tag-dynamic {
    background: #e74c3c;
}

.m-ticker-text {
    font-size: 13px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 热门楼盘 ===== */
.m-hot-section {
    background: #fff;
    margin-top: 8px;
    padding: 16px;
}

.m-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.m-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.m-section-more {
    font-size: 13px;
    color: #999;
}

/* 主打楼盘卡片 */
.m-featured-card {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.m-featured-img {
    width: 120px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.m-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.m-featured-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.m-featured-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.m-status-tag {
    display: inline-block;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 3px;
    color: #fff;
    width: fit-content;
}

.status-sale {
    background: #e74c3c;
}

.m-featured-price {
    font-size: 22px;
    font-weight: 700;
    color: #e74c3c;
}

.m-price-small {
    font-size: 12px;
    font-weight: 400;
}

.m-featured-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.m-tag-brand {
    font-size: 11px;
    color: #666;
    background: #f5f5f5;
    padding: 1px 6px;
    border-radius: 3px;
}

.m-featured-badges {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 2px;
}

.m-badge-hot {
    font-size: 11px;
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
}

.m-badge-rank {
    font-size: 11px;
    background: #fff3e0;
    color: #f5a623;
    padding: 2px 8px;
    border-radius: 10px;
}

/* 楼盘网格 */
.m-loupan-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
}

.m-loupan-card {
    display: flex;
    flex-direction: column;
}

.m-loupan-img {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.m-loupan-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.m-loupan-area {
    position: absolute;
    bottom: 4px;
    left: 4px;
    font-size: 10px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 1px 5px;
    border-radius: 3px;
}

.m-loupan-name {
    font-size: 12px;
    color: #333;
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 置业顾问 ===== */
.m-adviser-section {
    background: #fff;
    margin-top: 8px;
    padding: 16px;
}

.m-adviser-tabs {
    display: flex;
    gap: 16px;
    margin-left: 12px;
}

.m-tab {
    font-size: 13px;
    color: #999;
    cursor: pointer;
}

.m-tab.active {
    color: #333;
    font-weight: 600;
}

.m-adviser-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
}

.m-adviser-list::-webkit-scrollbar {
    display: none;
}

.m-adviser-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.m-adviser-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
}

.m-adviser-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.m-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

.m-adviser-info {
    text-align: center;
    margin-top: 6px;
}

.m-adviser-name {
    font-size: 12px;
    color: #333;
    font-weight: 500;
}

.m-adviser-company {
    font-size: 10px;
    color: #999;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 70px;
}

/* ===== 底部留白 ===== */
.m-bottom-spacer {
    height: 60px;
}

/* ===== 底部Tab栏 ===== */
.m-tab-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid #f0f0f0;
    z-index: 100;
}

.m-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex: 1;
}

.m-tab-icon {
    width: 24px;
    height: 24px;
}

.m-tab-label {
    font-size: 10px;
    color: #999;
}

.m-tab-item.active .m-tab-label {
    color: #e74c3c;
}

.m-tab-publish {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #e74c3c, #f39c12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -12px;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

/* 资讯链接样式 */
.m-ticker-text {
    color: #555;
    text-decoration: none;
}

.m-ticker-text:hover {
    color: #e74c3c;
}

/* 空状态提示 */
.m-empty-tip {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 20px 0;
    width: 100%;
}
