/* 产品详情页 — 白底 + 科技金色点缀 */
.page-product-detail {
  --pd-accent: #ad8950;
  --pd-accent-hover: #8b6c3c;
  --pd-accent-soft: rgba(173, 137, 80, 0.12);
  --pd-bg: #ffffff;
  --pd-card: #ffffff;
  --pd-surface: #f8f6f2;
  --pd-line: rgba(19, 32, 44, 0.08);
  --pd-line-strong: rgba(19, 32, 44, 0.12);
  --pd-text: #0d1721;
  --pd-muted: #5c6570;
  --pd-table-stripe: #fbfaf7;
  background: var(--pd-bg);
  color: var(--pd-text);
}

.page-product-detail .product-detail-layout {
  width: min(var(--container-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 88px;
}

/* 工具条：返回 + 系列（置于 #overview 内顶部） */
.pd-toolbar {
  margin-bottom: 6px;
  padding-bottom: 24px;
  border-bottom: none;
}

.pd-panel--overview > .pd-toolbar {
  margin-top: 0;
  margin-bottom: 0;
  padding-bottom: 20px;
  border-bottom: none;
}

.pd-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px 24px;
}

.pd-toolbar__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 4px 0;
  font-size: 14px;
  color: var(--pd-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.pd-toolbar__back:hover {
  color: var(--pd-accent);
}

.pd-toolbar__back .iconfont {
  font-size: 14px;
}

.pd-toolbar__intro {
  order: -1;
  text-align: left;
  min-width: 0;
  flex: 1;
}

.pd-toolbar__series {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--pd-text);
  letter-spacing: 0.02em;
}

.pd-toolbar__sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--pd-muted);
  line-height: 1.5;
}

/* —— 主内容区 —— */
.pd-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 44px;
}

.pd-panel {
  background: var(--pd-card);
  border: none;
  border-top: none;
  padding: 32px 0 0;
  box-shadow: none;
}

.pd-panel--overview {
  border-top: none;
  padding-top: 0;
}

.pd-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 0;
  border-bottom: none;
}

.pd-panel__title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--pd-text);
}

/* 概述：左图右文（产品标题在右侧文案栏顶部） */
.pd-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: start;
}

.pd-overview__text {
  min-width: 0;
}

.pd-overview__head {
  margin-bottom: 20px;
}

.pd-overview__head .pd-panel__title {
  margin: 0;
}

.pd-overview__lead {
  margin: 0 0 14px;
  color: #263544;
  font-size: 20px;
  line-height: 1.65;
}

.pd-gallery {
  min-width: 0;
}

.pd-gallery__main-wrap {
  position: relative;
  aspect-ratio: var(--ratio-product-media, 4 / 3);
  max-height: 420px;
  margin: 0 auto;
  background: linear-gradient(145deg, #fcfbf8, #f3efe6);
  border: none;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pd-gallery__main {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: opacity 0.22s ease;
}

.pd-gallery__main.is-switching {
  opacity: 0.35;
}

.pd-gallery__thumbs {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.pd-gallery__thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0;
  overflow: hidden;
  cursor: pointer;
  background: rgba(19, 32, 44, 0.04);
  transition: border-color 0.2s ease, background 0.2s ease;
}

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

.pd-gallery__thumb:hover {
  border-color: rgba(173, 137, 80, 0.35);
  background: rgba(173, 137, 80, 0.08);
}

.pd-gallery__thumb.is-active {
  border-color: var(--pd-accent);
  background: var(--pd-accent-soft);
}

.pd-prose {
  font-size: 15px;
  line-height: 1.9;
  color: var(--pd-muted);
}

.pd-prose[hidden] {
  display: none !important;
}

.pd-prose p {
  margin: 0;
}

.pd-highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.pd-highlight {
  padding: 18px 18px 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
  border: 1px solid var(--pd-line);
}

.pd-highlight__label {
  margin: 0;
  color: #7c6a49;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.pd-highlight__value {
  margin: 10px 0 0;
  color: var(--pd-text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
  padding: 11px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--pd-accent);
  background: transparent;
  border: none;
  border-bottom: 1px solid currentColor;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.pd-btn:hover {
  color: var(--pd-accent-hover);
}

.pd-btn:active {
  transform: translateY(1px);
}

/* 富文本区域 */
.pd-richtext {
  font-size: 15px;
  line-height: 1.95;
  color: var(--pd-muted);
}

.pd-richtext > :first-child {
  margin-top: 0;
}

.pd-richtext > :last-child {
  margin-bottom: 0;
}

.pd-richtext h3,
.pd-richtext h4 {
  margin: 28px 0 12px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--pd-text);
}

.pd-richtext p {
  margin: 0 0 16px;
}

.pd-richtext ul,
.pd-richtext ol {
  margin: 0 0 16px;
  padding-left: 1.2em;
}

.pd-richtext li {
  margin-bottom: 8px;
}

.pd-richtext table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 14px;
}

.pd-richtext table td,
.pd-richtext table th {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--pd-line);
}

