/* ETSCO part-number pages and part-number directories.
 * Loaded after the V2.5 design system and the V2.6 leadership layer; uses their tokens.
 */

/* ---------- Product page hero and identity panel ---------- */
.pn-hero {
  padding-block: clamp(46px, 6vw, 80px);
  background: var(--ink-900);
  color: var(--surface);
}

.pn-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.pn-hero h1 {
  margin: 0;
  color: var(--surface);
  font-family: var(--font);
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.08;
}

.pn-hero__pn {
  display: block;
  margin-bottom: 10px;
  color: var(--surface);
  font-family: var(--font-mono);
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
}

.pn-hero__name {
  display: block;
  color: rgba(255, 255, 255, .88);
  font-size: clamp(22px, 2.4vw, 32px);
  overflow-wrap: anywhere;
}

.pn-hero__lead {
  max-width: 62ch;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, .78);
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.65;
}

.pn-hero .v26-actions {
  margin-top: 28px;
}

.pn-id {
  padding: 26px 26px 22px;
  border-top: 4px solid var(--red-600);
  background: var(--surface);
  color: var(--ink-900);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28);
}

.pn-id__label {
  margin: 0 0 6px;
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
}

.pn-id__value {
  margin: 0;
}

.pn-id__number {
  display: inline-block;
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1.2;
  white-space: nowrap;
  user-select: all;
  -webkit-user-select: all;
}

.pn-copy {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 16px;
  border: 1px solid var(--ink-900);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink-900);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.pn-copy:hover,
.pn-copy:focus-visible {
  background: var(--ink-900);
  color: var(--surface);
}

.pn-copy__status {
  min-height: 1.5em;
  margin: 8px 0 0;
  color: var(--success);
  font-size: 13px;
  font-weight: 700;
}

.pn-copy__hint {
  margin: 10px 0 0;
  color: var(--ink-500);
  font-size: 12px;
}

.pn-id__meta {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.pn-id__meta div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
}

.pn-id__meta dt {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.pn-id__meta dd {
  margin: 0;
  color: var(--ink-900);
  font-size: 14px;
  font-weight: 700;
}

.pn-id__meta a {
  color: var(--red-700);
  text-underline-offset: 3px;
}

/* ---------- Product page body ---------- */
.pn-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  padding-block: clamp(48px, 6vw, 80px);
}

.pn-section + .pn-section {
  margin-top: clamp(40px, 5vw, 56px);
}

.pn-section h2 {
  margin: 0 0 18px;
  color: var(--ink-900);
  font-family: var(--font);
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 750;
  letter-spacing: -.02em;
  line-height: 1.15;
}

.pn-section h3 {
  margin: 26px 0 12px;
  color: var(--ink-900);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.3;
}

.pn-section p {
  max-width: 72ch;
  margin: 0 0 16px;
  color: var(--ink-700);
  font-size: 16px;
  line-height: 1.7;
}

.pn-section p a,
.pn-section td a,
.pn-note a {
  color: var(--red-700);
  font-weight: 700;
  text-underline-offset: 3px;
}

.pn-table-wrap {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
}

