/* ============================================================
   产品详情页 — 仅 /product/{slug}.html 使用
   ============================================================ */

.pd-hero {
  background: linear-gradient(180deg, var(--bg-light) 0%, #fff 100%);
  padding: 104px 0 44px;
  border-bottom: 1px solid var(--border);
}

.pd-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-gray);
  margin-bottom: 22px;
}
.pd-breadcrumb a { color: var(--text-gray); }
.pd-breadcrumb a:hover { color: var(--primary); }
.pd-breadcrumb span { color: #b8c2cf; }

.pd-top {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px;
  align-items: start;
}

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

.pd-main {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.pd-main img {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  transition: var(--transition);
}

.pd-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(30, 41, 59, 0.42);
  color: #fff;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.pd-gallery-nav:hover { background: var(--primary); }
.pd-gallery-nav:focus-visible { outline: 3px solid var(--primary-light); }
.pd-prev { left: 16px; }
.pd-next { right: 16px; }

.pd-gallery-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin-top: 16px;
}
.pd-gallery-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #c6d0dc;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}
.pd-gallery-dot:hover { background: var(--primary); }
.pd-gallery-dot.active { width: 26px; background: var(--primary); }
.pd-gallery-dot:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.pd-info { padding-top: 2px; }

.pd-cat {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}

.pd-info h1 {
  font-size: 1.75rem;
  line-height: 1.4;
  color: var(--text-dark);
  margin: 14px 0 8px;
}
.pd-model {
  color: var(--text-gray);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.pd-key-specs {
  display: grid;
  gap: 2px;
  margin: 16px 0 18px;
  border-top: 1px solid var(--border);
}
.pd-key-specs li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.88rem;
}
.pd-key-specs li span { color: var(--text-gray); flex-shrink: 0; }
.pd-key-specs li strong { color: var(--text-dark); text-align: right; }

.pd-summary {
  color: var(--text-mid);
  line-height: 1.85;
  font-size: 0.92rem;
  margin-bottom: 22px;
}

.pd-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.pd-actions .btn { display: inline-flex; align-items: center; gap: 8px; }

.pd-views {
  margin-top: 15px;
  font-size: 0.82rem;
  color: var(--text-gray);
}
.pd-views i { color: var(--primary); margin-right: 4px; }

/* ---------- Tabs ---------- */
.pd-content { padding: 42px 0 68px; }

.pd-tabs {
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  scrollbar-width: thin;
}
.pd-tab {
  flex-shrink: 0;
  padding: 15px 28px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-mid);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.pd-tab:hover { color: var(--primary); }
.pd-tab.active {
  background: var(--primary);
  color: #fff;
  border-bottom-color: var(--primary);
}

.pd-panel { display: none; }
.pd-panel.active { display: block; animation: pdFade 0.28s ease; }
@keyframes pdFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 富文本 ---------- */
.rich-content {
  color: var(--text-mid);
  line-height: 1.9;
  font-size: 0.94rem;
}
.rich-content h2,
.rich-content h3,
.rich-content h4 {
  color: var(--text-dark);
  margin: 26px 0 12px;
  line-height: 1.5;
}
.rich-content h2 { font-size: 1.3rem; }
.rich-content h3 { font-size: 1.12rem; }
.rich-content p { margin-bottom: 14px; }
.rich-content ul,
.rich-content ol { padding-left: 24px; margin: 10px 0 16px; }
.rich-content ul { list-style: disc; }
.rich-content ol { list-style: decimal; }
.rich-content li { margin-bottom: 6px; }
.rich-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 16px 0;
}
.rich-content img.img-full { width: 100%; }
.rich-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.88rem;
}
.rich-content th,
.rich-content td { border: 1px solid var(--border); padding: 9px 12px; }
.rich-content th { background: var(--bg-light); color: var(--text-dark); }
.rich-content a { color: var(--primary); }
.rich-content blockquote {
  border-left: 4px solid var(--primary-light);
  background: var(--bg-light);
  padding: 12px 16px;
  margin: 14px 0;
  color: var(--text-mid);
}

/* ---------- 参数表 ---------- */
.pd-spec-group { margin-bottom: 34px; }
.pd-spec-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  padding-left: 10px;
  border-left: 4px solid var(--primary);
  margin-bottom: 12px;
}
.pd-spec-scroll { overflow-x: auto; }
.pd-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  min-width: 520px;
}
.pd-spec-table th,
.pd-spec-table td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: center;
}
.pd-spec-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.pd-spec-table td:first-child {
  width: 30%;
  background: #fafcff;
  color: var(--text-dark);
  font-weight: 600;
  text-align: left;
}
.pd-spec-table td { color: var(--text-mid); }
.pd-spec-table tbody tr:nth-child(even) td { background-color: #f7faff; }
.pd-spec-table tbody tr:nth-child(even) td:first-child { background-color: #f1f6fd; }

/* ---------- 下载 ---------- */
.pd-dl-group { margin-bottom: 30px; }
.pd-dl-group-title {
  background: var(--primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: 6px 6px 0 0;
  margin: 0;
}
.pd-dl-list {
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}
.pd-dl-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.pd-dl-item:last-child { border-bottom: none; }
.pd-dl-item:hover { background: var(--bg-light); }
.pd-dl-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
  font-size: 1rem;
}
.pd-dl-icon.zip { background: #fff3e8; color: var(--accent); }
.pd-dl-info { flex: 1; min-width: 0; }
.pd-dl-name {
  color: var(--text-dark);
  font-weight: 600;
  font-size: 0.9rem;
  word-break: break-all;
}
.pd-dl-type { color: var(--primary); }
.pd-dl-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 5px;
  color: var(--text-gray);
  font-size: 0.78rem;
}
.pd-dl-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 0.84rem;
  font-weight: 600;
  transition: var(--transition);
}
.pd-dl-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ---------- 系列产品 ---------- */
.pd-series-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.pd-series-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}
.pd-series-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--primary-light);
}
.pd-series-img {
  height: 170px;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pd-series-img img { max-width: 100%; max-height: 140px; object-fit: contain; }
.pd-series-body { padding: 14px 16px 18px; }
.pd-series-model {
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 5px;
}
.pd-series-body h3 {
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--text-dark);
  font-weight: 600;
}

.pd-empty {
  color: var(--text-gray);
  font-size: 0.9rem;
  padding: 18px 0;
}

@media (max-width: 980px) {
  .pd-top { grid-template-columns: 1fr; gap: 28px; }
  .pd-main { min-height: 280px; }
  .pd-main img { max-height: 320px; }
  .pd-info h1 { font-size: 1.5rem; }
  .pd-series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .pd-hero { padding: 88px 0 32px; }
  .pd-content { padding: 30px 0 48px; }
  .pd-main { min-height: 220px; padding: 14px; }
  .pd-gallery-nav { width: 36px; height: 36px; font-size: 0.9rem; }
  .pd-prev { left: 8px; }
  .pd-next { right: 8px; }
  .pd-tab { padding: 11px 16px; font-size: 0.88rem; }
  .pd-actions { flex-direction: column; align-items: stretch; }
  .pd-actions .btn { justify-content: center; }
  .pd-dl-item { flex-wrap: wrap; }
  .pd-dl-btn { width: 100%; justify-content: center; }
  .pd-series-grid { grid-template-columns: 1fr; }
  .pd-spec-table { min-width: 460px; }
}
