/* ============================================
   Metric Flange Head Bolts 产品页面 - 优化完整版
   ============================================ */

:root {
    --primary-color: #004a99;    
    --secondary-color: #007bff;     
    --accent-color: #1e90ff;        
    --light-bg: #f8fafc;           
    --card-bg: white;              
    --text-color: #2c3e50;          
    --text-light: #64748b;         
    --soft-border: #e2e8f0;        
    --shadow-elevation: 0 4px 20px rgba(0, 74, 153, 0.08); 
    --shadow-hover: 0 8px 30px rgba(0, 74, 153, 0.12); 
    --radius: 12px;             
    --gradient-primary: linear-gradient(135deg, #004a99 0%, #007bff 100%);
    --gradient-light: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 100%);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    font-size: 17px; /* 增加基准字体大小，提升整体可读性 */
    line-height: 1.8; /* 增加行高，使文本呼吸感更强 */
    color: var(--text-color);
    background-color: var(--light-bg);
    margin: 0;
    padding: 0;
    background-image: var(--gradient-light);
    background-attachment: fixed;
}

/* ========== 链接样式 ========== */
.tag-page-container a {
    text-decoration: none;
    color: var(--secondary-color);
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
}

.tag-page-container a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.tag-page-container a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.tag-page-container a:hover::after {
    width: 100%;
}

/* ========== 页面容器 ========== */
.tag-page-container {
    max-width: 1280px; 
    margin: 0 auto;
    padding: 20px 30px 80px 30px;
}

/* ========== 页头与导航 ========== */
header {
    background: var(--gradient-primary);
    color: white; 
    padding: 25px 30px; 
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 74, 153, 0.15);
    border-radius: 0 0 var(--radius) var(--radius);
    margin-bottom: 30px;
}

.breadcrumb {
    background-color: white;
    padding: 15px 30px;
    font-size: 0.95em; /* 略微增大 */
    border-bottom: 2px solid var(--soft-border);
    border-radius: var(--radius);
    margin: 20px auto;
    max-width: 1280px;
    box-shadow: var(--shadow-elevation);
}

/* ========== 主标题区域 ========== */
.tag-hero-section {
    padding: 50px 0;
  
    text-align: center;
    position: relative;
}

.tag-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.tag-title {
    font-size: 30px; 
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.tag-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.tag-hero-section .hero-section-p {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
    color: var(--text-light);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

/* ========== 介绍内容区域 ========== */
.editor-content-1 {
    font-size: 16px;
    color: var(--text-color);
    padding: 30px;
    background: white;
    border-radius: var(--radius);
    line-height: 1.8;
    border-left: 5px solid var(--secondary-color);
    box-shadow: var(--shadow-elevation);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.editor-content-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.editor-content-1 strong {
    color: var(--primary-color);
    font-weight: 700;
}

/* ========== 产品预览区域 ========== */
.product-preview-section {
    padding: 60px 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-elevation);
    margin-bottom: 50px;
}

.product-preview-section h2 {
    font-size: 2.5em;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 20px;
}

.product-preview-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.product-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.preview-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-elevation);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1px solid var(--soft-border);
    position: relative;
}

.preview-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-card:hover::before {
    opacity: 1;
}

.preview-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.preview-card:hover img {
    transform: scale(1.05);
}

.preview-card h3 {
    font-size: 1.3em;
    color: var(--primary-color);
    margin: 20px 20px 10px;
    font-weight: 700;
}

.preview-card p {
    color: var(--text-light);
    margin: 0 20px 20px;
    font-size: 0.95em;
    line-height: 1.6;
}

.preview-card a {
    display: inline-block;
    margin: 20px;
    padding: 12px 30px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.preview-card a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.3);
    text-decoration: none;
}

/* ========== 主要内容网格布局 ========== */
.content-matrix {
    display: grid;
    gap: 40px;
    grid-template-columns: 2fr 1fr;
    margin-bottom: 50px;
    padding-top:100px;
}

/* ========== 通用编辑器模块样式 ========== */
.editor-module {
    background: white;
    padding: 35px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow-elevation);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--soft-border);
    position: relative;
    overflow: hidden;
}

.editor-module:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.editor-module::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.editor-module h2 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--soft-border);
    font-weight: 700;
    position: relative;
}

.editor-module h3, .editor-module h4 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
    font-size: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.editor-module h3::after, .editor-module h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.editor-module p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 1.2em;
    color: var(--text-color);
}

.editor-module ul {
    list-style: none;
    padding-left: 0;
}

.editor-module li {
    padding: 12px 0;
    border-bottom: 1px solid var(--soft-border);
    position: relative;
    padding-left: 35px;
    line-height: 1.8;
    transition: all 0.3s ease;
    font-size: 1em; /* 统一列表字体大小 */
}

.editor-module li:hover {
    background: #f8fafc;
    padding-left: 40px;
}

