/* Zamax Website .89 — Commercial guide imagery and CTA/footer continuity.
   This layer is intentionally route-exact and follows the frozen .88 layer. */

/* All 13 Commercial routes close directly onto the shared footer. */
body:is(
  [data-zmx-route="/"],
  [data-zmx-route="/solutions/"],
  [data-zmx-route="/services/"],
  [data-zmx-route="/about/"],
  [data-zmx-route="/resources/"],
  [data-zmx-route="/referrals/"],
  [data-zmx-route="/solutions/commercial-unit-income-upgrade/"],
  [data-zmx-route="/solutions/rooflife/"],
  [data-zmx-route="/solutions/solar-ready-roof-power/"],
  [data-zmx-route="/solutions/commercial-property-protection-plan/"],
  [data-zmx-route="/services/commercial-electrical/"],
  [data-zmx-route="/services/commercial-roofing/"],
  [data-zmx-route="/services/renewables-ev-charging/"]
) main {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
body:is(
  [data-zmx-route="/"],
  [data-zmx-route="/solutions/"],
  [data-zmx-route="/services/"],
  [data-zmx-route="/about/"],
  [data-zmx-route="/resources/"],
  [data-zmx-route="/referrals/"],
  [data-zmx-route="/solutions/commercial-unit-income-upgrade/"],
  [data-zmx-route="/solutions/rooflife/"],
  [data-zmx-route="/solutions/solar-ready-roof-power/"],
  [data-zmx-route="/solutions/commercial-property-protection-plan/"],
  [data-zmx-route="/services/commercial-electrical/"],
  [data-zmx-route="/services/commercial-roofing/"],
  [data-zmx-route="/services/renewables-ev-charging/"]
) main > :last-child {
  margin-bottom: 0 !important;
}
body:is(
  [data-zmx-route="/"],
  [data-zmx-route="/solutions/"],
  [data-zmx-route="/services/"],
  [data-zmx-route="/about/"],
  [data-zmx-route="/resources/"],
  [data-zmx-route="/referrals/"],
  [data-zmx-route="/solutions/commercial-unit-income-upgrade/"],
  [data-zmx-route="/solutions/rooflife/"],
  [data-zmx-route="/solutions/solar-ready-roof-power/"],
  [data-zmx-route="/solutions/commercial-property-protection-plan/"],
  [data-zmx-route="/services/commercial-electrical/"],
  [data-zmx-route="/services/commercial-roofing/"],
  [data-zmx-route="/services/renewables-ev-charging/"]
) main + .zmx-global-footer {
  margin-top: 0 !important;
}

/* These are the four observed .88 gap sites. Keep their final section identity,
   imagery, content and sizing; remove only the inherited closing margin. */
body[data-zmx-route="/solutions/"] .bottom-cta,
body[data-zmx-route="/resources/"] #main-content > section:last-child,
body[data-zmx-route="/about/"] .about-final-cta,
body[data-zmx-route="/referrals/"] #main-content > .cta-band {
  margin-bottom: 0 !important;
}
body[data-zmx-route="/resources/"] #main-content > section:last-child,
body[data-zmx-route="/about/"] .about-final-cta {
  padding-bottom: 0 !important;
}

/* Commercial guides now share the accepted image-led editorial rhythm. */
body[data-zmx-route="/resources/"] .zmx-dot85-resource-grid {
  align-items: stretch !important;
}
.zmx-global-sticky[data-zmx-guide-grid-suppressed] {
  display: none !important;
}
body[data-zmx-route="/resources/"] .zmx-dot89-resource-card {
  min-width: 0 !important;
  min-height: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
}
body[data-zmx-route="/resources/"] .zmx-dot89-resource-card::before {
  display: none !important;
}
body[data-zmx-route="/resources/"] .zmx-dot89-resource-card__media {
  position: relative;
  height: 218px;
  min-height: 218px;
  margin: 0;
  overflow: hidden;
  background: #dce8e2;
}
body[data-zmx-route="/resources/"] .zmx-dot89-resource-card__media > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}
body[data-zmx-route="/resources/"] .zmx-dot89-guide-brand {
  position: absolute;
  left: 16px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.46);
  border-radius: 999px;
  background: rgba(4,29,26,.84);
  color: #f4d989;
  box-shadow: 0 8px 20px rgba(0,0,0,.22);
  font-size: .69rem;
  font-weight: 900;
  letter-spacing: .14em;
  line-height: 1;
  text-transform: uppercase;
}
body[data-zmx-route="/resources/"] .zmx-dot89-guide-brand img {
  width: 28px;
  height: 24px;
  object-fit: contain;
}
body[data-zmx-route="/resources/"] .zmx-dot89-resource-card__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: clamp(24px,3vw,34px);
}
body[data-zmx-route="/resources/"] .zmx-dot89-resource-card__body > p:not(.zmx-dot85-resource-card__meta) {
  margin: 14px 0;
  color: #49615b;
  line-height: 1.62;
}
body[data-zmx-route="/resources/"] .zmx-dot89-resource-card__body .zmx-dot86-guide-request {
  width: 100%;
  margin-top: auto !important;
}

@media (max-width: 720px) {
  body[data-zmx-route="/resources/"] .zmx-dot89-resource-card__media {
    height: 196px;
    min-height: 196px;
  }
  body[data-zmx-route="/resources/"] .zmx-dot89-resource-card__body {
    padding: 24px 22px 26px;
  }
}
