/* ========== 商品模块公共样式 - 基于 _shared.css 风格扩展 ========== */

/* 主 Tab 栏（列表/体检等） */
.prod-tabs {
  display: flex;
  gap: 0;
  background: #FFFFFF;
  border-radius: 10px 10px 0 0;
  padding: 0 20px;
  border-bottom: 1px solid var(--edy-border);
  margin-bottom: 0;
  box-shadow: var(--shadow-sm);
}
.prod-tab {
  position: relative;
  padding: 14px 20px;
  background: transparent;
  border: none;
  font-size: 14px;
  color: var(--edy-text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  transition: color 0.2s;
}
.prod-tab:hover { color: var(--edy-blue); }
.prod-tab.active { color: var(--edy-blue); font-weight: 600; }
.prod-tab.active::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: -1px;
  height: 2px;
  background: var(--edy-blue);
  border-radius: 2px;
}
.prod-tab .count { color: var(--edy-text-tertiary); font-weight: 400; margin-left: 4px; font-size: 12px; }
.prod-tab.active .count { color: var(--edy-blue); }

/* 筛选条（继承 review 风格） */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 16px 20px;
  background: #FFFFFF;
  border-radius: 0;
  border-bottom: 1px solid var(--edy-border-light);
}
.filter-bar .f-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-bar label {
  font-size: 13px;
  color: var(--edy-text-secondary);
  flex-shrink: 0;
}
.filter-bar input,
.filter-bar select {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--edy-border);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  color: var(--edy-text-primary);
  background: #FFFFFF;
  outline: none;
  transition: border-color 0.2s;
  min-width: 140px;
}
.filter-bar input:focus,
.filter-bar select:focus { border-color: var(--edy-blue); }
.filter-bar .btn { height: 32px; min-height: 32px; min-width: 60px; padding: 4px 12px; line-height: 22px; font-size: 14px; box-sizing: border-box; }
.filter-bar .btn.btn-sm { padding: 4px 16px; font-size: 13px; min-height: 30px; }

/* 列表容器 */
.list-card {
  background: #FFFFFF;
  border-radius: 0;
  overflow: hidden;
}
.list-card.standalone { border-radius: 0; }

/* 数据表格增强 */
.list-card .data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.list-card .data-table th {
  background: #F9FAFB;
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  color: var(--edy-text-primary);
  font-size: 13px;
  border-bottom: 1px solid #F3F4F6;
}
.list-card .data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--edy-border-light);
  color: var(--edy-text-primary);
  vertical-align: middle;
}
.list-card .data-table tbody tr:hover { background: #EFF6FF; }

/* 批量操作条 */
.batch-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--edy-blue-light);
  border-bottom: 1px solid var(--edy-border);
  font-size: 13px;
  color: var(--edy-blue);
}
.batch-bar .batch-count { font-weight: 600; }

