/* Site-wide responsive guardrails. Loaded last so legacy page styles remain intact. */
html,
body {
  max-width: 100%;
  width: 100%;
  overflow-x: clip !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
html {
  min-height: 100%;
  overflow-y: auto !important;
  scrollbar-width: thin;
  scrollbar-color: #69747c #eef0f2;
}
html::-webkit-scrollbar { width: 10px; }
html::-webkit-scrollbar-track { background: #eef0f2; }
html::-webkit-scrollbar-thumb { background: #69747c; border: 2px solid #eef0f2; border-radius: 10px; }
html::-webkit-scrollbar-thumb:hover { background: #39444c; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: visible !important;
  padding-top: var(--mmw-header-height, 125px) !important;
}
footer.footer,
footer.footer-modern {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: auto 0 0 !important;
}
footer.footer-modern {
  background-position: center bottom !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  border-bottom: 0 !important;
}
.footer.footer-modern > .container { margin-bottom: 0 !important; }
img,
video,
iframe {
  max-width: 100%;
  height: auto;
}
.mmw-utility-bar {
  position: relative !important;
  z-index: 1038 !important;
}
.mmw-site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1050;
  width: 100%;
  background: #fff;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.12);
}
.mmw-site-header .navbar.sticky-top {
  position: relative !important;
  top: auto !important;
}
.navbar.sticky-top,
.navbar.navbar-expand-lg {
  position: sticky !important;
  top: 0 !important;
  z-index: 1040 !important;
  margin-bottom: 0 !important;
}
.navbar.sticky-top.is-stuck,
.navbar.navbar-expand-lg.is-stuck {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16) !important;
}
.product-search-empty {
  padding: 12px 16px;
  color: #69717a;
  font-size: 13px;
}
footer.footer,
footer.footer-modern {
  overflow-x: clip !important;
  overflow-y: visible !important;
  padding-bottom: 0 !important;
}
footer.footer-modern:last-of-type,
footer.footer-modern .footer-bottom,
footer.footer-modern .footer-bottom p { margin-bottom: 0 !important; }
footer.footer-modern { min-height: min-content; }

/* The fixed header must not cover or crop the homepage banner. */
.mmw-home #mainCarousel {
  min-height: 0 !important;
}
.mmw-home #mainCarousel .carousel-inner,
.mmw-home #mainCarousel .carousel-item {
  height: auto !important;
}
.mmw-home #mainCarousel .carousel-item img {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
}
footer.footer-modern .footer-bottom { padding-bottom: 22px !important; }
footer.footer-modern + .back-to-top { position: fixed !important; }

/* Extend only the footer artwork across the browser's final bottom gutter. */
footer.footer-modern::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 0;
  right: 0;
  bottom: -28px;
  height: 29px;
  background:
    linear-gradient(rgba(20, 27, 32, 0.78), rgba(15, 21, 25, 0.88)),
    url('../images/footerbg.avif') center bottom / cover no-repeat;
  pointer-events: none;
}

footer.footer-modern,
footer.footer-modern > .container,
footer.footer-modern .footer-bottom {
  box-sizing: border-box !important;
}
body > footer.footer-modern ~ .modal,
body > footer.footer-modern ~ style,
body > footer.footer-modern ~ script {
  margin: 0 !important;
  padding: 0 !important;
}

.mmw-section-heading h2,
.mmw-main-feature-copy h2,
.mmw-intro-copy h2,
.mmw-contact-head h2,
.mmw-contact-direct-card h2,
.mmw-office-panel h2 {
  font-size: 30px !important;
  line-height: 1.16 !important;
}
.mmw-output-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: stretch !important;
}
.mmw-output-gallery img {
  width: 100% !important;
  height: 260px !important;
  min-height: 0 !important;
  max-height: none !important;
  border-radius: 12px !important;
  background: #fff !important;
}
.mmw-output-gallery > div {
  display: none !important;
}

