
/* ===== 产品详情页 + 分类型号列表（2026-11-05 新增） ===== */
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 0.86rem; color: var(--text-muted);
  padding: 22px 0 6px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { opacity: 0.5; }
.breadcrumb .current { color: var(--primary); font-weight: 600; }

.detail-main { background: var(--bg-soft); padding-bottom: 72px; }
.detail-hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: center; padding: 34px 0 46px;
}
.detail-photo {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 26px;
  display: flex; align-items: center; justify-content: center;
  min-height: 380px;
}
.detail-photo img { max-width: 100%; max-height: 420px; object-fit: contain; display: block; }
/* 系列汇总产品的横向主图：宽幅横幅，不需要竖图的高框 */
.detail-photo-wide { min-height: 220px; padding: 20px; }
.detail-photo-wide img { width: 100%; max-width: 100%; max-height: none; }
/* 细长横幅主图（如 477x122 胰岛素注射器）：框更矮更贴合，避免上下大片留白 */
.detail-photo-compact { min-height: 150px; padding: 14px; }
.detail-photo-compact img { width: 100%; max-width: 100%; max-height: none; }
/* 系列汇总产品的竖向主图：竖长条图需要更高的显示区，否则产品显得过小 */
.detail-photo-tall { min-height: 620px; padding: 16px; }
.detail-photo-tall img { max-height: 640px; width: auto; max-width: 100%; }
/* 源图本身偏小的竖版主图（如 156x447 的皮下注射针）：按高度等比放大填满图框，
   width:auto 保证不变形；只作用于配置了 photoMode:"portrait" 的汇总页 */
.detail-photo-portrait { min-height: 620px; padding: 16px; }
.detail-photo-portrait img { height: 580px; width: auto; max-width: 100%; max-height: none; object-fit: contain; }
.detail-cat {
  display: inline-block; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--secondary); background: var(--accent-light);
  padding: 7px 14px; border-radius: 999px; margin-bottom: 16px;
}
.detail-summary h1 { font-size: clamp(1.8rem, 3vw, 2.7rem); color: var(--primary); margin: 0 0 10px; line-height: 1.2; }
.detail-ref { font-size: 0.95rem; color: var(--text-muted); margin: 0 0 18px; }
.detail-ref strong { color: var(--primary); }
.detail-desc { font-size: 1.02rem; line-height: 1.75; color: var(--text-secondary); margin: 0 0 26px; }

