:root {
  --primary-color: #0A2540;     /* 深蓝主调 */
  --secondary-color: #00D4FF;   /* 亮青强调色 */
  --text-color: #333333;        /* 正文字体 */
  --bg-light: #F8F9FA;          /* 浅灰背景 */
  --font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-family);
  color: var(--text-color);
  line-height: 1.6;
}

/* 导航头 */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 5%;
  backdrop-filter: blur(10px);
}

.logo img {
  height: 80px;      /* 放大 LOGO 尺寸 */
  width: auto;
  max-width: 250px;  /* 防止极端情况下超宽破坏布局 */
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

nav a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--secondary-color);
}

.contact-btn {
  background: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
}

.contact-btn:hover {
  background: var(--secondary-color);
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

/* 首屏区域 */
.hero {
  margin-top: 80px;
  /* 第一层：深色遮罩 + 工人切割火花照片 */
  background: linear-gradient(rgba(10, 37, 64, 0.75), rgba(0, 0, 0, 0.6)), url('images/hero-bg-2.jpg') center/cover no-repeat;
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 0 20px;
  position: relative; /* 为叠加颗粒背景做准备 */
}

/* 首屏颗粒叠加层：在火花中隐约透出研磨颗粒（说明：这是原材料） */
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: url('images/bg-blue.jpg') repeat;
  background-size: 250px; /* 适当缩放颗粒 */
  mix-blend-mode: screen; /* 滤色混合，让颗粒像光点一样浮在火花背景上 */
  opacity: 0.35; /* 较高透明度，保证不盖掉文字，但一眼能看出颗粒边缘 */
  
  /* 🎉 关键优化：给颗粒层加一个“中间透明、四周可见”的遮罩，完美避开切割片主体 */
  -webkit-mask-image: radial-gradient(ellipse at 60% 60%, transparent 35%, black 75%);
  mask-image: radial-gradient(ellipse at 60% 60%, transparent 35%, black 75%);
  
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative; 
  z-index: 1; /* 确保文字不受叠加图层影响 */
}

.hero-content h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  opacity: 0.9;
}

.cta-button {
  background: var(--secondary-color);
  color: var(--primary-color);
  padding: 15px 40px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 30px;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
  display: inline-block;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 212, 255, 0.4);
}

/* 公共标题样式 */
.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 50px;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--secondary-color);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* 核心产品：叠加蓝色磨料颗粒作为质感背景 */
.products {
  padding: 100px 5%;
  background-color: var(--bg-light);
  position: relative;
  /* 允许背景层相对于此容器定位 */
}

.products::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  /* 运用蓝色磨料图做背景平铺，调高透明度，让颗粒感更强 */
  background: url('images/bg-blue.jpg') repeat;
  background-size: 200px; /* 缩小一点图，让颗粒显得更密 */
  mix-blend-mode: multiply; /* 叠底混合增加厚重感 */
  opacity: 0.25; /* 大幅调高可见度 */
  z-index: 0;
  pointer-events: none;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative; /* 保证卡片浮在背景之上 */
  z-index: 1;
}

.product-card {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.product-img {
  width: 100%;
  height: 250px;
  object-fit: contain; /* 改为完整展现，不裁剪 */
  background-color: #ffffff; /* 如果图片比例不符，上下留白显示纯白色 */
  padding: 20px; /* 让标志不要贴着大卡片的边缘 */
}

/* 🚀 产品动态合成图样式 */
.product-img-composite {
  width: 100%;
  height: 250px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.composite-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(10, 37, 64, 0.45); /* 深蓝色半透明遮罩 */
  backdrop-filter: blur(1.5px); /* 🟢 降低模糊值：让底层颗粒大体清晰可见 */
  -webkit-backdrop-filter: blur(1.5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: all 0.4s ease;
}

.product-card:hover .composite-overlay {
  background: rgba(10, 37, 64, 0.15); /* 鼠标移上去时变透明，展现高清原材料 */
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.composite-logo {
  height: 75px !important;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 15px rgba(255, 255, 255, 1)); /* 白光发光效果，突显 LOGO */
  transition: transform 0.3s;
}

.product-card:hover .composite-logo {
  transform: scale(1.05);
}

.composite-text {
  color: white;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 3px 6px rgba(0,0,0,0.8);
  font-family: var(--font-family);
  z-index: 2;
}

.product-info {
  padding: 25px;
  text-align: center;
}

.product-info h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* 工厂实景 */
.factory {
  padding: 100px 5%;
}

.factory-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 改为完整展现不裁剪，以保护LOGO */
  background-color: #ffffff;
  padding: 10px; /* 轻微内边距，防贴边 */
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* 联系与询盘：叠加红色磨料颗粒做深色底纹 */
.contact {
  padding: 100px 5%;
  background-color: var(--primary-color);
  color: white;
  position: relative;
}

.contact::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  /* 使用红色磨料颗粒图混合到蓝色底部中 */
  background: url('images/bg-red.jpg') repeat;
  background-size: 300px;
  mix-blend-mode: multiply; /* 融入底色，打造工业粗糙感 */
  opacity: 0.45; /* 大幅提亮，让红色矿石质感从深蓝背景中透出来 */
  z-index: 0;
  pointer-events: none;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative; /* 保证文字和表单浮在背景图之上 */
  z-index: 1;
}

.contact-info h3, .contact-form h3 {
  font-size: 2rem;
  margin-bottom: 30px;
  color: white;
}

.info-item {
  margin-bottom: 25px;
}

.info-item h4 {
  color: var(--secondary-color);
  margin-bottom: 5px;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input, .contact-form textarea {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
}

.contact-form textarea {
  height: 150px;
  resize: vertical;
}

.submit-btn {
  background: var(--secondary-color);
  color: var(--primary-color);
  border: none;
  padding: 15px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.submit-btn:hover {
  background: white;
}

/* 底部版权 */
footer {
  background: #061A2D;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
}

/* 移动端适配 (Responsive) */
@media (max-width: 768px) {
  nav { display: none; /* 移动端折叠菜单待交互优化 */ }
  .hero-content h1 { font-size: 2.5rem; }
  .factory-gallery { grid-template-columns: 1fr; }
  .contact-container { grid-template-columns: 1fr; }
}
