/* =========================================================
   Chenfeng — product detail page (L3)
   Loaded only on /products/{brand}-{model}/
   ========================================================= */

.pd { padding: 26px 0 8px; }
.pd-head h1 {
  font-family: var(--ff-head); font-size: 26px; line-height: 1.22;
  letter-spacing: -0.02em; font-weight: 700;
}
.pd-head h1 .hl { color: var(--ink); }
/* keep the order code on one line: it breaks at a hyphen otherwise, and a split
   part number is the one thing a buyer must not misread */
.pd-head h1 .pn { white-space: nowrap; }
.pd-head h1 .fam {
  display: block; margin-top: 6px;
  font-size: 16px; font-weight: 500; letter-spacing: 0;
  color: var(--muted);
}
.pd-sub {
  margin-top: 14px; font-size: 14.5px; line-height: 1.55; color: #3C4B5A;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
}

/* about + specs */
.pd-split { display: grid; gap: 30px; }

/* ---------- split: gallery + buy card ---------- */
.pd-grid { display: grid; gap: 22px; margin-top: 22px; align-items: start; }

.gal-main {
  position: relative; display: block; width: 100%;
  padding: 0; border: 1px solid var(--line); background: var(--soft);
  cursor: zoom-in; overflow: hidden; text-align: left;
}
.gal-ph { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; color: #A9B8C6; }
/* above phone width a 4:3 box gets taller than the viewport, so cap the height */
@media (min-width: 640px) { .gal-ph { aspect-ratio: auto; height: 380px; } }
@media (min-width: 900px) { .gal-ph { height: 430px; } }
.gal-ph .glyph { width: 96px; height: 96px; stroke-width: 0.9; }
.gal-ph img, .zoom-ph img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gal-tag {
  position: absolute; top: 10px; left: 10px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 7px; background: rgba(27,42,58,0.82); color: #fff;
}
.gal-cap {
  display: grid; gap: 2px; padding: 11px 13px 13px;
  background: #fff; border-top: 1px solid var(--line-2);
}
.gal-cap b { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.gal-cap span { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.gal-zoom {
  position: absolute; right: 10px; bottom: 52px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
  padding: 5px 9px; background: #fff; border: 1px solid var(--line); color: var(--ink);
}
.gal-main:hover .gal-zoom { border-color: var(--ink); }
/* no photograph on file: the plate is a plain frame, and one sentence sits underneath it */
.gal-static { cursor: default; }
.gal-empty { margin: 10px 2px 0; font-size: 13px; line-height: 1.55; color: var(--muted); }

.gal-thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.gal-th {
  display: grid; gap: 4px; width: 100%; padding: 8px 4px 7px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  color: var(--muted-2); text-align: center;
}
.gal-th .glyph { width: 22px; height: 22px; margin: 0 auto; stroke-width: 1.1; }
.gal-th span { font-size: 10.5px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); line-height: 1.2; }
.gal-th:hover { border-color: #B4C0CC; }
.gal-th.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.gal-th.is-on span { color: var(--ink); font-weight: 600; }

/* ---------- buy card ---------- */
.buy {
  border: 1px solid var(--line); background: #fff;
  padding: 18px 16px 16px; display: grid; gap: 0;
}
.buy-state { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.buy-lead { font-family: var(--ff-mono); font-size: 13px; color: var(--ink); }
.buy-line { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.buy-facts { display: grid; gap: 0; margin: 14px 0 16px; border-top: 1px solid var(--line-2); }
.buy-facts > div {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line-2);
}
.buy-facts dt {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--muted-2); padding-top: 2px;
}
.buy-facts dd { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink); }
.buy-facts dd.mono { font-family: var(--ff-mono); font-size: 12.5px; word-break: break-word; }
.buy .btn { margin-bottom: 8px; }
.buy-micro {
  margin-top: 6px; font-size: 11.5px; line-height: 1.55; color: var(--muted);
  text-align: center;
}

/* ---------- sections ---------- */
.pd-sec { padding: 38px 0; border-top: 1px solid var(--line); }
.pd-sec-soft { background: var(--soft); border-top: 0; }
.pd-h2 {
  font-family: var(--ff-head); font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 16px;
}
.prose { display: grid; gap: 14px; font-size: 15.5px; line-height: 1.68; color: #33424F; max-width: 680px; }
.prose p:first-child { color: var(--ink); }

/* spec table */
.spec-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-t caption {
  text-align: left; font-family: var(--ff-head); font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  padding-bottom: 12px;
}
.spec-t tr { border-bottom: 1px solid var(--line-2); }
.spec-t tr:first-child th, .spec-t tr:first-child td { border-top: 1px solid var(--line); }
.spec-t th {
  width: 41%; padding: 9px 12px 9px 0; text-align: left; vertical-align: top;
  font-weight: 500; font-size: 12.5px; color: var(--muted);
}
.spec-t td { padding: 9px 0; color: var(--ink); line-height: 1.45; }
.spec-t tr:hover td, .spec-t tr:hover th { background: #FCFDFE; }
.spec-note { margin-top: 12px; font-size: 12px; line-height: 1.55; color: var(--muted); max-width: 660px; }

/* compatibility */
.compat { display: grid; gap: 18px; }
.cbox { border: 1px solid var(--line); padding: 16px 16px 14px; background: #fff; }
.cbox h3 {
  font-family: var(--ff-head); font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  color: var(--ink); margin-bottom: 10px;
}
.cbox h3 + h3,
.cbox .clist + h3,
.cbox .cnote + h3 { margin-top: 20px; }
.cbox h3 span { font-weight: 500; color: var(--muted-2); }
.clist { display: grid; gap: 12px; }
.clist li { display: grid; gap: 3px; padding-bottom: 11px; border-bottom: 1px solid var(--line-2); }
.clist li:last-child { border-bottom: 0; padding-bottom: 0; }
.clist .cm {
  font-family: var(--ff-mono); font-size: 12.5px; font-weight: 600;
  color: var(--ink); word-break: break-word;
  text-decoration: underline; text-decoration-color: #C9D3DD; text-underline-offset: 3px;
}
.clist a.cm:hover { color: var(--accent-dk); text-decoration-color: var(--accent); }
.clist li > span { font-size: 12.5px; line-height: 1.52; color: var(--muted); }
.cnote { font-size: 12.5px; line-height: 1.55; color: var(--muted); }

/* supply */
.supply { display: grid; gap: 22px; }
.sup-col h3 {
  font-family: var(--ff-head); font-size: 13.5px; font-weight: 700;
  color: var(--ink); margin-bottom: 9px;
}
.sup-col p { font-size: 13.5px; line-height: 1.6; color: #435261; }
.vlist { display: grid; gap: 10px; counter-reset: vs; }
.vlist li {
  position: relative; padding-left: 26px;
  font-size: 13.5px; line-height: 1.58; color: #435261;
  counter-increment: vs;
}
.vlist li::before {
  content: counter(vs); position: absolute; left: 0; top: 1px;
  width: 17px; height: 17px; border: 1px solid #C6CFD8;
  font-family: var(--ff-mono); font-size: 9.5px; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}

/* quote form on the product page */
.pquote { display: grid; gap: 26px; align-items: start; }
.pquote-head h2 {
  font-family: var(--ff-head); font-size: 22px; font-weight: 700;
  letter-spacing: -0.015em; line-height: 1.25;
}
.pquote-head p { margin-top: 10px; font-size: 14px; line-height: 1.6; color: #435261; max-width: 380px; }
.pquote-head .mono {
  display: inline-block; margin-top: 14px; padding: 6px 9px;
  background: #fff; border: 1px solid var(--line);
  font-family: var(--ff-mono); font-size: 12px; color: var(--ink); word-break: break-word;
}
.qrow-3 { display: grid; gap: 16px; }

/* related */
.rel-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 16px;
}
.rel-head h2 { font-family: var(--ff-head); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
.rel-grid { display: grid; gap: 10px; }
.rel-card {
  height: 100%; padding: 13px 13px 14px;
  border: 1px solid var(--line); background: #fff;
  transition: border-color .15s ease;
}
.rel-card > a { display: grid; gap: 5px; height: 100%; align-content: start; }
.rel-card .rel-foot { margin-top: auto; padding-top: 6px; }
.rel-card:hover { border-color: #B4C0CC; }
.rel-model { font-family: var(--ff-mono); font-size: 12.5px; font-weight: 600; color: var(--ink); word-break: break-word; }
.rel-desc { font-size: 12px; line-height: 1.5; color: var(--muted); }
.rel-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.rel-foot .st { font-size: 10px; padding: 3px 6px; }
.rel-cta { font-size: 11.5px; font-weight: 600; color: var(--accent-dk); letter-spacing: 0.02em; }

/* image zoom dialog */
.zoom {
  padding: 0; border: 0; max-width: 100vw; max-height: 100vh;
  background: transparent; color: var(--ink);
}
.zoom::backdrop { background: rgba(15, 24, 33, 0.82); }
.zoom-in { width: min(92vw, 880px); background: #fff; }
.zoom-ph {
  position: relative; display: flex; align-items: center; justify-content: center;
  aspect-ratio: 4 / 3; background: var(--soft); color: #A9B8C6;
  border-bottom: 1px solid var(--line);
}
.zoom-ph .glyph { width: 150px; height: 150px; stroke-width: 0.8; }
.zoom-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 20px; padding: 12px 16px;
}
.zoom-bar p { display: grid; gap: 2px; font-size: 12.5px; line-height: 1.5; color: var(--muted); max-width: 620px; }
.zoom-bar b { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 639px) {
  /* breadcrumb: five levels wrap onto two lines on a phone; keep the ends only */
  .crumb li:nth-child(n+3):not(:last-child) { display: none; }
  .spec-t th { width: 34%; padding-right: 10px; font-size: 12px; }
  .spec-t td { font-size: 13px; }
  .buy-facts > div { grid-template-columns: 84px minmax(0, 1fr); gap: 8px; }
}
@media (min-width: 640px) {
  .pd-grid { grid-template-columns: minmax(0, 1fr) minmax(290px, 0.72fr); gap: 24px; }
  .pd-head h1 { font-size: 30px; }
  .pd-head h1 .fam { font-size: 17px; }
  .buy { padding: 22px 22px 18px; }
  .compat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supply { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 34px; }
  .rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qrow-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .pd { padding-top: 34px; }
  .pd-split { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 48px; }
  .pd-grid { grid-template-columns: minmax(0, 1.32fr) minmax(300px, 0.68fr); gap: 40px; }
  .buy { position: sticky; top: 76px; }
  .pd-head h1 { font-size: 33px; }
  .gal-ph .glyph { width: 128px; height: 128px; }
  .spec-t th { width: 37%; }
  .rel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pquote { grid-template-columns: minmax(0, 0.78fr) minmax(340px, 1.22fr); gap: 44px; }
  .qrow-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1080px) {
  .pd-grid { grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.58fr); }
  .rel-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