.pn-specs,
.pn-compare,
.pn-dir {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.pn-specs th,
.pn-specs td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.pn-specs tr:last-child th,
.pn-specs tr:last-child td {
  border-bottom: 0;
}

.pn-specs th {
  width: 34%;
  background: var(--cloud);
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: .02em;
}

.pn-specs td {
  color: var(--ink-900);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.pn-specs .pn-mono,
.pn-mono {
  font-family: var(--font-mono);
  font-size: .95em;
  letter-spacing: .01em;
  white-space: nowrap;
}

.pn-nowrap {
  white-space: nowrap;
}

.pn-muted {
  color: var(--ink-500);
  font-weight: 500;
}

.pn-note {
  max-width: 78ch;
  margin: 14px 0 0;
  padding-left: 14px;
  border-left: 3px solid var(--red-600);
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.55;
}

.pn-refs {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pn-refs li {
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.pn-refs strong {
  font-family: var(--font-mono);
  font-size: 16px;
  white-space: nowrap;
}

.pn-refs span {
  color: var(--ink-500);
  font-size: 14px;
}

.pn-unknowns {
  margin: 0;
  padding-left: 20px;
  color: var(--ink-700);
  font-size: 15px;
  line-height: 1.6;
}

.pn-section .v26-list li {
  color: var(--ink-700);
}

.pn-compare th,
.pn-compare td,
.pn-dir th,
.pn-dir td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.pn-compare thead th,
.pn-dir thead th {
  background: var(--ink-900);
  color: var(--surface);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pn-compare tbody tr:nth-child(even),
.pn-dir tbody tr:nth-child(even) {
  background: var(--cloud);
}

.pn-compare tr[aria-current="page"] {
  background: var(--red-surface);
  box-shadow: inset 4px 0 0 var(--red-600);
}

.pn-compare td:first-child a,
.pn-dir td:first-child a {
  color: var(--red-700);
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
  text-underline-offset: 3px;
}

.pn-compare td:first-child,
.pn-dir td:first-child {
  font-family: var(--font-mono);
  font-weight: 700;
  white-space: nowrap;
}

.pn-tag {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pn-tag--review {
  border-color: #e3b7b9;
  background: var(--red-surface);
  color: var(--red-800);
}

.pn-dir__rfq {
  color: var(--red-700);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
  text-underline-offset: 3px;
}

/* Photograph slots (placeholders until product photos are supplied) */
.pn-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.pn-slot {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.pn-slot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.pn-slot__frame {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  margin: 8px 8px 0;
  border: 2px dashed var(--ink-400);
  background: var(--cloud);
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pn-slot figcaption {
  padding: 10px 12px 12px;
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

/* Side column */
.pn-side {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 24px;
}

.pn-figure {
  margin: 0;
  border: 1px solid var(--line);
  background: var(--surface);
}

.pn-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.pn-figure figcaption {
  padding: 12px 14px;
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.5;
}

.pn-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--ink-900);
  background: var(--surface);
}

.pn-card--dark {
  border-color: var(--ink-900);
  border-top-color: var(--red-600);
  background: var(--ink-900);
  color: var(--surface);
}

.pn-card h2 {
  margin: 0 0 12px;
  color: inherit;
  font-size: 19px;
  font-weight: 750;
  line-height: 1.25;
}

.pn-card p {
  margin: 0 0 14px;
  color: var(--ink-500);
  font-size: 14px;
  line-height: 1.6;
}

.pn-card--dark p {
  color: rgba(255, 255, 255, .74);
}

.pn-card .v26-button {
  width: 100%;
}

.pn-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pn-card li a {
  color: var(--red-700);
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: 3px;
}

.pn-cta-wrap {
  padding-bottom: clamp(48px, 6vw, 80px);
}

.pn-disclaimer {
  margin: 28px 0 0;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.6;
}

/* ---------- Part-number directory (on /parts/ and category pages) ---------- */
.pn-directory {
  margin: 0 0 68px;
}

.pn-directory > h2 {
  margin: 0 0 12px;
  color: var(--ink-900);
  font-family: var(--font);
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 750;
  letter-spacing: -.025em;
  line-height: 1.08;
}

.pn-directory > p {
  max-width: 72ch;
  margin: 0 0 20px;
  color: var(--ink-500);
  font-size: 15px;
  line-height: 1.65;
}

.pn-directory h3 {
  margin: 30px 0 12px;
  color: var(--ink-900);
  font-size: 19px;
  font-weight: 750;
  line-height: 1.25;
}

.pn-filter {
  display: grid;
  gap: 6px;
  max-width: 460px;
  margin: 0 0 18px;
}

.pn-filter label {
  color: var(--ink-700);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
}

.pn-filter input {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--ink-400);
  border-radius: 2px;
  background: var(--surface);
  color: var(--ink-900);
  font-family: var(--font-mono);
  font-size: 16px;
}

.pn-filter input:focus-visible {
  outline: 3px solid var(--red-600);
  outline-offset: 1px;
}

.pn-filter__status {
  min-height: 1.4em;
  margin: 0;
  color: var(--ink-500);
  font-size: 13px;
}

.pn-dir caption {
  padding: 0 0 8px;
  color: var(--ink-500);
  font-size: 13px;
  text-align: left;
}

/* Directory placed on the legacy interior category pages. */
.pn-legacy-dir {
  padding-top: 47px;
  font-family: var(--font);
}

.pn-legacy-dir .pn-directory {
  margin-bottom: 0;
}

.pn-legacy-dir .pn-directory > h2 {
  font-size: clamp(22px, 2.2vw, 28px);
  text-align: center;
}

.pn-legacy-dir .pn-directory > p {
  margin-inline: auto;
  text-align: center;
}

.pn-legacy-dir .pn-filter {
  margin-inline: auto;
}

.pn-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 18px;
}

.pn-cards a {
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink-900);
  background: var(--surface);
  color: var(--ink-900);
  text-decoration: none;
}

.pn-cards a:hover,
.pn-cards a:focus-visible {
  border-color: var(--red-600);
}

.pn-cards strong {
  font-family: var(--font-mono);
  font-size: 22px;
}

.pn-cards span {
  margin-top: 6px;
  color: var(--ink-700);
  font-size: 15px;
  font-weight: 700;
}

.pn-cards small {
  margin-top: 10px;
  color: var(--ink-500);
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .pn-hero__grid,
  .pn-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .pn-side {
    position: static;
  }
}

@media (max-width: 620px) {
  .pn-hero__pn {
    font-size: clamp(30px, 9.6vw, 40px);
  }

  .pn-id {
    padding: 22px 20px 18px;
  }

  .pn-id__meta div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .pn-copy {
    width: 100%;
    justify-content: center;
  }

  .pn-specs th,
  .pn-specs td {
    display: block;
    width: 100%;
  }

  .pn-specs th {
    padding-bottom: 4px;
    border-bottom: 0;
  }

  .pn-refs li {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .pn-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .pn-slots {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Directory rows become stacked records on phones. */
  .pn-dir thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .pn-dir,
  .pn-dir tbody,
  .pn-dir tr,
  .pn-dir td {
    display: block;
    width: 100%;
  }

  .pn-dir tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid var(--line);
  }

  .pn-dir td {
    padding: 0;
    border: 0;
  }

  .pn-dir td:nth-child(1) {
    grid-column: 1;
    font-size: 16px;
  }

  .pn-dir td:nth-child(5) {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
  }

  .pn-dir td:nth-child(2),
  .pn-dir td:nth-child(3),
  .pn-dir td:nth-child(4) {
    grid-column: 1 / -1;
  }

  .pn-dir td:nth-child(2) {
    color: var(--ink-900);
    font-weight: 700;
  }

  .pn-dir td:nth-child(3) {
    color: var(--ink-500);
    font-size: 13px;
    overflow-wrap: anywhere;
  }
}

@media print {
  .pn-copy,
  .pn-filter {
    display: none !important;
  }
}
