:root {
    --primary: #0056b3;
    --text-main: #333;
    --text-gray: #666;
    --bg-light: #f9f9f9;
    --border: #eee;
    --red-btn: #dc3545;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans SC', sans-serif; color: var(--text-main); font-size: 14px; line-height: 1.6; background: #fff; }
a { text-decoration: none; color: inherit; transition: 0.2s; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* --- Navbar (统一标准版) --- */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.98); /* 微透明背景 */
    border-bottom: 1px solid #eee;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03); /* 增加轻微阴影提升层次感 */
}

.nav-container {
    height: 100%;
    display: flex;
    justify-content: space-between; /* 两端对齐 */
    align-items: center; /* 垂直居中 */
}

.logo {
    font-size: 22px; /* 统一字体大小 */
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    flex-shrink: 0; /* 防止Logo被压缩 */
    margin-right: 40px;
}

.nav-links {
    display: flex;
    gap: 30px; /* 菜单项间距 */
    flex: 1; /* 占据剩余空间 */
    justify-content: flex-start; /* 菜单靠左排列 */
}

.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: #555;
    position: relative;
    padding: 5px 0;
}

.nav-links a:hover {
    color: var(--primary);
}

/* 简单的下划线动效 */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0; height: 2px;
    bottom: 0; left: 0;
    background: var(--primary);
    transition: width 0.3s;
}
.nav-links a:hover::after {
    width: 100%;
}

/* 导航栏右侧按钮 */
#nav-cta {
    flex-shrink: 0;
    padding: 8px 20px;
    font-size: 14px;
    border-radius: 4px;
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
    transition: all 0.3s;
}

#nav-cta:hover {
    background: #fff;
    color: var(--primary);
}

/* 移动端适配：隐藏菜单 */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .logo { font-size: 18px; }
}

/* --- Navbar ---
.navbar { height: 70px; border-bottom: 1px solid #ddd; display: flex; align-items: center; background: #fff; }
.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo { font-size: 24px; font-weight: bold; color: var(--primary); }
.nav-links { display: flex; gap: 30px; }
.nav-links a:hover { color: var(--primary); } */

