/* ============================================
   宜荣财达智慧物流管理系统  v1.0  - 修复版
   www.yrcdw.com
   2026-8 | 修复风格显示问题
   ============================================ */

/* ==================== 公共变量与基础 ==================== */
:root {
    --primary: #c9302c;
    --primary-dark: #a02622;
    --secondary: #2c5aa0;
    --bg: #f5f6f8;
    --card-bg: #ffffff;
    --text: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --border: #e8e8e8;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
}

/* 修复：原 .zjzqg-page body 选择器无效 */
body.zjzqg-page,
.zjzqg-page {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* 仅重置 zjzqg-page 容器内部元素，不影响 header/footer */
.zjzqg-page,
.zjzqg-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.zjzqg-page a { text-decoration: none; color: inherit; }
.zjzqg-page img { max-width: 100%; display: block; }

/* ==================== 页面头部 ==================== */
.page-header {
    background: linear-gradient(135deg, var(--secondary) 0%, #1a3a6e 100%);
    padding: 40px 20px;
    text-align: center;
    color: #fff;
}
.page-header h1 { font-size: 28px; font-weight: 600; margin-bottom: 8px; letter-spacing: 2px; }
.page-header p { font-size: 14px; opacity: 0.85; }
.breadcrumb { margin-top: 12px; font-size: 13px; opacity: 0.8; }
.breadcrumb a { color: #fff; text-decoration: underline; }
.breadcrumb a:hover { opacity: 0.8; }
.breadcrumb span { margin: 0 6px; }

/* ==================== 布局骨架（修复版） ==================== */
.main-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    gap: 24px;
    -webkit-box-align: start;
    align-items: flex-start;
    -webkit-box-pack: start;
    justify-content: flex-start;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
}

.content-area {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.sidebar {
    width: 280px;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 280px;
    flex: 0 0 280px;
}

/* ==================== 运输卡片网格 ==================== */
.transport-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.transport-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}
.transport-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.card-image {
    width: 100%;
    position: relative;
    padding-bottom: 75%;
    background: #f0f0f0;
    overflow: hidden;
}
.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.transport-card:hover .card-image img { transform: scale(1.05); }
.card-image .no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    font-size: 14px;
}
.card-body { padding: 14px 16px; }
.card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 42px;
}
.card-meta {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-lighter);
}
.card-route {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--secondary);
    font-weight: 500;
}
.card-route .arrow { color: var(--text-lighter); }

