/* ==============================================
【1. 全局基础重置层】
全局统一清除内外边距、盒模型、默认字体
============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei",sans-serif;
}
body {
    background-color: #fff;
}
/* ==============================================
【2. 顶部导航栏模块】
Logo、主导航、下拉菜单、搜索组件、移动端汉堡菜单
============================================== */
/* 2.1 导航外层容器 */
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
}
/* 2.2 Logo 区域 */
/* Logo链接容器 */
.nav-container .logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #222;
  font-size: 24px;
  font-weight: bold;
}
/* Logo图片样式 */
.nav-container .logo img {
  max-height: 220px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* 2.3 导航下拉二级菜单 */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 6px;
  display: none;
  z-index: 9999;
}
.submenu a {
  display: block;
  padding: 10px 15px;
  color: #333;
}
.submenu a:hover {
  background: #f5f5f5;
  color: #007bff;
}
.dropdown:hover .submenu {
  display: block;
}
/* 2.4 导航搜索组件（全局搜索弹窗/导航内嵌搜索） */
.nav-item {
    height: 60px;
    display: flex;
    align-items: center;
}
/* 搜索触发按钮 */
.global-search-trigger{
    flex-shrink: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    gap:6px;
    height: 32px;
    padding: 0 12px;
    background: #f5f5f5;
    border:1px solid #ddd;
    border-radius: 30px;
    color:#333;
    transition: all 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
}
.global-search-trigger:hover{
    background: #0066cc;
    color:#fff;
    border-color:#0066cc;
}
/* 导航内嵌搜索输入框，默认隐藏 */
.nav-search-box {
    display: none;
    align-items: center;
    gap:8px;
    height:32px;
}
.nav-search-input {
    height:100%;
    padding:0 50px;
    border:1px solid #ddd;
    border-radius:30px;
    outline:none;
}
.nav-search-btn {
    height:100%;
    padding:0 14px;
    border:none;
    background:#0066cc;
    color:#fff;
    border-radius:30px;
    cursor:pointer;
}
.nav-search-close {
    color:#999;
    cursor:pointer;
    padding:0 6px;
}
/* 搜索遮罩层【修复语法错误】 */
.global-search-mask{
    position: fixed;
    left: 0;
    top: 90px;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    display: none;
}
/* 搜索弹窗主体 */
.global-search-modal{
    position: fixed;
    left: 50%;
    top: 80px;
    transform: translateX(-50%);
    width: 100%;
    max-width: 700px;
    background: #fff;
    z-index: 200;
    padding: 30px 20px 20px;
    border-radius: 8px;
    display: none;
    box-sizing: border-box;
}
/* 弹窗关闭按钮 */
.global-search-close{
    position: absolute;
    right: -12px;
    top: -12px;
    width: 34px;
    height: 34px;
    line-height: 34px;
    text-align: center;
    font-size: 20px;
    cursor: pointer;
    color: #fff;
    background: #333;
    border-radius: 50%;
    z-index: 99;
    transition: background 0.2s;
}
.global-search-close:hover{
    background: #f00;
}
/* 搜索结果区域 */
.global-search-result{
    margin-top: 10px;
    max-height: 40vh;
    overflow-y: auto;
}
.search-tip{
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}
.red-high{
    color: #f00;
    font-weight: bold;
}
.search-list-row{
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.search-item{
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 6px;
}
.search-item h4{
    margin: 0 0 6px;
    font-size: 16px;
}
.search-item h4 a{
    color: #222;
    text-decoration: none;
}
.search-item h4 a:hover{
    color: #0066cc;
}
.search-desc{
    color: #666;
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 6px;
}
.search-type{
    font-size: 12px;
    color: #999;
}
.empty-text{
    text-align: center;
    padding: 30px 0;
    color: #999;
}

/* ==============================================
【4. 公共通用样式】
版块标题、页面内容容器、友情链接
============================================== */
/* 4.1 版块统一标题 */
.title {
    text-align: center;
    margin: 40px 0 25px;
}
.title h2 {
    font-size:33px;
    margin-bottom: 6px;
}
.title p {
    color: #666;
    font-size: 14px;
}
/* 4.2 内页内容统一容器 */
.page-wrap{
    max-width: 100%;
    width:92%;
    margin:0 auto;
    padding:40px 0;
}
/* 4.3 底部友情链接 */
.friend-link {
    width: 100%;
    margin: 60px auto 30px;
    padding: 30px 20px;
    border-top: 1px solid #e5e7eb;
}
.friend-link h3 {
    font-size: 18px;
    color: #1f2937;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
    padding-left: 12px;
}
.friend-link h3::before {
    content: "";
    width: 4px;
    height: 18px;
    background: #007bff;
    position: absolute;
    left: 0;
    top: 3px;
    border-radius: 2px;
}

/* ==============================================
【6. 内页子Banner（页面顶部标题横幅）】
产品/新闻等内页顶部背景横幅
============================================== */
.sub-banner {
    margin-top: 104px;
    width: 100%;
    height: 180px;
    background: #2c3e50;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sub-banner h2 {
    color: #fff;
    font-size: 32px;
}
/* ==============================================
【7. 产品列表模块】
产品网格卡片、图片hover缩放、信息文字
============================================== */
.product {
    width: 100%;
    padding: 20px 20px;
    background: #f9f9f9;
    box-sizing: border-box;
}
.product-list {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.product-card {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}
.product-card img {
    width: 100%;
   
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
/* 鼠标悬浮图片收缩效果 */
.product-card:hover img {
    transform: scale(0.9);
}
.product-info {
    padding: 10px;
}
.product-name {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 140%;
    color: #333;
    text-align: left;
    min-height: 5rem;
    text-transform: capitalize;
    letter-spacing: -0.01em;
    margin: 0.5rem 0 0 0;
}

.product-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}
/* ==============================================
【8. 新闻列表模块】
新闻网格卡片、封面图、信息文字（与产品列表样式统一）
============================================== */
.news {
    width: 100%;
    padding: 20px 20px;
    background: #f9f9f9;
    box-sizing: border-box;
}
.news-list {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.news-card {
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}
.news-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
/* 鼠标悬浮图片收缩效果，和产品卡片保持一致 */
.news-card:hover img {
    transform: scale(0.9);
}
.news-info {
    padding: 10px;
}
.news-name {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 140%;
    color:#333;
    text-align: left;
    min-height: 5rem;
    text-transform: capitalize;
    letter-spacing: -0.01em;
    margin: 0.5rem 0 0 0;
}
.news-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}
/* PC端布局 */
.news-card a {
    display: flex;
    gap: 0;
    text-decoration: none;
    color: #333;
}
.news-card .img-box{
    width:200px;
    height:140px;
    flex-shrink:0;
    overflow:hidden;
}
.news-card-action a {
    display: inline-block;
    padding: 7px 16px;
    background: #2563eb;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

/* ==============================================
【9. 响应式媒体查询（多屏幕适配）】
============================================== */
/* 9.1 平板端 ≤992px */
@media (max-width: 992px) {
    .product-list, .news-list {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* 9.2 普通手机 ≤768px */
@media screen and (max-width: 768px) {
    /* 导航logo缩小 */
    .nav-container .logo img {
        max-height: 90px;
        max-width: 150px;
    }
    .nav-container .logo {
        font-size: 20px;
    }
    /* 移动端下拉菜单 */
    .menu {
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        padding: 10px 20px;
        display: none;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    .menu a {
        line-height: 50px;
        height: 50px;
        border-bottom: 1px solid #f5f5f5;
    }
    .burger { display: block; }
    .logo { margin-left: 0; }
    /* 内页子banner高度缩小 */
    .sub-banner{ height:120px; }
    .sub-banner h2{ font-size:24px; }

    /* 768px以内：产品、新闻单列 */
    .product-list, .news-list {
        grid-template-columns: 1fr;
    }
}

/* 9.4 PC大屏 ≥641px 搜索弹窗单独定位 */
@media screen and (min-width: 641px) {
    .global-search-modal {
        top: 130px;
    }
    .global-search-mask {
        top: 90px;
    }
}
/* 9.5 手机端 ≤640px 搜索&汉堡菜单适配 */
@media screen and (max-width: 640px) {
    .global-search-modal{
        top: 70px;
        padding: 25px 15px 15px;
    }
    .global-search-mask {
        top: 60px;
    }
    .global-search-trigger{
        padding:5px 12px;
        font-size:13px;
        margin-top: 8px;
        margin-right: 1px;
    }
    .nav-search-box {
        width:280px;
    }
    .nav-search-input {
        flex: 1;
        min-width: 250px;
    }
    .global-search-close{
        right: -8px;
        top: -8px;
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 18px;
    }
    /* 手机隐藏PC导航菜单 */
    .nav-menu {
        display: none;
    }
    /* 右侧搜索+汉堡容器 */
    .header-right-wrap {
        display: flex;
        align-items: center;
        gap: 0;
    }
    /* 汉堡按钮 */
    .hamburger {
        height: 60px;
        display: flex;
        align-items: center;
        background: transparent;
        border: none;
        font-size: 20px;
        cursor: pointer;
    }
    /* ≤640px 产品、新闻 一排1个 */
    .product-list, .news-list {
        grid-template-columns: 1fr;
    }
}