/* --- Footer (通用) --- */
.footer { background: #f9f9f9; padding: 50px 0 20px; border-top: 1px solid #eee; margin-top: 60px; font-size: 13px; color: #666; }
.footer-grid { display: grid; grid-template-columns: 2fr 1.5fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-col h3 { font-size: 15px; color: #333; font-weight: bold; margin-bottom: 15px; }
.footer-qr { display: flex; justify-content: flex-end; }
.qr-box { text-align: center; }
.qr-box img { width: 100px; height: 100px; border: 1px solid #ddd; padding: 3px; background: #fff; margin-bottom: 5px; }
.footer-bottom { border-top: 1px solid #eee; padding-top: 15px; text-align: center; color: #999; }

/* --- Index Page Styles --- */
.hero { height: 450px; display: flex; align-items: center; justify-content: center; color: #fff; background-size: cover; background-position: center; position: relative; margin-bottom: 60px; }
.hero::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.4); }
.hero-content { position: relative; z-index: 1; text-align: center; }
.hero-content h1 { font-size: 42px; margin-bottom: 20px; }
.hero-buttons { display: flex; gap: 15px; justify-content: center; }
.btn { padding: 10px 30px; border-radius: 4px; border: 1px solid #fff; color: #fff; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: #fff; color: #333; }

.section { margin-bottom: 80px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 28px; font-weight: normal; }
.bg-light { background: var(--bg-light); padding: 60px 0; }

/* 产品网格 (修复首页) */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; }
.product-card { background: #fff; border: 1px solid #eee; border-radius: 6px; overflow: hidden; transition: 0.3s; }
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); border-color: var(--primary); }
.card-img-wrapper { height: 200px; overflow: hidden; background: #f4f4f4; }
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.product-card:hover img { transform: scale(1.05); }
.card-info { padding: 15px; }
.card-cat { font-size: 12px; background: #f0f0f0; color: #999; padding: 2px 6px; border-radius: 4px; }
.card-info h3 { font-size: 16px; margin: 10px 0; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-footer { display: flex; justify-content: space-between; border-top: 1px solid #f9f9f9; padding-top: 10px; color: var(--primary); font-weight: bold; }
.card-btn { font-size: 12px; color: #999; font-weight: normal; }

.filter-container { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; }
.filter-btn { border: 1px solid #ddd; background: #fff; padding: 6px 20px; cursor: pointer; color: #666; }
.filter-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.grid-services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; text-align: center; }
.service-item { background: #fff; padding: 30px; border: 1px solid #eee; }
.service-icon { font-size: 32px; margin-bottom: 15px; }
.grid-about { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-img-wrapper img { border-radius: 8px; }

/* --- Detail Page Styles --- */
/* .slim-banner { height: 120px; background: #333; color: #fff; display: flex; align-items: center; margin-bottom: 20px; } */
/* --- Detail Page Styles --- */

.slim-banner {
    /* 核心修复：增加顶部间距，高度等于导航栏高度(70px) */
    margin-top: 70px; 
    
    height: 120px;
    /* 这里设置 Banner 的背景图，可以用深色背景或者图片 */
    background: #333 url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072&auto=format&fit=crop') center/cover no-repeat;
    display: flex;
    align-items: center;
    color: #fff;
    margin-bottom: 20px;
    position: relative; /* 建议加上 */
}

/* 如果觉得文字看不清，可以加个遮罩层 (可选) */
.slim-banner::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); /* 半透明黑 */
}

/* 确保文字在遮罩层之上 */
.slim-banner .container {
    position: relative;
    z-index: 2;
}

.slim-banner h2 {
    font-weight: 400;
    font-size: 24px;
    letter-spacing: 1px;
}
.breadcrumb { text-align: right; padding: 15px 0; border-bottom: 1px solid #f0f0f0; margin-bottom: 40px; color: #999; font-size: 13px; }

.product-showcase { display: flex; gap: 50px; margin-bottom: 60px; }
.p-gallery { width: 50%; }
.main-img-box { border: 1px solid #eee; height: 400px; display: flex; align-items: center; justify-content: center; margin-bottom: 10px; padding: 10px; }
.main-img-box img { max-height: 100%; object-fit: contain; }
.thumbs-list { display: flex; gap: 10px; }
.thumb-item { width: 60px; height: 60px; border: 1px solid #ddd; padding: 2px; cursor: pointer; opacity: 0.6; }
.thumb-item.active { border-color: var(--primary); opacity: 1; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }

.p-info { width: 50%; }
.p-info h1 { font-size: 26px; font-weight: normal; margin-bottom: 15px; }
.info-divider { height: 1px; background: #eee; margin: 15px 0; }
.param-list .param-item { display: flex; padding: 10px 0; border-bottom: 1px dashed #ddd; font-size: 14px; }
.param-item dt { width: 80px; color: #666; }
.btn-consult { display: inline-block; background: var(--red-btn); color: #fff; padding: 10px 35px; margin-top: 20px; border-radius: 3px; }

.detail-block { margin-bottom: 40px; }
.block-header { border-bottom: 2px solid var(--primary); margin-bottom: 20px; }
.block-header h3 { display: inline-block; background: var(--primary); color: #fff; padding: 8px 20px; font-size: 16px; font-weight: normal; }
.next-post { margin-bottom: 50px; color: #666; }
.next-post a:hover { color: var(--primary); text-decoration: underline; }

.comment-form textarea { width: 100%; padding: 10px; border: 1px solid #ddd; margin-bottom: 15px; }
.form-row { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.input-verify { border: 1px solid #ddd; padding: 8px; width: 150px; }
.btn-submit { background: #f5f5f5; border: 1px solid #ddd; padding: 8px 25px; cursor: pointer; }

/* Fixed Sidebar */
.fixed-sidebar { position: fixed; right: 0; top: 50%; transform: translateY(-50%); width: 60px; background: var(--primary); z-index: 100; }
.sidebar-item { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 60px; color: #fff; border-bottom: 1px solid rgba(255,255,255,0.2); font-size: 12px; cursor: pointer; }
.sidebar-item:hover { background: #004494; }
.sidebar-icon { font-size: 20px; margin-bottom: 2px; }

@media (max-width: 768px) {
    .nav-links, .fixed-sidebar { display: none; }
    .product-grid, .grid-services, .grid-about, .product-showcase, .footer-grid { grid-template-columns: 1fr; }
    .product-showcase { flex-direction: column; }
    .p-gallery, .p-info { width: 100%; }
}

/* --- 联系方式弹窗样式 --- */
.contact-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6); /* 半透明遮罩 */
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none; /* 默认不可点击 */
    transition: opacity 0.3s ease;
}

.contact-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.contact-box {
    background: #fff;
    width: 320px;
    padding: 30px 25px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    position: relative;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.contact-modal.active .contact-box {
    transform: translateY(0);
}

.contact-box h3 {
    margin-bottom: 25px;
    color: var(--primary);
    font-size: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.close-btn {
    position: absolute;
    top: 10px; right: 15px;
    background: none; border: none;
    font-size: 24px; color: #999;
    cursor: pointer;
}
.close-btn:hover { color: #333; }

.contact-item {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 15px;
    font-size: 15px;
    color: #333;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
}

.contact-item .label {
    font-weight: bold;
    margin-right: 5px;
    min-width: 60px;
    text-align: right;
}

.contact-item .value {
    word-break: break-all;
    color: #555;
    font-weight: 500;
}

.confirm-btn {
    margin-top: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 30px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}
.confirm-btn:hover { background: #004494; }

/* --- 产品详情页翻页导航 --- */
.product-navigation {
    display: flex;
    justify-content: space-between; /* 左右分布 */
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-bottom: 50px;
    font-size: 14px;
    color: #666;
}

.nav-item a {
    color: #333;
    transition: color 0.2s;
}

.nav-item a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* 移动端适配：变为上下排列 */
@media (max-width: 768px) {
    .product-navigation {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}