/*
 * 产品详情页 —— 1:1 对应设计稿 Astra 6月 / 产品详情 1080:1529
 * 六个区块共用这一份样式（它们只会同时出现在详情页模板里，合成一个文件少几次请求）：
 *   首屏     1080:1583  左右 320/240、上下 96，文案栈 40，标题 48/53(-1.92px)
 *   特性卡   1080:1681  上下 120 左右 160，栈 96；卡片 hover 转 #FDF1F1 + 投影
 *   图文     1080:1720  上下 120 左右 240；左栏 672、右图 720×600
 *   大图双栏 1080:1703  通栏图 1920×760 + 手机浮层；下方两栏 hover 转红并加红下边框
 *   参数轮播 1080:1740  上下 100 左右 200，半透明白底面板，左图右表 + 红圆箭头
 *   相关卡片 1080:1788  三卡 464×604 gap 24，hover 起投影 + 按钮转红
 */

.astra-pd {
  --pd-primary: #e60012;
  --pd-primary-soft: #fdf1f1;
  --pd-text-strong: #000000;
  --pd-text: #333333;
  --pd-text-muted: #808080;
  --pd-text-subtle: #999999;
  --pd-border: #dedfe0;
  --pd-border-cool: #f4f6f7;
  --pd-bg: #ffffff;
}

/* 通用：区块标题（居中款，特性卡 / 大图双栏 / 相关卡片共用） */
.astra-pd__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}

.astra-pd__header--left {
  align-items: flex-start;
  text-align: left;
  max-width: none;
  margin: 0;
}

.astra-pd__title {
  margin: 0;
  width: 100%;
  font-size: var(--pd-title-size, 48px);
  line-height: var(--pd-title-line, 53px);
  font-weight: 700;
  letter-spacing: -1.92px;
  color: var(--pd-text-strong);
  overflow-wrap: break-word;
}

.astra-pd__rule {
  flex: 0 0 auto;
  width: 100px;
  height: 4px;
  background: var(--pd-primary);
}

.astra-pd__sub {
  margin: 0;
  width: 100%;
  font-size: var(--pd-sub-size, 24px);
  line-height: var(--pd-sub-line, 32px);
  font-weight: 600;
  letter-spacing: -0.24px;
  color: var(--pd-text-subtle);
}

/* 通用：ASTRA / Button（Figma 467:510），高 44、图标在右 */
.astra-pd__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--pd-primary);
  background: transparent;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: var(--pd-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.3s, border-color 0.3s, background-color 0.3s;
}

.astra-pd__btn:hover,
.astra-pd__btn:focus-visible {
  background: var(--pd-primary);
  color: #ffffff;
}

.astra-pd__btn--solid {
  background: var(--pd-primary);
  color: #ffffff;
}

.astra-pd__btn--solid:hover,
.astra-pd__btn--solid:focus-visible {
  background: #c1000f;
  border-color: #c1000f;
}

.astra-pd__btn-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: block;
}

.astra-pd__btn-icon path {
  stroke: currentColor;
}

/* ============================================================ 首屏 1080:1583 */
.astra-pd-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  min-height: var(--pd-hero-height, 960px);
  padding: 96px 240px 96px 320px;
  overflow: hidden;
}

.astra-pd-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.astra-pd-hero__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.astra-pd-hero__text {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.astra-pd-hero__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 36px;
}

.astra-pd-hero__name {
  margin: 0;
  font-size: var(--pd-hero-name-size, 48px);
  line-height: var(--pd-hero-name-line, 53px);
  font-weight: 700;
  letter-spacing: -1.92px;
  color: var(--pd-text-strong);
}

.astra-pd-hero__desc {
  margin: 0;
  font-size: var(--pd-hero-desc-size, 24px);
  line-height: var(--pd-hero-desc-line, 32px);
  font-weight: 600;
  letter-spacing: -0.24px;
  color: var(--pd-text);
}

.astra-pd-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* 设计稿是 1:1、占满上下留白之间的高度（960-96×2=768）。
 * 这里必须给显式宽度：flex 子项只有 align-self:stretch + aspect-ratio 时，
 * 图片是绝对定位的、内容宽为 0，宽度会塌成 0。 */
.astra-pd-hero__media {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  align-self: center;
  width: calc(var(--pd-hero-height, 960px) - 192px);
  max-width: 58%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.astra-pd-hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ======================================================== 特性卡 1080:1681 */
.astra-pd-features {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--pd-features-gap, 96px);
  padding: var(--pd-features-padding, 120px) 0;
}

.astra-pd-features__row {
  display: flex;
  align-items: stretch;
  gap: 20px;
  width: 100%;
  padding: 0 12px;
}