@media (max-width: 991px) {
  .navbar.sticky-top,
  .navbar.navbar-expand-lg {
    top: 0 !important;
  }
  .navbar.sticky-top .container-fluid {
    align-items: center;
  }
  .navbar.sticky-top .navbar-brand span {
    font-size: 20px;
  }
  .navbar.sticky-top .navbar-brand small {
    font-size: 9px;
    letter-spacing: 0.08em;
  }
  .navbar.sticky-top .navbar-collapse {
    padding-top: 12px;
  }
  .navbar.sticky-top .navbar-nav {
    gap: 0;
  }
  .navbar.sticky-top .nav-link {
    padding: 10px 12px !important;
    font-size: 12px !important;
  }
  .main-products-menu.show {
    grid-template-columns: 1fr !important;
    max-height: 58vh;
    overflow-y: auto;
  }
  .main-products-menu a {
    min-height: auto;
    padding: 10px 11px;
  }
  .mmw-page-hero h1 {
    font-size: clamp(28px, 6vw, 42px);
  }
  .mmw-page-hero-inner {
    padding-top: 38px;
    padding-bottom: 38px;
  }
  .mmw-section-heading h2,
  .mmw-main-feature-copy h2,
  .mmw-intro-copy h2 {
    font-size: clamp(22px, 4vw, 32px) !important;
  }
  .mmw-wide-container,
  .mmw-product-shell {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  body {
    font-size: 14px;
    line-height: 1.6;
    padding-top: var(--mmw-header-height, 70px) !important;
  }
  .mmw-about-media-main {
    min-height: 0 !important;
  }
  .mmw-about-media-main img {
    height: auto !important;
    aspect-ratio: 720 / 839;
    object-fit: cover;
  }
  .mmw-utility-bar {
    display: none !important;
  }
  .navbar.sticky-top,
  .navbar.navbar-expand-lg {
    top: 0 !important;
  }
  main h1 {
    font-size: clamp(25px, 8vw, 38px) !important;
    line-height: 1.1;
  }
  main h2 {
    font-size: clamp(21px, 7vw, 30px) !important;
    line-height: 1.16;
  }
  .mmw-page-hero {
    min-height: 190px;
  }
  .mmw-page-hero-inner {
    width: calc(100% - 24px);
    padding: 32px 0 30px 26px;
  }
  .mmw-page-hero:before {
    top: 26px;
    left: 8px;
    width: 48px;
    height: 108px;
    border-width: 8px;
  }
  .mmw-page-hero span {
    margin-bottom: 8px;
    padding: 6px 10px;
    font-size: 10px;
  }
  .mmw-page-hero h1 {
    max-width: calc(100vw - 58px);
    font-size: clamp(25px, 8vw, 38px);
    line-height: 1.08;
  }
  .mmw-page-hero nav {
    max-width: calc(100vw - 50px);
    font-size: 10px;
    line-height: 1.45;
    word-break: normal;
  }
  .mmw-main-feature,
  .mmw-intro-section {
    padding-top: 38px;
  }
  .mmw-main-feature-copy,
  .mmw-intro-copy {
    padding: 12px 0;
  }
  .mmw-main-feature-copy span,
  .mmw-intro-copy span {
    font-size: 10px;
    padding: 6px 9px;
  }
  .mmw-section-block .mmw-product-shell {
    padding: 24px 16px;
  }
  .mmw-main-feature-media,
  .mmw-intro-media {
    padding: 14px;
    border-radius: 14px;
  }
  .mmw-main-feature-media img,
  .mmw-intro-media img,
  .mmw-output-box img {
    min-height: 220px;
    max-height: 340px;
  }
  .mmw-output-box {
    padding: 14px;
    gap: 14px;
  }
  .mmw-output-gallery {
    grid-template-columns: 1fr !important;
  }
  .mmw-output-gallery img {
    height: 230px !important;
    min-height: 0 !important;
  }
  .mmw-section-heading h2,
  .mmw-main-feature-copy h2,
  .mmw-intro-copy h2 {
    font-size: clamp(21px, 7vw, 30px);
  }
  .mmw-feature-list li {
    padding: 11px 12px;
    font-size: 13.5px;
  }
  .mmw-spec-card,
  .mmw-faq-card {
    padding: 18px 14px;
  }
  .mmw-spec-card table {
    font-size: 12.5px;
  }
  .mmw-spec-card th,
  .mmw-spec-card td {
    padding: 9px 8px;
  }
  .mmw-wide-container {
    padding-inline: 14px;
  }
  .navbar.sticky-top .navbar-brand img {
    height: 46px;
  }
  .navbar.sticky-top .navbar-brand span {
    font-size: 17px;
  }
  .navbar.sticky-top .navbar-brand small {
    display: none;
  }
  .navbar.sticky-top .navbar-toggler {
    padding: 5px 8px;
  }
  .navbar.sticky-top .navbar-collapse {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
  .navbar.sticky-top .header-actions {
    flex-wrap: wrap;
    gap: 8px;
  }
  .navbar.sticky-top .product-search-form {
    width: 100%;
    order: 3;
  }
  .navbar.sticky-top .product-search-box {
    width: 100%;
  }
  .mmw-about-stats,
  .mmw-global-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .mmw-about-stats > div,
  .mmw-global-stats > div {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .mmw-about-stats strong,
  .mmw-global-stats strong {
    font-size: 20px;
  }
  .mmw-about-stats span,
  .mmw-global-stats span {
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .mmw-page-hero h1 {
    font-size: 25px;
  }
  .mmw-page-hero nav {
    font-size: 9px;
  }
  .mmw-page-hero-inner {
    padding-left: 23px;
  }
  .mmw-page-hero:before {
    width: 40px;
    height: 96px;
  }
}
