/* 产品详情 */

.page-banner {
  background-image: url("../images/banner/banner-product-detail.jpg");
}

.product-detail-page {
  padding: 0.8rem 0;
  background: #f8fafc;
}

.product-detail-page > .container {
  width: calc(100% - 3.6rem);
  max-width: 16.44rem;
  margin: 0 auto;
}

.pd-name {
  margin: 0 0 1.23rem;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  font-size: 0.3rem;
  font-style: normal;
  /* line-height: 0.32rem; */
  color: #1e2538;
  text-align: left;
  text-transform: none;
}

/* ---------- 图片详情区 ---------- */
.pd-gallery {
  position: relative;
  width: 100%;
  max-width: 15.58rem;
  height: auto;
  aspect-ratio: 15.58 / 6.86;
  margin: 0 auto 0.94rem;
  box-sizing: border-box;
}

.pd-gallery::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 99.5%;
  max-width: 15.5rem;
  height: auto;
  aspect-ratio: 15.5 / 8;
  transform: translate(-50%, -50%);
  background: url("../images/detail/gallery-frame.png") center / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 3;
}

.pd-gallery-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 15.58rem;
  height: 100%;
  box-sizing: border-box;
  padding: 0.28rem 1.18rem 0.24rem;
  background: #fff;
  border-radius: 0.1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 4px 0 rgba(141, 155, 185, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.pd-gallery-title {
  margin: 0.3rem 0 0.2rem;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  font-size: 0.24rem;
  font-style: normal;
  line-height: 1.3;
  color: #1e2538;
  text-align: center;
  text-transform: none;
  flex-shrink: 0;
}

.pd-slider {
  position: relative;
  width: 51.81%;
  max-width: 7.76rem;
  height: auto;
  aspect-ratio: 7.76 / 4.69;
  flex: 1 1 auto;
  min-height: 0;
  opacity: 1;
}

.pd-slider-viewport {
  width: 100%;
  height: 100%;
  border-radius: 0.08rem;
  overflow: hidden;
  background: #f3f5f8;
}

.pd-slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.pd-slider-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem;
  box-sizing: border-box;
}

.pd-slider-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

.pd-slider-slide img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 1;
  border-radius: 0.04rem;
}

.pd-slider-btn {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 0.36rem;
  height: 0.88rem;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 0.08rem;
  background: rgba(30, 37, 56, 0.45);
  cursor: pointer;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-slider-btn::before {
  content: "";
  width: 0.12rem;
  height: 0.12rem;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  box-sizing: border-box;
}

.pd-slider-btn.is-prev {
  left: 0.29rem;
  border-radius: 0.08rem;
}

.pd-slider-btn.is-prev::before {
  transform: rotate(-135deg);
  margin-left: 0.04rem;
}

.pd-slider-btn.is-next {
  right: 0.29rem;
  border-radius: 0.08rem;
}

.pd-slider-btn.is-next::before {
  transform: rotate(45deg);
  margin-right: 0.04rem;
}

.pd-slider-btn:hover {
  background: rgba(30, 37, 56, 0.6);
}

.pd-slider-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  margin-top: 0.22rem;
}

.pd-slider-dots button {
  width: 0.1rem;
  height: 0.1rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #c4cad6;
  cursor: pointer;
}

.pd-slider-dots button.is-active {
  background: #dc2626;
}

/* ---------- 产品介绍 ---------- */
.detail-block {
  margin-bottom: 0.4rem;
  margin-top: 1.04rem;
}

.detail-block h2 {
  margin: 0 0 0.24rem;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  /* font-weight: 500; */
  font-size: 0.24rem;
  font-style: normal;
  line-height: 0.36rem;
  color: #1e2538;
  text-align: left;
  text-transform: none;
}

.rich-text p {
  margin: 0 0 0.16rem;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  font-size: 0.18rem;
  font-style: normal;
  line-height: 0.27rem;
  color: #1e2538;
  text-align: left;
  text-transform: none;
}

.rich-text strong,
.rich-text b {
  font-weight: 600;
  font-size: 0.18rem;
  color: #1e2538;
}

.rich-text h1,
.rich-text h2,
.rich-text h3,
.rich-text h4 {
  margin: 0.2rem 0 0.12rem;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  font-size: 0.2rem;
  line-height: 1.4;
  color: #1e2538;
}

.rich-text ul {
  margin: 0.12rem 0 0.2rem;
  padding: 0;
  list-style: none;
}

.rich-text li {
  position: relative;
  padding-left: 0.2rem;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.16rem;
  color: #1e2538;
  line-height: 0.32rem;
  margin-bottom: 0.06rem;
}

.rich-text li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.12rem;
  width: 0.08rem;
  height: 0.08rem;
  border-radius: 50%;
  background: #1e2538;
}

.pd-related-link {
  margin-top: 0.28rem !important;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  font-size: 0.18rem;
  line-height: 0.27rem;
  letter-spacing: 0;
  color: #1e2538;
  text-align: left;
  vertical-align: top;
}

.pd-related-link span {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 600;
  font-size: 0.18rem;
  line-height: 0.27rem;
  letter-spacing: 0;
  color: #1e2538;
}

.pd-related-link a {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  font-size: 0.18rem;
  line-height: 0.27rem;
  letter-spacing: 0;
  color: #2563eb;
  text-decoration: underline;
}

.pd-related-link a:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .product-detail-page > .container,
  .news-detail-page > .container,
  .case-detail-page > .container {
    width: calc(100% - 0.48rem);
    max-width: none;
  }

  .pd-name {
    font-size: 0.36rem;
    margin-bottom: 0.4rem;
  }

  /* 手机端：相对 PC 等比例（15.58×6.86 / 画框 15.5×8 / 图 7.76×4.69） */
  .pd-gallery {
    width: 15.58rem;
    max-width: calc(100% - 0.4rem);
    height: auto;
    aspect-ratio: 15.58 / 6.86;
    margin: 0.24rem auto 0.8rem;
    overflow: visible;
    box-sizing: border-box;
  }

  .pd-gallery::before {
    display: block;
    z-index: 3;
    width: 99.49%; /* 15.5 / 15.58 */
    max-width: 15.5rem;
    height: auto;
    aspect-ratio: 15.5 / 8;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: url("../images/detail/gallery-frame.png") center / 100% 100% no-repeat;
  }

  .pd-gallery-card {
    width: 100%;
    max-width: 100%;
    height: 100%;
    padding: 1.8% 7.57% 1.54%; /* 相对宽：0.28/15.58 · 1.18/15.58 · 0.24/15.58 */
    box-sizing: border-box;
  }

  .pd-gallery-title {
    margin: 0.2rem 0 0.14rem;
    font-size: 0.24rem;
  }

  .pd-slider {
    width: 51.81%;
    max-width: 7.76rem;
    height: auto;
    aspect-ratio: 7.76 / 4.69;
    flex-shrink: 0;
  }

  .pd-slider-viewport {
    width: 100%;
    height: 100%;
  }

  .pd-slider-slide img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .pd-slider-btn {
    z-index: 6;
    width: 10.64%;
    max-width: 0.36rem;
    height: 35.76%;
    max-height: 0.88rem;
  }

  .pd-slider-btn.is-prev {
    left: 3.74%; /* 0.29 / 7.76 */
  }

  .pd-slider-btn.is-next {
    right: 3.74%;
  }

  .pd-slider-dots {
    margin-top: 0.16rem;
  }
}
