/* ===================================
   桂安物流 · 手机站样式 V2
   =================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background: #f0f0f0;
    color: #333;
    font-size: 14px;
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
}
a { color: #1a3a6b; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ===== 顶栏 ===== */
.top-bar {
    background: #fff;
    text-align: center;
    padding: 8px 0;
    border-bottom: 2px solid #1a3a6b;
}
.top-logo { max-height: 50px; margin: 0 auto; }

/* ===== 6宫格导航 ===== */
.nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #ddd;
    padding: 0;
}
.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 15px 5px;
    min-height: 70px;
}
.nav-btn:active { background: #f0f0f0; }
.nav-img {
    width: 100%;
    height: auto;
    max-height: 70px;
    object-fit: contain;
}
.nav-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.nav-f-icon { font-size: 28px; }
.nav-f-label { font-size: 12px; color: #666; margin-top: 4px; }

/* ===== 蓝色条框 ===== */
.sec-bar {
    background: #1a3a6b;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-radius: 6px 6px 0 0;
}
.sec-title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}
.sec-more {
    color: #fff;
    font-size: 12px;
    opacity: 0.85;
}

/* ===== 区块 ===== */
.m-section {
    background: #fff;
    margin: 8px 6px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.m-section .scroll-x,
.m-section .news-list {
    padding: 10px;
}

/* ===== 横向滚动 ===== */
.scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
}
.scroll-x::-webkit-scrollbar { height: 3px; }
.scroll-x::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }
.scroll-track {
    display: flex;
    gap: 8px;
}

/* 省份卡片 */
.province-card {
    width: 120px;
    height: 90px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a3a6b, #2a5298);
    color: #fff;
    scroll-snap-align: start;
    cursor: pointer;
    flex-shrink: 0;
}
.province-card:active { opacity: 0.8; }
.pc-icon { font-size: 24px; margin-bottom: 3px; }
.pc-name { font-size: 14px; font-weight: 600; }
.pc-count { font-size: 11px; opacity: 0.7; }

/* 外贸卡片 */
.trade-card {
    width: 180px;
    border-radius: 6px;
    overflow: hidden;
    background: #f8f9fc;
    border: 1px solid #eee;
    scroll-snap-align: start;
    flex-shrink: 0;
    cursor: pointer;
}
.trade-card:active { opacity: 0.85; }
.trade-card img { width: 100%; height: 90px; object-fit: cover; }
.trade-card .tc-body { padding: 6px 8px; }
.trade-card .tc-body h4 { font-size: 12px; color: #1a3a6b; }
.trade-card .tc-body p { font-size: 11px; color: #999; }

/* ===== 公告 ===== */
.news-list { list-style: none; padding: 0 10px !important; }
.news-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}
.news-list li:last-child { border-bottom: none; }
.news-list li a {
    font-size: 13px;
    color: #333;
    display: block;
    line-height: 1.5;
}

/* ===== 底部浮动栏 ===== */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    display: flex;
    background: #1a2b4a;
    height: 55px;
}
.b-bar-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    border-right: 1px solid rgba(255,255,255,0.1);
}
.b-bar-btn:last-child { border-right: none; }
.b-bar-btn:active { background: rgba(255,255,255,0.1); }
.b-bar-icon { font-size: 18px; margin-bottom: 2px; }
.b-bar-label { font-size: 11px; }

/* ===== 导航面板 ===== */
.nav-panel {
    display: none;
    position: fixed;
    bottom: 55px;
    left: 0;
    right: 0;
    z-index: 998;
    background: #fff;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.15);
    padding: 8px 0;
}
.nav-panel.show { display: block; }
.nav-panel a {
    display: block;
    padding: 12px 18px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #eee;
}
.nav-panel a:last-child { border-bottom: none; }
.nav-panel a:active { background: #f5f5f5; }

/* ===== Footer ===== */
.m-footer {
    background: #1a2b4a;
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 15px 12px;
    font-size: 11px;
    line-height: 2;
}
.m-footer p { margin-bottom: 2px; }
.copy { margin-top: 8px; opacity: 0.5; font-size: 10px; }

/* ===== 线路页面 ===== */
.route-page { padding: 8px 6px; }
.route-page h1 { font-size: 16px; color: #fff; background: #1a3a6b; padding: 10px 14px; border-radius: 6px; margin-bottom: 10px; }
.province-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
    background: #fff;
}
.city-list { background: #fff; border-radius: 6px; overflow: hidden; }
.city-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 14px; border-bottom: 1px solid #eee; cursor: pointer;
}
.city-item:last-child { border-bottom: none; }
.city-item:active { background: #f5f5f5; }
.city-name { font-size: 14px; font-weight: 500; }
.city-mode { font-size: 11px; padding: 2px 10px; border-radius: 8px; font-weight: 500; }
.city-mode.direct { background: #e8f5e9; color: #2e7d32; }
.city-mode.transfer { background: #fff3e0; color: #e65100; }

/* ===== 城市详情 ===== */
.city-detail-card {
    background: transparent; border-radius: 0; padding: 0;
}
.city-detail-card h2 { font-size: 18px; color: #1a3a6b; margin-bottom: 12px; }
.detail-row {
    display: flex; padding: 8px 0; border-bottom: 1px solid #eee; font-size: 13px;
}
.detail-label { width: 60px; color: #999; flex-shrink: 0; }
.detail-value { flex: 1; }
.detail-value.price { color: #c41e2a; font-weight: 600; font-size: 15px; }
.detail-phone {
    display: block; text-align: center; padding: 12px; margin-top: 12px;
    background: #c41e2a; color: #fff; border-radius: 6px; font-size: 15px; font-weight: 600;
}

/* ===== 自定义滚动条 - 加宽方便手指滑动 ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #aaa;
    border-radius: 4px;
}