.astra-pd-features__card {
  flex: 1 1 0;
  min-width: 0;
  min-height: 229px;
  display: flex;
  flex-direction: column;
  /* 设计稿是纯 space-between、无额外 gap；加 gap 会把卡片顶过 229 */
  justify-content: space-between;
  padding: 32px 25px;
  background: var(--pd-bg);
  transition: background-color 0.3s, filter 0.3s;
}

.astra-pd-features__card:hover {
  background: var(--pd-primary-soft);
  filter: drop-shadow(10px 2px 6.8px rgba(0, 0, 0, 0.05));
}

.astra-pd-features__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: block;
}

.astra-pd-features__icon img,
.astra-pd-features__icon svg {
  display: block;
  width: 42px;
  height: 42px;
}

.astra-pd-features__card-title {
  margin: 0;
  font-size: 28px;
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.56px;
  color: var(--pd-text-strong);
}

.astra-pd-features__card-desc {
  margin: 0;
  font-size: 18px;
  line-height: 25px;
  font-weight: 700;
  letter-spacing: -0.36px;
  color: var(--pd-text);
}

/* ========================================================== 图文 1080:1720 */
.astra-pd-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding: var(--pd-highlight-padding, 120px) 0;
  background: var(--pd-bg);
}

.astra-pd-highlight--reverse {
  flex-direction: row-reverse;
}

.astra-pd-highlight__content {
  flex: 0 0 672px;
  max-width: 672px;
  align-self: stretch;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 70px 0;
}

.astra-pd-highlight__list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.astra-pd-highlight__item {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--pd-border-cool);
}

.astra-pd-highlight__dot {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: block;
}

.astra-pd-highlight__item-text {
  margin: 0;
  font-size: var(--pd-highlight-item-size, 28px);
  line-height: 34px;
  font-weight: 600;
  letter-spacing: -0.56px;
  color: var(--pd-text-muted);
}

.astra-pd-highlight__media {
  flex: 0 0 720px;
  max-width: 720px;
  height: 600px;
  position: relative;
  overflow: hidden;
}

.astra-pd-highlight__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==================================================== 大图双栏 1080:1703 */
.astra-pd-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--pd-showcase-gap, 96px);
  padding: var(--pd-showcase-padding, 120px) 0;
}

.astra-pd-showcase__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
}

/* 设计稿这张图是通栏的，要挣脱外层容器的左右留白。
 * 不用 100vw：它含滚动条宽度会溢出。改成按容器百分比往两侧顶，
 * 这个百分比刚好等于一侧留白（容器 75% 时为 16.667%），换算见下方断点。 */
.astra-pd-showcase__media {
  --pd-bleed: 16.667%;
  position: relative;
  align-self: stretch;
  width: auto;
  margin-left: calc(var(--pd-bleed) * -1);
  margin-right: calc(var(--pd-bleed) * -1);
  height: var(--pd-showcase-media-height, 760px);
  overflow: hidden;
}

.astra-pd-showcase__media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 手机浮层 1080:1712：位置按设计稿占比换算。
 * 高度留 auto 走图片自身比例，所以不能复用上面那条主图规则。 */
.astra-pd-showcase__overlay {
  position: absolute;
  left: 64.68%;
  top: 11.73%;
  width: 14.8%;
  height: auto;
  display: block;
  object-fit: contain;
}

.astra-pd-showcase__blocks {
  display: flex;
  align-items: stretch;
  gap: 64px;
  width: 100%;
}

.astra-pd-showcase__block {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s;
}

.astra-pd-showcase__block:hover {
  border-bottom-color: var(--pd-primary);
}

.astra-pd-showcase__block-title {
  margin: 0;
  font-size: var(--pd-showcase-block-size, 36px);
  line-height: 40px;
  font-weight: 700;
  letter-spacing: -0.72px;
  color: var(--pd-text);
  transition: color 0.3s;
}

.astra-pd-showcase__block:hover .astra-pd-showcase__block-title {
  color: var(--pd-primary);
}

.astra-pd-showcase__block-desc {
  margin: 0;
  font-size: 18px;
  line-height: 25px;
  font-weight: 700;
  letter-spacing: -0.36px;
  color: var(--pd-text);
}

/* ==================================================== 参数轮播 1080:1740 */
.astra-pd-specs {
  position: relative;
  padding: var(--pd-specs-padding, 100px) 200px;
  overflow: hidden;
}

.astra-pd-specs__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.astra-pd-specs__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.astra-pd-specs__panel {
  --pd-specs-figure-width: 648px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.5);
  padding-right: 40px;
}

.astra-pd-specs__swiper {
  width: 100%;
  overflow: hidden;
}

.astra-pd-specs__slide {
  display: flex;
  align-items: center;
  width: 100%;
  height: auto;
}

