/* ===========================================================
   Product-detail page layer

   Layout for the detail page's own sections only. Tokens and every
   shared primitive (buttons, badges, status, callouts, panels,
   screenshots, nav, footer) come from assets/insight.css, which this
   file is loaded AFTER and must never override.
   =========================================================== */

.pi-skip {
  position: absolute;
  left: 0;
  top: -120px;
  z-index: 10;
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  border-radius: 0 0 var(--radius-control) 0;
  transition: top 0.12s ease;
}
.pi-skip:focus {
  top: 0;
}

.pi-page {
  max-width: calc(var(--container) + 2 * var(--space-5));
  margin: 0 auto;
  padding: var(--space-5) var(--space-5) var(--space-9);
}

.pi-eyebrow {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

/* ---------------- breadcrumb ---------------- */

.pd-crumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-6);
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
}
.pd-crumb li + li::before {
  content: "/";
  margin-right: var(--space-2);
  color: var(--color-border-strong);
}
.pd-crumb a {
  color: var(--color-text-muted);
}
.pd-crumb a:hover {
  color: var(--color-primary);
}
.pd-crumb [aria-current="page"] {
  color: var(--color-text);
  font-weight: var(--weight-medium);
}

/* ---------------- hero ----------------
   Compact by design: the argument on the left, price and availability
   in a panel on the right. No full-width marketing band. */

.pd-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--space-7);
  align-items: start;
  padding-bottom: var(--space-6);
}
.pd-hero h1 {
  margin-bottom: var(--space-3);
}
.pd-hero__purpose {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 54ch;
}
.pd-hero__facts {
  margin: var(--space-5) 0 var(--space-4);
}
.pd-req {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
}
.pd-req__link {
  font-size: var(--text-sm);
}

.pd-buy {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-panel);
  background: var(--color-surface-soft);
  text-align: center;
}
.pd-buy__price {
  margin: 0;
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  line-height: 1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.pd-buy__price span {
  font-size: 0.5em;
  vertical-align: super;
  color: var(--color-text-muted);
}
.pd-buy__note {
  margin: 0 0 var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-subtle);
}

.pd-shot {
  margin: 0 0 var(--space-8);
}

/* ---------------- sections ---------------- */

.pd-section {
  margin-bottom: var(--space-8);
}
.pd-section > h2 {
  margin-bottom: var(--space-3);
}
.pd-lead {
  font-size: var(--text-lg);
}
.pd-audience {
  color: var(--color-text-muted);
}
.pd-note {
  font-size: var(--text-sm);
  color: var(--color-text-subtle);
  max-width: var(--measure);
}

/* ---------------- dashboards ---------------- */

.pd-dash {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.pd-dash__item {
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-surface);
}
.pd-dash__item h3 {
  margin-bottom: var(--space-1);
  font-size: var(--text-base);
}
.pd-dash__count {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---------------- capabilities ---------------- */

.pd-caps {
  margin: var(--space-5) 0 0;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--color-border);
}
.pd-caps > div {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: var(--space-5);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}
.pd-caps dt {
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
}
.pd-caps dd {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

/* ---------------- requirements ---------------- */

.pd-reqs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-4);
}
.pd-reqs .pi-callout {
  max-width: none;
  margin: 0;
}

/* ---------------- gallery ---------------- */

.pd-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-5);
}

/* ---------------- two panels ---------------- */

.pd-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-4);
}
.pd-two h3 {
  font-size: var(--text-base);
}
.pd-two .pi-btn {
  margin-top: var(--space-3);
}

/* ---------------- related ---------------- */

.pd-related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-4);
}
.pd-related__item {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-panel);
  background: var(--color-surface);
  text-decoration: none;
}
.pd-related__item:hover {
  border-color: var(--color-primary);
  text-decoration: none;
}
.pd-related__name {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
}
.pd-related__purpose {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}
.pd-related__meta {
  color: var(--color-text-subtle);
  font-size: var(--text-xs);
}

/* ---------------- closing cta ---------------- */

.pi-cta {
  padding: var(--space-7) var(--space-6);
  border-radius: var(--radius-panel);
}
.pi-cta h2 {
  margin-bottom: var(--space-3);
}
.pi-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
/* The pending state on the dark closing band. Text, never a control. */
.pi-status--inverse {
  margin: 0;
  padding: 0;
  color: var(--color-text-inverse-muted);
}

/* ---------------- responsive ---------------- */

@media (max-width: 900px) {
  .pd-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-5);
  }
  .pd-buy {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .pi-page {
    padding: var(--space-4) var(--space-4) var(--space-8);
  }
  .pd-caps > div {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-1);
  }
  .pi-cta {
    padding: var(--space-6) var(--space-5);
  }
}