.editor-module li::before {
    content: '✓';
    color: var(--secondary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.editor-module li:hover::before {
    transform: scale(1.2);
}

/* ========== Specification 表格 - 彻底重构对齐版 ========== */
.info-column1 {
    background: white;
    border-radius: var(--radius);
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-elevation);
    position: relative;
    overflow: hidden;
}
.info-column1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

/* 表格标题 - 确保字体足够大 */
.info-column1 h3,
.info-column1 h4 {
    color: var(--primary-color);
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 1.2em;
    padding-bottom: 0.5em;

    font-weight: 700;
    text-align: center;
}

/* 表格容器 - 核心修复开始 */
.info-column1 table {
    width: 100%;
    border-collapse: collapse; /* 合并边框，对齐的基础 */
    margin: 1.5em 0 0 0;
    font-size: 1em; /* 基准17px */
    table-layout: fixed; /* 固定列宽，防止变形 */
    min-width: 100%; /* 确保宽度 */
}

/* 表头行 - 确保列对齐 */
.info-column1 table thead tr {
    background: var(--gradient-primary);
}
.info-column1 table thead th {
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 16px 20px; /* 固定且充足的padding */
    font-size: 0.95em; /* 约16.15px > 16px */
    vertical-align: middle; /* 垂直居中对齐 */
    border: none;
    text-align: left; /* 统一左对齐 */
    line-height: 1.5;
}

/* 定义明确的列宽 - 解决变形核心 */
.info-column1 table thead th:nth-child(1),
.info-column1 table tbody td:nth-child(1) {
    width: 35%; /* Feature列宽 */
}
.info-column1 table thead th:nth-child(2),
.info-column1 table tbody td:nth-child(2) {
    width: 65%; /* Details列宽 */
}

/* 表格内容行样式 - 确保行对齐 */
.info-column1 table tbody tr {
    border-bottom: 1px solid var(--soft-border);
    transition: background-color 0.2s ease;
}
.info-column1 table tbody td {
    padding: 16px 20px; /* 与表头一致的padding */
    font-size: 1em; /* 基准17px */
    vertical-align: top; /* 内容顶部对齐 */
    text-align: left; /* 内容左对齐 */
    line-height: 1.6;
    word-wrap: break-word; /* 长单词换行 */
    overflow-wrap: break-word;
}

/* 隔行变色 */
.info-column1 table tbody tr:nth-child(even) {
    background-color: #f9fafc;
}
.info-column1 table tbody tr:hover {
    background-color: #f0f7ff;
}

/* 突出第一列（参数名） */
.info-column1 table tbody td:first-child {
    font-weight: 600;
    color: var(--primary-color);
    background-color: rgba(0, 74, 153, 0.03);
    border-right: 2px solid var(--soft-border);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .info-column1 table thead th,
    .info-column1 table tbody td {
        padding: 14px 16px;
    }
    .content-matrix{
        display:inline!important;
    }
}

@media (max-width: 768px) {
    .info-column1 {
        padding: 25px 15px;
        overflow-x: auto; /* 小屏幕允许横向滚动 */
    }
    .info-column1 table {
        font-size: 1em; /* 保持17px */
        min-width: 500px; /* 最小宽度，保证不挤压 */
    }
    .info-column1 table thead th,
    .info-column1 table tbody td {
        padding: 12px 14px;
        font-size: 1em; /* 确保不小于16px */
    }
    /* 移动端调整列宽比例 */
    .info-column1 table thead th:nth-child(1),
    .info-column1 table tbody td:nth-child(1) {
        width: 40%;
    }
    .info-column1 table thead th:nth-child(2),
    .info-column1 table tbody td:nth-child(2) {
        width: 60%;
    }
}

@media (max-width: 480px) {
    .info-column1 table thead th,
    .info-column1 table tbody td {
        padding: 10px 12px;
    }
    body {
        font-size: 16px; /* 超小屏幕基准16px */
    }
}

/* ========== 第二个编辑器模块 (通常是Advantages等) ========== */
.editor-module1 {
    margin: 40px 0;
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-elevation);
}

.editor-module1 h3, .editor-module1 h4 {
    text-align: center;
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 30px;
    padding-top: 20px;
    font-weight: 800;
    position: relative;
}

/* ========== 模块化优点卡片 (jinfeng-ul-1) ========== */
.jinfeng-ul-1 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* 增加最小宽度 */
    gap: 30px; /* 增加间距 */
    list-style: none;
    padding: 0;
    margin: 2em 0;
}
.jinfeng-ul-1 li {
    background: white;
    border: 1px solid var(--soft-border);
    border-radius: var(--radius);
    padding: 25px;
    text-align: left; /* 改为左对齐 */
    box-shadow: var(--shadow-elevation);
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start; /* 图标与文字顶部对齐 */
    min-height: auto;
}
.jinfeng-ul-1 li:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}
.jinfeng-ul-1 li::before {
    content: '★'; /* 使用星形图标，可改为 '✓'、'●' */
    font-size: 1.8em;
    margin-right: 15px;
    color: var(--secondary-color);
    background: none; /* 移除背景圆 */
    width: auto;
    height: auto;
    border-radius: 0;
    flex-shrink: 0; /* 防止图标被挤压 */
    margin-top: 0.1em; /* 微调对齐 */
}
.jinfeng-ul-1 li span {
    font-size: 1.05em; /* 调大字体 */
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.6;
}

