/* =========================================
   1. 全局基础设置 (Global Reset & Base)
   ========================================= */
:root {
    --primary-color: #0056b3;    /* 工业蓝：主色调 */
    --primary-dark: #004494;     /* 深蓝：悬停状态 */
    --accent-color: #ff9900;     /* 活力橙：按钮/高亮 */
    --accent-dark: #e68a00;      /* 深橙：按钮悬停 */
    --text-color: #333333;       /* 正文颜色 */
    --text-light: #666666;       /* 次要文字 */
    --bg-light: #f8f9fa;         /* 浅灰背景 */
    --border-color: #e9ecef;     /* 边框颜色 */
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* 通用阴影 */
    --transition: all 0.3s ease; /* 通用过渡 */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================================
   2. 头部导航 (Header & Navigation)
   ========================================= */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 1px;
}
.logo span { color: var(--text-color); }

nav ul {
    display: flex;
    gap: 35px;
}

nav a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-light);
    position: relative;
    padding-bottom: 5px;
}

nav a:hover, nav a.active {
    color: var(--primary-color);
}

nav a.active::after, nav a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

/* =========================================
   3. 首屏 Banner (Hero Section)
   ========================================= */
.hero {
    background: linear-gradient(135deg, rgba(0, 86, 179, 0.9), rgba(0, 68, 148, 0.9)), 
                url('banner-bg.jpg') center/cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 100px 0;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 18px;
    margin-bottom: 35px;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background: var(--accent-color);
    color: #fff;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 153, 0, 0.4);
}

/* =========================================
   4. 核心优势 (Advantages)
   ========================================= */
.advantages {
    padding: 80px 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: var(--text-color);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 15px auto 0;
}

.adv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.adv-item {
    background: #fff;
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.adv-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.adv-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 20px;
}

/* =========================================
   5. 产品中心 (Products)
   ========================================= */
.products { padding: 80px 0; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.product-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: var(--transition);
}

.product-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.product-img {
    height: 220px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    overflow: hidden;
}

.product-info { padding: 25px; }

.product-info h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.product-info p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.5;
}

.tag {
    display: inline-block;
    background: #eef7ff;
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-weight: 500;
}

/* 产品详情页参数表格样式 */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

.spec-table th, .spec-table td {
    border: 1px solid var(--border-color);
    padding: 12px 15px;
    text-align: left;
}

.spec-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--primary-color);
    width: 30%;
}

/* =========================================
   6. 联系我们 (Contact)
   ========================================= */
.contact {
    background: var(--primary-color);
    color: #fff;
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-info h3 {
    font-size: 30px;
    margin-bottom: 25px;
}

.contact-info p {
    margin-bottom: 12px;
    opacity: 0.9;
    font-size: 16px;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
}

.contact-form button {
    width: 100%;
    padding: 15px;
    background: var(--accent-color);
    border: none;
    color: #fff;
    font-size: 18px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.contact-form button:hover {
    background: var(--accent-dark);
}

/* =========================================
   7. 底部版权 (Footer)
   ========================================= */
footer {
    background: #1a1a1a;
    color: #aaa;
    text-align: center;
    padding: 25px 0;
    font-size: 14px;
}

/* =========================================
   8. 响应式适配 (Responsive Design)
   ========================================= */
@media (max-width: 992px) {
    .hero h1 { font-size: 32px; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .nav-wrap { height: 60px; }
    .logo { font-size: 20px; }
    
    /* 移动端菜单简化处理 */
    nav ul { 
        gap: 15px; 
        font-size: 14px; 
    }
    
    .hero { padding: 60px 0; }
    .hero h1 { font-size: 26px; }
    .hero p { font-size: 15px; }
    
    .section-title { font-size: 26px; }
    .product-grid { grid-template-columns: 1fr; }
}

/* === 头部补充样式 === */
.site-header { background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 1000; }
.nav-wrap { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { font-size: 24px; font-weight: 800; color: var(--primary-color); }
.logo span { color: var(--text-color); }

/* 下拉菜单 */
.has-dropdown { position: relative; }
.dropdown { position: absolute; top: 100%; left: 0; background: #fff; min-width: 200px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); opacity: 0; visibility: hidden; transition: 0.3s; padding: 10px 0; border-radius: 4px; }
.has-dropdown:hover .dropdown { opacity: 1; visibility: visible; }
.dropdown li a { display: block; padding: 8px 20px; font-size: 14px; color: var(--text-light); }
.dropdown li a:hover { background: var(--bg-light); color: var(--primary-color); }

/* 移动端按钮 */
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 5px; }
.mobile-menu-btn span { display: block; width: 25px; height: 2px; background: var(--text-color); margin: 5px 0; transition: 0.3s; }

/* === 底部补充样式 === */
.site-footer { background: #1a1a1a; color: #aaa; padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid #333; }
.footer-logo { font-size: 22px; font-weight: bold; color: #fff; margin-bottom: 15px; }
.footer-col h4 { color: #fff; margin-bottom: 20px; font-size: 16px; }
.footer-col ul li { margin-bottom: 10px; font-size: 14px; }
.footer-col a:hover { color: var(--accent-color); }
.copyright { padding: 20px 0; text-align: center; font-size: 13px; color: #666; }

/* 响应式：移动端菜单 */
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .main-nav { position: fixed; top: 80px; left: 0; width: 100%; background: #fff; box-shadow: 0 5px 10px rgba(0,0,0,0.1); max-height: 0; overflow: hidden; transition: 0.3s; }
    .main-nav.active { max-height: 500px; }
    .main-nav ul { flex-direction: column; padding: 15px; }
    .dropdown { position: static; opacity: 1; visibility: visible; box-shadow: none; padding-left: 15px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

/* 让下拉菜单里的 li 横向排列 */
.dropdown li {
    display: inline-block; /* 或者使用 float: left; */
}

/* 为了美观，调整一下下拉菜单的整体样式和内部链接的间距 */
.dropdown {
    display: flex;           /* 推荐使用 Flexbox 布局，更现代且对齐更好 */
    align-items: center;
    white-space: nowrap;     /* 防止菜单项过多时换行 */
    min-width: auto;         /* 取消原来可能设置的固定最小宽度，让它根据内容撑开 */
    padding: 10px 15px;      /* 给横向菜单增加一点左右内边距 */
}

.dropdown li a {
    display: inline-block;
    padding: 8px 15px;       /* 增加左右内边距，让横向菜单项之间有呼吸感 */
}