/* ==========================================================================
   AntCMS - 产品详情页专属样式 (product-detail.css)
   包含：产品首屏Hero图文相册、样品效果展示、产品概述、适用产品、设备特点、
         工作流程、设备视频、技术参数表格、选型建议、SEO介绍、常见问题、相关推荐等
   ========================================================================== */

/* ===== 首屏图文展示区 (Product Hero) ===== */
.product-hero {
  padding: 6px 0 50px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 46px;
  align-items: start;
}

.gallery {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  min-width: 0;
}

.gallery.single-gallery {
  display: block;
  width: 100%;
}

.single-gallery .main-image {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1 / 1;
}

.thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.thumb,
.main-image,
.detail-image,
.effect-image,
.related-card .pic {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(145deg, #edf1f5, #c9d1da);
  border: 1px solid #d9e0e7;
  isolation: isolate;
}

.thumb {
  border-radius: 12px;
  cursor: pointer;
}

.thumb.active {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* 纯 CSS 矢量设备抽象占位图 (当未上传真实机器图时优雅回退) */
.machine-art:before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 14%;
  height: 34%;
  border-radius: 14px;
  background: linear-gradient(145deg, #d7dde4, #818d9b);
  box-shadow: 0 16px 30px rgba(16, 24, 40, 0.16);
}

.machine-art:after {
  content: "";
  position: absolute;
  right: 16%;
  top: 18%;
  width: 24%;
  height: 44%;
  border-radius: 10px;
  background: linear-gradient(145deg, #e5eaf0, #8a96a4);
}

.gallery-note {
  grid-column: 2;
  font-size: 12px;
  color: #98a2b3;
  margin-top: -2px;
}

/* 真实图片适配：完整展示，不裁切机器 */
.main-image img,
.detail-image img,
.related-card .pic img,
.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #fff;
}

.effect-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* 产品参数与核心卖点提炼区 */
.product-info .kicker {
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.2px;
}

.product-info h1 {
  font-size: 40px;
  line-height: 1.12;
  margin: 8px 0 12px;
}

.subtitle {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 22px;
}

.highlights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 22px;
}

.highlight {
  padding: 13px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f6;
}

.highlight strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.highlight span {
  font-size: 12px;
  color: var(--muted);
}

.quick-specs {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  margin-bottom: 22px;
}

.spec-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 7px 0;
  font-size: 14px;
}

.spec-row span:first-child {
  color: var(--muted);
}

.tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tag {
  font-size: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--brand);
  font-weight: 800;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tip {
  margin-top: 14px;
  font-size: 12px;
  color: #98a2b3;
}

/* ===== 贴标效果展示 (Labeling Effect) ===== */
.effect-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.effect-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  min-width: 0;
}

.effect-image {
  background: #f1f5f9;
}

.effect-body {
  padding: 14px;
}

.effect-body strong {
  font-size: 15px;
}

.effect-body p {
  font-size: 12px;
  color: var(--muted);
  margin: 4px 0 0;
}

/* ===== 产品概述 (Product Overview) ===== */
.overview-simple {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 52px;
  align-items: start;
}

.overview-copy small {
  display: block;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.2px;
  margin-bottom: 7px;
}

.overview-copy h2 {
  font-size: 34px;
  line-height: 1.2;
  margin: 0 0 14px;
}

.overview-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.overview-points {
  display: grid;
  gap: 12px;
}

.overview-point {
  display: grid;
  grid-template-columns: 42px 1fr;
  column-gap: 12px;
  row-gap: 3px;
  padding: 17px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.overview-point b {
  grid-row: 1 / span 2;
  color: var(--brand);
  font-size: 12px;
  padding-top: 2px;
}

.overview-point strong {
  font-size: 15px;
}

.overview-point span {
  font-size: 12px;
  color: var(--muted);
}

/* ===== 适用产品 (Application) ===== */
.app-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.app-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
}