/* ==================== 侧边栏 ==================== */
.sidebar-box {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}
.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--border);
    position: relative;
}
.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}
.city-list { list-style: none; }
.city-list li { margin-bottom: 8px; }
.city-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--text-light);
    transition: all 0.2s;
}
.city-list a:hover { background: #f5f5f5; color: var(--primary); }
.city-list .city-name { display: flex; align-items: center; gap: 6px; }
.city-list .city-name::before { content: '📍'; font-size: 12px; }
.city-list .city-num {
    background: #f0f0f0;
    color: var(--text-lighter);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}
.city-list a:hover .city-num { background: var(--primary); color: #fff; }
.city-list .active a { background: var(--primary); color: #fff; }
.city-list .active .city-num { background: rgba(255,255,255,0.2); color: #fff; }

/* ==================== 分页 ==================== */
.pager-wrapper {
    margin-top: 32px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.pager-info { font-size: 14px; color: var(--text-light); }
.pager-num { color: var(--primary); font-weight: 600; margin: 0 2px; }
.pager-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: center;
}
.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: var(--radius);
    font-size: 13px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-light);
    transition: all 0.2s;
    cursor: pointer;
}
.pager-btn:hover:not(.disabled) {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.pager-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 600;
}
.pager-btn.disabled { opacity: 0.4; cursor: not-allowed; }
.pager-first, .pager-prev, .pager-next, .pager-last { padding: 0 14px; }

/* ==================== 空状态 ==================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.empty-state-icon { font-size: 64px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-text { font-size: 16px; color: var(--text-lighter); }

/* ==================== 详情页：信息卡片 ==================== */
.detail-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    overflow: hidden;
}
.detail-card-header {
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.detail-card-body { padding: 20px; }

/* ==================== 详情页：图片画廊（修复：三类缩略图合并一行） ==================== */
.gallery-main {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
    cursor: pointer;
    text-align: center;
    background: #f8f8f8;
}
.gallery-main img {
    width: 100%;
    max-height: 420px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}
.gallery-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.gallery-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
    flex-shrink: 0;
    position: relative;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb.active,
.gallery-thumb:hover { border-color: var(--primary); opacity: 1; }

/* 缩略图角标（装货/车辆/回单） */
.thumb-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 10px;
    text-align: center;
    padding: 2px 0;
    z-index: 2;
    pointer-events: none;
}

/* ==================== 详情页：联系方式 ==================== */
.contact-section {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}
.contact-phone {
    flex: 1;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 20px;
    text-align: center;
}
.contact-label { font-size: 14px; color: var(--text-lighter); margin-bottom: 8px; }
.contact-number { font-size: 22px; font-weight: 700; color: var(--primary); }
.contact-number a { color: var(--primary); }
.contact-qr {
    width: 120px;
    height: 120px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.contact-qr img { width: 100%; height: 100%; object-fit: cover; }

/* ==================== 详情页：信息表格 ==================== */
.info-table { width: 100%; border-collapse: collapse; }
.info-table tr { border-bottom: 1px solid var(--border); }
.info-table tr:last-child { border-bottom: none; }
.info-table th,
.info-table td { padding: 14px 20px; text-align: left; font-size: 14px; }
.info-table th {
    width: 120px;
    color: var(--text-light);
    font-weight: 500;
    background: #fafafa;
}
.info-table td { color: var(--text); }
.info-table .highlight { color: var(--primary); font-weight: 600; }
.info-table .price { color: var(--primary); font-weight: 700; font-size: 16px; }
.info-table .remark-cell { color: var(--text-light); line-height: 1.6; }

/* ==================== 详情页：运输路线时间轴 ==================== */
.route-timeline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 20px 0;
    margin-bottom: 20px;
}
.route-node { text-align: center; flex: 1; }
.route-node-city {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 6px;
}
.route-node-date { font-size: 13px; color: var(--text-lighter); }
.route-line {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    position: relative;
}
.route-line::after {
    content: '→';
    position: absolute;
    right: -10px;
    top: -10px;
    color: var(--primary);
    font-size: 16px;
}
.route-info-bar {
    display: flex;
    justify-content: space-around;
    background: #fafafa;
    border-radius: var(--radius);
    padding: 16px;
}
.route-info-item { text-align: center; }
.route-info-label { font-size: 12px; color: var(--text-lighter); margin-bottom: 4px; }
.route-info-value { font-size: 16px; font-weight: 600; color: var(--text); }
.route-info-value .km-tip { font-size: 12px; color: var(--text-lighter); }

/* ==================== 详情页：相关记录 ==================== */
.related-list { list-style: none; }
.related-list li { margin-bottom: 12px; }
.related-list li:last-child { margin-bottom: 0; }
.related-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius);
    transition: all 0.2s;
}
.related-item:hover { background: #f5f5f5; }
.related-thumb {
    width: 70px;
    height: 70px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.related-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.related-meta { font-size: 12px; color: var(--text-lighter); margin-top: 4px; }

/* ==================== 详情页：图片放大模态框 ==================== */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    align-items: center;
    justify-content: center;
}
.image-modal.active { display: flex; }
.image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
}
.image-modal img { max-width: 90%; max-height: 90%; border-radius: 4px; }

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
    .transport-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .main-wrapper {
        -webkit-flex-direction: column;
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        -webkit-flex: 0 0 auto;
        flex: 0 0 auto;
    }
    .transport-grid { grid-template-columns: repeat(3, 1fr); }
    .city-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .city-list li { margin-bottom: 0; }
    .contact-section { flex-direction: column; }
    .contact-qr { width: 100%; height: auto; aspect-ratio: 1; }
}

@media (max-width: 768px) {
    .page-header { padding: 28px 16px; }
    .page-header h1 { font-size: 22px; }
    .main-wrapper { padding: 16px 12px; gap: 16px; }
    .transport-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card-body { padding: 10px 12px; }
    .card-title { font-size: 13px; min-height: 38px; }
    .pager-wrapper { padding: 14px; }
    .pager-btn { min-width: 32px; height: 32px; padding: 0 8px; font-size: 12px; }
    .city-list { grid-template-columns: repeat(2, 1fr); }
    .info-table th, .info-table td { padding: 10px 12px; font-size: 13px; }
    .route-timeline { flex-direction: column; gap: 10px; }
    .route-line { width: 2px; height: 30px; }
    .route-line::after { content: '↓'; right: -6px; top: 8px; }
    .route-info-bar { flex-wrap: wrap; gap: 12px; }
    .gallery-main img { max-height: 300px; }
    /* 手机版缩略图改小 */
    .gallery-thumbs { gap: 8px; }
    .gallery-thumb { width: 60px; height: 60px; }
    .thumb-badge { font-size: 9px; padding: 1px 0; }
    .detail-card-body { padding: 16px; }
    /* 手机版隐藏二维码 */
    .contact-qr { display: none !important; }
    .contact-phone { width: 100%; }
}

@media (max-width: 480px) {
    .transport-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .page-header h1 { font-size: 18px; letter-spacing: 1px; }
    .pager-first, .pager-last { display: none; }
    .gallery-main img { max-height: 220px; }
    /* 超小屏进一步缩小缩略图 */
    .gallery-thumbs { gap: 6px; }
    .gallery-thumb { width: 52px; height: 52px; }
    .thumb-badge { font-size: 8px; }
    .detail-card-body { padding: 12px; }
}