/* --- 1. 全局滚动条美化 --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* 隐藏侧边栏的滚动条 */
.sidebar::-webkit-scrollbar { width: 0; display: none; }

/* --- 2. 基础布局 --- */
body {
    margin: 0;
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
    background-color: #F7F7FB;
    /* 禁止 body 滚动，防止双滚动条 */
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}


.product-page {
    display: flex;
    flex-direction: column; /* 垂直排列：内容区在上，Footer在下 */

    /* 占满剩余高度 */
    height: calc(100vh - 80px);

    /* 开启滚动：这是全页唯一的滚动容器 */
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

/* 内容包装器：包含 Sidebar 和 MainContent */
.page-wrapper {
    display: flex;
    flex: 1 0 auto; /* 允许放大，不允许缩小 */
    min-height: 100%; /* 关键：至少占满一屏，把Footer挤下去 */
    position: relative;
}

/* --- 左侧侧边栏 --- */
.sidebar {
    width: 380px;
    background-color: #FAFAFA;
    border-right: 1px solid #e0e0e0;
    padding: 0;
    flex-shrink: 0;

    /* Sticky: 相对于 .page-wrapper 定位 */
    position: sticky;
    top: 0;

    /* 高度限制在视口内，允许内部独立滚动 */
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.category { margin-bottom: 20px; margin-top: 20px}
.category-title {
    padding: 20px 30px; background: #f8f9fa; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 600; font-size: 18px; color: #333; transition: all 0.3s;width: 100%;
}
.category-title:hover { background-color: #f0f0f0; color: #007AFF; }
.category.active .category-title { background-color: #18278C; color: white; box-shadow: 0 4px 10px rgba(0,122,255,0.3); }

.arrow { font-size: 22px; font-weight: 400; line-height: 1; width: 20px; text-align: center; display: inline-block; }
.arrow::after { content: "+"; }
.category.active .arrow::after { content: "-"; }

.category-content { max-height: 0; overflow: hidden; margin-top: 5px; padding-left: 15px; transition: max-height 0.4s ease; }
.category.active .category-content { max-height: 1000px; }

.sub-item {
    padding: 12px 20px; color: #666; font-size: 15px; cursor: pointer; transition: 0.2s;
    border-left: 3px solid transparent; margin-top: 5px;
}
.sub-item:hover { color: #007AFF; border-left-color: #007AFF; padding-left: 30px; background: #f0f7ff; border-radius: 0 8px 8px 0;}

/* --- 右侧主内容区 --- */
.main-content {
    flex: 1; /* 占满剩余宽度 */
    background-color: #fff;
    overflow: visible; /* 随页面滚动 */
    position: relative;
    padding-bottom: 60px;
}

/* --- 4. 内容样式 --- */
/* --- 1. 首页: 生产线大板块 (布局优化) --- */
.line-section {
    min-height: auto;
    /* 增加整体板块高度呼吸感 */
    padding: 100px 60px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: stretch; /* 拉伸高度，方便做底部对齐 */
    gap: 80px;
}

.line-section:nth-child(even) {
    flex-direction: row-reverse;
    background-color: #fafafa;
}

.line-text {
    flex: 1;
    display: flex;
    flex-direction: column;

    /* 修改点 1：文字整体往下移，不再顶着上边框 */
    padding-top: 60px;
}

.line-text h2 {
    font-size: 40px;
    color: #333;
    /* 修改点 2：标题和简介之间的间距加大 */
    margin-bottom: 50px;
    font-weight: 300;
}

.line-text .desc {
    font-size: 18px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 0; /* 下方间距由 Tags 的 margin-top 控制 */
}

/* 修改点 3：核心设备标签样式微调 */
.equipment-label {
    font-size: 14px;
    color: #999;
    margin-bottom: 10px;
    display: block;
}

.equipment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    /* 修改点 3：让标签紧跟简介下方，与底部按钮区分开 */
    margin-top: 40px;
    margin-bottom: 20px;
}

.equip-tag {
    background: #eef6ff;
    color: #007AFF;
    padding: 8px 20px;
    border-radius: 50px; /* 胶囊圆角 */
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.equip-tag:hover { background: #007AFF; color: white; }

/* 底部包裹层 (优点 + 按钮) */
.line-bottom-wrapper {
    /* 关键：将这部分内容推到底部 */
    margin-top: auto;
    /* 修改点 4：稍微往上提一点，不要死死贴着底边 */
    padding-bottom: 10px;
}

/* --- 优点栏样式 (放大) --- */
.line-features {
    display: flex;
    gap: 20px;
    margin-bottom: 35px; /* 距离按钮的距离 */
    padding-top: 30px;
    border-top: 1px solid #eee; /* 分割线 */
}

.feature-item {
    font-size: 15px;
    font-weight: 500;
    color: #444;
    background-color: #fff;
    padding: 10px 16px; /* 卡片变大 */
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.feature-item i { color: #007AFF; font-size: 16px; }

/* 右侧大图 */
.line-img {
    flex: 1.2;
    height: auto;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    /* 图片垂直居中 */
    align-self: center;
}

.line-img img { width: 100%; height: auto; object-fit: cover; transition: transform 0.5s; display: block; }
.line-section:hover .line-img img { transform: scale(1.05); }

/* Grid View */
.clean-grid-container { padding: 60px 80px; background-color: #FFFFFF; min-height: 100%; }

.clean-grid {
    display: grid;
    /* 默认大屏3列 */
    grid-template-columns: repeat(3, 1fr);
    gap: 180px 10px; /* 行距60，列距50 */
    margin-top: 60px;
}

.clean-card {
    background: transparent;
    padding: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-radius: 16px;
}
.clean-card:hover {
    transform: translateY(-16px);
    background: #fff;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

.clean-card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    background: transparent !important;   /* 强制去掉白底 */
    padding: 0 !important;                /* 去掉所有内边距 */
    display: flex;
    align-items: center;
    justify-content: center;

    /* 关键：最大物理尺寸限制（防放大糊） */
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}
/* 图片本身：contain + 最大尺寸保护 */
.clean-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.7s ease;
}

/*介绍文字*/
.product-desc {
    margin-top: 20px;
    font-size: 17px;              /* 比 lead 小 */
    font-family: "Helvetica Neue", Arial, sans-serif;
    color: #000 !important;       /* 强制黑色 */
}
.product-desc-top{
    font-size: 20px;
    margin-top: 40px;
}
.clean-card:hover .clean-card-img { border-color: #fff; }

.clean-card-title { font-size: 15px; font-weight: 500; color: #555; text-align: center; transition: color 0.3s; margin-top: 5px; }
.clean-card:hover .clean-card-title { color: #007AFF; font-weight: 600; }
/* Detail View */
.detail-view { padding: 80px; display: flex; gap: 80px; min-height: 80vh; animation: fadeIn 0.5s; align-items: flex-start; background: #fff; }
.detail-text { flex: 1; padding-top: 40px; }
.detail-img-box {position: sticky; top: 400px;flex: 1.2; height: auto; box-shadow: none; border: none; background: transparent; border-radius: 20px; overflow: hidden; display: flex; justify-content: center; align-items: center; margin-top: 20px; }
.detail-img-box img { width: 100%; height: auto; max-width: 850px; display: block; }

/*技术规格*/
.Specifications{
    margin-top: 150px;
}
.specs-table { margin-top: 30px; width: 100%; border-collapse: collapse; font-size: 14px; color: #555; }
.specs-table th, .specs-table td { padding: 12px 15px; border-bottom: 1px solid #eee; text-align: left; }
.specs-table th { font-weight: 600; background-color: #f9f9f9; width: 35%; color: #333; }
.specs-table tr:last-child td, .specs-table tr:last-child th { border-bottom: none; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1920px) {
    .sidebar { width: 300px; }
}

/* --- 6. 响应式 --- */
@media (max-width: 1200px) {
    .line-section { flex-direction: column !important; padding: 60px 40px; }
    .line-img { width: 100%; }
    .sidebar { width: 300px; }
    .clean-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; padding: 0; }
    .clean-grid-container { padding: 40px; }
    .Specifications{
        margin-top: 50px;
    }
    .line-section { flex-direction: column !important; padding: 60px 40px; align-items: center; }
    .line-text { width: 100%; padding-top: 0; }
    .line-bottom-wrapper { margin-top: 40px; width: 100%; }
    .line-img { width: 100%; }
    .line-text .desc{font-size: 14px}

}

@media (max-width: 992px) {
    body { overflow-y: auto; height: auto; display: block; }
    .product-page { display: block; height: auto; overflow: visible; }
    .page-wrapper { display: block; min-height: auto; }
    .sidebar { display: none; }
    .line-section { padding: 40px 20px; flex-direction: column-reverse !important; }
    .line-text h2 { font-size: 28px; margin-top: 20px;}
    .line-img { width: 100%; }

    .clean-grid-container { padding: 30px 20px; }
    .clean-grid { grid-template-columns: 1fr; gap: 30px; }

    .detail-view { flex-direction: column-reverse; padding: 30px 20px; gap: 30px; }
    .detail-img-box { width: 100%; margin-top: 0; position: sticky;top: 0px }
    .detail-img-box img { max-width: 100%; }
    .detail-text { padding-top: 0; }
    .detail-text h1 { font-size: 28px; }
    .Specifications{
        margin-top: 1px;
    }
    .line-features {
        flex-wrap: wrap;       /* 允许换行！这是关键 */
        gap: 10px;             /* 手机上间隙小一点 */
        padding-top: 20px;
    }
    .equipment-tags {
        display: flex;
        flex-wrap: wrap;       /* 设备标签也允许换行 */
        gap: 8px;
    }
    .feature-item {
        font-size: 13px;       /* 字体稍小 */
        padding: 6px 12px;     /* 内边距缩小 */
        flex: 0 0 auto;        /* 防止被压缩 */
        white-space: normal;   /* 如果文字太长，允许卡片内部换行 */
    }
    .line-section {
        flex-direction: column; /* 改为垂直排列 */
        padding: 40px 20px;     /* 减小内边距 */
        height: auto;           /* 高度自适应 */
    }
    .line-text {
        width: 100%;
        padding-right: 0;
        margin-bottom: 0; /* 文字在最下面，不需要下边距 */
    }

    .line-img {
        width: 100%;
        height: auto;
        /* 图片在上面，给它加个下边距，把文字顶下去 */
        margin-bottom: 30px;

        border-radius: 12px;
        overflow: hidden;
        flex: none;
    }

    /* 3. 修复 Grid View (一行3列 -> 一行1列) */
    .clean-grid-container {
        padding: 30px 20px;    /* 减小容器内边距 */
    }

    .clean-grid {
        grid-template-columns: 1fr; /* 强制单列 */
        gap: 40px;                  /* 减小行距 */
        margin-top: 30px;
    }

    .clean-card {
        box-shadow: 0 5px 15px rgba(0,0,0,0.05); /* 手机端默认给点阴影，因为没有hover */
    }

    /* 4. 修复 Detail View (详情页左右 -> 上下) */
    .detail-view {
        flex-direction: column-reverse; /* 图片在上，文字在下，或者 column */
        padding: 30px 20px;
        gap: 30px;
    }

    .detail-text {
        width: 100%;
        padding-top: 0;
    }

    .detail-img-box {
        position: relative; /* 手机端取消 sticky 吸顶，防止占满屏幕 */
        top: 0;
        width: 100%;
        margin-bottom: 20px;
    }

    /* 5. 表格适配 (如果表格太宽，允许横向滚动) */
    .specs-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