.astra-pd-specs__figure {
  flex: 0 0 var(--pd-specs-figure-width);
  max-width: var(--pd-specs-figure-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  min-height: var(--pd-specs-height, 760px);
}

.astra-pd-specs__image {
  position: relative;
  width: 554px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.astra-pd-specs__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 左右各让出 42 的圆形按钮 + 32 的间距，位置和设计稿一致 */
.astra-pd-specs__table {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 52px 0;
  margin: 0 74px;
  align-self: stretch;
  justify-content: center;
}

.astra-pd-specs__row {
  display: flex;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--pd-border);
}

.astra-pd-specs__label,
.astra-pd-specs__value {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  font-size: 18px;
  line-height: 25px;
  font-weight: 700;
  letter-spacing: -0.36px;
  color: var(--pd-text);
}

.astra-pd-specs__value {
  padding-left: 20px;
}

/* 红色圆形上一张/下一张 1080:1750 / 1080:1779
 * 设计稿里它们夹在图与表之间、且不随滑动走，所以绝对定位在面板上 */
.astra-pd-specs__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--pd-primary);
  cursor: pointer;
  transition: background-color 0.3s, opacity 0.3s;
}

.astra-pd-specs__nav--prev {
  left: var(--pd-specs-figure-width);
}

.astra-pd-specs__nav--next {
  right: 40px;
}

.astra-pd-specs__nav:hover {
  background: #c1000f;
}

.astra-pd-specs__nav.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
}

.astra-pd-specs__nav svg {
  width: 24px;
  height: 24px;
  display: block;
}

.astra-pd-specs__nav--prev svg {
  transform: rotate(180deg);
}

/* 图片下方的分页点 1080:1743 */
.astra-pd-specs__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 0;
}

.astra-pd-specs__dots .swiper-pagination-bullet,
.astra-pd-related__dots .swiper-pagination-bullet {
  width: 12px;
  height: 12px;
  margin: 0;
  border-radius: 999px;
  background: #d9d9d9;
  opacity: 1;
  transition: background-color 0.3s;
}

.astra-pd-specs__dots .swiper-pagination-bullet-active,
.astra-pd-related__dots .swiper-pagination-bullet-active {
  background: var(--pd-primary);
}

/* ==================================================== 相关卡片 1080:1788 */
.astra-pd-related {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--pd-related-gap, 96px);
  padding: var(--pd-related-padding, 120px) 0;
}

.astra-pd-related__viewport {
  width: 100%;
  overflow: hidden;
}

.astra-pd-related__card {
  display: flex;
  flex-direction: column;
  height: auto;
  background: var(--pd-bg);
  text-decoration: none;
  color: inherit;
  transition: filter 0.3s;
}

.astra-pd-related__card:hover {
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.08));
}

.astra-pd-related__media {
  position: relative;
  width: 100%;
  height: 320px;
  overflow: hidden;
}

.astra-pd-related__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.astra-pd-related__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 20px;
}

.astra-pd-related__desc {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 0;
  flex: 1 1 auto;
}

.astra-pd-related__card-title {
  margin: 0;
  font-size: 32px;
  line-height: 38px;
  font-weight: 600;
  letter-spacing: -0.64px;
  color: var(--pd-text-strong);
}

.astra-pd-related__line {
  width: 52px;
  height: 2px;
  margin: 12px 0;
  background: var(--pd-text-subtle);
  transition: background-color 0.3s;
}

.astra-pd-related__card:hover .astra-pd-related__line {
  background: var(--pd-primary);
}

.astra-pd-related__card-sub {
  margin: 0;
  font-size: 24px;
  line-height: 32px;
  font-weight: 600;
  letter-spacing: -0.24px;
  color: var(--pd-text);
}

.astra-pd-related__more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 20px;
  padding: 12px 25px;
  border: 1px solid var(--pd-border);
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  color: var(--pd-text-subtle);
  transition: color 0.3s, border-color 0.3s;
}

.astra-pd-related__card:hover .astra-pd-related__more {
  border-color: var(--pd-primary);
  color: var(--pd-primary);
}

.astra-pd-related__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.astra-pd__empty {
  margin: 0;
  padding: 48px 0;
  text-align: center;
  font-size: 18px;
  line-height: 28px;
  color: var(--pd-text-subtle);
}

/* ============================================================== 响应式 */
/* 设计稿只有 1920 桌面稿。上下留白与主标题字号由组件的响应式控制项按断点输出，
 * 本段只处理控制项没覆盖的排布与固定尺寸。 */
/* 破格宽度跟着全局容器宽走：桌面 75% / 笔记本 83.33% / 平板以下 92% */
@media (max-width: 1768px) {
  .astra-pd-hero {
    padding: 96px 6% 96px 8%;
  }

  .astra-pd-specs {
    padding-left: 6%;
    padding-right: 6%;
  }

  .astra-pd-showcase__media {
    --pd-bleed: 10%;
  }
}

