/*
Theme Name: Integi UK
Theme URI: https://integi.co.uk/
Description: Bespoke classic theme for Integi UK, official UK distributor of INTEGI knurling, rotary broaching, burnishing and thread rolling tooling. WooCommerce-ready in catalogue / request-a-quote mode.
Author: Integi UK
Version: 1.6.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: integi-uk
Tags: business, e-commerce, custom-colors, custom-menu, featured-images, translation-ready
WC requires at least: 7.0
WC tested up to: 9.0
*/

/* ---------- Fonts: Archivo, self-hosted (SIL OFL 1.1 — see assets/fonts/OFL.txt) ----------

   Both files are variable fonts: one file covers every weight the theme uses, so the
   weight range goes in the font-weight descriptor rather than one @font-face per weight.
*/

@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("assets/fonts/archivo-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Archivo Narrow";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/archivo-narrow-variable.woff2") format("woff2");
}

:root {
  --ink: #18202a;
  --muted: #606a76;
  --line: #dde2e7;
  --red: #d9251d;
  --red-dark: #b51c16;
  --blue: #123c69;
  --steel: #f3f5f7;
  --white: #ffffff;
  --max: 1180px;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-head: "Archivo Narrow", "Arial Narrow", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--white);
  line-height: 1.6;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--red);
  color: var(--white);
  font-weight: 800;
}

.skip-link:focus {
  left: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(18, 32, 42, 0.98);
  box-shadow: 0 8px 24px rgba(8, 15, 22, 0.26);
  backdrop-filter: blur(10px);
}

.topbar {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  padding: 8px max(20px, calc((100vw - var(--max)) / 2));
  color: var(--white);
  font-size: 14px;
  background: var(--blue);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand img {
  width: 132px;
  height: auto;
}

.brand span {
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 13px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 14px;
  color: var(--white);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  transition: color 180ms ease;
  display: block;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links .current-menu-item > a,
.nav-links .current_page_item > a {
  color: var(--red);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 10px;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--white);
}

.hero {
  position: relative;
  min-height: clamp(560px, 78vh, 760px);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 23, 35, 0.9) 0%, rgba(11, 23, 35, 0.72) 45%, rgba(11, 23, 35, 0.26) 100%),
    var(--hero-image, url("assets/images/hero.jpg")) center / cover;
  transform: scale(1.02);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 72px 20px 118px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 14px;
}

.hero .eyebrow {
  color: #ff5a50;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  font-family: var(--font-head);
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h1 {
  max-width: 760px;
  font-size: clamp(44px, 6vw, 82px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

h3 {
  font-size: 28px;
  text-transform: uppercase;
}

.hero p:not(.eyebrow) {
  max-width: 620px;
  margin: 24px 0 0;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 22px;
  border: 2px solid transparent;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 14px;
  cursor: pointer;
}

.button-primary {
  background: var(--red);
  color: var(--white);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--red-dark);
}

.button-secondary {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: var(--white);
}

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 92px 20px;
}

.intro {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 64px;
  align-items: start;
}

.section-heading h2 {
  max-width: 700px;
}

.intro-copy {
  display: grid;
  gap: 18px;
  color: var(--muted);
  font-size: 18px;
}

.intro-copy p,
.support-copy p,
.quality-copy p,
.contact-panel p {
  margin: 0;
}

.products {
  max-width: none;
  background: var(--steel);
}

.products > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 44px;
}

