/* 自定义样式 */
.fade-enter-active, .fade-leave-active { transition: opacity 0.2s; }
.fade-enter-from, .fade-leave-to { opacity: 0; }

.product-row.selected { background-color: #f0fdf4; border-left: 3px solid #22c55e; }
.product-row:hover { background-color: #f1f5f9; }

/* 商品缩略图容器 — 固定尺寸防止排版变形 */
.img-thumb-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}
.img-thumb { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; display: block; }
/* 搜1688 hover 蒙层 */
.img-thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.5px;
}
.img-thumb-wrap:hover .img-thumb-overlay { opacity: 1; }
/* 无扩展时光标样式不同 */
.img-thumb-wrap.no-ext { cursor: default; }
.img-thumb-wrap.no-ext .img-thumb-overlay { display: none; }

/* 图片大图预览浮层 */
.img-preview-overlay {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
}
.img-preview-large {
  width: 320px;
  height: 320px;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  background: #fff;
  border: 1px solid #e5e7eb;
}

.sort-btn { cursor: pointer; user-select: none; }
.sort-btn:hover { color: #3b82f6; }
.sort-btn.active { color: #2563eb; font-weight: 600; }

.tag { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 12px; }
.tag-hot { background: #fef2f2; color: #dc2626; }
.tag-selected { background: #f0fdf4; color: #16a34a; }
.tag-layer { background: #eff6ff; color: #2563eb; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal-box { background: white; border-radius: 8px; padding: 24px; max-width: 500px; width: 90%; max-height: 80vh; overflow-y: auto; }

/* 分页 */
.pagination button { min-width: 36px; }
.pagination button.active { background: #2563eb; color: white; }

/* 数据采集状态徽章 */
.data-badges { display: flex; gap: 3px; margin-top: 3px; }
.data-badge {
  display: inline-block;
  font-size: 10px;
  padding: 0 4px;
  border-radius: 2px;
  line-height: 16px;
  font-weight: 500;
  white-space: nowrap;
}
.data-badge-ae { background: #dbeafe; color: #1d4ed8; }
.data-badge-1688 { background: #ffedd5; color: #c2410c; }
.data-badge-supplier { background: #d1fae5; color: #047857; }
.data-badge-stale { background: #f3f4f6; color: #9ca3af; }

/* 价格单元格 */
.price-cell { line-height: 1.6; }
.price-ae { color: #2563eb; font-weight: 500; }
.price-1688 { color: #ea580c; font-weight: 500; }

/* 操作按钮组 */
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border-radius: 4px;
  font-size: 12px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.action-btn:hover { background: #eff6ff; border-color: #bfdbfe; color: #2563eb; }
.action-btn.active-select { background: #dcfce7; border-color: #86efac; color: #16a34a; }
.action-btn.active-reject { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }

/* 详情页价格对比卡片 */
.price-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.price-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}
.price-card-label { font-size: 12px; color: #64748b; margin-bottom: 4px; }
.price-card-value { font-size: 18px; font-weight: 700; }

/* 详情页区块标题 */
.section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

/* 选品操作区 — 详情页 */
.sel-form-sticky {
  position: sticky;
  top: 64px;
  z-index: 10;
}

/* 导出按钮 */
.btn-export {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-export:hover { background: #f3f4f6; border-color: #9ca3af; }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: #9ca3af;
}
.empty-state-icon { font-size: 36px; margin-bottom: 8px; opacity: 0.5; }

/* 价格历史图表容器 */
.price-chart-container {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  overflow: hidden;
}
.price-chart-container canvas {
  width: 100%;
  display: block;
}

/* IXSPY 市场数据网格 */
.market-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.market-data-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
  text-align: center;
}
.market-data-label { font-size: 11px; color: #64748b; margin-bottom: 2px; }
.market-data-value { font-size: 16px; font-weight: 700; color: #1e293b; }

/* 自建趋势图表容器 */
.trend-chart-container {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
}
.trend-chart-container canvas { width: 100%; display: block; }

/* AE 评论条目 */
.review-item {
  padding: 6px 0;
  border-bottom: 1px solid #fef3c7;
}
.review-item:last-child { border-bottom: none; }

/* 浏览足迹栏 */
.breadcrumb-trail {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  padding: 6px 0;
  position: sticky;
  top: 56px;
  z-index: 40;
}
.breadcrumb-trail::-webkit-scrollbar { display: none; }
.breadcrumb-item {
  display: inline-block;
  font-size: 12px;
  color: #6b7280;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  text-decoration: none;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.15s;
}
.breadcrumb-item:hover { background: #e0e7ff; color: #4338ca; }
.breadcrumb-item.active { background: #dbeafe; color: #2563eb; font-weight: 500; }

/* 列表页表格容器 — 用 clip 替代 auto 以兼容 sticky */
.table-wrap {
  overflow-x: clip;
}

/* 列表页表头固定 */
.sticky-thead {
  position: sticky;
  top: var(--thead-top, 56px);
  z-index: 20;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.sticky-thead th {
  background: #f9fafb;
}
