/* 定制工坊专属样式 - 与哈哈打卡全局设计系统保持严格一致 */

/* 顶部横幅区 */
.workshop-hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--page-bg) 100%);
  border-bottom: 1px solid var(--line-soft);
  padding: 0.2rem 0 0;
  margin-bottom: 0.75rem;
}

.workshop-kicker,
.workshop-eyebrow {
  color: var(--brand-blue);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.workshop-lead {
  max-width: 640px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* 顶部选项卡导航 */
.workshop-tabs {
  display: flex;
  gap: 0.5rem 1.5rem;
  margin-top: 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.workshop-tabs-main,
.workshop-tabs-account {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.workshop-tabs-account { margin-left: auto; gap: 1rem; }
.workshop-tabs .workshop-tabs-account a { font-size: 0.82rem; }
.workshop-tabs-account i { margin-right: 0.35rem; }

@media (max-width: 575px) {
  .workshop-tabs { flex-wrap: wrap; gap: 0; }
  .workshop-tabs-main { width: 100%; justify-content: space-between; gap: 0.75rem; }
  .workshop-tabs-account { margin-left: auto; }
}

.workshop-tabs::-webkit-scrollbar {
  display: none;
}

.workshop-tabs a {
  padding: 0.65rem 0.2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.workshop-tabs a:hover {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
}

.workshop-tabs a.active {
  color: var(--brand-blue);
  border-bottom-color: var(--brand-blue);
  font-weight: 700;
}

/* 容器与网格 */
.workshop-grid,
.workshop-section,
.workshop-form-page,
.workshop-list-page,
.workshop-detail-page,
.workshop-cards,
.workshop-admin {
  max-width: 1140px;
  margin-right: auto;
  margin-left: auto;
}

/* 工坊首页与入口卡片容器 */
.workshop-home-container {
  max-width: 1140px;
  margin: 0 auto;
  padding-bottom: 3.5rem;
}

/* 4 大核心入口卡片网格 - 极简干练 */
.workshop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 768px) {
  .workshop-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* 入口卡片样式 - 极简排版，无多余图标 */
a.workshop-entry-card {
  text-decoration: none !important;
  color: inherit !important;
  display: block;
  background: var(--surface-bg);
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  padding: 1.6rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.02);
  transition: all 0.2s ease;
}

a.workshop-entry-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.08);
}

.entry-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.entry-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.tag-blue { background: #eff6ff; color: #1d4ed8; }
.tag-amber { background: #fffbeb; color: #b45309; }
.tag-green { background: #f0fdf4; color: #15803d; }
.tag-slate { background: #f1f5f9; color: #475569; }

.entry-card-body {
  flex: 1;
  margin-bottom: 1.25rem;
}

.entry-title {
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.5rem;
  text-decoration: none !important;
}

.entry-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.entry-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-blue);
  transition: color 0.2s ease;
}

.entry-arrow {
  transition: transform 0.25s ease;
}

a.workshop-entry-card:hover .entry-card-footer {
  color: var(--brand-blue-dark);
}

a.workshop-entry-card:hover .entry-arrow {
  transform: translateX(4px);
}

/* 定制标准化流程面板 */
.workshop-workflow-section {
  background: var(--surface-bg);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-subtle);
}

.workflow-header {
  text-align: center;
  margin-bottom: 2rem;
}

.workflow-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.35rem;
}

.workflow-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0;
}

.workflow-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 992px) {
  .workflow-steps {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .workflow-divider {
    display: none;
  }
}

.workflow-step {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.step-num {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-blue);
  background: #eff6ff;
  border: 1px solid #dbeafe;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.3rem;
}

.step-content p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 0;
}

.workflow-divider {
  color: #cbd5e1;
  font-size: 0.85rem;
  padding: 0 0.5rem;
}

/* 作品橱窗精选预览 */
.workshop-featured-section {
  background: var(--surface-bg);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-subtle);
}

.featured-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
}

.featured-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 0.2rem;
}