/* 商品信息单元格（图 + 文） */
.cell-product {
  display: flex;
  gap: 10px;
  min-width: 0;
  align-items: flex-start;
}
.cell-product .cp-img {
  width: 60px; height: 60px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: #F2F4F7;
  border: 1px solid var(--edy-border-light);
}
.cell-product .cp-info { min-width: 0; flex: 1; }
.cell-product .cp-title {
  font-size: 13px;
  color: var(--edy-text-primary);
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cell-product .cp-meta {
  font-size: 12px;
  color: var(--edy-text-tertiary);
  line-height: 1.5;
}
.cell-product .cp-meta .price {
  color: var(--edy-error);
  font-family: var(--edy-font-display);
  font-weight: 600;
}

/* 商品状态徽章 */
.prod-status {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 4px;
}
.prod-status.on-sale { background: rgba(34,197,94,0.12); color: var(--edy-success); }
.prod-status.off-sale { background: rgba(142,142,147,0.12); color: #8E8E93; }
.prod-status.sold-out { background: rgba(245,158,11,0.12); color: var(--edy-warning); }
.prod-status.rejected { background: rgba(239,68,68,0.12); color: var(--edy-error); }
.prod-status.draft { background: rgba(79,110,247,0.12); color: var(--edy-blue); }
.prod-status.violation { background: rgba(239,68,68,0.12); color: var(--edy-error); }

/* 行操作 */
.row-actions { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.row-actions .act {
  background: none; border: none; padding: 0;
  color: var(--edy-blue); font-size: 13px;
  cursor: pointer; font-family: inherit;
  text-align: left;
  font-weight: 500;
}
.row-actions .act:hover { color: var(--edy-blue-hover); text-decoration: underline; }
.row-actions .act.danger { color: var(--edy-error); }
.row-actions .act.danger:hover { color: #DC2626; }

/* 空态 */
.empty-state {
  padding: 80px 20px;
  text-align: center;
  color: var(--edy-text-tertiary);
}
.empty-state svg { width: 64px; height: 64px; stroke: #C8CDD5; stroke-width: 1.5; fill: none; margin-bottom: 12px; }
.empty-state .empty-text { font-size: 14px; margin-bottom: 16px; }

/* 分页 */
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--edy-border);
  font-size: 13px;
  color: var(--edy-text-secondary);
}
.pager .pg-btn {
  min-width: 32px; height: 32px;
  padding: 0 10px;
  border: 1px solid var(--edy-border);
  border-radius: 6px;
  background: #FFFFFF;
  cursor: pointer;
  font-size: 13px;
  color: var(--edy-text-primary);
  font-family: inherit;
}
.pager .pg-btn:hover:not(:disabled) { border-color: var(--edy-blue); color: var(--edy-blue); }
.pager .pg-btn.active { background: var(--edy-blue); border-color: var(--edy-blue); color: #FFFFFF; }
.pager .pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pager select {
  height: 32px; padding: 0 8px;
  border: 1px solid var(--edy-border);
  border-radius: 6px;
  font-size: 13px;
  background: #FFFFFF;
  cursor: pointer;
}

/* ============ 商品体检 ============ */
.health-hero {
  display: flex;
  gap: 32px;
  padding: 28px 32px;
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  align-items: center;
  border: 1px solid #EEEEEE; 
}
.health-score {
  width: 130px; height: 130px;
  border-radius: 50%;
  background: conic-gradient(var(--edy-success) 92%, #F0F2F5 0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.health-score::before {
  content: '';
  position: absolute;
  inset: 8px;
  background: #FFFFFF;
  border-radius: 50%;
}
.health-score .score-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}
.health-score .score-value {
  font-family: var(--edy-font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--edy-text-primary);
  line-height: 1;
}
.health-score .score-label {
  font-size: 12px;
  color: var(--edy-text-secondary);
  margin-top: 4px;
}
.health-main { flex: 1; min-width: 0; }
.health-main h2 { font-size: 18px; font-weight: 600; color: var(--edy-text-primary); margin-bottom: 6px; }
.health-main h2 .hl { color: var(--edy-error); }
.health-main .health-desc { font-size: 13px; color: var(--edy-text-secondary); }
.health-traffic {
  width: 240px;
  padding-left: 24px;
  border-left: 1px solid var(--edy-border);
  font-size: 13px;
}
.health-traffic .tr-title { color: var(--edy-text-secondary); margin-bottom: 10px; font-weight: 500; }
.health-traffic .tr-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--edy-text-tertiary);
  margin-bottom: 6px;
}
.health-traffic .tr-progress {
  height: 6px;
  background: #F0F2F5;
  border-radius:4px;
  overflow: hidden;
}
.health-traffic .tr-progress-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--edy-error), var(--edy-warning), var(--edy-success));
  border-radius:4px;
}

