/* ================================================================
   全局样式（仅保留非头尾部的公共样式）
   头部和尾部的样式已移至 headerFooter.js 中
   ================================================================ */
:root {
    --primary: #02aca0;
    --sub1: #27a76c;
    --sub2: #214e43;
    --gradient-primary: linear-gradient(135deg, #02aca0, #61bf3d);
    --white: #ffffff;
    --bg-light: #f8fafc;
    --border-light: #e9ecef;
    --text-muted: #64748b;
    --text-dark: #1a1a2e;
    --shadow-sm: 0 2px 16px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.06);
    --radius: 8px;
    --radius-lg: 12px;
    --header-height: 72px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', Roboto, sans-serif;
    background: #fcfcfc;
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: var(--header-height);
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}
ul {
    list-style: none;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================================================
   按钮（公共）
   ================================================================ */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary:hover {
    opacity: 0.85;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(2, 172, 160, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 8px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.tag {
    display: inline-block;
    background: rgba(2, 172, 160, 0.08);
    color: var(--primary);
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 6px;
    margin-bottom: 6px;
}
.tag-green {
    background: rgba(39, 167, 108, 0.1);
    color: var(--sub1);
}
.tag-orange {
    background: rgba(244, 175, 27, 0.1);
    color: #c97d0e;
}

/* ================================================================
   卡片 & 列表网格
   ================================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 16px;
}

.info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}
.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.card-img {
    height: 170px;
    background: var(--bg-light);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: var(--text-muted);
}
.card-img .badge-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    padding: 4px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
}
.card-img.cat-parking { background: linear-gradient(135deg, #e6f7f5, #b8e8e2); }
.card-img.cat-management { background: linear-gradient(135deg, #e8f0fe, #c5d8f0); }
.card-img.cat-engine { background: linear-gradient(135deg, #fce4ec, #f5c8d4); }
.card-img.cat-drive { background: linear-gradient(135deg, #e0f2f1, #b8dfdb); }
.card-img.cat-brake { background: linear-gradient(135deg, #fbe9e7, #f5ccc4); }
.card-img.cat-electrical { background: linear-gradient(135deg, #ede7f6, #d5c8e8); }

.card-body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 10px;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-title a:hover {
    color: var(--primary);
}
.card-merchant {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    font-size: 14px;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 8px 12px;
    border-radius: var(--radius);
    margin-bottom: 10px;
}
.card-merchant .name {
    font-weight: 600;
    color: var(--text-dark);
}
.card-merchant .phone {
    color: var(--primary);
    font-weight: 500;
}
.card-tags {
    margin-top: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.card-footer-meta {
    margin-top: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
}

/* ================================================================
   详情页
   ================================================================ */
.detail-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-top: 20px;
}
@media (max-width: 900px) {
    .detail-wrapper {
        grid-template-columns: 1fr;
    }
}
.detail-main .detail-header {
    border-bottom: 2px solid rgba(2, 172, 160, 0.15);
    padding-bottom: 18px;
    margin-bottom: 24px;
}
.detail-main .detail-header h1 {
    font-size: 28px;
    line-height: 1.4;
    color: var(--text-dark);
}
.detail-main .detail-header .sub-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 15px;
}
.detail-contact-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: sticky;
    top: 100px;
}
.detail-contact-card .company {
    font-size: 20px;
    font-weight: 700;
    color: var(--sub2);
    margin-bottom: 4px;
}
.detail-contact-card .detail-phone {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin: 12px 0;
}
.detail-contact-card .address {
    color: var(--text-muted);
    margin-bottom: 16px;
}
.detail-contact-card .trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}
.detail-contact-card .trust-badges span {
    background: rgba(2, 172, 160, 0.06);
    color: var(--primary);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}
.detail-section {
    margin-top: 32px;
}
.detail-section h3 {
    font-size: 20px;
    border-left: 4px solid var(--primary);
    padding-left: 16px;
    margin-bottom: 16px;
    color: var(--text-dark);
}
.detail-section .grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.detail-section .grid-2col .block {
    background: var(--bg-light);
    padding: 16px 20px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}
.detail-section .grid-2col .block strong {
    display: block;
    color: var(--text-dark);
    margin-bottom: 4px;
}

/* ================================================================
   模态框
   ================================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}
.modal-overlay.active {
    display: flex;
}
.modal-box {
    background: var(--white);
    max-width: 520px;
    width: 92%;
    border-radius: var(--radius-lg);
    padding: 36px 32px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
}
.modal-box .close-modal {
    float: right;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.3s;
}
.modal-box .close-modal:hover {
    color: var(--text-dark);
}
.modal-box .protocol-box {
    background: var(--bg-light);
    padding: 16px;
    border-radius: var(--radius);
    max-height: 200px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-muted);
    margin: 12px 0;
    border: 1px solid var(--border-light);
    white-space: pre-wrap;
}
.modal-box .agree-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0 16px;
}
.modal-box .agree-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}