/* ==========================================================
   product-detail.css
   Companion to product.css. Reuses .page-hero, .page-breadcrumb,
   .mono, .product-grid, .product-card, .product-view-btn,
   .media-grade, .doc-link, .catalogue-empty and .filter-reset
   as-is from product.css — nothing here redefines them.

   Colour / type tokens fall back to sane defaults via var(--x, fallback)
   so this file inherits home.css's real palette automatically if the
   variable names already match; otherwise it still renders correctly
   on its own.
   ========================================================== */

:root {
  --sh-navy:      var(--navy, #0d2340);
  --sh-navy-deep: var(--navy-deep, #081627);
  --sh-bronze:    var(--bronze, #b9884f);
  --sh-cream:     var(--cream, #f7f5f1);
  --sh-ink:       var(--ink, #1c2430);
  --sh-muted:     var(--muted, #6b7480);
  --sh-line:      var(--hairline, #e4e0d8);
}

/* ---------------- COA-style hero modifier ---------------- */

.page-hero.detail-hero {
  padding-bottom: 3rem;
}

.page-hero.detail-hero .page-breadcrumb {
  margin-bottom: 1.5rem;
}

.page-hero.detail-hero .eyebrow.mono {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.page-hero.detail-hero h1 {
  margin-top: 0;
}

/* Spec strip reads as a distinct glass card sitting on the hero photo,
   not text floating loose over the image — a fixed column count keeps
   every label lined up instead of wrapping unevenly (e.g. "Grade"
   dropping to its own row while the rest stay put). */
.detail-spec-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  margin: 2rem 0 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.detail-spec-strip > div {
  padding: 1.1rem 1.4rem;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.detail-spec-strip > div:last-child {
  border-right: none;
}

@media (max-width: 700px) {
  .detail-spec-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-spec-strip > div:nth-child(2n) {
    border-right: none;
  }
}

.detail-spec-strip dt {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.35rem;
  white-space: nowrap;
}

.detail-spec-strip dd {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}

.detail-spec-strip .mono {
  font-family: 'IBM Plex Mono', monospace;
}

/* ---------------- loading / not-found state ---------------- */

.detail-state {
  padding: 4rem 0;
}

/* ---------------- detail body layout ---------------- */

.detail-section {
  padding: 4rem 0 5rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* -- media column -- */

.detail-media-frame {
  position: relative;
  isolation: isolate; /* keeps .media-grade contained to this box even if
                          product.css gives it a high z-index elsewhere */
  border-radius: 10px;
  overflow: hidden;
  background: var(--sh-cream);
  border: 1px solid var(--sh-line);
  box-shadow: 0 1px 2px rgba(13, 35, 64, 0.04);
  aspect-ratio: 1 / 1;
  padding: 0.75rem;
}

/* width/height: 100% + object-fit: contain scales the image to FILL
   the frame (upscaling small source images, not just shrinking large
   ones) while still preserving its aspect ratio and never cropping —
   the earlier max-width/max-height + width:auto approach only ever
   shrank oversized images, so a small source photo just sat tiny in
   the middle of the box with empty cream space around it. */
.detail-media-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.detail-media-empty {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--sh-muted);
  background: var(--sh-cream);
}

.detail-media-frame.no-image .detail-media-empty {
  display: flex;
}

.detail-media-empty i {
  font-size: 2.25rem;
  color: var(--sh-bronze);
  opacity: 0.6;
}

.detail-media-empty span {
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

.detail-media-frame .media-grade {
  position: absolute !important;
  top: 0.9rem !important;
  right: 0.9rem !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 2;
}

.detail-docs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.doc-link-block {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: 8px;
  text-decoration: none;
  color: var(--sh-ink);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.doc-link-block:hover {
  border-color: var(--sh-bronze);
  background: color-mix(in srgb, var(--sh-bronze) 8%, transparent);
}

.doc-link-block > i:first-child {
  font-size: 1.3rem;
  color: var(--sh-bronze);
}

.doc-link-block span {
  display: flex;
  flex-direction: column;
  flex: 1;
  line-height: 1.25;
}

.doc-link-block span small {
  color: var(--sh-muted);
  font-size: 0.78rem;
}

.doc-link-block > i:last-child {
  color: var(--sh-muted);
  font-size: 1rem;
}

.detail-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.5rem;
}

/* -- info column -- */

.detail-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sh-bronze);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

/* Each labelled section (Overview / Applications / Specification
   Summary / Additional Specifications) is its own quiet card, so the
   info column reads as a stack of distinct panels rather than one
   continuous run of headings and paragraphs. */
.detail-block {
  background: #fff;
  border: 1px solid var(--sh-line);
  border-radius: 10px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 2px rgba(13, 35, 64, 0.04);
}

.detail-block:last-child {
  margin-bottom: 0;
}

.detail-info-heading {
  font-family: var(--font-serif, Georgia, 'Times New Roman', serif);
  font-size: 1.25rem;
  margin: 0 0 0.9rem;
  color: var(--sh-navy);
}

.detail-description {
  color: var(--sh-ink);
  line-height: 1.7;
  font-size: 1rem;
  margin: 0;
}

.specimen-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.25rem;
}

.specimen-table tr {
  border-bottom: 1px solid var(--sh-line);
}

.specimen-table tr:last-child {
  border-bottom: none;
}

.specimen-table th,
.specimen-table td {
  text-align: left;
  padding: 0.85rem 0.5rem;
  font-weight: 400;
  font-size: 0.95rem;
}

.specimen-table th {
  width: 40%;
  color: var(--sh-muted);
  font-weight: 500;
}

.specimen-table td {
  color: var(--sh-ink);
}

.specimen-table td.mono {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
}

/* ---------------- related products ---------------- */

.related-section {
  padding: 1rem 0 5rem;
  border-top: 1px solid var(--sh-line);
}

.related-heading {
  text-align: center;
  margin: 3rem 0 2.5rem;
}

.related-heading .eyebrow {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sh-bronze);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.related-heading h2 {
  font-family: var(--font-serif, Georgia, 'Times New Roman', serif);
  font-size: 1.9rem;
  color: var(--sh-navy);
  margin: 0;
}

.related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}