/* 全局字体定义 */
* {
  font-family: '思源黑体 Bold', 'Montserrat Bold', sans-serif;
}

.product-detail {
  flex: 1;
  border: 1px solid #eee;
  background: #fff;
  padding: 20px;
}

/* 核心修复：产品图片画廊布局（解决初始高度不一致） */
.product-gallery {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  align-items: stretch; /* 强制子元素高度一致 */
}

.main-img-wrap {
  flex: 1;
  display: flex; /* 主图容器弹性布局，确保高度稳定 */
  align-items: center;
  justify-content: center;
  min-height: 400px; /* 固定最小高度，避免初始高度塌陷 */
  border: 1px solid #eee;
}

.main-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* 保证图片比例，不拉伸 */
}

/* 缩略图列表修复：固定高度 + 避免交互遮挡 */
.thumb-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 60px; /* 固定宽度，避免自适应错乱 */
  height: 100%; /* 与主图容器高度同步 */
  overflow-y: auto; /* 缩略图过多时滚动，不影响布局 */
  padding: 2px;
}

.thumb-item {
  width: 100%; /* 继承父容器宽度，避免手动写死导致的适配问题 */
  height: 50px;
  border: 1px solid #ddd;
  cursor: pointer;
  box-sizing: border-box; /* 边框计入尺寸，避免溢出 */
  flex-shrink: 0; /* 禁止缩略图被压缩 */
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 缩略图激活态 - 替换为主色科技绿 */
.thumb-item.active {
  border-color: #00A846;
  outline: 2px solid #00A846; 
}

/* 修复切换按钮交互：提高点击优先级 + 避免遮挡 */
.lb-prev, .lb-next,
.viewer-prev, .viewer-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  background: rgba(255,255,255,0.8); /* 增加背景，提升点击区域 */
  border-radius: 50%; /* 圆形点击区域，更易点击 */
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  z-index: 99999; /* 最高层级，避免被遮挡 */
  color: #333;
  pointer-events: auto; /* 强制启用点击事件 */
}

.lb-prev { left: 15px; }
.lb-next { right: 15px; }
.viewer-prev { left: 15px; }
.viewer-next { right: 15px; }

/* 按钮hover态增强 - 替换为主色科技绿 */
.lb-prev:hover, .lb-next:hover,
.viewer-prev:hover, .viewer-next:hover {
  background: rgba(255,255,255,1);
  color: #00A846;
  box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

/* 原有样式保留（以下为你原有样式，仅优化部分细节） */
.product-info {
  margin-bottom: 40px;
}
.product-info .product-name h1{
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #000000; /* 纯黑 */
  font-family: "思源黑体 Bold", sans-serif
}
.product-info .product-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #666;
  margin-bottom: 10px;
}
.next-product {
  font-size: 14px;
  color: #666;
}
.next-name {
  color: #00A846; /* 替换为主色科技绿 */
  margin-left: 6px;
}

/* 标签页样式统一修复 */
.tab-container {
  margin-top: 10px;
}
.tab-nav {
  display: flex;
  border-bottom: 1px solid #eee;
  flex-wrap: nowrap; /* 禁止标签换行 */
}
.tab-btn {
  padding: 10px 25px;
  background: #f5f5f5;
  border: 1px solid #eee;
  border-bottom: none;
  cursor: pointer;
  font-size: 14px;
  position: relative;
  flex-shrink: 0; /* 禁止标签被压缩 */
}
.tab-btn.active {
  background: #FFFFFF; /* 纯白 */
  border-top: 2px solid #00A846; /* 替换为主色科技绿 */
  font-weight: bold;
  color: #00A846; /* 替换为主色科技绿 */
}
.tab-content {
  padding: 20px;
  border: 1px solid #eee;
  border-top: none;
  background: #FFFFFF; /* 纯白 */
  font-size: 14px;
  line-height: 1.7;
  color: #000000; /* 纯黑 */
}

/* 面包屑 - 替换为主色科技绿 */
.breadcrumb #bc-detail {
  color: #00A846 !important;
  font-weight: bold !important;
}

/* 相关产品 */
.related-products {
  padding: 15px;
}
.related-item {
  text-align: center;
  margin-bottom: 15px;
  padding: 8px; /* 增加内边距，hover更友好 */
  transition: background-color 0.2s; /* 平滑过渡 */
}
.related-item:hover {
  background-color: #f5f5f5;
  border-radius: 4px;
}
.related-item img {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border: 1px solid #eee;
  margin-bottom: 6px;
}
.related-item p {
  font-size: 12px;
  color: #000000; /* 纯黑 */
  margin: 0;
  line-height: 1.3;
}