.featured-subtitle {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.featured-more-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.featured-more-link:hover {
  color: var(--brand-blue-dark);
}

.workshop-products-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

@media (max-width: 992px) {
  .workshop-products-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 576px) {
  .workshop-products-preview {
    grid-template-columns: 1fr;
  }
}

a.preview-product-card {
  text-decoration: none !important;
  color: inherit !important;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

a.preview-product-card:hover {
  transform: translateY(-3px);
  border-color: #bfdbfe;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.preview-product-img {
  aspect-ratio: 4 / 3;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.preview-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-fallback-icon {
  font-size: 2.2rem;
  color: #cbd5e1;
}

.preview-product-info {
  padding: 0.85rem 1rem;
}

.preview-product-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preview-price {
  font-weight: 700;
  color: var(--danger-soft);
  font-size: 1rem;
}

.preview-author {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* 面板通用样式 */
.workshop-panel {
  padding: 1.5rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface-bg);
  box-shadow: var(--shadow-subtle);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* 重点主展面板 - 统一采用品牌蓝渐变 */
.workshop-panel-wide {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
  border-color: transparent;
  box-shadow: 0 10px 25px rgba(39, 128, 227, 0.25);
}

.workshop-panel-wide h2 {
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0.4rem 0 0.8rem;
}

.workshop-panel-wide p {
  color: rgba(255, 255, 255, 0.9);
  max-width: 580px;
  font-size: 0.95rem;
}

.workshop-panel-wide .workshop-eyebrow {
  color: var(--accent-warm-soft);
}

.workshop-panel-wide .btn-primary {
  background: #ffffff;
  color: var(--brand-blue-dark);
  border-color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.workshop-panel-wide .btn-primary:hover {
  background: var(--accent-warm-soft);
  color: var(--text-strong);
  border-color: var(--accent-warm-soft);
}

.workshop-panel-icon {
  padding: 1rem 1.5rem;
  opacity: 0.25;
  font-size: 5rem;
}

.workshop-panel h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-strong);
  margin-top: 0.35rem;
}

.workshop-panel h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.75rem;
}

/* 说明区 */
.workshop-section {
  padding: 2.5rem 0;
}

.workshop-section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--line-muted);
  padding-bottom: 0.75rem;
}

.workshop-section-heading h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-strong);
  margin: 0;
}

.workshop-section-heading span {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.workshop-step {
  padding: 1.25rem;
  background: var(--surface-bg);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  height: 100%;
}

.workshop-step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(39, 128, 227, 0.1);
  color: var(--brand-blue);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.workshop-step h3 {
  color: var(--text-strong);
  font-size: 1rem;
  font-weight: 600;
}

.workshop-step p {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin: 0;
  line-height: 1.5;
}

/* 表单定制项 */
.workshop-form-section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.workshop-form-section:first-child,
.workshop-form-section.pt-0 {
  padding-top: 0 !important;
}

.workshop-option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.workshop-option {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  min-width: 140px;
  border: 1.5px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-bg);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.workshop-option:hover {
  border-color: var(--brand-blue);
  background: #f8fbfe;
}

.workshop-option input[type="radio"],
.workshop-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  margin: 0;
}

.workshop-option:has(input:checked) {
  border-color: var(--brand-blue);
  background: rgba(39, 128, 227, 0.06);
  box-shadow: 0 0 0 2px var(--brand-blue);
}

.workshop-option:has(input:checked)::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-blue, #2563eb);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.workshop-option.single-option {
  cursor: default;
}

.workshop-option-name {
  font-weight: 600;
  color: var(--text-strong);
  font-size: 0.92rem;
  line-height: 1.35;
}

.workshop-option-price {
  margin-top: 0.2rem;
  color: var(--brand-blue);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
}

.workshop-selected-spec-preview {
  margin-top: 0.9rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.workshop-spec-preview-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 0.6rem;
}

.workshop-spec-preview-title {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
  flex-shrink: 0;
}

.workshop-spec-preview-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
  margin: 0 !important;
  word-break: break-word;
}