.product-card {
  display: grid;
  grid-template-rows: 190px 1fr;
  min-height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .product-card-body {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.product-card p {
  margin: 0;
  color: var(--muted);
}

.product-card a.card-link {
  align-self: end;
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

.support,
.quality {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 58px;
  align-items: center;
}

.support-image,
.quality img {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(18, 60, 105, 0.13);
}

.support-image img,
.quality img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.support-copy,
.quality-copy {
  display: grid;
  gap: 22px;
  color: var(--muted);
  font-size: 18px;
}

.support-copy h2,
.quality-copy h2,
.contact-band h2 {
  color: var(--ink);
}

.check-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 9px;
  height: 9px;
  background: var(--red);
  border-radius: 50%;
}

.contact-band {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 48px;
  align-items: center;
  padding-left: max(20px, calc((100vw - var(--max)) / 2));
  padding-right: max(20px, calc((100vw - var(--max)) / 2));
  background: var(--blue);
  color: var(--white);
}

.contact-band h2 {
  max-width: 760px;
  color: var(--white);
}

.contact-panel {
  display: grid;
  gap: 16px;
  padding: 28px;
  background: var(--white);
  color: var(--ink);
  border-radius: 6px;
}

.contact-line {
  display: grid;
  gap: 2px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.contact-line span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.contact-line strong {
  color: var(--red);
  font-size: 20px;
}

.legal-strip {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
  padding: 20px max(20px, calc((100vw - var(--max)) / 2));
  background: #eef1f4;
  color: var(--muted);
  font-size: 14px;
}

.legal-strip div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.legal-strip strong {
  color: var(--ink);
}

.site-footer {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 1fr 0.8fr;
  gap: 40px;
  padding: 54px max(20px, calc((100vw - var(--max)) / 2));
  color: rgba(255, 255, 255, 0.82);
  background:
    linear-gradient(rgba(12, 19, 27, 0.95), rgba(12, 19, 27, 0.95)),
    url("assets/images/footer.png") center / cover;
}

.site-footer img {
  width: 150px;
  margin-bottom: 18px;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 18px;
}

.site-footer a {
  display: block;
  margin: 8px 0;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer p {
  margin: 8px 0;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--white);
}

.page-hero {
  position: relative;
  min-height: 380px;
  display: grid;
  align-items: end;
  color: var(--white);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(11, 23, 35, 0.9), rgba(11, 23, 35, 0.45)),
    var(--page-image, url("assets/images/hero.jpg")) center / cover;
}

.page-hero .section {
  width: 100%;
  padding-top: 84px;
  padding-bottom: 70px;
}

.page-hero h1 {
  max-width: 820px;
  font-size: clamp(42px, 5vw, 72px);
}

.page-hero p:not(.eyebrow) {
  max-width: 680px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--white);
}

.range-grid,
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.range-card,
.detail-card {
  display: grid;
  gap: 16px;
  min-height: 100%;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.range-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
}

.range-card p,
.detail-card p,
.product-intro p {
  margin: 0;
  color: var(--muted);
}

.range-card a.card-link,
.detail-card a.card-link {
  align-self: end;
  color: var(--red);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
}

.product-intro {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 54px;
  align-items: start;
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.spec-list li {
  padding: 14px 16px;
  background: var(--steel);
  border-left: 4px solid var(--red);
  font-weight: 700;
}

.product-band {
  max-width: none;
  background: var(--steel);
}

.product-band > * {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

.model-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

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

.model-table th {
  color: var(--white);
  background: var(--blue);
  text-transform: uppercase;
  font-size: 13px;
}

.model-table tr:last-child td {
  border-bottom: 0;
}

.cta-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.button-muted {
  color: var(--blue);
  border-color: var(--line);
  background: var(--white);
}

.button-muted:hover,
.button-muted:focus-visible {
  border-color: var(--blue);
}

/* ---------- Generic page content (legal pages, default page.php) ---------- */
.legal-page .section,
.page-content.section {
  max-width: 820px;
}

.entry-content > * {
  margin-top: 0;
  margin-bottom: 20px;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 34px;
}

.entry-content ul,
.entry-content ol {
  padding-left: 22px;
}

.entry-content a {
  color: var(--red);
  font-weight: 700;
}

/* ---------- Enquiry / quote form ---------- */
.enquiry-form {
  display: grid;
  gap: 18px;
}

.enquiry-form .field {
  display: grid;
  gap: 6px;
}

.enquiry-form label {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 13px;
  color: var(--ink);
}

.enquiry-form input,
.enquiry-form textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
}

.enquiry-form input:focus,
.enquiry-form textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.enquiry-form textarea {
  min-height: 150px;
  resize: vertical;
}

/* Honeypot: hidden from real users, visible to bots */
.enquiry-form .hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.enquiry-notice {
  padding: 16px 18px;
  border-radius: 4px;
  margin-bottom: 22px;
  font-weight: 700;
}

.enquiry-notice.is-success {
  background: #e6f4ea;
  border-left: 4px solid #1f8a45;
  color: #14622f;
}

.enquiry-notice.is-error {
  background: #fdecec;
  border-left: 4px solid var(--red);
  color: var(--red-dark);
}

.enquiry-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 54px;
  align-items: start;
}

/* ---------- WooCommerce catalogue mode ---------- */
.woocommerce-products-header,
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
  display: none;
}