/* 灯箱样式（优化层级和交互） */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* 初始禁止穿透，打开后启用 */
}
.lightbox.active {
  display: flex;
  pointer-events: auto; /* 启用交互 */
}
.lightbox-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  cursor: pointer;
}
.lightbox-box {
  position: relative;
  background: #FFFFFF; /* 纯白 */
  border-radius: 4px;
  overflow: hidden;
  max-width: 90%;
  max-height: 90vh;
}
.lightbox-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: #f8f8f8;
  border-bottom: 1px solid #ddd;
}
.tools {
  display: flex;
  gap: 8px;
}
.tools button {
  padding: 4px 10px;
  border: 1px solid #ccc;
  background: #FFFFFF; /* 纯白 */
  cursor: pointer;
}
.lb-close {
  padding: 4px 12px;
  background: #004220; /* 辅助深绿 */
  color: #FFFFFF; /* 纯白 */
  border: none;
  cursor: pointer;
}
.lightbox-middle {
  position: relative;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lbImg {
  max-width: 100%;
  max-height: 70vh;
  transition: transform 0.2s;
}

/* 图片查看器 */
.image-viewer{
  position:fixed;
  inset:0;
  z-index:9999;
  display:flex;
  align-items:center;
  justify-content:center;
  pointer-events: none;
}
.image-viewer.active {
  pointer-events: auto;
}
.viewer-overlay{
  position:absolute;
  inset:0;
  background:#000000; /* 纯黑 */
  opacity:.85;
  cursor: pointer;
}
.viewer-container{
  position:relative;
  background:#FFFFFF; /* 纯白 */
  border-radius:8px;
  overflow:hidden;
  max-width:90%;
  max-height:90vh;
}
.viewer-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 20px;
  background:#f8f9fa;
  border-bottom:1px solid #ddd;
}
.viewer-tools{
  display:flex;
  gap:8px;
}
.viewer-tools button{
  padding:6px 12px;
  border:1px solid #ccc;
  background:#FFFFFF; /* 纯白 */
  border-radius:4px;
  cursor:pointer;
}
.viewer-close{
  padding:6px 14px;
  background: #004220; /* 辅助深绿 */
  color: #FFFFFF; /* 纯白 */
  border:none;
  border-radius:4px;
  cursor:pointer;
}
.viewer-body{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:30px 50px;
}
.viewer-img{
  max-width:100%;
  max-height:70vh;
  transition:transform .2s;
}

/* 顶部“下一个”按钮栏 */
.next-product-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 10px 0;
}
.next-product-bar button {
  padding: 6px 16px;
  border: 1px solid #ccc;
  border-radius: 20px;
  background: #FFFFFF; /* 纯白 */
  cursor: pointer;
  transition: border-color 0.2s;
}
.next-product-bar button:hover {
  border-color: #00A846; /* 主色科技绿 */
  color: #00A846; /* 主色科技绿 */
}

/* 产品切换按钮 */
.product-switch-bar {
  margin: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.product-switch-bar button {
  padding: 8px 20px;
  border: 1px solid #ddd;
  background: #FFFFFF; /* 纯白 */
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.product-switch-bar button:hover {
  border-color: #00A846; /* 主色科技绿 */
  color: #00A846; /* 主色科技绿 */
}

/* 产品详情列表 */
.feature-section h3 {
  font-size: 16px;
  margin-bottom: 10px;
  color: #000000; /* 纯黑 */
}
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature-list li {
  padding: 5px 0;
  line-height: 1.6;
  color: #000000; /* 纯黑 */
}
.param-box {
  line-height: 2;
  color: #000000; /* 纯黑 */
}

/* 侧边栏样式适配主色 */
.sidebar-title {
  /* color: #004220; /* 辅助深绿 */ */
  font-weight: bold;
}
.contact-item span {
  color: #000000; /* 纯黑 */
}
.custom-menu-level1.active {
  color: #00A846; /* 主色科技绿 */
}
.custom-menu-level2.active {
  color: #00A846; /* 主色科技绿 */
}
.custom-arrow.open {
  color: #00A846; /* 主色科技绿 */
}