.app-icon {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.app-icon:before {
  content: "";
  width: 42px;
  height: 62px;
  border: 7px solid #98a2b3;
  border-radius: 18px;
}

.app-card:nth-child(2) .app-icon:before {
  width: 46px;
  height: 62px;
  border-radius: 13px;
}

.app-card:nth-child(3) .app-icon:before {
  width: 40px;
  height: 64px;
  border-radius: 16px 16px 8px 8px;
}

.app-card:nth-child(4) .app-icon:before {
  width: 52px;
  height: 56px;
  border-radius: 22px;
}

.app-card strong {
  display: block;
  font-size: 15px;
}

.app-card span {
  font-size: 12px;
  color: var(--muted);
}

/* ===== 设备特点 (Features) ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.feature {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
}

.feature b {
  display: block;
  color: var(--brand);
  font-size: 12px;
  margin-bottom: 7px;
}

.feature strong {
  display: block;
  margin-bottom: 6px;
}

.feature span {
  font-size: 13px;
  color: var(--muted);
}

/* ===== 工作流程 (Process) ===== */
.process {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
}

.step .num {
  font-size: 12px;
  color: var(--brand);
  font-weight: 900;
  margin-bottom: 20px;
}

.step strong {
  display: block;
  font-size: 15px;
  margin-bottom: 5px;
}

.step span {
  font-size: 12px;
  color: var(--muted);
}

.step:not(:last-child):after {
  content: "→";
  position: absolute;
  right: -11px;
  top: 50%;
  transform: translateY(-50%);
  color: #98a2b3;
  background: var(--soft);
  padding: 2px;
}

/* ===== 视频展示区 (Video Box) ===== */
.video-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: linear-gradient(145deg, #1e293b, #0b1120);
  position: relative;
  color: #fff;
  overflow: hidden;
  display: block;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* 仅在纯链接/无video标签时显示大居中播放图标 */
.video-box:before {
  content: "▶";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: transform 0.2s, background-color 0.2s;
  pointer-events: none;
  z-index: 2;
}

.video-box:hover:before {
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(255, 255, 255, 0.25);
}

/* 当容器包含真实 video 时，彻底隐藏居中播放伪类，避免遮挡原生控件 */
.video-box:has(video):before {
  display: none !important;
}

.video-box .caption {
  position: absolute;
  left: 20px;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
  z-index: 5;
}

.video-box .caption .caption-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #f1f5f9;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px;
  font-weight: 600;
  max-width: 65%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-box .caption .caption-case-link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: #2563eb;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
  transition: all 0.2s ease;
}

.video-box .caption .caption-case-link:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.video-box video,
.video-box iframe,
.video-box img {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  object-fit: cover;
}

/* 视频案例切换胶囊按钮区 (自适应) */
.video-switcher-wrap {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.video-switcher-label {
  font-size: 13px;
  color: var(--muted, #64748b);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.video-switcher-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.video-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 30px;
  border: 1px solid #d9e2ec;
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.video-tab-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  background: #eff6ff;
}

.video-tab-btn.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.video-tab-btn .tab-badge {
  background: #e2e8f0;
  color: #64748b;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 500;
}

.video-tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

@media (max-width: 768px) {
  .video-box .caption {
    left: 12px;
    bottom: 12px;
    right: 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .video-box .caption .caption-title {
    max-width: 100%;
    font-size: 12px;
    padding: 4px 10px;
  }
  .video-box .caption .caption-case-link {
    font-size: 12px;
    padding: 4px 10px;
  }
  .video-tab-btn {
    padding: 6px 14px;
    font-size: 12px;
  }
}

/* ===== 主要技术参数表 (Specifications) ===== */
.table-wrap,
.spec-table-wrap {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.spec-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}

.spec-col {
  min-width: 0;
}

.spec-col:first-child {
  border-right: 1px solid var(--line);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 0;
}

.spec-table th,
.spec-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid #eef2f6;
  font-size: 14px;
  line-height: 1.5;
}

.spec-table th {
  width: 36%;
  background: #fafafa;
  color: #475467;
  font-weight: 600;
}

.spec-table td {
  width: 64%;
  color: var(--text);
  background: #fff;
}

.spec-col .spec-table tr:last-child th,
.spec-col .spec-table tr:last-child td {
  border-bottom: 0;
}

/* ===== 选型前建议确认 (Selection Guide) ===== */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.selection {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
}

.selection b {
  display: block;
  color: var(--brand);
  font-size: 12px;
  margin-bottom: 7px;
}

.selection strong {
  display: block;
  margin-bottom: 5px;
}

.selection span {
  font-size: 12px;
  color: var(--muted);
}

/* ===== SEO 说明与富文本详细介绍 (SEO Copy & Article Content) ===== */
.seo-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 36px;
  align-items: start;
}

.seo-copy-main h2 {
  font-size: 32px;
  line-height: 1.25;
  margin: 0 0 15px;
}

.seo-copy-main p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.seo-note {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 20px;
}

.seo-note h3 {
  font-size: 17px;
  margin: 0 0 12px;
}

.seo-note ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.seo-note li {
  margin: 7px 0;
}

/* ===== 常见问题 (FAQ) ===== */
.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  background: #fff;
  margin-bottom: 10px;
}

.faq summary {
  font-weight: 800;
  cursor: pointer;
  outline: none;
}

.faq p {
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0 0;
  line-height: 1.6;
}

/* ===== 相关推荐设备 (Related Products) ===== */
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  display: block;
  transition: transform 0.2s, box-shadow 0.2s;
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
}

