/* ===== 1. 全局重置与基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", "PingFang SC", Arial, sans-serif;
}

body {
    background-color: #f5f8ff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    flex: 1;
    width: 100%;
}

/* ===== 2. 导航栏样式 ===== */
header {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 999;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 75px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #212529;
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(1.1rem, 2vw, 1.3rem);
}

.nav-brand img {
    height: clamp(2.2rem, 4vw, 3.2rem);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1000;
}

.bar {
    width: 24px;
    height: 2.5px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 3px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #495057;
    text-decoration: none;
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #007bff;
}

/* ===== 3. 产品 Banner ===== */
.product-banner {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: #fff;
    border-radius: 12px;
    padding: 3rem 2rem;
    margin: 20px 0 30px;
    text-align: center;
}
.product-banner h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    font-weight: 700;
}
.product-banner p {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}
.promo-badge {
    display: inline-block;
    background: #ff4d4f;
    color: #fff;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* ===== 4. 款式区块 ===== */
.style-section {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    border: 1px solid #e8f1ff;
}
.style-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eaf5ff;
    flex-wrap: wrap;
}
.style-header i {
    font-size: 2rem;
    color: #1a73e8;
}
.style-header h2 {
    font-size: 1.5rem;
    color: #212529;
    margin: 0;
}
.style-header .style-badge {
    font-size: 0.8rem;
    background: #eaf5ff;
    color: #1a73e8;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: normal;
}
.style-body {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
    align-items: start;
}