.woocommerce .products.range-grid {
  margin: 0;
}

.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

body.woocommerce ul.products[class*="columns-"] li.product,
body.woocommerce-page ul.products[class*="columns-"] li.product {
  width: auto;
  float: none;
  clear: none;
  margin: 0;
}

.woocommerce ul.products li.product {
  width: auto;
  float: none;
  margin: 0;
  display: grid;
  gap: 16px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.woocommerce ul.products li.product a img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 4px;
  margin: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  padding: 0;
  font-family: var(--font-head);
  font-size: 24px;
  text-transform: uppercase;
  color: var(--ink);
}

.woocommerce ul.products.columns-3 li.product, .woocommerce-page ul.products.columns-3 li.product {
  width: auto;
}

.woocommerce ul.products li.product .price {
  display: none;
}

.woocommerce ul.products li.product .button,
.woocommerce div.product form.cart,
.woocommerce div.product p.price,
.woocommerce div.product .stock {
  /* prices / cart hidden in catalogue mode */
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  display: none;
}

.page-hero .woo-breadcrumb,
.page-hero .woocommerce-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 14px;
}

.page-hero .woo-breadcrumb a,
.page-hero .woocommerce-breadcrumb a {
  color: var(--white);
}

/* ---------- Single product ---------- */

.woocommerce .term-description,
.single-product .woocommerce-product-details__short-description {
  color: var(--muted);
  font-size: 18px;
}

.single-product .woocommerce-product-details__short-description p:first-child {
  margin-top: 0;
}

/* WooCommerce floats the gallery and summary side by side; lay them out as a grid
   instead, with everything below the summary spanning the full width. */
.woocommerce.single-product div.product {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0 54px;
  align-items: start;
}

.woocommerce.single-product div.product > div.images,
.woocommerce.single-product div.product > div.summary {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
}

.woocommerce.single-product div.product > .product-detail,
.woocommerce.single-product div.product > .related,
.woocommerce.single-product div.product > .up-sells,
.woocommerce.single-product div.product > #reviews {
  grid-column: 1 / -1;
}

/* Gallery.
   The frame sits on each slide, not on the wrapper: once WooCommerce starts FlexSlider
   (any product with more than one image) the wrapper becomes a track several viewport
   widths wide, so a border there is drawn round the whole strip instead of round the
   picture. Sizing the image itself to the column is what keeps it inside the screen on a
   phone, whether or not the slider script runs. */
.single-product .woocommerce-product-gallery {
  max-width: 100%;
}

/* No max-width here: FlexSlider needs this track wider than the frame to slide between
   images. It is kept off the page by .flex-viewport's overflow and the min-width: 0 on the
   grid column, not by capping the track. */
.single-product .woocommerce-product-gallery__wrapper {
  margin: 0;
}

.single-product .woocommerce-product-gallery__image {
  border: 1px solid var(--line);
  background: var(--white);
}

.single-product .woocommerce-product-gallery img {
  width: 100%;
  height: auto;
  border-radius: 0;
}

.single-product .flex-viewport {
  max-width: 100%;
  min-width: 0;
}

/* These carry WooCommerce's own selector depth on purpose. Woo styles the thumbnails as
   `.woocommerce div.product div.images .flex-control-thumbs li { width: 25%; float: left }`
   - inside a grid the float is ignored but the 25% is measured against the grid track, not
   the row, which shrinks each thumbnail to a quarter of its column. A shorter selector here
   loses to Woo's and the rule silently does nothing. */
.woocommerce.single-product div.product div.images .flex-control-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.woocommerce.single-product div.product div.images .flex-control-thumbs li {
  width: auto;
  float: none;
  margin: 0;
  list-style: none;
}

