/* 基础样式重置与全局设置 */
.container {
  max-width: 1620px;
  margin: 0 auto;
  padding: 0 5px;
}

/* 产品展示区域 */
.product-section {
  margin: 30px auto;
  padding: 40px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.product-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: stretch; /* 确保左右两边高度一致 */
}

/* 产品图片区域 */
/* 产品图片区域 */
.product-image-container {
  position: relative;
  width: 100%;
  /* 移除固定高度和最小高度，改用padding-bottom实现比例自适应 */
  padding-bottom: 95%; /* 调整此值控制宽高比（120%表示高度是宽度的120%） */
  border-radius: 4px;
  overflow: hidden;
  background-color: #f9f9f9;
}

.product-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /*! height: 100%; */ /* 让图片填满容器 */
  object-fit: contain; /* 改为contain确保图片完整显示，不裁剪 */
  transition: opacity 0.4s ease;
}

/* 保持第一张图的堆叠顺序 */
.product-image:first-child {
  z-index: 1;
}

.product-image.hidden {
  opacity: 0;
  pointer-events: none;
}

.light-toggle {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px; /* 补充高度，确保按钮为正方形 */
  border-radius: 30%;
  background-color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #333;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 10;
}

.light-toggle:hover {
  transform: scale(1.05);
  background-color: #f0f0f0;
}

/* 响应式调整不同屏幕的比例 */
@media (min-width: 768px) {
  .product-image-container {
    padding-bottom: 95%; /* 平板及以上设备调整为更宽的比例 */
  }
}

@media (min-width: 1200px) {
  .product-image-container {
    padding-bottom: 95%; /* 桌面端进一步调整比例 */
  }
}


/* 产品描述区域 */
.product-description {
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* 使内容分布均匀，确保底部文本在最下方 */
  /*height: 100%;
  min-height: 600px;*/ /* 与左侧图片区域保持相同最小高度 */
}

.product-content {
  margin-bottom: 30px;
}

.product-category {
  color: #888;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.product-title {
  font-size: 36px;
  font-weight: 300;
  margin-bottom: 20px;  
  line-height: 1.2;
}

.product-price {
  font-size: 28px;
  color: #333;
  margin-bottom: 30px;
  font-weight: 500;
}

.product-rating {
  color: #d4af37;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.product-rating span {
  color: #777;
  font-size: 14px;
  margin-left: 10px;
}

.product-intro {
  font-size: 16px;
  margin-bottom: 30px;
  color: #555;
  line-height: 1.8;
}

.product-description p {
  font-size: 16px;
  margin-bottom: 30px;
  color: #555;
  line-height: 1.8;
}

/* 底部切换提示文本 */
.light-status {
  margin-top: auto; /* 推至底部 */
  text-align: left;
  color: #666;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: color 0.3s ease;
}
/* 屏幕宽度小于996px时隐藏 */
@media (max-width: 995px) {
  .light-status {
    display: none !important;
  }
}
.light-status:hover {
  color: #333;
}

/* 产品详情区域 */
.details-section {
  margin: 60px auto;
  padding: 40px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.section-title {
  font-size: 28px;
  font-weight: 300;
  margin-bottom: 40px;
  color: #222;
  text-align: center;
}

.details-images {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.detail-image-container {
  width: 100%;
  height: auto;
  border-radius: 4px;
  overflow: hidden;
}

.detail-image {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* 产品参数表格区域 */
.datasheet-section {
  margin: 60px auto 100px;
  padding: 40px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.datasheet-table {
  width: 100%;
  border-collapse: collapse;
}

.datasheet-table tr {
  border-bottom: 1px solid #f0f0f0;
}

.datasheet-table th,
.datasheet-table td {
  padding: 20px 15px;
  text-align: left;
}

.datasheet-table th {
  width: 35%;
  font-weight: 500;
  color: #333;
  font-size: 16px;
}

.datasheet-table td {
  width: 65%;
  color: #555;
  font-size: 16px;
}

.download-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #3498db;
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.3s ease;
}

.download-link:hover {
  color: #2980b9;
  text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .product-image-container,
  .product-description {
    height: auto;
  }
  
  .detail-image-container {
    height: 400px;
  }
}

@media (max-width: 992px) {
  .product-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .product-image-container {
    height: auto; /* 确保移动端图片区域有足够高度 */
  }
  
  .product-description {
    min-height: auto;
  }
  
  .detail-image-container {
    height: 350px;
  }
  
  .datasheet-table th,
  .datasheet-table td {
    padding: 15px 10px;
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .product-section,
  .details-section,
  .datasheet-section {
    padding: 10px 10px 0 10px;
    margin: 30px auto;
  }
  
  .product-title {
    font-size: 28px;
  }
  
  .product-price {
    font-size: 24px;
  }
  
  .product-image-container {
    height: auto; /* 小屏手机调整图片区域高度 */
  }
  
  .detail-image-container {
    height: 300px;
  }
  
  /* 修复产品参数表格移动端显示 - 保持参数和内容并列 */
  .datasheet-table {
    display: table;
    width: 100%;
  }
  
  .datasheet-table tr {
    display: table-row;
    margin-bottom: 0;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .datasheet-table th,
  .datasheet-table td {
    display: table-cell;
    width: auto;
    padding: 12px 8px;
  }
  
  .datasheet-table th {
    width: 35%;
    padding-bottom: 12px;
  }
  
  .datasheet-table td {
    width: 65%;
  }
}

@media (max-width: 576px) {
  .detail-image-container {
    height: 250px;
  }
  
  .section-title {
    font-size: 24px;
  }
  
  /* 进一步优化超小屏设备表格显示 */
  .datasheet-table th,
  .datasheet-table td {
    font-size: 14px;
    padding: 10px 5px;
  }
}


/* 标题 */
.projects-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.projects-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #333;
}

.projects-header p {
  font-size: 1.1rem;
  color: #666;
  max-width: 800px;
  margin: 0 auto;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .projects-grid {
    gap: 15px;
  }
  
  .project-image {
    height: 200px;
    object-fit: cover;
  }
}

/* 移动端响应式设置 */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    aspect-ratio: 16/9;
  }
  .hero-image {
    height: 100%;
    object-fit: cover;
  }
}