/* ==========================================================================
   Zhonglong — product detail page (zh-product.html / product.html)
   两张实拍图并排展示，右侧型号与核心规格，下方完整明细。
   ========================================================================== */

/* ---- 面包屑 ---- */
.pd-crumb {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.pd-crumb__inner {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 15px 0;
  font-size: 13px;
  color: var(--muted);
}
.pd-crumb__inner a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.18s var(--ease);
}
.pd-crumb__inner a:hover { color: var(--accent); }
.pd-crumb__now { color: var(--ink); font-weight: 600; }

/* ---- 主体两栏 ---- */
.pd-main {
  background: var(--white);
  padding: clamp(24px, 3.4vw, 44px) 0 clamp(38px, 4.6vw, 62px);
}
.pd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 0.84fr);
  gap: clamp(26px, 3.6vw, 58px);
  align-items: start;
}

/* ---- 左：图集 ---- */
.pd-gallery__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.pd-gallery__tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.pd-gallery__hint {
  font-size: 12px;
  color: var(--muted);
}

.pd-gallery__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.pd-gallery__grid--one {
  grid-template-columns: 1fr;
  max-width: 84%;
}
.pd-gallery__grid--empty { display: block; }

.pd-ph {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px;
  aspect-ratio: 1 / 1;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: zoom-in;
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.24s var(--ease), transform 0.24s var(--ease);
}
.pd-ph:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.pd-ph:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pd-ph img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.pd-ph--load {
  background: linear-gradient(100deg, #f6f4ef 20%, #eeeae1 40%, #f6f4ef 60%);
  background-size: 220% 100%;
  animation: pd-shimmer 1.3s linear infinite;
  cursor: default;
  border-style: dashed;
}
@keyframes pd-shimmer {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.pd-ph__zoom {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(11, 13, 15, 0.72);
  color: #fff;
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.pd-ph:hover .pd-ph__zoom,
.pd-ph:focus-visible .pd-ph__zoom {
  opacity: 1;
  transform: scale(1);
}

.pd-noimg {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 54px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
}

/* ---- 右：型号与核心规格 ---- */
.pd-info__type {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.pd-info__code {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.pd-info__lede {
  margin: 0 0 26px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 46ch;
}

.pd-specs {
  margin: 0 0 26px;
  border-top: 1px solid var(--line);
}
.pd-specs__row {
  display: grid;
  grid-template-columns: minmax(84px, 132px) minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.pd-specs__row dt {
  font-size: 12.5px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.pd-specs__row dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.pd-specs__row dd.pd-specs__none {
  font-weight: 400;
  font-size: 13.5px;
  color: var(--muted);
}
.pd-specs__row--lead dd {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 0.01em;
}

.pd-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.pd-info__note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 44ch;
}

/* ---- 型号不存在 ---- */
.pd-missing {
  grid-column: 1 / -1;
  text-align: center;
  padding: clamp(40px, 7vw, 84px) 20px;
}
.pd-missing h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.pd-missing p {
  margin: 0 auto 26px;
  max-width: 44ch;
  color: var(--muted);
}

/* ---- 详情明细（与主体同一块，用分隔线断开） ---- */
.pd-detail {
  margin-top: clamp(32px, 4.2vw, 56px);
  padding-top: clamp(26px, 3.2vw, 42px);
  border-top: 1px solid var(--line);
}
.pd-detail__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(30px, 4.4vw, 68px);
  align-items: start;
}
.pd-block__title {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pd-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.pd-table th,
.pd-table td {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: baseline;
}
.pd-table th {
  width: 33%;
  font-weight: 400;
  color: var(--muted);
  padding-right: 16px;
}
.pd-table td {
  font-weight: 600;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.pd-oem__main {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
  word-break: break-word;
}
.pd-oem__main.is-long {
  font-size: clamp(15px, 1.7vw, 18px);
  letter-spacing: 0;
}
.pd-oem__main.is-empty,
.pd-app.is-empty {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}
.pd-oem__alt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.pd-oem__label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 2px;
}
.pd-oem__chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-2);
}

.pd-app {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-2);
}
.pd-updated {
  margin: 26px 0 0;
  font-size: 12px;
  color: var(--muted);
}

/* ---- 相关型号 ---- */
.pd-rel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.pd-rel__card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
}
.pd-rel__card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}
.pd-rel__thumb {
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
}
.pd-rel__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.pd-rel__none {
  width: 100%;
  height: 100%;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
}
.pd-rel__body {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.pd-rel__code {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.pd-rel__meta {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- 询价带 ---- */
.pd-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.pd-cta h2 { color: #fff; }
.pd-cta p { color: var(--muted-dark); margin: 12px 0 0; max-width: 40ch; }
.pd-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.pd-cta__actions .form-note {
  flex: 1 0 100%;
  margin: 4px 0 0;
  color: var(--muted-dark);
}

/* ---- 大图查看 ---- */
.pd-lb {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
  background: rgba(11, 13, 15, 0.9);
  backdrop-filter: blur(4px);
  animation: pd-fade 0.18s var(--ease);
}
@keyframes pd-fade { from { opacity: 0; } to { opacity: 1; } }

.pd-lb__panel {
  position: relative;
  /* 面板宽度跟随图片，避免源图小的时候白框拉成长条 */
  width: min(680px, 92vw);
  max-width: 100%;
  max-height: min(90vh, 920px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(14px, 2vw, 22px);
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.pd-lb__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s var(--ease);
}
.pd-lb__close:hover { background: var(--paper-2); }
.pd-lb__stage {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 26px 10px 8px;
}
.pd-lb__stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(74vh, 780px);
  object-fit: contain;
}
.pd-lb__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-top: 4px;
}
.pd-lb__count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.pd-lb__nav {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.pd-lb__nav:hover { border-color: var(--line-strong); background: var(--paper); }

/* ---- 响应式 ---- */
@media (max-width: 1080px) {
  .pd-grid { grid-template-columns: 1fr; gap: 30px; }
  .pd-gallery__grid--one { max-width: 52%; }
  .pd-detail__grid { grid-template-columns: 1fr; gap: 40px; }
  .pd-rel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-cta { grid-template-columns: 1fr; align-items: start; }
}

@media (max-width: 640px) {
  .pd-crumb__inner { padding: 12px 0; font-size: 12px; }
  .pd-gallery__grid { gap: 9px; }
  .pd-ph { padding: 7px; border-radius: 11px; }
  .pd-gallery__grid--one { max-width: 100%; }
  .pd-info__code { font-size: 34px; }
  .pd-info__lede { margin-bottom: 20px; }
  .pd-specs__row { grid-template-columns: minmax(72px, 106px) minmax(0, 1fr); gap: 10px; padding: 10px 0; }
  .pd-specs__row dd { font-size: 14px; }
  .pd-actions .btn { flex: 1 1 auto; justify-content: center; }
  .pd-rel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .pd-rel__card { padding: 9px; gap: 9px; }
  .pd-rel__thumb { width: 44px; height: 44px; }
  .pd-rel__code { font-size: 12.5px; }
  .pd-rel__meta { font-size: 11px; }
  .pd-lb { padding: 0; }
  .pd-lb__panel {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    padding: 12px;
  }
  .pd-lb__stage img { max-height: 76vh; }
}