/* 规格产品示例平铺展示（与公共橱窗点开详情一致） */
.workshop-selected-spec-preview .workshop-spec-gallery {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  margin: 0.5rem 0 0.2rem 0;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.workshop-selected-spec-preview .workshop-source-images img {
  background: #ffffff;
}

/* 反面（B面）紧凑精致药丸按钮组 */
.workshop-face-card {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

.workshop-face-mode-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workshop-face-mode-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 15px;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease-in-out;
  margin: 0;
}

.workshop-face-mode-pill input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.workshop-face-mode-pill:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.workshop-face-mode-pill.is-selected {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #3b82f6;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(59, 130, 246, 0.12);
}
}

.workshop-option > span {
  font-weight: 600;
  color: var(--text-strong);
  font-size: 0.95rem;
}

.workshop-option small {
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

/* 列表与工具栏 */
.workshop-list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.workshop-list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--surface-bg);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-subtle);
  transition: all 0.2s ease;
}

.workshop-list-row:hover {
  background: #f8fafc;
  border-color: var(--brand-blue);
  transform: translateX(3px);
}

.workshop-list-row small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.workshop-list-row b {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-strong);
}

/* 状态徽章 */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(39, 128, 227, 0.1);
  color: var(--brand-blue);
  font-size: 0.78rem;
  font-weight: 600;
}

.status-badge.status-warning {
  background: rgba(244, 183, 64, 0.15);
  color: var(--accent-warm-dark);
}

.status-badge.status-success {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

/* 空状态 */
.workshop-empty {
  padding: 4rem 1.5rem;
  border: 1.5px dashed var(--line-soft);
  border-radius: 12px;
  background: var(--surface-bg);
  color: var(--text-muted);
  text-align: center;
  font-size: 0.95rem;
}

/* 详情页头部与金额 */
.workshop-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-soft);
}

.workshop-total {
  color: var(--brand-blue-dark);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}

/* 流程时间线 */
.workshop-timeline-item {
  display: flex;
  gap: 0.85rem;
  margin-left: 0.3rem;
  padding: 0 0 1.25rem 1rem;
  border-left: 2px solid var(--line-soft);
  position: relative;
}

.workshop-timeline-item:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}

.workshop-timeline-item > div {
  flex-grow: 1;
  min-width: 0;
}

.workshop-timeline-item > i {
  position: absolute;
  left: -7px;
  top: 2px;
  color: var(--brand-blue);
  background: #ffffff;
  font-size: 0.8rem;
}

.workshop-timeline-shipment > i {
  left: -8px;
  top: 1px;
  color: #10b981;
  background: #ffffff;
  font-size: 0.85rem;
}

.workshop-timeline-item p {
  margin: 0.25rem 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.workshop-timeline-item small {
  color: var(--text-soft);
  font-size: 0.78rem;
}

.workshop-prose {
  white-space: pre-wrap;
  line-height: 1.7;
  color: var(--text-strong);
}

/* 投稿、地址与收益列表行 */
.workshop-submission,
.workshop-address,
.workshop-earning {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line-muted);
}

.workshop-submission:last-child,
.workshop-address:last-child,
.workshop-earning:last-child {
  border-bottom: none;
}

.workshop-submission p,
.workshop-address p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* 商品橱窗卡片网格 */
.workshop-product-search input { min-width: 0; }
.workshop-product-search button { flex-shrink: 0; white-space: nowrap; }
.workshop-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.workshop-product-card {
  padding: 1.15rem;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--surface-bg);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-subtle);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.workshop-product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
  border-color: var(--brand-blue);
}

.workshop-product-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 1rem;
  background: #f1f5f9;
  border-radius: 8px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 2.5rem;
}
.workshop-product-image img { display: block; width: 100%; height: 100%; object-fit: cover; }

.workshop-product-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 0.4rem;
}

.workshop-product-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  flex-grow: 1;
}

.workshop-product-kind {
  margin-bottom: 0.35rem;
}

