.products-menu-shell {
  display: inline-flex;
  position: static;
}

.products-menu-shell > [data-products-menu-trigger] {
  appearance: none;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  padding: 0;
  text-transform: uppercase;
}

.site-header #mainNav > a,
.site-header #mainNav > .products-menu-shell > [data-products-menu-trigger] {
  align-items: center;
  display: inline-flex;
  height: 1rem;
  line-height: 1 !important;
  padding: 0 4px !important;
}

@media (min-width: 768px) {
  .products-menu-shell > [data-products-menu-trigger] {
    line-height: 13px;
    padding-bottom: 5px;
  }
}

.products-mega-menu {
  background: #fff;
  border-block: 1px solid #e7e1dd;
  box-shadow: 0 18px 36px rgb(61 45 37 / 8%);
  color: #292f34;
  left: 50vw;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding: clamp(2.5rem, 3vw, 3.5rem) max(2rem, calc((100vw - 1800px) / 2));
  position: absolute;
  top: 100%;
  transform: translateX(-50%);
  width: 100vw;
  z-index: 90;
}

.products-mega-menu[hidden] { display: none; }

.products-mega-grid {
  display: grid;
  gap: 2.75rem clamp(2rem, 3vw, 3.5rem);
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.products-mega-group { min-width: 0; }
.products-mega-group-heading {
  align-items: center;
  border-bottom: 1px solid #ece7e3;
  display: flex;
  justify-content: space-between;
  min-height: 34px;
}
.products-mega-group h2 { font-size: 1.05rem; font-weight: 500; letter-spacing: 0.01em; line-height: 1.2; margin: 0; padding: 0.45rem 0; text-transform: uppercase; }
.products-mega-group h2 a { color: #292f34 !important; font-weight: 500 !important; text-decoration: none; white-space: normal !important; }
.products-mega-group ul { list-style: none; margin: 0; padding: 0.75rem 0 0; }
.products-mega-group li + li { margin-top: 0.65rem; }
.products-mega-group li a { color: #292f34 !important; font-size: 0.95rem; font-weight: 400 !important; line-height: 1.35; text-decoration: none; text-transform: none; white-space: normal !important; }
.products-mega-menu a::after { content: none; }
.products-mega-group li a:hover,
.products-mega-group li a:focus-visible,
.products-mega-group h2 a:hover,
.products-mega-group h2 a:focus-visible { color: #637f91; text-decoration: underline; text-underline-offset: 0.22em; }
.products-mega-group-toggle { display: none; }

.products-mega-actions {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}
.products-menu-shell .products-mega-actions a {
  background: #292f34;
  border: 1px solid #292f34;
  border-radius: 999px;
  color: #fff !important;
  font-weight: 700;
  min-width: 12rem;
  padding: 0.8rem 1.5rem;
  text-align: center;
  text-decoration: none;
}
.products-menu-shell .products-mega-actions a:hover,
.products-menu-shell .products-mega-actions a:focus-visible { background: #637f91; border-color: #637f91; }

@media (min-width: 768px) and (max-width: 1279px) {
  .products-menu-shell > [data-products-menu-trigger] { padding-bottom: 3px; }
  .products-mega-menu { padding: 12px 20px 14px; }
  .products-mega-grid { column-gap: 18px; grid-auto-rows: minmax(34px, auto); grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 0; }
  .products-mega-group h2 { align-items: center; display: flex; font-size: 10px; line-height: 1.2; min-height: 34px; padding: 3px 0; }
  .products-mega-group-toggle { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; background: none; border: 0; color: inherit; cursor: pointer; font-size: 10px; }
  .products-mega-group ul { padding-top: 5px; }
  .products-mega-group ul[hidden] { display: none; }
  .products-mega-group li + li { margin-top: 3px; }
  .products-mega-group li a { font-size: 9px; line-height: 1.25; }
  .products-mega-actions { margin-top: 10px; }
  .products-menu-shell .products-mega-actions a { min-width: 120px; padding: 7px 16px; font-size: 8px; }
}

@media (max-width: 767px) {
  #mainNav { max-width: calc(100vw - 2rem) !important; width: calc(100vw - 2rem) !important; }
  .products-menu-shell { display: block; margin-inline: 0; width: 100%; }
  .products-menu-shell > [data-products-menu-trigger] { border-bottom: 1px solid #e7e1dd; font-weight: 700; padding-block: 0.8rem; text-align: center; text-transform: uppercase; width: 100%; }
  .products-mega-menu {
    border: 0;
    box-shadow: none;
    max-height: none;
    overflow: visible;
    padding: 1rem 0 0.75rem;
    position: static;
    transform: none;
    width: 100%;
  }
  .products-mega-grid { display: grid; gap: 1.5rem 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .products-mega-group { border: 0; padding: 0; }
  .products-mega-group-heading { border-bottom: 1px solid #ece7e3; }
  .products-mega-group h2 { flex: 1 1 auto; font-size: 0.7rem; line-height: 1.25; min-width: 0; padding: 0 0.125rem 0.45rem 0; }
  .products-mega-group h2 a { overflow-wrap: anywhere; }
  .products-mega-group-toggle { display: inline-flex; flex: 0 0 24px; align-items: center; justify-content: center; width: 24px; height: 32px; background: none; border: 0; color: inherit; cursor: pointer; }
  .products-mega-group ul { display: block; padding-top: 0.55rem; }
  .products-mega-group ul[hidden] { display: none; }
  .products-mega-group li + li { margin-top: 0.35rem; }
  .products-mega-group li a { font-size: 0.72rem; line-height: 1.25; }
  .products-mega-actions { margin-top: 1.5rem; }
  .products-mega-actions a { font-size: 0.82rem; min-width: 10rem; }
}

@media (prefers-reduced-motion: reduce) {
  .products-mega-menu,
  .products-mega-menu * { scroll-behavior: auto; transition-duration: 0.01ms !important; }
}
