/* Product page styles, layered on Bootstrap 5.

   Kept as thin as site.css: everything that Bootstrap already does - cards,
   tables, badges, the grid - is done with its classes, and only what Bootstrap
   has no answer for lives here. */

/* The uppercase micro-labels above each figure and on the spec group headers.
   Bootstrap has .small and .text-uppercase but no letter-spacing, and uppercase
   text set solid reads as a jumble at this size. */
.small-caps {
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .1em;
}

/* The four headline figures sit in one bordered block with hairlines between
   them, rather than four separate cards - they are one reading, not four. The
   dividers are drawn per cell so they disappear correctly when the grid wraps
   to two columns on a narrow screen. */
.figure-grid > [class*="col-"] {
  border-right: 1px solid var(--bs-border-color);
  border-bottom: 1px solid var(--bs-border-color);
}

.figure-grid > [class*="col-"]:nth-child(2n) {
  border-right: 0;
}

@media (min-width: 768px) {
  .figure-grid > [class*="col-"] {
    border-bottom: 0;
  }
  .figure-grid > [class*="col-"]:nth-child(2n) {
    border-right: 1px solid var(--bs-border-color);
  }
  .figure-grid > [class*="col-"]:last-child {
    border-right: 0;
  }
}

.figure-grid > [class*="col-"]:last-child {
  border-bottom: 0;
}

/* Product photographs are small studio shots on white - 128x225 for the ones
   carried over from the old site - so they are shown near their natural size
   rather than stretched to fill the card. A white plate keeps a JPEG with a
   white background from floating on a tinted card in dark mode. */
.product-shot {
  min-height: 16rem;
}

.product-shot img {
  max-height: 22rem;
  width: auto;
  background: #fff;
  border-radius: .25rem;
  padding: .5rem;
}

/* Chart.js needs a sized box to be responsive inside; without a height the
   canvas collapses to nothing on first paint. */
.curve-holder {
  position: relative;
  height: 20rem;
}

@media (min-width: 992px) {
  .curve-holder {
    height: 24rem;
  }
}

/* Specification rows read as pairs, so a faint rule between them helps the eye
   track across the gap to the value. The last pair does not need one. */
.card-body > dl.row > dt {
  border-top: 1px solid var(--bs-border-color-translucent);
}

.card-body > dl.row > dd {
  border-top: 1px solid var(--bs-border-color-translucent);
}

.card-body > dl.row > dt:first-of-type,
.card-body > dl.row > dt:first-of-type + dd {
  border-top: 0;
}

/* The unit toggle sits on the card header's tinted background, where Bootstrap's
   default primary (#0d6efd) falls to 4.24:1 - just under AA. site.css already
   defines a darker brand blue for exactly this reason, so the inactive buttons
   take it: 6.4:1 on the same ground, and closer to the brand besides. The
   active button is white on a filled blue and was never the problem.

   Scoped to this group rather than restyling .btn-outline-primary globally,
   which would change the selector's appearance for a fault it does not have. */
.card-header .btn-group .btn-outline-primary {
  --bs-btn-color: var(--qp-brand);
  --bs-btn-border-color: var(--qp-brand);
  --bs-btn-hover-bg: var(--qp-brand);
  --bs-btn-hover-border-color: var(--qp-brand);
  --bs-btn-active-bg: var(--qp-brand);
  --bs-btn-active-border-color: var(--qp-brand);
}

/* The manufacturer's dimensional drawing: line work on white, shown at its own
   size (BBC's are 180-680 px wide once cropped) and never stretched, since the
   figures printed in it would blur. White ground kept in either theme. */
/* Every drawing in the same box, scaled to fit it, so they read alike: the
   sources range from a 180 px BBC sketch to an 1,100 px EVAK page. The box
   is height-led because the drawings are mostly taller than wide; it eases
   down on narrow screens. Full size is a click away. */
.qp-drawing {
  display: block;
  margin: 0 auto;
  width: 100%;
  height: clamp(280px, 62vw, 460px);
  object-fit: contain;
  background: #fff;
  border-radius: .375rem;
}
/* A drawing with no table beside it prints its own figures (Faggiolati's
   whole INGOMBRI sheet), so it gets the full width and a taller box - at
   460 px its figures were too small to read (Jon, 4 Nov 2026). */
.qp-drawing.qp-drawing-sheet { height: clamp(420px, 140vw, 1000px); }
.qp-dims .qp-dim-letter { width: 2rem; font-weight: 600; }
.qp-dims td, .qp-dims th { vertical-align: baseline; }

/* No photograph and none in its range: the catalogue card's outline drawing,
   at the size a photograph sits in this column. */
.product-outline {
  width: auto;
  height: 225px;
  max-width: 100%;
  color: #9fb0c2;
}
