/* v0.91 — consistent vertical rhythm; content, images and page grids are retained.
   Loaded last on every page. #main-content deliberately supersedes inherited
   version-specific !important spacing, including the v0.89/v0.90 patches. */
body.spacing-v091[data-layout-rhythm="compact"] {
  --v091-section-pad: 20px;
  --v091-hero-top: 28px;
  --v091-hero-bottom: 20px;
  --v091-page-end: 24px;
}

body.spacing-v091[data-layout-rhythm="compact"] #main-content > .section,
body.spacing-v091[data-layout-rhythm="compact"] #main-content > .premium-section {
  padding-top: var(--v091-section-pad) !important;
  padding-bottom: var(--v091-section-pad) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.spacing-v091[data-layout-rhythm="compact"] #main-content > .v36-home-hero,
body.spacing-v091[data-layout-rhythm="compact"] #main-content > .v36-page-hero,
body.spacing-v091[data-layout-rhythm="compact"] #main-content > .v39-solutions-hero,
body.spacing-v091[data-layout-rhythm="compact"] #main-content > .v084-about-hero,
body.spacing-v091[data-layout-rhythm="compact"] #main-content > .page-hero,
body.spacing-v091[data-layout-rhythm="compact"] #main-content > .seo-article-hero,
body.spacing-v091[data-layout-rhythm="compact"] #main-content > .catalogue-hero {
  padding-top: var(--v091-hero-top) !important;
  padding-bottom: var(--v091-hero-bottom) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

body.spacing-v091[data-layout-rhythm="compact"] #main-content > .section:last-child,
body.spacing-v091[data-layout-rhythm="compact"] #main-content > .premium-section:last-child {
  padding-bottom: var(--v091-page-end) !important;
}

/* Shorter heading-to-content gaps without changing type or column layouts. */
body.spacing-v091[data-layout-rhythm="compact"] #main-content .section-head,
body.spacing-v091[data-layout-rhythm="compact"] #main-content .v089-knowledge-intro {
  margin-bottom: 16px !important;
}

/* The earlier knowledge patch carried 64px / 72px padding of its own. */
body.spacing-v091[data-layout-rhythm="compact"] #main-content > .v089-warranty-knowledge {
  padding-top: var(--v091-section-pad) !important;
  padding-bottom: var(--v091-page-end) !important;
}

/* Remove artificial text-panel height; preserve the five photographs/crops. */
body.spacing-v091[data-layout-rhythm="compact"] #main-content .v39-door-card > div:last-child {
  min-height: 0 !important;
  padding-top: 14px !important;
  padding-bottom: 14px !important;
}
body.spacing-v091[data-layout-rhythm="compact"] #main-content .v39-door-card > div:last-child > span {
  margin-top: 10px !important;
  padding-top: 0 !important;
}

/* Catalogue and PDP retain their grids, images and internal product geometry. */
body.spacing-v091[data-layout-rhythm="compact"] #main-content > .catalog-shell {
  padding-top: 18px !important;
  padding-bottom: var(--v091-page-end) !important;
}
body.spacing-v091[data-layout-rhythm="compact"] #main-content .pdp-wrap {
  padding-top: 18px !important;
  padding-bottom: var(--v091-page-end) !important;
}
body.spacing-v091[data-layout-rhythm="compact"] #main-content .related-section {
  margin-top: 24px !important;
}

/* Do not stack page-end padding + a 56px footer margin + an oversized rule gap. */
body.spacing-v091[data-layout-rhythm="compact"] #main-content ~ footer {
  margin-top: 0 !important;
  padding-top: 26px !important;
  padding-bottom: 24px !important;
}
body.spacing-v091[data-layout-rhythm="compact"] #main-content ~ footer::before {
  margin-top: 0 !important;
  margin-bottom: 20px !important;
}

/* PDP: use the homepage's actual triangle classes. Reserve real gutters inside
   the section so overflow clipping cannot hide either button. */
body.spacing-v091[data-layout-rhythm="compact"] #main-content .related-section .motion-v079-shell {
  margin-top: 0 !important;
  padding-left: 44px !important;
  padding-right: 44px !important;
}
body.spacing-v091[data-layout-rhythm="compact"] #main-content .related-section .motion-v079-arrow {
  width: 44px !important;
  height: 58px !important;
  opacity: .58 !important;
}
body.spacing-v091[data-layout-rhythm="compact"] #main-content .related-section .motion-v079-prev {
  left: 0 !important;
}
body.spacing-v091[data-layout-rhythm="compact"] #main-content .related-section .motion-v079-next {
  right: 0 !important;
}
body.spacing-v091[data-layout-rhythm="compact"] #main-content .related-section .motion-v079-arrow:hover,
body.spacing-v091[data-layout-rhythm="compact"] #main-content .related-section .motion-v079-arrow:focus-visible {
  opacity: 1 !important;
}
body.spacing-v091[data-layout-rhythm="compact"] #main-content .related-section .motion-v079-arrow:focus-visible {
  outline: 2px solid #c92332 !important;
  outline-offset: -4px !important;
  border-radius: 8px !important;
}

@media (max-width: 780px) {
  body.spacing-v091[data-layout-rhythm="compact"] {
    --v091-section-pad: 16px;
    --v091-hero-top: 24px;
    --v091-hero-bottom: 16px;
    --v091-page-end: 20px;
  }
  body.spacing-v091[data-layout-rhythm="compact"] #main-content .section-head,
  body.spacing-v091[data-layout-rhythm="compact"] #main-content .v089-knowledge-intro {
    margin-bottom: 14px !important;
  }
  body.spacing-v091[data-layout-rhythm="compact"] #main-content ~ footer {
    padding-top: 24px !important;
    padding-bottom: 20px !important;
  }
  body.spacing-v091[data-layout-rhythm="compact"] #main-content ~ footer::before {
    margin-bottom: 14px !important;
  }
}
