/* ==========================================================================
   Xylem header — Xylem-style
   Bar: logo left · centered menu · Contact Us + hamburger right.
   Like Xylem, everything sits in a centered 1328px box with 44px
   inner padding. Opening a menu turns that box white (the page stays
   visible on both sides); content runs from the logo to the last button.
   ========================================================================== */
.xr-header {
  --xr-bar-h: 64px;
  --xr-hd-ink: #11181c;
  --xr-hd-soft: #f6f6f6;
  --xr-hd-muted: #5d6670;
  --xr-hd-pad: max(clamp(20px, 3vw, 40px), calc((100% - 1440px) / 2 + clamp(20px, 3vw, 40px)));
  --xr-box-w: 1328px;
  --xr-box-pad: 44px;
  /* logo.png has ~20% empty space on the left/right of the wordmark */
  --xr-logo-img: 180px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  color: #fff;
  font-size: 15px;
  letter-spacing: -0.01em;
  background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,0));
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease;
}
.xr-header *, .xr-header *::before, .xr-header *::after { box-sizing: border-box; }
.xr-header ul { list-style: none; margin: 0; padding: 0; }
.xr-header a { text-decoration: none; }

body.xr-nav-solid .xr-header {
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
body.xr-nav-solid .xr-header,
.xr-header[data-open="true"] { color: var(--xr-hd-ink); }

/* The contained box (Xylem: max 1328px, 44px padding) */
.xr-header__box {
  position: relative;
  max-width: var(--xr-box-w);
  margin: 0 auto;
  padding: 0 var(--xr-box-pad);
  background: transparent;
  transition: background-color .2s ease;
}
.xr-header[data-open="true"] .xr-header__box { background: #fff; }

.xr-header__bar {
  height: var(--xr-bar-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

/* Logo — box is the visible wordmark; the PNG's built-in side padding is cropped out */
.xr-logo {
  flex: 0 0 auto;
  display: flex; align-items: center;
  width: calc(var(--xr-logo-img) * 0.593);
  height: 100%;
  overflow: hidden;
  color: inherit;
}
.xr-logo img {
  display: block;
  flex: none;
  width: var(--xr-logo-img) !important;
  max-width: none !important;
  height: auto !important;
  margin: 0 0 0 calc(var(--xr-logo-img) * -0.2008) !important;
  transition: filter .25s ease;
}
body:not(.xr-nav-solid) .xr-header[data-open="false"] .xr-logo img { filter: brightness(0) invert(1); }

/* Centered menu */
.xr-menu { flex: 1 1 auto; display: flex; justify-content: center; min-width: 0; }
.xr-menu__list { display: flex; align-items: center; gap: 2px; }
.xr-menu__link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px;
  border: 0; border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit; font-weight: 500; line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease;
}
.xr-menu__link:hover,
.xr-menu__item.is-open > .xr-menu__link { background: rgba(255,255,255,.14); }
body.xr-nav-solid .xr-menu__link:hover,
.xr-header[data-open="true"] .xr-menu__link:hover,
.xr-header[data-open="true"] .xr-menu__item.is-open > .xr-menu__link { background: var(--xr-hd-soft); }

.xr-chev { width: 12px; height: 12px; flex: none; transition: transform .25s ease; }
.xr-chev path { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.xr-menu__item.is-open .xr-chev { transform: rotate(180deg); }

/* Right side: Contact Us + hamburger */
.xr-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.xr-actions__btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 8px;
  background: #fff; color: var(--xr-hd-ink) !important;
  font-weight: 600; white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
.xr-actions__btn:hover { background: #f26322; color: #fff !important; }
body.xr-nav-solid .xr-actions__btn,
.xr-header[data-open="true"] .xr-actions__btn { background: var(--xr-hd-ink); color: #fff !important; }
body.xr-nav-solid .xr-actions__btn:hover,
.xr-header[data-open="true"] .xr-actions__btn:hover { background: #f26322; }

.xr-burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 10px;
  border: 0; border-radius: 8px;
  background: transparent; color: inherit; cursor: pointer;
  transition: background-color .2s ease;
}
.xr-burger:hover { background: rgba(255,255,255,.14); }
body.xr-nav-solid .xr-burger:hover,
.xr-header[data-open="true"] .xr-burger:hover { background: var(--xr-hd-soft); }
.xr-burger span { display: block; height: 1.5px; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
.xr-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.xr-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.xr-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- Dropdown panels + desktop drawer ---------- */
.xr-panel,
.xr-drawer {
  position: absolute;
  top: var(--xr-bar-h); left: 0; right: 0;
  z-index: 1;
  padding: 36px var(--xr-box-pad) 44px;
  background: #fff;
  opacity: 0; visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}
.xr-menu__item.is-open > .xr-panel,
.xr-header.is-drawer-open .xr-drawer {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .2s ease, transform .2s ease, visibility 0s;
}
/* Content runs from the logo's left edge to the Contact Us / hamburger edge */
.xr-panel__inner {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: 40px;
  color: var(--xr-hd-ink);
}
.xr-panel__intro h5, .xr-panel__intro p.xr-panel__title {
  margin: 0 0 12px;
  font-size: 20px; font-weight: 500; line-height: 1.25; letter-spacing: -0.01em;
  color: var(--xr-hd-ink);
}
.xr-panel__intro p {
  margin: 0;
  font-size: 15px; line-height: 1.6; letter-spacing: 0;
  color: var(--xr-hd-muted);
}

/* Product cards
   Image box has a fixed shape; the text area absorbs any extra height, so
   images stay the same size whether the label is 1, 2 or 3 lines. Cards in
   a row match the tallest one (grid items stretch by default). */
.xr-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 233px));
  gap: 19px;
}
.xr-card {
  position: relative;
  display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: 5px;
  background: var(--xr-hd-soft);
  color: var(--xr-hd-ink) !important;
}
.xr-card__media {
  position: relative;
  flex: 0 0 auto;
  aspect-ratio: 233 / 190;     /* change this one value to resize every card image */
}
.xr-card__media img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; object-position: center;
  padding: 18px;
  transition: transform .5s ease;
}
.xr-card:hover .xr-card__media img { transform: scale(1.04); }
.xr-card__foot {
  flex: 1 1 auto;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  padding: 16px 18px 18px;
}
.xr-card__label {
  align-self: flex-start;      /* names line up across the row */
  font-size: 15px; font-weight: 500; line-height: 1.35;
}
.xr-card__label strong { display: block; font-size: 22px; font-weight: 600; line-height: 1.1; margin-bottom: 4px; }
.xr-bubble {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: #fff; color: var(--xr-hd-ink);
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
.xr-bubble svg { width: 14px; height: 14px; }
.xr-bubble path { fill: none; stroke: currentColor; stroke-width: 1.4; }
.xr-card:hover .xr-bubble { background: #f26322; color: #fff; transform: translateX(2px); }

/* Text cards (Support) */
.xr-card--static { min-height: 104px; justify-content: flex-end; transition: background-color .2s ease; }
.xr-card--static .xr-card__foot { flex: 0 0 auto; }
.xr-card--static .xr-card__label { align-self: auto; }
.xr-card--static:hover { background: #e7eaee; }
.xr-groups { display: grid; gap: 20px; }
.xr-groups .xr-cards--static { grid-template-columns: repeat(auto-fill, minmax(200px, 233px)); }
.xr-group__title {
  margin: 0 0 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--xr-hd-muted);
}

/* Desktop drawer content */
.xr-drawer__inner { grid-template-columns: minmax(200px, 260px) minmax(0, 1fr); }
.xr-drawer__links li a {
  display: inline-block; padding: 6px 0;
  font-size: 22px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em;
  color: var(--xr-hd-ink) !important;
  transition: color .15s ease;
}
.xr-drawer__links li a:hover { color: #f26322 !important; }
.xr-drawer__products .xr-group__title { margin-top: 0; }
.xr-drawer__products ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.xr-drawer__products a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px; border-radius: 6px;
  background: var(--xr-hd-soft); color: var(--xr-hd-ink) !important;
  transition: background-color .2s ease;
}
.xr-drawer__products a:hover { background: #e7eaee; }
.xr-drawer__products strong { font-size: 18px; font-weight: 600; }
.xr-drawer__products span { font-size: 14px; color: var(--xr-hd-muted); }

/* Dim the page while anything is open */
.xr-scrim {
  position: fixed; inset: 0; z-index: 999;
  background: transparent;
  opacity: 0; visibility: hidden;
  transition: opacity .2s ease, visibility 0s linear .2s;
}
body.xr-menu-open .xr-scrim { opacity: 1; visibility: visible; transition: opacity .2s ease, visibility 0s; }

/* ---------- Tablet / mobile: hamburger opens the full menu ---------- */
.xr-mobile { display: none; }
@media (max-width: 1327px) {
  .xr-header { --xr-box-pad: clamp(20px, 3vw, 44px); }
}
@media (max-width: 1279px) {
  .xr-menu, .xr-drawer { display: none; }
  .xr-actions { margin-left: auto; }
  .xr-mobile {
    display: block;
    position: fixed; top: var(--xr-bar-h); left: 0; right: 0; bottom: 0;
    background: #fff; color: var(--xr-hd-ink);
    overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; visibility: hidden;
    transition: opacity .2s ease, visibility 0s linear .2s;
  }
  .xr-header.is-drawer-open .xr-mobile { opacity: 1; visibility: visible; transition: opacity .2s ease, visibility 0s; }
  .xr-mobile__inner { padding: 8px var(--xr-hd-pad) 40px; }
  .xr-acc { border-bottom: 1px solid rgba(0,0,0,.1); }
  .xr-acc summary {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 0; font-size: 20px; font-weight: 500; cursor: pointer;
    list-style: none;
  }
  .xr-acc summary::-webkit-details-marker { display: none; }
  .xr-acc summary .xr-chev { width: 14px; height: 14px; }
  .xr-acc[open] summary .xr-chev { transform: rotate(180deg); }
  .xr-acc ul { padding: 0 0 16px; }
  .xr-acc li a { display: block; padding: 10px 0; font-size: 16px; color: #3a434b !important; }
  .xr-acc li a strong { font-weight: 700; margin-right: 6px; color: var(--xr-hd-ink); }
  .xr-mobile__links { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; padding-top: 20px !important; }
  .xr-mobile__links a { display: block; padding: 10px 0; font-size: 18px; font-weight: 500; color: var(--xr-hd-ink) !important; }
  .xr-mobile__cta { display: flex; width: 100%; margin-top: 24px; padding: 14px 18px; background: var(--xr-hd-ink); color: #fff !important; }
}
@media (max-width: 767px) {
  .xr-header { --xr-bar-h: 60px; --xr-logo-img: 160px; }
  .xr-header__bar .xr-actions__btn { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .xr-header *, .xr-panel, .xr-drawer, .xr-scrim, .xr-mobile { transition: none !important; }
}

/* Pages without a video hero: solid white bar that sits in the page flow */
.xr-header[data-solid="true"] { position: sticky; }
body.page-template-product-single-new { padding-top: 0 !important; }

/* Contact Us — de-emphasised plain text link */
.xr-header .xr-actions__btn,
.xr-header .xr-actions__btn:hover,
body.xr-nav-solid .xr-header .xr-actions__btn,
.xr-header[data-open="true"] .xr-actions__btn {
    gap: 8px;
    padding: 10px 6px;
    border-radius: 0;
    background: transparent !important;
    color: inherit !important;
    font-weight: 500;
}
.xr-header .xr-actions__btn:hover { color: #f26322 !important; }

/* Mobile "Contact Us" — plain text link */
@media (max-width: 1279px) {
  .xr-header .xr-mobile__cta,
  .xr-header .xr-mobile__cta:hover {
    justify-content: flex-start;
    width: auto;
    margin-top: 24px;
    padding: 10px 0 !important;
    background: transparent !important;
    color: #11181c !important;
    font-size: 18px;
  }
  .xr-header .xr-mobile__cta:hover { color: #f26322 !important; }
}

/* WordPress admin bar (logged-in users): push the header below it */
body.admin-bar .xr-header { top: 32px; }
@media (max-width: 1279px) {
  body.admin-bar .xr-mobile { top: calc(var(--xr-bar-h) + 32px); }
}
@media screen and (max-width: 782px) {
  body.admin-bar .xr-header { top: 46px; }
  body.admin-bar .xr-mobile { top: calc(var(--xr-bar-h) + 46px); }
}
@media screen and (max-width: 600px) {
  /* WP's admin bar scrolls away on small screens */
  body.admin-bar .xr-header { top: 0; }
  body.admin-bar .xr-mobile { top: var(--xr-bar-h); }
}
/* Every page except the home page: solid white header that sits above the content */
body:not(.home) .xr-header {
  position: sticky;
  top: 0;
  color: var(--xr-hd-ink);
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
body.admin-bar:not(.home) .xr-header { top: 32px; }

/* Dark logo instead of the white version */
body:not(.home) .xr-header .xr-logo img { filter: none !important; }

/* Light gray hover on menu items and the hamburger */
body:not(.home) .xr-header .xr-menu__link:hover,
body:not(.home) .xr-header .xr-menu__item.is-open > .xr-menu__link,
body:not(.home) .xr-header .xr-burger:hover { background: var(--xr-hd-soft); }