/* ==========================================================================
   related.css — 四套数据（机型 / 买家秀 / 3M材料 / 安装教程）互相关联区块
   被以下页面引用：models(机型聚合)、showcase(案例详情)、
   material-detail(材料详情)、tutorials(教程详情)、search(聚合搜索)
   ========================================================================== */

/* ---------- 聚合页顶部标题 ---------- */
.detail-hero-2 {
  padding: 8px 0 24px;
  border-bottom: 1px solid #ececee;
  margin-bottom: 24px;
}
.detail-hero-2 .eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 1.4px;
  color: #d61b29;
  margin-bottom: 8px;
}
.detail-hero-2 h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  margin: 0 0 8px;
  color: #1d1d1f;
}
.detail-hero-2 .desc {
  color: #6e6e73;
  font-size: 15px;
  line-height: 1.6;
  margin: 4px 0 0;
}

/* ---------- 聚合页数据条 ---------- */
.rel-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 24px 0 8px;
}
.rel-stats > div {
  background: #fff;
  border: 1px solid #ececee;
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
}
.rel-stats b {
  display: block;
  font-size: 26px;
  line-height: 1.1;
  color: #1d1d1f;
}
.rel-stats span {
  display: block;
  font-size: 12px;
  color: #86868b;
  margin-top: 4px;
}

/* ---------- 关联区块 ---------- */
.rel-section {
  margin-top: 36px;
}
.rel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.rel-head .eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 1.2px;
  color: #d61b29;
  font-weight: 700;
}
.rel-head h2 {
  font-size: 20px;
  margin: 4px 0 0;
  color: #1d1d1f;
}
.rel-head .rel-more {
  font-size: 13px;
  color: #1d1d1f;
  text-decoration: none;
  border-bottom: 1px solid #d0d0d4;
  padding-bottom: 1px;
  white-space: nowrap;
}
.rel-head .rel-more:hover { border-bottom-color: #1d1d1f; }

/* ---------- 相关教程 CTA 标题：和首页"播放教程"按钮一致的设计感 ---------- */
.rel-section--tutorials .rel-head--cta { margin-bottom: 20px; }
.rel-head__cta-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #1d1d1f;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.rel-head__cta-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0066cc;
  color: #fff;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 102, 204, 0.25);
}
.rel-head__cta-sub {
  margin: 8px 0 0;
  font-size: 14px;
  color: #86868b;
  line-height: 1.5;
}

/* ---------- 关联卡片网格 ---------- */
.rel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 14px;
}
.rel-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ececee;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rel-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.rel-thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f2f4;
  overflow: hidden;
}
.rel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rel-thumb .ph {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #fff;
  text-align: center;
  padding: 0 10px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}
.rel-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
}
.rel-meta {
  padding: 10px 12px 12px;
}
.rel-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #1d1d1f;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rel-sub {
  display: block;
  font-size: 12px;
  color: #86868b;
  margin-top: 3px;
}

/* ---------- 空状态 / 错误 ---------- */
.rel-grid > .rel-empty { grid-column: 1 / -1; }
.rel-empty {
  padding: 20px 16px;
  background: #f7f7f9;
  border: 1px dashed #d8d8dc;
  border-radius: 12px;
  color: #86868b;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
}

/* ---------- 详情页里承载关联内容的容器 ---------- */
.rel-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

/* ---------- 案例/教程详情大图 ---------- */
.detail-thumb-lg {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  overflow: hidden;
  background: #f2f2f4;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.detail-thumb-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.showcase-detail-image-open { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.showcase-detail-image-open span { position: absolute; right: 14px; bottom: 14px; padding: 7px 10px; border-radius: 6px; background: rgb(0 0 0 / .7); color: white; font-size: 13px; }
.detail-thumb-lg .device {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ---------- 教程详情播放器 ---------- */
.tut-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 8px;
}
.tut-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.tut-player .ext {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: 20px;
}
.tut-player .ext h3 { color: #fff; margin: 0 0 8px; font-size: 18px; }
.tut-player .ext p { color: #d0d0d4; margin: 0 0 14px; font-size: 14px; }

/* ---------- 返回链接 ---------- */
.rel-back {
  display: inline-block;
  font-size: 13px;
  color: #6e6e73;
  text-decoration: none;
  margin-bottom: 14px;
}
.rel-back:hover { color: #1d1d1f; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .rel-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .rel-thumb { aspect-ratio: 1 / 1; }
  .rel-head h2 { font-size: 18px; }
  .rel-head__cta-title { font-size: 22px; gap: 10px; }
  .rel-head__cta-ico { width: 32px; height: 32px; font-size: 13px; }
  .detail-thumb-lg { aspect-ratio: 4 / 3; }
  .rel-wrap { padding: 0 16px 36px; }
}