@media (max-width: 1400px) {
  .astra-pd-showcase__media {
    --pd-bleed: 4.348%;
  }

  .astra-pd-highlight__content {
    flex: 1 1 auto;
    max-width: none;
  }

  .astra-pd-highlight__media {
    flex: 0 0 46%;
    max-width: 46%;
    height: 520px;
  }

  .astra-pd-specs__panel {
    --pd-specs-figure-width: 44%;
  }

  .astra-pd-specs__image {
    width: 100%;
  }

  .astra-pd-features__card-title {
    font-size: 24px;
    line-height: 30px;
  }

  .astra-pd-highlight__item-text {
    font-size: 22px;
    line-height: 30px;
  }
}

@media (max-width: 1200px) {
  .astra-pd-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 56px 0;
  }

  .astra-pd-hero__media {
    align-self: center;
    width: min(100%, 480px);
    max-width: 100%;
    aspect-ratio: 1 / 1;
  }

  .astra-pd-features__row {
    flex-wrap: wrap;
    padding: 0;
  }

  .astra-pd-features__card {
    flex: 1 1 calc(50% - 10px);
    min-width: 260px;
  }

  .astra-pd-highlight,
  .astra-pd-highlight--reverse {
    flex-direction: column;
    align-items: stretch;
  }

  .astra-pd-highlight__content {
    min-height: 0;
    padding: 0;
  }

  .astra-pd-highlight__media {
    flex: 1 1 auto;
    max-width: none;
    height: auto;
    aspect-ratio: 720 / 600;
  }

  .astra-pd-showcase__blocks {
    flex-direction: column;
    gap: 0;
  }

  .astra-pd-specs__slide {
    flex-direction: column;
  }

  .astra-pd-specs__figure {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
    min-height: 0;
    padding-top: 32px;
  }

  .astra-pd-specs__table {
    padding: 24px 0;
    margin: 0;
  }

  .astra-pd-specs__panel {
    flex-direction: column;
    padding: 0 16px 72px;
  }

  /* 窄屏改成面板底部居中的一排 */
  .astra-pd-specs__nav {
    top: auto;
    bottom: 16px;
    transform: none;
  }

  .astra-pd-specs__nav--prev {
    left: calc(50% - 52px);
  }

  .astra-pd-specs__nav--next {
    right: calc(50% - 52px);
  }
}

@media (max-width: 768px) {
  .astra-pd__title {
    font-size: clamp(15px, 4.8vw, 26px);
    line-height: clamp(18.46px, 5.91vw, 32px);
    letter-spacing: -0.5px;
  }

  .astra-pd__sub {
    font-size: clamp(12px, 3.6vw, 15px);
    line-height: clamp(19.2px, 5.76vw, 24px);
  }

  .astra-pd-hero__head {
    gap: 20px;
  }

  .astra-pd-hero__text {
    gap: 24px;
  }

  .astra-pd-features {
    gap: 40px;
  }

  .astra-pd-features__card {
    flex: 1 1 100%;
    min-height: 0;
    padding: 24px 20px;
  }

  .astra-pd-features__card-title {
    font-size: clamp(13px, 4.2vw, 20px);
    line-height: clamp(16.9px, 5.46vw, 26px);
  }

  .astra-pd-features__card-desc {
    font-size: clamp(12px, 3.6vw, 15px);
    line-height: clamp(19.2px, 5.76vw, 24px);
  }

  .astra-pd-highlight {
    gap: 32px;
  }

  .astra-pd-highlight__content {
    gap: 32px;
  }

  .astra-pd-highlight__item-text {
    font-size: clamp(12px, 3.8vw, 17px);
    line-height: clamp(18.35px, 5.81vw, 26px);
  }

  .astra-pd-showcase {
    gap: 40px;
  }

  .astra-pd-showcase__block-title {
    font-size: clamp(13px, 4.2vw, 22px);
    line-height: clamp(16.55px, 5.35vw, 28px);
  }

  .astra-pd-showcase__block-desc,
  .astra-pd-specs__label,
  .astra-pd-specs__value {
    font-size: clamp(12px, 3.6vw, 15px);
    line-height: clamp(19.2px, 5.76vw, 24px);
  }

  .astra-pd-specs__row {
    padding: 12px 0;
  }

  .astra-pd-related {
    gap: 40px;
  }

  .astra-pd-related__media {
    height: 200px;
  }

  .astra-pd-related__card-title {
    font-size: clamp(13px, 4.2vw, 20px);
    line-height: clamp(16.9px, 5.46vw, 26px);
  }

  .astra-pd-related__card-sub {
    font-size: clamp(12px, 3.6vw, 16px);
    line-height: clamp(18px, 5.4vw, 24px);
  }

  .astra-pd-related__more {
    font-size: clamp(12px, 3.6vw, 15px);
  }
}
