/* ==========================================================================
   产品详情页 product-detail.css（油敏 / 干敏 共用）
   ========================================================================== */

/* Banner */
.pd-banner {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
}

.pd-banner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pd-banner__mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.7),
    rgba(255, 255, 255, 0.4),
    transparent
  );
}

.pd-banner__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 80px;
}

.pd-banner__eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 16px;
}

.pd-banner__title {
  font-size: 56px;
  font-weight: 300;
  color: var(--foreground);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.pd-banner__desc {
  font-size: 18px;
  color: var(--muted-foreground);
  font-weight: 300;
}

/* 产品详情主区 */
.pd-section {
  max-width: 1152px;
  margin: 0 auto;
  padding: 64px 48px;
}

.pd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.pd-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pd-right {
  gap: 32px;
}

/* 主图卡 */
.pd-image-card {
  background-color: hsl(30 20% 97%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.pd-image-card img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
}

/* 数据 / 报告卡 */
.pd-card {
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.pd-card__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 16px;
}

.pd-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  background-color: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.pd-btn:hover {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

/* 右侧文字 */
.pd-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 8px;
  line-height: 1.3;
}

.pd-block {
  border-left: 4px solid var(--primary);
  padding-left: 24px;
}

.pd-block__title {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.pd-block__title.with-gap {
  margin-bottom: 12px;
}

.pd-block__text {
  color: var(--muted-foreground);
  line-height: 1.7;
}

.pd-block__strong {
  color: var(--foreground);
  font-weight: 500;
}

.pd-block__meta {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.7;
  margin-top: 12px;
}

.pd-list {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted-foreground);
}

.pd-list li {
  list-style: none;
  line-height: 1.6;
}

/* 购买区 */
.pd-buy {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pd-buy__panel {
  background-color: hsl(30 20% 97%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pd-buy__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.pd-buy__price-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
}

.pd-buy__spec {
  font-size: 13px;
  color: var(--muted-foreground);
}

.pd-buy__store {
  font-size: 13px;
  color: var(--muted-foreground);
  margin: 0;
}

.pd-buy__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pd-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  text-decoration: none;
  box-shadow: var(--shadow-md);
  border: 0;
}

.pd-buy-btn--primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.pd-buy-btn--primary:hover {
  opacity: 0.9;
}

.pd-buy-btn--dark {
  background-color: #111;
  color: #fff;
}

.pd-buy-btn--dark:hover {
  background-color: #333;
}

.pd-buy-btn--lg {
  padding: 12px 32px;
  font-size: 15px;
}

/* 详情长图 */
.pd-detail-img {
  max-width: 896px;
  margin: 0 auto;
  padding: 0 48px 64px;
}

.pd-detail-img__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 24px;
  text-align: center;
}

.pd-detail-img__frame {
  background-color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pd-detail-img__frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================
   表格 / PDF 弹窗
   ============================ */
.pd-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  padding: 20px;
}

.pd-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.pd-modal-dialog {
  position: relative;
  z-index: 999;
  background-color: #fff;
  border-radius: var(--radius);
  width: 90vw;
  max-width: 1024px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.pd-modal-dialog--pdf {
  max-width: 960px;
  max-height: 90vh;
}

.pd-modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pd-modal-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--foreground);
  margin: 0;
}

.pd-modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background-color: transparent;
  border: 0;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--muted-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pd-modal-close:hover {
  background-color: var(--accent);
  color: var(--foreground);
}

.pd-modal-body {
  padding: 24px;
  overflow: auto;
  flex: 1;
}

.pd-modal-body--pdf {
  padding: 16px;
  overflow-y: auto;
  max-height: calc(90vh - 80px);
}

/* pdf.js canvas 容器（替代原 iframe） */
.pd-modal-body--pdf #pdPdfFrame {
  min-height: 400px;
}

/* 数据表格 */
.pd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pd-table thead {
  background-color: hsl(25 15% 96%);
}

.pd-table th {
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--foreground);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.pd-table td {
  padding: 12px 14px;
  color: var(--foreground);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.pd-table tbody tr:hover {
  background-color: hsl(30 20% 98%);
}

.pd-table td.font-medium,
.pd-table td.is-strong {
  font-weight: 600;
}

.pd-table th:first-child {
  width: 100px;
}

/* ============================
   响应式
   ============================ */
@media (max-width: 768px) {
  .pd-banner {
    height: 220px;
  }

  .pd-banner__inner {
    padding: 0 32px;
  }

  .pd-banner__title {
    font-size: 36px;
  }

  .pd-banner__desc {
    font-size: 15px;
  }

  .pd-section {
    padding: 40px 24px;
  }

  .pd-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .pd-detail-img {
    padding: 0 24px 48px;
  }

  .pd-name {
    font-size: 22px;
  }

  .pd-buy__panel {
    flex-direction: column;
    align-items: stretch;
  }

  .pd-modal-body {
    padding: 16px;
  }

  .pd-table {
    font-size: 12px;
  }

  .pd-table th,
  .pd-table td {
    padding: 10px 8px;
  }

  .pd-modal-body--pdf {
    max-height: calc(85vh - 80px);
  }

  /* 表格横向滚动 */
  .pd-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pd-table {
    min-width: 500px;
  }
}

/* ========== 产品文字版详情区块 ========== */
.pd-text-detail {
    max-width: 800px;
    margin: 40px auto;
    padding: 32px 24px;
}

.pd-text-detail__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #333;
    text-align: center;
}

.pd-text-detail__block {
    margin-bottom: 24px;
}

.pd-text-detail__block h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.pd-text-detail__block p {
    font-size: 14px;
    line-height: 1.8;
    color: #666;
}

/* ========== noscript 静态数据表格 ========== */
.pd-static-data h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 16px 0 8px;
    color: #444;
}

.pd-static-data table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 13px;
}

.pd-static-data th,
.pd-static-data td {
    border: 1px solid #e0e0e0;
    padding: 8px 12px;
    text-align: left;
}

.pd-static-data th {
    background: #f5f5f5;
    font-weight: 600;
}
