.image-preview {
  text-align: center;
  margin-bottom: 20px;
}
.image-preview img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.color-palette {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}
.color-swatch {
  position: relative;           /* 为反馈文字定位 */
  width: 100px;
  height: 100px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 8px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  font-weight: bold;
  transition: transform 0.2s;
  cursor: pointer;              /* 可点击复制 */
}
.color-swatch:hover {
  transform: scale(1.05);
}
.color-hex {
  margin-bottom: 2px;
  font-size: 13px;
  letter-spacing: 1px;
}
.color-label {
  font-size: 11px;
  opacity: 0.8;
}
/* 复制成功反馈文字 */
.copy-feedback {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform: translate(-50%, 50%);
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;         /* 不阻挡点击 */
}
.color-swatch.copied .copy-feedback {
  opacity: 1;
}

.palette-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

/* ========== 收藏列表统一风格 ========== */
.productList {
  overflow: hidden;
  clear: both;
}
.fav-grid-item.pro_list {
  float: left;
  min-height: 1px;
  padding-left: 5px;
  padding-right: 5px;
  box-sizing: border-box;
  margin: 10px 0;
  width: 100%;
  transition: transform 0.2s;
}
.fav-grid-item:hover {
  transform: scale(1.02);
}
.fav-grid-item .pro_title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  max-width: 100%;
}
.fav-actions {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* Extract Palette 按钮 */
.compose-btn {
  background-color: #4f8cff;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}
.compose-btn:hover {
  background-color: #3a6fd8;
}

/* 垃圾桶删除按钮 */
.fav-remove-btn {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}
.fav-remove-btn::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: #ff6b6b;
  transition: width 0.25s ease;
}
.fav-remove-btn:hover {
  color: #ff6b6b;
}
.fav-remove-btn:hover::after {
  width: 100%;
}
.fav-remove-icon {
  width: 14px;
  height: 14px;
  stroke: #999;
  transition: stroke 0.2s ease;
}
.fav-remove-btn:hover .fav-remove-icon {
  stroke: #ff6b6b;
}

/* ========== 自定义网格 ========== */
@media (max-width: 767px) {
  .fav-grid-item.pro_list {
    width: 50%;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .fav-grid-item.pro_list {
    width: 33.333%;
  }
}
@media (min-width: 992px) {
  .fav-grid-item.pro_list {
    width: 20%;
  }
}

/* 响应式调色板色块 */
@media (max-width: 768px) {
  .color-swatch { width: 70px; height: 70px; font-size: 12px; }
  .color-hex { font-size: 10px; }
}

/* ========== 分类筛选样式（已修正换行） ========== */
.fav-filter-bar {
  margin-bottom: 20px;
  overflow: hidden;
}
.fav-filter-scroll {
  display: flex;
  flex-wrap: wrap;          /* 允许换行 */
  gap: 8px;
  justify-content: flex-start;
  padding-bottom: 4px;
}
.fav-filter-btn {
  display: inline-block;
  margin: 4px 6px;
  padding: 8px 18px;
  background: #f5f6fa;
  color: #666;
  border: 1px solid #e0e4e8;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.fav-filter-btn:hover {
  background: #eef2ff;
  border-color: #4f8cff;
  color: #4f8cff;
}
.fav-filter-btn.active {
  background: #4f8cff;
  color: #fff;
  border-color: #4f8cff;
}

/* 统一操作按钮 */
.apply-btn {
  background-color: #4f8cff;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
}
.apply-btn:hover {
  background-color: #3a6fd8;
}

/* ========== 上传按钮区域 ========== */
.upload-section {
  text-align: center;
  margin: 0 0 15px 0;
}
.upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  background: #fff;
  color: #4f8cff;
  border: 1.5px dashed #4f8cff;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f8faff;
}
.upload-btn:hover {
  background: #4f8cff;
  color: #fff;
  border-style: solid;
}
.upload-btn:active {
  background: #3a6fd8;
  border-color: #3a6fd8;
}

/* 上传图片浮动标签（与之前相同，放在这里统一） */
.custom-badge {
  position: absolute;
  top: 0;
  left: 0;
  background: #ff9800;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px 3px 5px;
  border-radius: 0 6px 6px 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.custom-badge::before {
  content: "⬆";
  font-size: 11px;
  flex-shrink: 0;
}
/* 色卡库入口提示条 */
.vault-info {
  margin-top: 15px;
  background: #f3f0ff;
  border-left: 3px solid #7c4dff;
  color: #4a3b7c;
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.vault-info a.vault-btn {
  text-decoration: none;
  color: #fff !important;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 4px;
  background-color: #7c4dff;
  transition: background 0.2s;
}
.vault-info a.vault-btn:hover {
  background-color: #6a3de8;
}

/* 教程按钮样式（与上传按钮协调） */
.guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 24px;
  background: #f8faff;
  color: #666;
  border: 1.5px dashed #aaa;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.guide-btn:hover {
  border-color: #4f8cff;
  color: #4f8cff;
  background: #eef2ff;
}
.guide-btn:active {
  background: #dce6ff;
}

/* 教程面板样式 */
.guide-panel {
  background: #f9fafb;
  border: 1px solid #e0e4e8;
  border-radius: 8px;
  padding: 15px 20px;
  margin-bottom: 20px;
  text-align: left;
  font-size: 14px;
  line-height: 1.6;
  color: #333;
}
.guide-panel h4 {
  margin: 0 0 8px 0;
  color: #2764b3;
}
.guide-panel ol, .guide-panel ul {
  padding-left: 20px;
  margin: 5px 0;
}