/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 全局样式 */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  background-color: #f9fafb;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: #0a66c2;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: #004182;
  transform: translateY(-2px);
}

section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title span {
  display: inline-block;
  color: #0a66c2;
  font-weight: 600;
  margin-bottom: 10px;
}

.section-title h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
}

.section-title p {
  color: #666;
  max-width: 700px;
  margin: 0 auto;
}

:root {
    --primary-color: #165DFF;
    --secondary-color: #36BFFA;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #F5F7FA;
    --white: #FFFFFF;
    --gray-light: #EEEEEE;
    --gray: #DDDDDD;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}





/* 导航栏样式 */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 101;
  transition: all 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px; /* 图片与文字间距，如需保留文字 */
  text-decoration: none;
}

.logo-image {
  height: 40px; /* 根据需要调整高度 */
  width: auto; /* 保持宽高比 */
  object-fit: contain; /* 确保图片完整显示 */
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  font-weight: 500;
  color: #666;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: #0a66c2;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #0a66c2;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
  padding: 8px;
}

/* 移动端菜单样式 */
.mobile-menu {
  position: fixed;
  top: 80px; /* 与导航栏高度一致 */
  left: 0;
  right: 0;
  background-color: white;
  box-shadow: 0 10px 10px rgba(0,0,0,0.1);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 99;
}

.mobile-menu.active {
  max-height: 400px; /* 足够容纳所有菜单项 */
}

.mobile-links {
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 15px;
}

.mobile-links a {
  padding: 10px 15px;
  font-weight: 500;
  color: #666;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.mobile-links a:hover,
.mobile-links a.active {
  color: #0a66c2;
  background-color: #f0f7ff;
}

/* 在768px以下显示移动端菜单 */
@media (min-width: 769px) {
  .mobile-menu {
    display: none;
  }
}



/* 页面标题区域 */
.hero {
  margin-top: 80px;
  padding: 100px 0;
  background: linear-gradient(135deg, #f0f7ff 0%, #e6f0ff 100%);
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: #333;
}

.hero h1 span {
  color: #0a66c2;
}

.hero p {
  font-size: 1.2rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 30px;
}



/* 产品展示区域 */
.product-display {
    padding: 20px 0 60px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.product-image-placeholder {
    background-color: var(--bg-light);
    height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    position: relative;
    overflow: hidden;
}

.product-image-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.product-card:hover .product-image-placeholder::after {
    left: 100%;
}

.product-image-placeholder i {
    font-size: 4rem;
    margin-bottom: 15px;
    transition: var(--transition);
}

.product-card:hover .product-image-placeholder i {
    transform: scale(1.1);
}

.placeholder-text {
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--text-dark);
    transition: var(--transition);
}

.product-card:hover .product-title {
    color: var(--primary-color);
}

.product-desc {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex: 1;

    display: -webkit-box; /* 将元素设置为弹性盒模型（WebKit 私有） */
    -webkit-line-clamp: 2; /* 限制显示的行数 */
    -webkit-box-orient: vertical; /* 设置弹性盒的排列方向为垂直 */
    overflow: hidden; /* 隐藏超出的内容 */
    text-overflow: ellipsis; /* 超出部分显示省略号 */
}





.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}




.view-details:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: contain; /* 保持比例并填充容器 */
    border-radius: 4px;
}

.product-actions a.view-details {
    /* 复制原按钮的所有样式 */
    display: inline-block;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none; /* 去除链接下划线 */
}

.product-actions a.view-details:hover {
    /* 保持hover效果一致 */
    background-color: #0056b3;
}







/* 页脚样式 */
footer {
  background-color: #2c3e50;
  color: #ecf0f1;
  padding: 60px 0 30px;
  margin-top: 80px;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
}

/* 公司信息部分 */
.footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.footer-logo-icon {
  font-size: 28px;
  margin-right: 12px;
  color: #4cc9f0;
}

.footer-logo span {
  font-size: 22px;
  font-weight: 700;
}

.footer-desc {
  color: #b0b0c3;
  max-width: 350px;
  line-height: 1.6;
  margin-bottom: 25px;
}

/* 微信二维码样式 */
.footer-social {
  position: relative;
  display: inline-block; /* 确保容器能正确包裹内容 */
}

.wechat-container {
  position: relative;
  display: inline-block;
  vertical-align: top;
}

/* 微信图标样式 */
.wechat-container img {
  width: 110px;  /* 从40px增大到50px */
  height: 110px; /* 从40px增大到50px */
  border-radius: 10%;
  object-fit: contain; /* 确保图片完整显示 */
}

/* 鼠标悬停显示二维码 */
.wechat-container:hover .wechat-qrcode {
  opacity: 1;
  visibility: visible;
}

.wechat-qrcode {
  position: absolute;
  top: 0; /* 与微信图标顶端对齐 */
  left: calc(100% + 10px); /* 微信图标右侧，距离10px */
  width: 120px;
  height: 120px;
  padding: 5px;
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 100;
}

/* 调整三角指示位置，使其指向微信图标 */
.wechat-container {
  position: relative;
  display: inline-block;
  vertical-align: top; /* 确保图标垂直对齐 */
}

/* 三角指示位置调整到二维码左上角，指向微信图标 */
.wechat-qrcode::after {
  content: '';
  position: absolute;
  right: 100%; /* 二维码左侧 */
  top: 10px; /* 距离顶部10px */
  border-width: 8px 8px 8px 0;
  border-style: solid;
  border-color: transparent #fff transparent transparent;
}

/* 在现有样式基础上添加以下代码 */
@media (max-width: 768px) {
  .footer-social {
    display: flex;
    justify-content: center;
    width: 100%;
  }
  
  .wechat-container {
    /* 确保微信图标在移动设备上居中显示 */
    margin: 0 auto;
  }
}


.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background-color: #4cc9f0;
  transform: translateY(-3px);
}

/* 快速链接部分 */
.footer-links {
  min-width: 200px;
}

.footer-links h3 {
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-links h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: #4cc9f0;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #b0b0c3;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-links a.active {
  color: #4cc9f0;
  padding-left: 5px;
}

.footer-links li i {
  margin-right: 8px;
  color: #4cc9f0;
  width: 16px;
  text-align: center;
}

/* 版权信息 */
.copyright {
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: #8a8a9c;
  font-size: 14px;
}




/* 响应式设计调整 */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .product-header {
        padding: 60px 0;
    }
    
    .product-header h1 {
        font-size: 2rem;
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .md\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none; /* 可在移动端转为汉堡菜单 */
    }
    
    .filter-buttons {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    .md\:col-span-2 {
        grid-column: span 1 / span 1;
    }
}

/* 响应式调整 */
@media (max-width: 992px) {
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .section-title h2 {
    font-size: 1.8rem;
  }
  
  .footer-content {
    flex-direction: column;
    gap: 30px;
  }
  
  .footer-logo {
    justify-content: center;
  }
  
  .footer-desc {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  
  .footer-social {
    justify-content: center;
  }
  
  .footer-links {
    text-align: center;
  }
  
  .footer-links h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .map-container {
    height: 350px;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 80px 0;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  section {
    padding: 60px 0;
  }
  
  .contact-form {
    padding: 30px 20px;
  }
  
  .map-container {
    height: 300px;
  }
}

