/* ====== 1688 以图搜款 样式 ====== */

/* 表格大图预览 */
.src-img-preview {
  max-width: 280px;
  max-height: 200px;
  object-fit: contain;
  cursor: pointer;
  border-radius: 6px;
  border: 1px solid #eee;
  transition: transform 0.2s, box-shadow 0.2s;
  display: block;
}
.src-img-preview:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 多图缩略图容器 */
.src-img-thumbs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.src-img-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid #ddd;
  cursor: pointer;
}

/* 图片大图查看器 */
.image-viewer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-viewer-close {
  position: absolute;
  top: 15px;
  right: 30px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
}
.image-viewer-close:hover {
  color: #ccc;
}
.image-viewer-main {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}
.image-viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 36px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  padding: 10px 15px;
  z-index: 10001;
}
.image-viewer-arrow:hover {
  color: #ccc;
}
.image-viewer-prev { left: 10px; }
.image-viewer-next { right: 10px; }
.image-viewer-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.image-viewer-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
}
.image-viewer-dot.active {
  background: #fff;
}

/* 自定义列弹窗 */
.column-config-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.column-config-modal {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
.column-config-modal h3 {
  margin: 0 0 4px;
  font-size: 16px;
}
.column-config-modal .subtitle {
  font-size: 12px;
  color: #888;
  margin-bottom: 12px;
}
.column-config-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.column-config-group {
  margin-bottom: 12px;
}
.column-config-group h4 {
  font-size: 13px;
  color: #555;
  margin: 0 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}
.column-config-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: grab;
  user-select: none;
  font-size: 13px;
}
.column-config-item:hover {
  background: #f5f5f5;
}
.column-config-item.dragging {
  opacity: 0.5;
  background: #e8f0fe;
}
.column-config-item .drag-handle {
  color: #ccc;
  cursor: grab;
  font-size: 14px;
}
.column-config-item input[type="checkbox"] {
  cursor: pointer;
}

/* 搜款表格 */
#srcTable {
  font-size: 13px;
}
#srcTable th {
  position: sticky;
  top: 0;
  background: #f8f9fa;
  padding: 10px 8px;
  border-bottom: 2px solid #dee2e6;
  white-space: nowrap;
  font-weight: 600;
}
#srcTable td {
  padding: 8px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

/* 相似度标签 */
.similarity-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}
.similarity-high {
  background: #d4edda;
  color: #155724;
}
.similarity-mid {
  background: #fff3cd;
  color: #856404;
}
.similarity-low {
  background: #f8d7da;
  color: #721c24;
}

/* 操作按钮组 */
.src-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* 筛选栏 */
.sourcing-filters input[type="range"] {
  vertical-align: middle;
}

/* 空状态 */
.src-empty {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.src-empty-icon {
  font-size: 48px;
}
.src-empty-text {
  font-size: 14px;
  margin-top: 12px;
}