.detail-columns { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.detail-spec, .detail-inquiry {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 32px;
}
.detail-spec h2, .detail-inquiry h2 { font-size: 1.4rem; color: var(--primary); margin: 0 0 18px; }
.detail-spec h3 { font-size: 1.05rem; color: var(--primary); margin: 28px 0 12px; }
.detail-spec p { color: var(--text-secondary); line-height: 1.8; margin: 0 0 14px; }
.detail-desc-photo { margin: 4px 0 22px; text-align: center; }
.detail-desc-photo img { max-width: 100%; max-height: 360px; width: auto; height: auto; object-fit: contain; border-radius: var(--radius); border: 1px solid var(--border); background: #fff; }
.detail-spec ul { margin: 0 0 8px; padding-left: 20px; color: var(--text-secondary); line-height: 1.85; }
.detail-spec li { margin-bottom: 4px; }
.detail-spec table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.detail-spec table th, .detail-spec table td { border-bottom: 1px solid var(--border); padding: 9px 10px; text-align: left; vertical-align: top; }
.detail-spec table th { width: 42%; color: var(--primary); font-weight: 600; }

/* 系列型号汇总：货描里的型号明细表 */
.detail-spec table.variant-table { margin: 4px 0 22px; }
.variant-table thead th { width: auto; background: var(--accent-light); color: var(--primary); font-weight: 700; border-bottom: 2px solid var(--border); }
.variant-table tbody td { padding: 9px 12px; }
.variant-table tbody td:first-child { font-weight: 700; color: var(--primary); letter-spacing: 0.02em; }
/* 多列型号表（如头皮针 4 列）：列多、单元格内容短，收紧 padding 与字号 */
.variant-table-multi thead th, .variant-table-multi tbody td { padding: 8px 8px; font-size: 0.88rem; }
@media (max-width: 640px) {
  .variant-table thead th, .variant-table tbody td { padding: 7px 8px; font-size: 0.86rem; }
  .variant-table-multi thead th, .variant-table-multi tbody td { padding: 6px 5px; font-size: 0.76rem; }
  .variant-table-multi tbody td:first-child { white-space: nowrap; }
}

/* Product Description 下方追加的产品图：自适应换行居中、白底、等比不拉伸
   （用 flex 而非固定两列，2 张 / 5 张都能排得平衡，末行也居中） */
.detail-extra-images {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 16px; margin: 22px 0 10px;
}
.detail-extra-images figure {
  margin: 0; flex: 0 1 220px; max-width: 220px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px;
  display: flex; align-items: center; justify-content: center; min-height: 190px;
}
.detail-extra-images img { max-width: 100%; max-height: 200px; width: auto; height: auto; object-fit: contain; display: block; }
@media (max-width: 640px) {
  .detail-extra-images { gap: 10px; }
  .detail-extra-images figure { flex: 0 1 150px; max-width: 150px; min-height: 140px; padding: 10px; }
  .detail-extra-images img { max-height: 150px; }
}
/* 单张细长竖版附图（如原皮下注射针 156x447 主图移到货描）：等比放大，避免细成一条 */
.detail-extra-images figure.extra-tall { min-height: 340px; }
.detail-extra-images figure.extra-tall img { max-height: 320px; }
@media (max-width: 640px) {
  .detail-extra-images figure.extra-tall { min-height: 250px; }
  .detail-extra-images figure.extra-tall img { max-height: 230px; }
}

.detail-source { font-size: 0.82rem; color: var(--text-muted); margin-top: 26px !important; border-top: 1px dashed var(--border); padding-top: 14px; }

.detail-inquiry { position: sticky; top: 130px; }
.detail-inquiry > p { font-size: 0.92rem; color: var(--text-secondary); margin: -8px 0 20px; line-height: 1.6; }
.inquiry-form .form-group { margin-bottom: 14px; }
.inquiry-form label { display: block; font-size: 0.86rem; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.inquiry-form input, .inquiry-form textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 11px 13px; font: inherit; font-size: 0.92rem; color: var(--text); background: #fff;
}
.inquiry-form textarea { resize: vertical; }
.inquiry-form input:focus, .inquiry-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.inquiry-form .btn { width: 100%; margin-top: 6px; }

.detail-related { margin-top: 56px; }
.detail-related h2 { font-size: 1.5rem; color: var(--primary); margin: 0 0 22px; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.related-card {
  display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; color: var(--text); box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.related-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; padding: 12px; }
.related-card .rc-body { padding: 12px 14px 16px; }
.related-card .rc-ref { font-size: 0.76rem; font-weight: 800; color: var(--secondary); letter-spacing: 0.06em; }
.related-card .rc-name { font-size: 0.9rem; font-weight: 600; line-height: 1.4; margin-top: 4px; display: block; }

/* 分类页：型号列表 */
.catalog-group { margin-bottom: 46px; scroll-margin-top: 140px; }
.catalog-group-head { border-bottom: 2px solid var(--border); padding-bottom: 12px; margin-bottom: 22px; }
.catalog-group-head h2 { font-size: 1.5rem; color: var(--primary); margin: 0; }
.catalog-group-head span { font-size: 0.86rem; color: var(--text-muted); }
.model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.model-card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.model-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.model-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #fff; padding: 14px; }
/* 横幅主图（皮下注射针系列 1220x580）：卡片框贴近 2:1，避免上下大片留白，仍完整不裁切 */
.model-card img[src*="hy-series-main"] { aspect-ratio: 2 / 1; padding: 10px; }
.model-card .mc-body { padding: 14px 16px 18px; display: flex; flex-direction: column; flex-grow: 1; }
.model-card .mc-ref { font-size: 0.76rem; font-weight: 800; letter-spacing: 0.06em; color: var(--secondary); }
.model-card h3 { font-size: 0.98rem; color: var(--primary); margin: 6px 0 8px; line-height: 1.4; }
.model-card p { font-size: 0.86rem; color: var(--text-secondary); line-height: 1.55; margin: 0 0 14px; flex-grow: 1; }
.model-card .mc-more { font-size: 0.86rem; font-weight: 700; color: var(--primary); }
.sidebar-count { font-size: 0.84rem; color: var(--text-muted); margin-top: 18px; line-height: 1.6; }
.sidebar-groups { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 18px; }
.sidebar-groups h4 { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 12px; }
.sidebar-groups .group-links { display: flex; flex-direction: column; gap: 4px; }
.sidebar-groups a { font-size: 0.86rem; color: var(--text-secondary); padding: 5px 0; line-height: 1.4; }
.sidebar-groups a:hover { color: var(--primary); }

@media (max-width: 1024px) {
  .detail-hero, .detail-columns { grid-template-columns: 1fr; }
  .detail-inquiry { position: static; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .model-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .detail-photo { min-height: 260px; padding: 14px; }
  .detail-photo-wide { min-height: 150px; padding: 14px; }
  .detail-photo-compact { min-height: 100px; padding: 10px; }
  .detail-photo-tall { min-height: 420px; padding: 10px; }
  .detail-photo-tall img { max-height: 420px; }
  .detail-photo-portrait { min-height: 400px; padding: 10px; }
  .detail-photo-portrait img { height: 380px; }
  .detail-spec, .detail-inquiry { padding: 22px; }
  .related-grid, .model-grid { grid-template-columns: 1fr; }
  .breadcrumb { font-size: 0.78rem; }
}