.woocommerce.single-product div.product div.images .flex-control-thumbs li img {
  border: 1px solid var(--line);
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.woocommerce.single-product div.product div.images .flex-control-thumbs li img:hover,
.woocommerce.single-product div.product div.images .flex-control-thumbs li img.flex-active {
  opacity: 1;
  border-color: var(--ink);
}

/* Key specifications beside the image */
.product-keyspecs {
  margin: 28px 0 0;
  display: grid;
  gap: 11px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.product-keyspecs > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.product-keyspecs dt {
  margin: 0;
  color: var(--muted);
}

.product-keyspecs dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

/* Deliberately hidden: the client asked for no enquiry buttons on product pages —
   enquiries come through the Contact page. Keep the rule if the layout is revisited. */
.single-product .product-enquiry {
  display: none;
}

.single-product .product_meta {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.single-product .product_meta > span {
  display: block;
  margin-bottom: 6px;
}

.single-product .product_meta a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.single-product .product_meta .sku {
  color: var(--ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Description and specification, in place of WooCommerce's tabs */
.product-detail {
  display: grid;
  gap: 48px;
  margin-top: 56px;
  padding-top: 46px;
  border-top: 3px solid var(--ink);
}

.product-detail-block > h2 {
  margin: 0 0 22px;
  font-size: clamp(24px, 2.4vw, 32px);
}

.product-detail .entry-content h3 {
  margin: 32px 0 14px;
  font-size: 20px;
  color: var(--ink);
}

.product-detail .entry-content ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.product-detail .entry-content li {
  margin-bottom: 6px;
}

.entry-content {
  overflow-wrap: break-word;
}

.entry-content iframe,
.entry-content embed,
.entry-content object,
.entry-content video {
  max-width: 100%;
}

/* A pasted table is the one thing in editor content that cannot wrap, so it scrolls in
   its own box rather than widening the page. */
.entry-content table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

/* ...but the spec table is a real table: two columns that wrap, so it never needs to
   scroll and should fill the column rather than shrink to its contents. */
.entry-content table.integi-specs {
  display: table;
  table-layout: fixed;
  overflow: visible;
}

/* Prose keeps a reading measure; tables and images use the full column, so the spec table
   in the description lines up with the attributes table below it instead of stopping short. */
.product-detail .entry-content {
  color: var(--muted);
  font-size: 17px;
}

.product-detail .entry-content > p,
.product-detail .entry-content > ul,
.product-detail .entry-content > ol,
.product-detail .entry-content > h2,
.product-detail .entry-content > h3,
.product-detail .entry-content > h4 {
  max-width: 70ch;
}

.product-detail .entry-content > *:first-child {
  margin-top: 0;
}

/* Two spec tables land on a product page: WooCommerce's attributes, and the
   `.integi-specs` table that ships inside every imported product description. They are
   styled together so the page reads as one specification, not two. */
.entry-content table.integi-specs,
.woocommerce.single-product table.woocommerce-product-attributes {
  width: 100%;
  margin: 0;
  border: 1px solid var(--line);
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.entry-content table.integi-specs th,
.entry-content table.integi-specs td,
.woocommerce.single-product table.woocommerce-product-attributes th,
.woocommerce.single-product table.woocommerce-product-attributes td {
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-style: normal;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.entry-content table.integi-specs th,
.woocommerce.single-product table.woocommerce-product-attributes th {
  width: 38%;
  color: var(--muted);
  font-weight: 700;
  background: var(--steel);
}

.entry-content table.integi-specs td,
.woocommerce.single-product table.woocommerce-product-attributes td {
  color: var(--ink);
  font-weight: 700;
  background: var(--white);
}

.entry-content table.integi-specs p,
.woocommerce.single-product table.woocommerce-product-attributes p {
  margin: 0;
}

.entry-content table.integi-specs tr:last-child th,
.entry-content table.integi-specs tr:last-child td,
.woocommerce.single-product table.woocommerce-product-attributes tr:last-child th,
.woocommerce.single-product table.woocommerce-product-attributes tr:last-child td {
  border-bottom: 0;
}

/* Related / upsell rows */
.single-product .related,
.single-product .up-sells {
  margin-top: 60px;
  padding-top: 46px;
  border-top: 1px solid var(--line);
}

.single-product .related > h2,
.single-product .up-sells > h2,
.single-product #reviews > h2 {
  margin: 0 0 28px;
  font-size: clamp(24px, 2.4vw, 32px);
}

.single-product #reviews {
  margin-top: 60px;
  padding-top: 46px;
  border-top: 1px solid var(--line);
}

@media (max-width: 980px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .range-grid,
  .detail-grid,
  .product-intro,
  .enquiry-layout,
  .woocommerce.single-product div.product {
    grid-template-columns: minmax(0, 1fr);
  }

  .woocommerce.single-product div.product > div.summary {
    margin-top: 30px;
  }

  .woocommerce ul.products {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro,
  .support,
  .quality,
  .contact-band,
  .legal-strip,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .legal-strip {
    display: grid;
  }

  .quality img {
    order: -1;
  }
}

@media (max-width: 760px) {
  .topbar {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 18px;
  }

  .nav {
    position: relative;
  }

  .brand span {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: calc(100% + 1px);
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 18px 30px rgba(18, 60, 105, 0.14);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .hero {
    min-height: 650px;
  }

  .hero-content {
    padding-top: 54px;
    padding-bottom: 86px;
  }

  .hero p:not(.eyebrow) {
    font-size: 18px;
  }

  .button {
    width: 100%;
  }

  .section {
    padding-top: 68px;
    padding-bottom: 68px;
  }

  .product-grid,
  .woocommerce ul.products {
    grid-template-columns: 1fr;
  }

  .product-card {
    grid-template-rows: 220px 1fr;
  }

  .spec-list {
    grid-template-columns: 1fr;
  }

  /* Related products are a footnote to the page, not the page: as full-width cards they
     ran to 1,800px on a phone. Thumbnail beside title keeps them scannable. */
  .single-product .related ul.products li.product,
  .single-product .up-sells ul.products li.product {
    padding: 14px;
    gap: 12px;
  }

  .single-product .related ul.products li.product > a.woocommerce-LoopProduct-link,
  .single-product .up-sells ul.products li.product > a.woocommerce-LoopProduct-link {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
  }

  .single-product .related ul.products li.product a img,
  .single-product .up-sells ul.products li.product a img {
    aspect-ratio: 1 / 1;
  }

  .single-product .related ul.products li.product .woocommerce-loop-product__title,
  .single-product .up-sells ul.products li.product .woocommerce-loop-product__title {
    font-size: 18px;
  }

  /* The whole row is a link already. */
  .single-product .related ul.products li.product .card-link,
  .single-product .up-sells ul.products li.product .card-link {
    display: none;
  }

  /* Model tables have more columns than a phone can hold. Scrolling the table in its own
     box keeps the columns readable and stops it widening the whole page. */
  .model-table {
    display: block;
    width: 100%;
    overflow-x: auto;
  }

  .contact-panel {
    padding: 22px;
  }

  /* A product photo cropped to cover a 380px band on a 375px-wide screen shows a narrow
     strip of the middle of the picture. A shallower band crops less and leaves the page
     title room. */
  .page-hero {
    min-height: 260px;
  }

  .product-detail {
    margin-top: 40px;
    padding-top: 34px;
    gap: 36px;
  }

  .single-product .related,
  .single-product .up-sells,
  .single-product #reviews {
    margin-top: 44px;
    padding-top: 34px;
  }
}

/* Narrow phones: the two-column specification table stops being a table and becomes
   label-above-value rows, so neither column is squeezed to a few characters. */
@media (max-width: 560px) {
  .entry-content table.integi-specs,
  .entry-content table.integi-specs tbody,
  .entry-content table.integi-specs tr,
  .entry-content table.integi-specs th,
  .entry-content table.integi-specs td,
  .woocommerce.single-product table.woocommerce-product-attributes,
  .woocommerce.single-product table.woocommerce-product-attributes tbody,
  .woocommerce.single-product table.woocommerce-product-attributes tr,
  .woocommerce.single-product table.woocommerce-product-attributes th,
  .woocommerce.single-product table.woocommerce-product-attributes td {
    display: block;
    width: auto;
  }

  .entry-content table.integi-specs th,
  .woocommerce.single-product table.woocommerce-product-attributes th {
    padding-bottom: 4px;
    border-bottom: 0;
  }

  .entry-content table.integi-specs td,
  .woocommerce.single-product table.woocommerce-product-attributes td {
    padding-top: 4px;
  }

  .woocommerce.single-product div.product div.images .flex-control-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  }
}
