/* Homepage only. Six existing top-level sections: hero, catalogue,
   introduction, editorial information, advantages, showroom.
   !important is limited to overriding Bootstrap spacing utilities. */
main:has(> section #heroCarousel) {
  --fh-section-space: 40px;
  --fh-content-space: 32px;
  --fh-text-space: 16px;
}
/* One source of vertical section padding; no stacked container padding. */
main:has(> section #heroCarousel) > section:not(:first-of-type) {
  padding-top: var(--fh-section-space) !important;
  padding-bottom: var(--fh-section-space) !important;
}
main:has(> section #heroCarousel) > section > .container {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
main > section:has(#heroCarousel) { padding-bottom: 0 !important; }
/* Catalogue introduction and grid. */
main:has(#heroCarousel) > section:nth-of-type(2) h1 { margin-bottom: 16px !important; }
main:has(#heroCarousel) > section:nth-of-type(2) h1 + div {
  padding-bottom: 0 !important;
  margin-bottom: var(--fh-section-space) !important;
}
main:has(#heroCarousel) > section:nth-of-type(2) > .container > .row { padding-bottom: 0 !important; }
/* Consistent photo-to-text gaps, retaining the original column widths. */
main:has(#heroCarousel) > section:nth-of-type(n+3) > .container > .row {
  --bs-gutter-y: var(--fh-content-space);
}
main:has(#heroCarousel) > section:nth-of-type(3) .img-fluid,
main:has(#heroCarousel) > section:nth-of-type(4) .img-fluid,
main:has(#heroCarousel) > section:nth-of-type(6) .img-fluid { display: block; }
/* Editorial copy: headings, paragraphs and lists share the same rhythm. */
main:has(#heroCarousel) > section:nth-of-type(3) .wp-block-heading,
main:has(#heroCarousel) > section:nth-of-type(4) .wp-block-heading { margin-bottom: var(--fh-text-space); }
main:has(#heroCarousel) > section:nth-of-type(4) .wp-block-heading:not(:first-child) { margin-top: var(--fh-content-space); }
main:has(#heroCarousel) > section:nth-of-type(3) .row > div > :is(p,ul,ol),
main:has(#heroCarousel) > section:nth-of-type(4) .row > div > :is(p,ul,ol) { margin-bottom: var(--fh-text-space); }
main:has(#heroCarousel) > section:nth-of-type(3) .row > div > :last-child,
main:has(#heroCarousel) > section:nth-of-type(4) .row > div > :last-child { margin-bottom: 0; }
main:has(#heroCarousel) > section:nth-of-type(4) .row.mt-4 { margin-top: var(--fh-text-space) !important; }
/* Advantages: remove empty icon padding and trailing paragraph margins. */
main:has(#heroCarousel) > section:nth-of-type(5) > .container > h2 { margin-bottom: var(--fh-content-space) !important; }
main:has(#heroCarousel) > section:nth-of-type(5) .row > div > .text-center {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
main:has(#heroCarousel) > section:nth-of-type(5) .row > div > div { margin-bottom: 16px !important; }
main:has(#heroCarousel) > section:nth-of-type(5) .row > div > p { margin-bottom: 0; }
/* Showroom heading and contact group. */
main:has(#heroCarousel) > section:nth-of-type(6) > .container > .row { align-items: center; }
main:has(#heroCarousel) > section:nth-of-type(6) h2 { margin-bottom: var(--fh-content-space) !important; }
main:has(#heroCarousel) > section:nth-of-type(6) .my-auto { margin-top: 0 !important; margin-bottom: 0 !important; }
main:has(#heroCarousel) > section:nth-of-type(6) .my-auto > :last-child { margin-bottom: 0 !important; }
@media (max-width: 767.98px) {
  main:has(> section #heroCarousel) {
    --fh-section-space: 32px;
    --fh-content-space: 24px;
  }
}