.related-card .pic {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(145deg, #edf1f5, #c9d1da);
  border-bottom: 1px solid var(--line);
}

.related-body {
  padding: 14px;
}

.related-body small {
  color: var(--brand);
  font-weight: 900;
}

.related-body h3 {
  font-size: 16px;
  margin: 5px 0;
}

/* ===== 相关技术文章 (Related Articles) ===== */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.article {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  display: block;
  min-width: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}

.article:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
}

.article small {
  color: var(--brand);
  font-weight: 900;
}

.article h3 {
  font-size: 16px;
  line-height: 1.45;
  margin: 7px 0;
}

.article p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

/* ===== 响应式适配 (Media Queries) ===== */
@media (max-width: 1000px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .gallery {
    max-width: 760px;
  }
  .overview-simple {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .app-grid,
  .feature-grid,
  .selection-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process {
    grid-template-columns: repeat(3, 1fr);
  }
  .step:not(:last-child):after {
    display: none;
  }
}

@media (max-width: 900px) {
  .seo-copy {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .product-hero {
    padding-bottom: 36px;
  }
  .gallery {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .thumbs {
    order: 2;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .thumbs::-webkit-scrollbar {
    display: none;
  }
  .thumb {
    flex: 0 0 72px;
  }
  .gallery-note {
    grid-column: 1;
    order: 3;
  }
  .product-info h1 {
    font-size: 32px;
  }
  .highlights {
    grid-template-columns: 1fr 1fr;
  }
  .spec-row {
    grid-template-columns: 92px 1fr;
  }
  .overview-copy h2 {
    font-size: 27px;
  }
  .overview-simple {
    gap: 18px;
  }
  .app-grid,
  .feature-grid,
  .selection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .process {
    grid-template-columns: 1fr 1fr;
  }
  .effect-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .article-grid {
    grid-template-columns: 1fr;
  }
  .spec-grid {
    grid-template-columns: 1fr;
  }
  .spec-col:first-child {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .spec-col .spec-table tr:last-child th,
  .spec-col .spec-table tr:last-child td {
    border-bottom: 1px solid #eef2f6;
  }
  .spec-col:last-child .spec-table tr:last-child th,
  .spec-col:last-child .spec-table tr:last-child td {
    border-bottom: 0;
  }
  .spec-table th {
    width: 32%;
  }
  .spec-table td {
    width: 68%;
  }
}

@media (max-width: 480px) {
  .highlights {
    grid-template-columns: 1fr;
  }
  .app-grid,
  .feature-grid,
  .selection-grid {
    grid-template-columns: 1fr 1fr;
  }
  .process {
    grid-template-columns: 1fr;
  }
  .effect-grid,
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }
  .product-info h1 {
    font-size: 29px;
  }
  .spec-table th,
  .spec-table td {
    display: block;
    width: 100%;
    padding: 8px 14px;
    border-bottom: none;
  }
  .spec-table tr {
    display: block;
    border-bottom: 1px solid #eef2f6;
    padding-bottom: 4px;
  }
  .spec-table tr:last-child {
    border-bottom: none;
  }
  .spec-table th {
    background: #f8fafc;
    color: var(--brand);
    font-size: 13px;
    padding-top: 10px;
    padding-bottom: 4px;
  }
  .spec-table td {
    color: var(--text);
    padding-top: 2px;
    padding-bottom: 10px;
  }
}