/* ========== 服务模块 ========== */
.editor-module-service {
    background: white;
    border-radius: var(--radius);
    padding: 35px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-elevation);
    position: relative;
    overflow: hidden;
}
.editor-module-service::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}
.editor-module-service h3 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--secondary-color);
    font-weight: 700;
    text-align: left;
}

/* ========== FAQ模块 ========== */
.editor-module-faq {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-elevation);
    margin: 40px auto;
    max-width: 900px;
    border: 1px solid var(--soft-border);
}

.editor-module-faq h4 {
    text-align: center;
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 800;
    position: relative;
    padding-bottom: 20px;
}

.editor-module-faq h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.editor-module-faq ul {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 14px;
    line-height: 30px;
}

.editor-module-faq li {
    padding: 20px;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--soft-border);
    background: white;
}

/* FAQ问题行 */
.editor-module-faq li:first-child {
    background: #f8fafc;
    color: var(--primary-color);
    font-weight: 600;
    padding: 1.2em 3em 1.2em 1.5em; /* 增加右侧空间给箭头 */
    position: relative;
    cursor: pointer;
    border: 1px solid var(--soft-border);
    border-radius: 8px; /* 单独圆角 */
    margin-bottom: 0;
}
.editor-module-faq li:first-child::after {
    content: '▼';
    position: absolute;
    right: 1.5em;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9em;
    color: var(--secondary-color);
    transition: transform 0.3s ease;
}
.editor-module-faq li:first-child.expanded::after {
    transform: translateY(-50%) rotate(180deg);
}

/* FAQ答案行 */
.editor-module-faq li:last-child {
    padding: 1.5em;
    border: 1px solid var(--soft-border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background: white;
    margin-top: 0;
}

/* ========== 更多信息区域 ========== */
.more-info {
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--soft-border);
    box-shadow: var(--shadow-elevation);
    padding: 35px;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}

.more-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.more-info h2 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 700;
}

.more-info p {
    color: var(--text-light);
    font-size: 1em; /* 统一调整 */
    margin-bottom: 25px;
    line-height: 1.7;
}

.more-info ul {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0;
    margin: 0;
}

.more-info li {
    margin: 0;
    padding: 0;
}

.more-info a {
    display: inline-flex;
    align-items: center;
    padding: 10px 22px;

    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 74, 153, 0.15);
}

.more-info a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 74, 153, 0.25);
    background: white;
    color: var(--primary-color);
    border-color: var(--secondary-color);
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .tag-title {
        font-size: 2.8em;
    }
    
    .content-matrix {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-preview-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .info-column1 table tr:first-child th,
    .info-column1 table tr:first-child td {
        padding: 1em 1em !important;
    }
    .info-column1 table tr:not(:first-child) td {
        padding: 1em 1em;
    }
}

@media (max-width: 768px) {
    .tag-page-container {
        padding: 15px 20px 50px 20px;
    }
    
    .tag-title {
        font-size: 2.2em;
    }
    
    header, .breadcrumb {
        padding: 20px;
        margin: 10px;
    }
    
    .editor-module,
    .editor-module1,
    .editor-module-service,
    .editor-module-faq,
    .more-info {
        padding: 25px;
    }
    
    .jinfeng-ul-1 {
        grid-template-columns: 1fr; /* 单列布局 */
        gap: 20px;
    }
    
    .more-info ul {
        justify-content: center;
    }
    
    .preview-card a {
        padding: 10px 25px;
    }
    
    /* 移动端表格优化 */
    .info-column1 {
        padding: 20px 15px;
        overflow-x: auto; /* 允许横向滚动 */
    }
    .info-column1 table {
        font-size: 0.95em;
        min-width: 550px; /* 保证表格最小宽度，触发滚动 */
    }
    .info-column1 table tr:first-child th:first-child,
    .info-column1 table tr:first-child td:first-child,
    .info-column1 table tr:not(:first-child) td:first-child {
        width: 40%; /* 移动端微调列宽 */
    }
    .info-column1 table tr:first-child th:last-child,
    .info-column1 table tr:first-child td:last-child,
    .info-column1 table tr:not(:first-child) td:last-child {
        width: 60%;
    }
}

@media (max-width: 480px) {
    .tag-title {
        font-size: 18px;
    }
    
    .tag-hero-section {
        padding: 30px 0;
    }
    
    .editor-content-1 {
        padding: 20px;
    }
    
    .product-preview-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .more-info ul {
        flex-direction: column;
        align-items: stretch; /* 拉伸对齐 */
    }
    
    .more-info a {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    
    body {
        font-size: 16px; /* 超小屏幕略微调小基准字体 */
        line-height: 1.7;
    }
}

/* ========== 动画效果 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.editor-module,
.preview-card,
.editor-module-faq,
.more-info {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--primary-color), #003366);
}

/* ========== 按钮通用样式 ========== */
.btn-primary {
    display: inline-block;
    padding: 14px 32px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 74, 153, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 74, 153, 0.3);
    color: white;
    text-decoration: none;
}