.health-issue {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: #FFFFFF;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  border: 1px solid #EEEEEE;
}
.health-issue .hi-tag {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 4px;
  margin-right: 14px;
  font-weight: 500;
}
.health-issue .hi-tag.danger { background: rgba(239,68,68,0.12); color: var(--edy-error); }
.health-issue .hi-tag.warn { background: rgba(245,158,11,0.12); color: var(--edy-warning); }
.health-issue .hi-title { font-size: 14px; font-weight: 500; color: var(--edy-text-primary); margin-right: auto; }
.health-issue .hi-desc { font-size: 12px; color: var(--edy-text-secondary); margin-top: 4px; }
.health-issue .hi-meta { font-size: 13px; color: var(--edy-text-secondary); margin-right: 20px; }
.health-issue .hi-meta .count { color: var(--edy-error); font-weight: 600; margin: 0 4px; }

/* ============ 商品工具 - 卡片网格 ============ */
.tool-section { margin-bottom: 28px; }
.tool-section h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--edy-text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.tool-section h2::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--edy-blue);
  border-radius: 2px;
}
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.tool-card {
  display: flex;
  gap: 12px;
  padding: 18px 16px;
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
  align-items: flex-start;
  border: 1px solid #EEEEEE;
}
.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.tool-card .tc-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #5C7BFF, #4060E5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(64,96,229,0.18);
}
.tool-card .tc-icon svg { width: 22px; height: 22px; stroke-width: 2; }
.tool-card .tc-icon.blue   { background: linear-gradient(135deg, #5C7BFF, #4060E5); box-shadow: 0 2px 6px rgba(64,96,229,0.18); }
.tool-card .tc-icon.cyan   { background: linear-gradient(135deg, #4DBCE9, #2D9CCC); box-shadow: 0 2px 6px rgba(45,156,204,0.18); }
.tool-card .tc-icon.orange { background: linear-gradient(135deg, #FF9A4D, #F97316); box-shadow: 0 2px 6px rgba(249,115,22,0.20); }
.tool-card .tc-icon.gold   { background: linear-gradient(135deg, #FFC247, #F59E0B); box-shadow: 0 2px 6px rgba(245,158,11,0.20); }
.tool-card .tc-icon.green  { background: linear-gradient(135deg, #4ADE80, #22C55E); box-shadow: 0 2px 6px rgba(34,197,94,0.18); }
.tool-card .tc-icon.purple { background: linear-gradient(135deg, #A78BFA, #8B5CF6); box-shadow: 0 2px 6px rgba(139,92,246,0.18); }
.tool-card .tc-icon.red    { background: linear-gradient(135deg, #FB7185, #EF4444); box-shadow: 0 2px 6px rgba(239,68,68,0.18); }
.tool-card .tc-body { min-width: 0; flex: 1; }
.tool-card .tc-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--edy-text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tool-card .tc-badge {
  padding: 1px 6px;
  font-size: 10px;
  border-radius:4px;
  background: #FFF7ED;
  color: #EA580C;
  font-weight: 500;
}
.tool-card .tc-desc {
  font-size: 12px;
  color: var(--edy-text-secondary);
  line-height: 1.5;
}

/* ============ 表单（详情 / 新建活动等） ============ */
.form-card {
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  padding: 28px 32px;
  margin-bottom: 16px;
}
.form-card-title {
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  color: var(--edy-text-primary);
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--edy-border-light);
}
.form-card-title::before {
  content: '';
  width: 3px; height: 14px;
  background: var(--edy-blue);
  border-radius: 2px;
  margin-right: 8px;
}
.fm-row { display: flex; align-items: flex-start; margin-bottom:16px; }
.fm-label {
  width: 140px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 14px;
  padding-top: 10px;
  font-size: 13px;
  color: var(--edy-text-primary);
}
.fm-label .required { color: var(--edy-error); margin-right: 3px; }
.fm-value { flex: 1; min-width: 0; }
.fm-value .fm-input,
.fm-value .fm-select,
.fm-value .fm-textarea {
  width: 360px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--edy-border);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  color: var(--edy-text-primary);
  background: #FFFFFF;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.fm-value .fm-input.wide { width: 480px; }
.fm-value .fm-textarea { height: auto; min-height: 80px; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.fm-value .fm-input:focus,
.fm-value .fm-select:focus,
.fm-value .fm-textarea:focus {
  border-color: var(--edy-blue);
  box-shadow: 0 0 0 2px rgba(79,110,247,0.15);
}
.fm-value .fm-input.error,
.fm-value .fm-select.error,
.fm-value .fm-textarea.error {
  border-color: var(--edy-error);
  box-shadow: 0 0 0 2px rgba(239,68,68,0.12);
}
.fm-hint {
  font-size: 12px;
  color: var(--edy-text-tertiary);
  margin-top: 6px;
}
.fm-err {
  font-size: 12px;
  color: var(--edy-error);
  margin-top: 6px;
  display: none;
}
.fm-err.show { display: block; }

.fm-radio-group { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 4px; }
.fm-radio {
  padding: 6px 16px;
  border: 1px solid var(--edy-border);
  border-radius: 6px;
  background: #FFFFFF;
  font-size: 13px;
  color: var(--edy-text-primary);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.fm-radio:hover { border-color: var(--edy-blue); color: var(--edy-blue); }
.fm-radio.active {
  background: var(--edy-blue-light);
  border-color: var(--edy-blue);
  color: var(--edy-blue);
  font-weight: 500;
}

.fm-date-range { display: flex; align-items: center; gap: 8px; }
.fm-date-range .fm-input { width: 160px; }
.fm-date-range .sep { color: var(--edy-text-tertiary); }

/* 底部固定操作条 */
.form-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  margin-top: 16px;
}

/* 商品选择器弹窗 */
.picker-modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.picker-modal.show { display: flex; }
.picker-modal .picker {
  width: 720px;
  max-height: 80vh;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.picker .pk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--edy-border-light);
}
.picker .pk-header h3 { font-size: 16px; font-weight: 600; }
.picker .pk-close {
  border: none; background: transparent;
  width: 28px; height: 28px;
  cursor: pointer; font-size: 18px;
  color: var(--edy-text-tertiary);
  border-radius: 4px;
}
.picker .pk-close:hover { background: #F2F4F7; color: var(--edy-text-primary); }
.picker .pk-search {
  padding: 14px 22px;
  border-bottom: 1px solid var(--edy-border-light);
}
.picker .pk-search input {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--edy-border);
  border-radius: 6px;
  font-size: 13px;
  outline: none;
}
.picker .pk-search input:focus { border-color: var(--edy-blue); }
.picker .pk-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.picker .pk-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 22px;
  cursor: pointer;
  transition: background 0.15s;
}
.picker .pk-item:hover { background: #F7F8FA; }
.picker .pk-item input[type=checkbox],
.picker .pk-item input[type=radio] {
  accent-color: var(--edy-blue);
  width: 16px; height: 16px;
}
.picker .pk-item img {
  width: 44px; height: 44px;
  border-radius: 4px;
  object-fit: cover;
  background: #F2F4F7;
}
.picker .pk-item .pk-info { flex: 1; min-width: 0; font-size: 13px; }
.picker .pk-item .pk-title {
  color: var(--edy-text-primary);
  margin-bottom: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.picker .pk-item .pk-meta { color: var(--edy-text-tertiary); font-size: 12px; }
.picker .pk-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 22px;
  border-top: 1px solid var(--edy-border-light);
}
.picker .pk-footer .pk-count { font-size: 13px; color: var(--edy-text-secondary); }
.picker .pk-footer .pk-count strong { color: var(--edy-blue); font-weight: 600; }

/* Toast */
.prod-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26,29,38,0.92);
  color: #fff;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.prod-toast.show { opacity: 1; }
.prod-toast.success { background: rgba(34,197,94,0.95); }
.prod-toast.error { background: rgba(239,68,68,0.95); }

/* 次要按钮（重置/导出/批量导出 等）统一为深色文案，正常态与悬浮态一致 */
.btn.btn-secondary,
.btn.btn-secondary:hover,
.btn.btn-secondary:focus,
.btn.btn-secondary:active { 
  color: #171A20; 
  font-weight: 400;
}