/* 管理提示与 JSON 快照 */
.workshop-admin-note {
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--accent-warm-line);
  border-radius: 8px;
  background: var(--accent-warm-soft);
  color: var(--accent-warm-dark);
  font-size: 0.9rem;
}

.workshop-json {
  max-height: 320px;
  overflow: auto;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  font-size: 0.75rem;
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* 页面内联小链接（如首页作品卡片上的定制按钮） */
.workshop-inline-link {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  background: rgba(39, 128, 227, 0.08);
  color: var(--brand-blue);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.workshop-inline-link:hover {
  background: var(--brand-blue);
  color: #ffffff;
}

.workshop-source {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1.15rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line-soft);
}

.workshop-source-images {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  margin: 0.85rem 0;
  padding-bottom: 4px;
}

.workshop-source-images img,
.workshop-proof-image {
  max-width: 160px;
  max-height: 200px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  object-fit: contain;
  background: #f8fafc;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.workshop-source-image-trigger,
.workshop-proof-image-trigger {
  display: inline-flex;
  /* 按图片实际显示宽度占位，避免 flex 按原图像素撑宽按钮、导致间距不均。 */
  flex: 0 0 auto;
  width: max-content;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  line-height: 0;
  border-radius: 6px;
}

.workshop-source-image-trigger:hover img,
.workshop-proof-image-trigger:hover img {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  border-color: #3b82f6;
}

.workshop-proof-image {
  display: block;
  max-width: 100%;
  max-height: 380px;
  margin-top: 0.5rem;
}

.workshop-payment-note {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: rgba(39, 128, 227, 0.06);
  border: 1px solid rgba(39, 128, 227, 0.18);
  color: var(--brand-blue-dark);
  font-size: 0.88rem;
}

.workshop-shipment {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line-muted);
  color: var(--text-strong);
  font-size: 0.9rem;
}

.workshop-submission-thumb {
  width: 56px;
  height: 56px;
  margin-right: 0.75rem;
  border-radius: 6px;
  object-fit: cover;
  vertical-align: middle;
  border: 1px solid var(--line-soft);
}

.workshop-option-summary {
  padding-left: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .workshop-hero {
    padding: 0.4rem 0 0;
  }
  .workshop-grid {
    display: block;
  }
  .workshop-grid > .workshop-panel {
    margin-bottom: 1rem;
  }
  .workshop-panel-wide {
    flex-direction: column;
    align-items: flex-start;
  }
  .workshop-panel-icon {
    display: none;
  }
  .workshop-list-toolbar,
  .workshop-detail-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .workshop-list-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .workshop-list-row .text-end {
    text-align: left !important;
    margin-top: 0.5rem;
  }
}

/* 工坊管理工作台专属样式 */
.workshop-admin-header {
  background: #ffffff;
  border-bottom: 1px solid var(--line-soft);
  padding: 1.5rem 0;
  margin-bottom: 1.8rem;
}

.workshop-admin-nav-tabs {
  border-bottom: 1px solid var(--line-soft);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.workshop-admin-nav-tabs .nav-link {
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.65rem 1rem;
  font-weight: 500;
  background: transparent;
  transition: all 0.2s ease;
}

.workshop-admin-nav-tabs .nav-link:hover {
  color: var(--brand-blue);
  border-bottom-color: var(--line-soft);
}

.workshop-admin-nav-tabs .nav-link.active {
  color: var(--brand-blue);
  border-bottom: 2px solid var(--brand-blue);
  background: transparent;
  font-weight: 700;
}

.workshop-pipeline-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.workshop-pipeline-filter .btn-filter {
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  border-radius: 20px;
  border: 1px solid var(--line-soft);
  background: #ffffff;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s ease;
}

.workshop-pipeline-filter .btn-filter.active,
.workshop-pipeline-filter .btn-filter:hover {
  background: var(--brand-blue);
  color: #ffffff;
  border-color: var(--brand-blue);
}

.workshop-order-pipeline-card {
  background: #ffffff;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s ease;
}

.workshop-order-pipeline-card:hover {
  border-color: #cbd5e1;
}

.order-pipeline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 0.85rem;
}

.order-pipeline-body {
  font-size: 0.92rem;
  color: var(--text-strong);
}

.order-pipeline-action {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--line-soft);
  background: #f8fafc;
  padding: 0.85rem 1rem;
  border-radius: 6px;
}
.workshop-commerce-page{padding:0.5rem 0 2.5rem}.workshop-commerce-head{display:flex;justify-content:space-between;align-items:center;gap:0.75rem;margin-bottom:0.75rem}.commerce-cart-item{display:flex;gap:1.5rem;align-items:center;margin-bottom:1rem}.commerce-cart-controls{display:flex;align-items:start;gap:1rem;margin-left:auto}.commerce-cart-controls form:first-child{width:92px}.commerce-cart-controls input{min-width:72px}.commerce-cart-summary{display:flex;justify-content:space-between;align-items:center;margin-top:1rem}.commerce-line-item{display:flex;justify-content:space-between;gap:1rem;padding:.9rem 0;border-bottom:1px solid #e5e7eb}.commerce-line-item small{display:block;color:#6b7280}.checkout-totals dl,.checkout-totals{margin:0}.checkout-totals dt,.checkout-totals dd{display:inline-block;width:49%;padding:.35rem 0;margin:0}.checkout-totals dd{text-align:right}.commerce-grand-total{font-size:1.15rem;font-weight:700;border-top:1px solid #d1d5db;margin-top:.5rem!important;padding-top:.75rem!important}.shipping-group input{font-size:.9rem}

/* 紧凑移动端结算、购物车与订单优化 - 杜绝大面积空白与无谓下拉 */
.checkout-page-compact,
.cart-page-compact,
.trade-page-compact {
  max-width: 680px;
  margin: 0 auto;
  padding: 0.25rem 0.25rem 2rem;
}

.checkout-section-box,
.cart-compact-card,
.trade-box {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.hover-danger:hover {
  color: #dc3545 !important;
}

@media(max-width:700px){.workshop-commerce-head,.commerce-cart-item{display:block}.commerce-cart-controls{margin-top:1rem;justify-content:space-between}.commerce-cart-summary{gap:1rem;align-items:start}}
.commerce-thumb{width:42px;height:42px;object-fit:cover;border-radius:5px;border:1px solid #e5e7eb;margin:.4rem .3rem 0 0;vertical-align:middle}

/* Match the existing Bootstrap 4 form controls on the commerce pages. */
.workshop-native-admin .form-select,.workshop-commerce-page .form-select{display:block;width:100%;max-width:100%;padding:.375rem .75rem;font-size:1rem;line-height:1.5;color:#495057;background:#fff;border:1px solid #ced4da;border-radius:.25rem}
.workshop-native-admin select[multiple].form-select{min-height:9rem}
.workshop-commerce-page .text-end{text-align:right}
.workshop-native-admin .ms-2{margin-left:.5rem}
.workshop-commerce-page .checkout-totals{margin-top:1rem}
@media(min-width:992px){.workshop-commerce-page .checkout-totals{margin-top:0}}

/* Direct choices and local image previews, shared by storefront and admin. */
select[data-workshop-choice-source] { display: none !important; }
.workshop-choices { display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem; margin: .35rem 0 .75rem; min-width: 0; }
.workshop-choices-scroll { max-height: 20rem; overflow-y: auto; padding: .2rem; }
.workshop-choice { display: flex; align-items: center; gap: .55rem; max-width: 100%; margin: 0; padding: .65rem .85rem; border: 1px solid #ccd5df; border-radius: 8px; background: #fff; cursor: pointer; overflow-wrap: anywhere; line-height: 1.5; }
.workshop-choice input { flex: 0 0 auto; width: 16px; height: 16px; margin: 0; accent-color: #2479e9; }
.workshop-choice:has(input:checked) { border-color: #2479e9; background: #eef5ff; color: #185db3; }
.workshop-choice:has(input:focus-visible) { outline: 2px solid #2479e9; outline-offset: 2px; }
.workshop-choice:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.workshop-choice[hidden], .workshop-upload-previews[hidden], .workshop-upload-preview[hidden] { display: none !important; }
.workshop-admin .workshop-choice { padding: .35rem .5rem; font-size: 12px; }
.workshop-upload-previews { display: flex; flex-wrap: wrap; gap: 1rem; margin: .75rem 0; }
.workshop-upload-previews figure { width: 180px; max-width: 100%; margin: 0; }
.workshop-upload-preview { display: block; width: 100%; padding: .4rem; border: 1px solid #ccd5df; border-radius: 8px; background: #fff; cursor: zoom-in; }
.workshop-upload-preview img { display: block; width: 100%; height: 150px; object-fit: contain; }
.workshop-upload-previews figcaption { font-size: .8rem; color: #657181; overflow-wrap: anywhere; margin-top: .4rem; }
.workshop-image-dialog { width: min(960px, 94vw); max-height: 92vh; padding: 1rem; border: 0; border-radius: 10px; }
.workshop-image-dialog::backdrop { background: rgba(15, 23, 42, .65); }
.workshop-image-dialog img { display: block; max-width: 100%; max-height: 76vh; object-fit: contain; margin: .75rem auto 0; }

.workshop-clear-images { align-self: flex-start; }
input[data-image-gallery] {
  display: none !important;
}

.workshop-image-gallery-wrap { border-radius: 10px; transition: background .15s ease, box-shadow .15s ease; }
.workshop-image-gallery-wrap.is-file-over { background: #eef5ff; box-shadow: 0 0 0 2px #2479e9 inset; }
.workshop-image-gallery { align-items: flex-start; gap: .65rem; margin: .4rem 0 .35rem; }
.workshop-image-gallery-item { position: relative; width: 108px !important; height: 108px; margin: 0; cursor: grab; border: 1.5px solid #dbe3ec; border-radius: 10px; overflow: hidden; background: #fff; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.workshop-image-gallery-item:hover { border-color: #93b4dc; box-shadow: 0 2px 8px rgba(15, 23, 42, .08); }
.workshop-image-gallery-item.is-cover { border: 2px solid #2f9e6b; }
.workshop-image-gallery-item.is-dragging { opacity: .4; }
.workshop-image-gallery-item.is-drop-target { border-color: #2479e9; transform: scale(1.04); box-shadow: 0 0 0 3px rgba(36, 121, 233, .25); }
.workshop-image-gallery-item:active { cursor: grabbing; }
.workshop-image-gallery .workshop-upload-preview { width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0; background: #f8fafc; }
.workshop-image-gallery .workshop-upload-preview img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.workshop-image-gallery .workshop-upload-preview:focus-visible { outline: 2px solid #2479e9; outline-offset: -2px; }
.workshop-image-gallery-handle { position: absolute; top: 5px; left: 5px; width: 20px; height: 20px; border-radius: 5px; background: rgba(15, 23, 42, .45); color: #fff; font-size: 13px; line-height: 20px; text-align: center; pointer-events: none; }
.workshop-image-gallery-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(15, 23, 42, .6); color: #fff; font-size: 16px; line-height: 22px; text-align: center; cursor: pointer; opacity: .85; }
.workshop-image-gallery-remove:hover, .workshop-image-gallery-remove:focus-visible { background: #dc3545; opacity: 1; }
.workshop-image-gallery-cover { position: absolute; left: 0; right: 0; bottom: 0; padding: 2px 0; background: #2f9e6b; color: #fff; font-size: 11px; font-weight: 600; text-align: center; pointer-events: none; }
.workshop-image-gallery-order { position: absolute; right: 4px; bottom: 4px; display: none; gap: 2px; }
.workshop-image-gallery-item.is-cover .workshop-image-gallery-order { bottom: 22px; }
.workshop-image-gallery-item:hover .workshop-image-gallery-order, .workshop-image-gallery-item:focus-within .workshop-image-gallery-order { display: flex; }
.workshop-image-gallery-order button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: rgba(255, 255, 255, .9); color: #334155; font-size: 14px; line-height: 18px; cursor: pointer; }
.workshop-image-gallery-order button:disabled { opacity: .35; cursor: default; }
.workshop-image-gallery-mask { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; background: rgba(255, 255, 255, .72); color: #185db3; font-size: 12px; text-align: center; }
.workshop-image-gallery-mask.is-error { background: rgba(220, 53, 69, .82); color: #fff; }
.workshop-image-gallery-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; font-size: 12px; color: #64748b; }
.workshop-image-gallery-counter { flex: 0 0 auto; padding: 0 .5rem; border-radius: 999px; background: #e9f7ef; color: #23855a; font-weight: 600; }
.workshop-image-gallery-counter.is-short { background: #fdecee; color: #c0392b; }
.workshop-image-gallery-status { margin-top: .25rem; }

.workshop-image-gallery-add {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  margin: 0;
  border: 1.5px dashed #8fcfae;
  border-radius: 10px;
  background: #f6fcf8;
  cursor: pointer;
  color: #23855a;
  transition: all 0.2s ease;
  user-select: none;
  padding: 0;
}

.workshop-image-gallery-add:hover {
  border-color: #2479e9;
  background: #f0f7ff;
  color: #2479e9;
}

.workshop-image-gallery-add .add-icon {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 2px;
  font-weight: 300;
}

.workshop-image-gallery-add .add-text {
  font-size: 12px;
  font-weight: 600;
}

.workshop-image-gallery-add .add-sub {
  font-size: 11px;
  color: #94a3b8;
}

/* Category choices size to their content instead of squeezed select columns. */
.workshop-category-create { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.workshop-category-name { flex: 1 1 180px; min-width: 0; }
.workshop-category-field { flex: 0 0 auto; max-width: 100%; }
.workshop-category-create .workshop-choices { margin: 0; flex-wrap: nowrap; }
.workshop-category-create .workshop-choice { white-space: nowrap; }
.workshop-category-edit { min-width: 230px; }
.workshop-category-edit .workshop-choices { margin-right: .5rem; }
.workshop-goods-total { margin: 0 0 1rem; font-size: 1rem; }
.workshop-goods-total strong { margin-left: .5rem; font-size: 1.35rem; }
.workshop-goods-total[hidden] { display: none !important; }

.commerce-cart-description{min-width:0}.commerce-cart-heading{display:flex;align-items:baseline;gap:.3em;min-width:0}.commerce-cart-author{flex-shrink:0;max-width:40%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.commerce-cart-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.workshop-gallery-progress { display: block; width: 100%; height: 6px; margin-top: .4rem; }

/* Checkout artwork previews retain the complete composition. */
.checkout-item-content{display:flex;align-items:center;gap:.75rem;min-width:0;overflow-wrap:anywhere}
.checkout-item-images{display:flex;flex-wrap:wrap;gap:.35rem;flex:0 0 72px}
.checkout-item-images:empty{display:none}
.checkout-item-images .commerce-thumb{width:72px;height:72px;object-fit:contain;background:#f8fafc;margin:0}
.commerce-line-item>.text-end{flex-shrink:0}

.commerce-cart-main{display:flex;align-items:center;gap:1rem;flex:1;min-width:0}
.commerce-cart-thumbnail{display:block;width:88px;height:88px;flex:0 0 88px;object-fit:cover;object-position:center;border:1px solid #e5e7eb;border-radius:6px;background:#f8fafc}
@media(max-width:700px){.commerce-cart-main{gap:.75rem}.commerce-cart-thumbnail{width:72px;height:72px;flex-basis:72px}}

.workshop-address-form label{font-size:.9rem}
.workshop-address-recognizer{padding:.8rem;background:#f3f7fc;border:1px solid #dfe7f1;border-radius:6px;margin-bottom:1rem}
.workshop-address-recognizer-actions{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin:.6rem 0}
.workshop-address-recognizer-actions button{flex-shrink:0}
.workshop-address-regions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;margin-bottom:1rem}
.workshop-address-regions select{appearance:auto;padding-left:.4rem;padding-right:.1rem}
.workshop-address-form{margin-top:0}
@media(max-width:991px){.workshop-address-form{margin-top:1rem}}

/* One commerce order per row; the artwork identifies each custom item. */
.workshop-group-table{min-width:1000px;font-variant-numeric:tabular-nums}
.workshop-group-number{width:190px;min-width:160px;overflow-wrap:anywhere}
.workshop-group-items{display:flex;flex-wrap:wrap;gap:12px;min-width:250px}
.workshop-group-item{display:flex;align-items:center;gap:8px;flex:1 1 240px;max-width:360px;min-width:0}
.workshop-group-item>a{flex:none}
.workshop-group-item-info{min-width:0;overflow-wrap:anywhere}
.trade-item{display:flex;align-items:center;gap:12px;padding:12px 0}
.trade-item-art{display:block;flex:0 0 64px;width:64px;height:64px;object-fit:cover;border-radius:6px;background:var(--surface-soft,#f8fafc)}
.trade-item-info{flex:1;min-width:0}
.trade-item-amount{flex:none;white-space:nowrap;font-variant-numeric:tabular-nums}
.trade-order-meta{flex-wrap:wrap;gap:4px 16px;overflow-wrap:anywhere}

/* 我的订单：一张卡片对应一笔订单，款式与件数直接可见。 */
.workshop-list-row.trade-preview-card{display:block;padding:12px 14px}
.trade-preview-header,.trade-preview-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.trade-preview-header{margin-bottom:10px}
.trade-preview-number{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.78rem;color:var(--text-muted)}
.trade-preview-header .status-badge{flex-shrink:0}
.trade-preview-items{display:flex;gap:16px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;padding-bottom:4px}
.trade-preview-item{display:flex;align-items:center;gap:10px;min-width:0;flex:0 0 280px;max-width:90%}
.trade-preview-image{display:block;width:56px;height:56px;flex:0 0 56px;object-fit:cover;border-radius:5px;background:var(--surface-soft,#f8fafc)}
.trade-preview-placeholder{display:flex;align-items:center;justify-content:center;font-size:.65rem;color:var(--text-muted)}
.trade-preview-info{flex:1;min-width:0}
.trade-preview-name{font-size:.88rem;font-weight:600;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.trade-preview-description{margin-top:3px;color:var(--text-muted);font-size:.76rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trade-preview-quantity{flex:none;font-size:.82rem;color:var(--text-muted)}
.trade-preview-more{flex:none;align-self:center;font-size:.76rem;color:var(--text-muted)}
.trade-preview-footer{flex-wrap:wrap;margin-top:10px;font-size:.76rem;color:var(--text-muted)}
.trade-preview-total{margin-left:auto;white-space:nowrap}
.trade-preview-total strong{margin-left:8px;font-size:.95rem;color:var(--text-strong)}

/* 橱窗商品介绍：作者、作品描述与继承的产品规格 */
.workshop-product-info {
  margin-top: 0.5rem;
}

.workshop-product-author {
  font-size: 0.95rem;
}

.workshop-product-author a {
  font-weight: 600;
}

.workshop-spec-list {
  display: grid;
  grid-template-columns: 4.5em 1fr;
  gap: 0.35rem 1rem;
  margin: 0;
  font-size: 0.92rem;
}

.workshop-spec-list dt {
  color: var(--bs-secondary-color, #6c757d);
  font-weight: 400;
}

.workshop-spec-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.workshop-spec-images img {
  max-width: 96px;
  max-height: 96px;
}

/* 后台橱窗商品的上架记录时间线 */
.workshop-listing-timeline {
  padding-left: 1.1rem;
}

.workshop-listing-timeline li + li {
  margin-top: 0.15rem;
}

/* 统一小号按钮尺寸与文字绝对垂直居中 */
.btn-xs {
  min-height: 24px !important;
  height: 24px !important;
  max-height: 24px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  border-radius: 4px;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  vertical-align: middle !important;
  white-space: nowrap;
  box-sizing: border-box;
}
