/* ===== 产品详情（product.html）样式 ===== */
/* 由模板内联样式迁移而来；产品卡片网格 .rd-cards/.rd-card 已在 product-grid.css 中统一定义 */

/* 全宽区块 */
.rd-sec {
  margin-bottom: 46px;
  box-sizing: border-box;
}

/* 详情页表格（后台富文本/参数表） */
table {
  caption-side: bottom;
  border-collapse: collapse;
  margin: 0 auto;
  width: 100%;
  border: 1px solid;
  text-align: left;
}
tr,
td {
  border: 1px solid;
  text-align: left;
  padding: 3px;
}
table tr:hover {
  background-color: #ff0000;   /* 行的背景色 */
  color: #fff;
}

/* 图片容器整体样式 */
.image-slider {
  width: 100%;
  max-width: 700px;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 大图容器（含放大相关样式） */
.main-image-container {
  width: 100%;
  height: 500px;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 20px;
  position: relative;
  cursor: zoom-in;   /* 放大光标 */
}

/* 大图容器 - 放大状态 */
.main-image-container.zoomed {
  cursor: grab;      /* 拖拽光标 */
  overflow: hidden;
}

.main-image-container.zoomed:active {
  cursor: grabbing;  /* 拖拽中光标 */
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;        /* 默认隐藏 */
  transform-origin: center center;   /* 缩放原点 */
  transition: transform 0.3s ease, opacity 0.5s ease;
}

/* 小图列表容器 */
.thumbnails-container {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}

/* 滚动条（可选） */
.thumbnails-container::-webkit-scrollbar {
  height: 4px;
}

.thumbnails-container::-webkit-scrollbar-thumb {
  background-color: #ccc;
  border-radius: 2px;
}

/* 小图样式 */
.thumbnail {
  width: 100px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
  flex-shrink: 0;
  border: 2px solid transparent;   /* 占位边框，避免选中时位移 */
}

.thumbnail:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

/* 响应式适配 */
@media (max-width: 768px) {
  .main-image-container {
    height: 300px;
  }
  .thumbnail {
    width: 80px;
    height: 60px;
  }
}

@media (max-width: 480px) {
  .main-image-container {
    height: 200px;
    cursor: default !important;   /* 移动端取消放大 */
  }
  .thumbnail {
    width: 60px;
    height: 50px;
  }
}