/* 图片 + 尺寸 包装容器 */
.style-img-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}
.style-img {
    width: 100%;
    border-radius: 12px;
    background: #f8fbff;
    padding: 1rem;
    border: 1px solid #e8f1ff;
    object-fit: contain;
    max-height: 280px;
    transition: opacity 0.2s ease;
}
/* 尺寸显示条 */
.size-display {
    text-align: center;
    background: linear-gradient(135deg, #eaf5ff 0%, #d8ecff 100%);
    color: #1a73e8;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    border: 1px solid #c4e0ff;
    letter-spacing: 0.5px;
}
.size-display i {
    margin-right: 6px;
    color: #0d47a1;
}
.size-display .size-label {
    color: #495057;
    font-weight: 500;
    margin-right: 4px;
}

.style-info h3 {
    font-size: 1.1rem;
    color: #212529;
    margin-bottom: 1rem;
}

/* ===== 5. 功能选项卡片 ===== */
.func-options {
    display: flex;
    /* flex-wrap: wrap; */
    gap: 1rem;
    margin-bottom: 1rem;
}
.func-card {
    flex: 1 1 180px;
    background: #f8fbff;
    border: 1px solid #e8f1ff;
    border-radius: 10px;
    padding: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.func-card:hover {
    border-color: #1a73e8;
    box-shadow: 0 4px 12px rgba(26,115,232,0.1);
}
.func-card h4 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.func-card h4 i {
    font-size: 0.9rem;
}
.func-card p {
    font-size: 0.8rem;
    color: #6c757d;
    margin: 0;
}
.func-switch h4 { color: #1890ff; }
.func-dim h4 { color: #722ed1; }
.func-measure h4 { color: #fa541c; }

/* ===== 6. 路数选项 ===== */
.route-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
}
.route-options span {
    background: #fff;
    border: 1px solid #d9d9d9;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}
.route-options span:hover {
    border-color: #1a73e8;
    color: #1a73e8;
}
.route-options span.active {
    background: #1a73e8;
    color: #fff;
    border-color: #1a73e8;
    box-shadow: 0 4px 10px rgba(26,115,232,0.3);
}

.style-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.btn-consult {
    display: inline-block;
    text-align: center;
    background: #ff4d4f;
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}
.btn-consult:hover { background: #e63946; }

/* ===== 7. 其他相关产品 ===== */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}
.related-card {
    background: #f8fbff;
    border: 1px solid #e8f1ff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}
.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 24px rgba(26,115,232,0.12);
    border-color: #d1e7ff;
}
.related-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background: #fff;
    padding: 1rem;
    border-bottom: 1px solid #eef4ff;
}
.related-card .related-info {
    padding: 1rem 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.related-card h4 {
    font-size: 0.98rem;
    color: #212529;
    margin-bottom: 0.4rem;
    font-weight: 600;
}
.related-card p {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.8rem;
    flex: 1;
}
.related-card .related-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.9rem;
}
.related-card .related-tags span {
    font-size: 0.7rem;
    background: #eaf5ff;
    color: #1a73e8;
    padding: 2px 8px;
    border-radius: 4px;
}
.related-btn {
    display: block;
    text-align: center;
    background: #1a73e8;
    color: #fff;
    text-decoration: none;
    padding: 0.55rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.3s;
}
.related-btn:hover {
    background: #0d47a1;
}

/* ===== 8. 核心功能特点 ===== */
.feature-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.feature-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    border: 1px solid #e8f1ff;
}
.feature-item i { font-size: 2rem; color: #1a73e8; margin-bottom: 1rem; }
.feature-item h4 { font-size: 1rem; color: #212529; margin-bottom: 0.5rem; }
.feature-item p { font-size: 0.85rem; color: #6c757d; margin: 0; }

/* ===== 9. 规格参数表 ===== */
.specs-section {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #e8f1ff;
    overflow-x: auto;
}
.specs-section h2 { font-size: 1.3rem; color: #212529; margin-bottom: 1.5rem; border-left: 4px solid #1a73e8; padding-left: 10px; }
.specs-table { width: 100%; border-collapse: collapse; min-width: 600px; }
.specs-table th, .specs-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #e9ecef; font-size: 0.9rem; }
.specs-table th { background-color: #f8f9fa; color: #495057; font-weight: 600; }
.specs-table tr:hover { background-color: #f8fbff; }

/* ===== 10. 应用场景 ===== */
.scene-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 3rem;
}
.scene-card { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 4/3; }
.scene-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.scene-card:hover img { transform: scale(1.05); }
.scene-card span { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.6); color: #fff; text-align: center; padding: 0.5rem; font-size: 0.9rem; }

/* ===== 11. 友情链接（非卡片，居中） ===== */
.friend-links-section {
    margin: 0 0 2rem;
    text-align: center; /* 整体居中 */
}
.friend-links-title {
    font-size: 1rem;
    color: #212529;
    margin: 0 0 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center; /* 标题居中 */
    gap: 8px;
    font-weight: 600;
}
.friend-links-title i {
    color: #1a73e8;
    font-size: 1rem;
}
.friend-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    align-items: center;
    justify-content: center; /* 链接居中 */
}
.friend-links a {
    color: #495057;
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.25s ease;
}
.friend-links a:hover {
    color: #1a73e8;
    text-decoration: underline;
}
/* 避免友情链接区域嵌套容器产生双重内边距 */
.container > .container {
    padding: 0;
    max-width: none;
}

/* ===== 12. 页脚样式 ===== */
footer {
    text-align: center;
    padding: 2.5rem 5%;
    color: #6c757d;
    background-color: #fff;
    border-top: 1px solid #e8f1ff;
    margin-top: auto;
}
footer .footer-title {
    font-size: 1.1rem;
    color: #212529;
    margin-bottom: 1rem;
    font-weight: 600;
}
footer .footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}
footer .footer-links a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s;
}
footer .footer-links a:hover {
    color: #007bff;
}
footer .copyright {
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
    margin-top: 1rem;
}

/* ===== 13. 响应式适配 ===== */
@media (max-width: 1024px) {
    .style-body {
        grid-template-columns: 1fr;
    }
    .style-img {
        max-height: 220px;
    }
}
@media (max-width: 768px) {
    .navbar-container {
        height: 70px;
        position: relative;
    }
    .menu-toggle {
        display: flex;
    }
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 220px;
        background-color: #fff;
        flex-direction: column;
        justify-content: center;
        padding: 2rem;
        gap: 2rem;
        box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
        transition: 0.3s ease;
        z-index: 999;
    }
    .nav-links.active {
        right: 0;
    }
    .nav-links a {
        font-size: 1rem;
        padding: 0.8rem 1rem;
        width: 100%;
        text-align: left;
        border-radius: 6px;
    }
    .nav-links a:hover {
        background-color: #f5f8ff;
    }
    .product-banner { padding: 2rem 1rem; }
    .specs-section { padding: 1.5rem 1rem; }
    .style-section { padding: 1.5rem; }
    .func-options { flex-direction: column; }
    .related-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
    .related-card img { height: 140px; }

    /* 友情链接移动端（非卡片，居中） */
    .friend-links-section {
        margin-bottom: 1.2rem;
    }
    .friend-links-title {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        gap: 6px;
    }
    .friend-links-title i {
        font-size: 0.85rem;
    }
    .friend-links {
        gap: 0.4rem 0.8rem;
    }
    .friend-links a {
        font-size: 0.72rem;
    }
}

/* ============================================================
   ★★★ 手机端紧凑优化（含"可选功能规则"上方间距压缩） ★★★
   ============================================================ */
@media (max-width: 768px) {
    /* 容器与 Banner 压缩 */
    .container { padding: 0 4%; }
    .product-banner { padding: 1.2rem 0.8rem; margin: 12px 0 16px; border-radius: 10px; }
    .product-banner h1 { font-size: 1.25rem; margin-bottom: 0.4rem; }
    .product-banner p { font-size: 0.8rem; line-height: 1.5; }
    .promo-badge { font-size: 0.7rem; padding: 1px 6px; margin-bottom: 0.5rem; }

    /* 款式区块紧凑化 */
    .style-section { padding: 1rem; margin-bottom: 1rem; border-radius: 12px; }
    .style-header { gap: 8px; margin-bottom: 0.8rem; padding-bottom: 0.6rem; }
    .style-header i { font-size: 1.3rem; }
    .style-header h2 { font-size: 1.1rem; }
    .style-header .style-badge { font-size: 0.68rem; padding: 2px 8px; }

    /* ★★★ 关键：图片/尺寸条 → 可选功能规则 之间的间距 ★★★ */
    .style-body { gap: 0.5rem; }              /* 原来是 2rem，缩到 0.5rem */
    .style-img-wrap { gap: 0.4rem; }          /* 图片与尺寸条之间 */
    .style-img { max-height: 160px; padding: 0.5rem; border-radius: 10px; }
    .size-display { padding: 6px 10px; font-size: 0.8rem; border-radius: 8px; }
    .size-display i { margin-right: 4px; }
    .style-info h3 {
        margin-top: 0.1rem;                   /* ★ 原来 0.8rem，几乎去掉上方间距 */
        margin-bottom: 0.4rem;
        font-size: 0.9rem;
    }

    /* 功能卡片（修复高度） */
    .func-options { gap: 0.4rem; margin-bottom: 0.7rem; }
    .func-card {
        flex: 0 0 auto;   /* ★ 取消 flex-basis 180px，卡片高度 = 内容高度 */
        padding: 0.6rem 0.8rem;
        border-radius: 8px;
    }
    .func-card h4 { font-size: 0.85rem; margin-bottom: 0.25rem; gap: 5px; }
    .func-card h4 i { font-size: 0.8rem; }
    .func-card p { font-size: 0.72rem; line-height: 1.4; }

    /* 路数选项压缩 */
    .route-options { gap: 0.4rem; margin-bottom: 0.7rem; }
    .route-options span { padding: 4px 12px; font-size: 0.72rem; }

    /* 按钮压缩 */
    .style-actions { gap: 0.5rem; }
    .btn-consult { padding: 0.6rem 1.2rem; font-size: 0.85rem; width: 100%; }

    /* 其他相关产品卡片压缩 */
    .related-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.7rem; }
    .related-card { border-radius: 10px; }
    .related-card img { height: 110px; padding: 0.5rem; }
    .related-card .related-info { padding: 0.7rem 0.7rem 0.8rem; }
    .related-card h4 { font-size: 0.82rem; margin-bottom: 0.2rem; }
    .related-card p { font-size: 0.68rem; margin-bottom: 0.5rem; line-height: 1.4; }
    .related-card .related-tags { gap: 0.25rem; margin-bottom: 0.55rem; }
    .related-card .related-tags span { font-size: 0.6rem; padding: 1px 5px; }
    .related-btn { padding: 0.4rem; font-size: 0.75rem; }

    /* 核心功能区块压缩 */
    .feature-section { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; margin-bottom: 1.5rem; }
    .feature-item { padding: 0.9rem 0.6rem; border-radius: 8px; }
    .feature-item i { font-size: 1.4rem; margin-bottom: 0.4rem; }
    .feature-item h4 { font-size: 0.82rem; margin-bottom: 0.2rem; }
    .feature-item p { font-size: 0.68rem; line-height: 1.4; }

    /* 规格表压缩 */
    .specs-section { padding: 1rem 0.8rem; margin-bottom: 1.5rem; }
    .specs-section h2 { font-size: 1rem; margin-bottom: 0.8rem; }
    .specs-table th, .specs-table td { padding: 8px 10px; font-size: 0.75rem; }

    /* 场景图压缩 */
    .scene-grid { grid-template-columns: repeat(3, 1fr); gap: 0.4rem; margin-bottom: 1.5rem; }
    .scene-card span { font-size: 0.7rem; padding: 0.25rem; }
    section h2 { font-size: 1.05rem !important; margin-bottom: 0.8rem !important; }

    /* 页脚压缩 */
    footer { padding: 1.5rem 4%; }
    footer .footer-title { font-size: 0.95rem; margin-bottom: 0.6rem; }
    footer .footer-links { gap: 0.8rem; margin-bottom: 0.6rem; }
    footer .footer-links a { font-size: 0.78rem; }
    footer .copyright { font-size: 0.72rem; margin-top: 0.6rem; }
}

/* 超小屏进一步压缩 */
@media (max-width: 480px) {
    .style-header h2 { font-size: 1.2rem; }
    .style-header i { font-size: 1.5rem; }

    .related-grid {grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));}
    .related-card h4 { font-size: 0.9rem; }
    .related-card p { font-size: 0.75rem; }
    .size-display { font-size: 0.85rem; padding: 8px 10px; }
    .scene-grid {grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));}

    /* 友情链接超小屏（居中继承） */
    .friend-links-section { margin-bottom: 1rem; }
    .friend-links-title { font-size: 0.85rem; }
    .friend-links { gap: 0.35rem 0.6rem; }
    .friend-links a { font-size: 0.7rem; }
}