.pd-richtext table tr:nth-child(even) {
  background: var(--pd-table-stripe);
}

.pd-richtext table tr:first-child td,
.pd-richtext table tr:first-child th {
  border-top: 1px solid var(--pd-line);
}

.pd-advantage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pd-advantage-card {
  padding: 28px 24px 26px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfaf7 100%);
  border: 1px solid var(--pd-line);
}

.pd-advantage-card__index {
  margin: 0 0 18px;
  color: rgba(173, 137, 80, 0.72);
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
}

.pd-advantage-card__title {
  margin: 0;
  color: var(--pd-text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.45;
}

.pd-advantage-card__desc {
  margin: 12px 0 0;
  color: var(--pd-muted);
  font-size: 14px;
  line-height: 1.9;
}

/* 来图定制 */
.pd-custom {
  padding: 4px 0 0;
}

.pd-custom__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 36px;
  padding: 34px 40px;
  background:
    linear-gradient(90deg, rgba(7, 18, 31, 0.92), rgba(14, 33, 53, 0.84)),
    url("../assets/images/product-custom-bg.jpg") center/cover no-repeat;
  border: none;
}

.pd-custom__head {
  min-width: 0;
  max-width: 720px;
}

.pd-custom__eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
}

.pd-custom__title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #ffffff;
}

.pd-custom__desc {
  margin: 14px 0 0;
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.82);
}

.pd-custom__actions {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 14px;
  flex-shrink: 0;
}

.pd-custom__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  font-size: 14px;
  font-weight: 700;
  color: #0d1721;
  background: #ffffff;
  border: none;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.pd-custom__button:hover {
  background: var(--brand-gold);
  color: #ffffff;
}

.pd-custom__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.pd-custom__link:hover {
  color: #ffffff;
  border-bottom-color: currentColor;
}

.pd-custom__button:active,
.pd-custom__link:active {
  transform: translateY(1px);
}

/* 应用领域三卡 */
.pd-app-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pd-app-card {
  position: relative;
  min-height: 180px;
  border-radius: 0;
  overflow: hidden;
  border: none;
  text-decoration: none;
  color: #fff;
  transition: transform 0.2s ease;
}

.pd-app-card:hover {
  transform: translateY(-3px);
}

.pd-app-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 0.35s ease;
}

.pd-app-card:hover .pd-app-card__bg {
  transform: scale(1.08);
}

.pd-app-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 23, 33, 0.08) 10%, rgba(13, 23, 33, 0.82) 100%);
}

.pd-app-card__label {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* 右侧悬浮 */
.pd-float {
  position: fixed;
  right: 18px;
  bottom: 100px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pd-float__btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--pd-accent);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.pd-float__btn:hover {
  background: var(--pd-accent);
  color: #fff;
}

.pd-float__btn .iconfont {
  font-size: 18px;
}

@media (max-width: 1024px) {
  .page-product-detail .product-detail-layout {
    padding: 20px 0 64px;
  }

  .pd-toolbar__row {
    flex-direction: column;
    align-items: flex-start;
  }

  .pd-toolbar__intro {
    text-align: left;
    width: 100%;
  }

  .pd-main {
    gap: 36px;
  }

  .pd-overview {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .pd-custom__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 24px;
    gap: 22px;
  }

  .pd-custom__actions {
    flex-wrap: wrap;
    gap: 12px 24px;
  }

  .pd-highlight-grid,
  .pd-advantage-grid,
  .pd-app-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .pd-panel {
    padding: 24px 0 0;
  }

  .pd-panel__head {
    margin-bottom: 22px;
  }

  .pd-toolbar__series {
    font-size: 22px;
  }

  .pd-overview__lead {
    font-size: 17px;
  }

  .pd-custom__title {
    font-size: 24px;
  }

  .pd-custom__desc {
    font-size: 14px;
    line-height: 1.9;
  }

  .pd-float {
    right: 12px;
    bottom: 80px;
  }
}
