/* Match the catalog category menu to the navigation used on inner pages. */
.storefront .category-mega-controls { display: none; }

.storefront .category-mega-heading > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  min-width: 0;
  margin-right: auto;
}
.storefront .category-mega-heading > div > .section-kicker {
  display: block;
  grid-column: 2;
  grid-row: 1;
  width: auto;
  margin: 0;
  color: #ffd1d9;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
}
.storefront .category-mega-heading > div > strong {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  color: #fff;
  font: 800 clamp(19px, 2.4vw, 24px)/1.2 Montserrat, sans-serif;
  letter-spacing: -.035em;
}
.storefront .category-mega-heading .mega-back {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 41px;
  height: 41px;
  border-color: rgba(255, 255, 255, .28);
  border-radius: 10px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
}
.storefront .category-mega-heading .mega-back svg {
  display: block;
  width: 21px;
  height: 21px;
  pointer-events: none;
}
.storefront .category-mega-heading .mega-back:hover {
  border-color: rgba(255, 255, 255, .52);
  background: rgba(255, 255, 255, .25);
}
.storefront .category-mega-heading .category-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 10px;
  width: auto;
  min-width: 0;
  min-height: 44px;
  height: 44px;
  padding: 0 14px 0 17px;
  border: 1px solid #fff;
  border-radius: 11px;
  background: #fff;
  box-shadow: none;
  color: #a9142d;
  font: 800 12px/1.2 Montserrat, sans-serif;
  white-space: nowrap;
}
.storefront .category-mega-heading .category-all:hover,
.storefront .category-mega-heading .category-all.active {
  border-color: #fff;
  background: #fff;
  color: #a9142d;
}
.storefront .category-mega-heading .category-all:hover { background: #fff0f3; }
.storefront .category-mega-heading .category-all-arrow {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #fff0f3;
  color: inherit;
  font-size: 16px;
  line-height: 1;
}
.storefront .category-mega-heading #categoryMegaClose {
  display: grid;
  place-items: center;
  flex: none;
  width: 41px;
  height: 41px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 10px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 22px;
  font-weight: 400;
}
.storefront .category-mega-heading #categoryMegaClose:hover {
  border-color: rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .24);
  color: #fff;
}

@media (min-width: 801px) {
  .storefront .category-mega-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 80px;
    margin-bottom: 13px;
    padding: 0 18px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(115deg, #aa102c 0%, #c51b2d 64%, #d7293e 100%);
    box-shadow: 0 9px 22px rgba(143, 20, 42, .15);
  }
}

@media (max-width: 800px) {
  .storefront .category-mega-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-rows: minmax(44px, auto);
    align-items: center;
    gap: 0;
    min-height: 66px;
    margin: 0;
    padding: 10px 16px;
    border-bottom: 1px solid #edf0f4;
    background: #fff;
  }
  .storefront .category-mega-heading > div {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }
  .storefront .category-mega[data-view="roots"] .category-mega-heading > div,
  .storefront .category-mega[data-view="search"] .category-mega-heading > div {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }
  .storefront .category-mega[data-view="roots"] .category-mega-heading > div > .section-kicker,
  .storefront .category-mega[data-view="roots"] .category-mega-heading > div > strong,
  .storefront .category-mega[data-view="search"] .category-mega-heading > div > .section-kicker,
  .storefront .category-mega[data-view="search"] .category-mega-heading > div > strong {
    grid-column: 1;
  }
  .storefront .category-mega-heading > div > .section-kicker { color: #c51b2d; }
  .storefront .category-mega-heading > div > strong { color: #182c46; font-size: 20px; }
  .storefront .category-mega-heading .mega-back {
    width: 41px;
    height: 41px;
    border-color: #f0cbd1;
    background: #fff1f3;
    color: #af1830;
  }
  .storefront .category-mega-heading .mega-back:hover { background: #ffe9ee; }
  .storefront .category-mega-heading #categoryMegaClose {
    grid-column: 2;
    grid-row: 1;
    width: 44px;
    height: 44px;
    border-color: #e3e8ef;
    background: #f7f9fb;
    color: #263a53;
  }
  .storefront .category-mega-heading #categoryMegaClose:hover {
    border-color: #ecb5bf;
    background: #fff3f5;
    color: #263a53;
  }
  .storefront .category-mega .mega-global-all,
  .storefront .category-mega .mega-global-all.active {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 20px;
    align-items: center;
    column-gap: 12px;
    width: 100%;
    min-height: 70px;
    height: auto;
    padding: 10px 16px;
    border: 0;
    border-bottom: 1px solid #ecf0f3;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    color: #23364e;
    font-size: 14px;
    font-weight: 800;
    text-align: left;
    white-space: normal;
  }
  .storefront .category-mega .mega-global-all.active { background: #fff5f6; }
  .storefront .category-mega .mega-global-all:hover,
  .storefront .category-mega .mega-global-all:focus-visible {
    background: #fff0f3;
    outline: 2px solid #df8d9d;
    outline-offset: -2px;
  }
  .storefront .category-mega .mega-global-all .category-all-icon {
    display: block;
    width: 44px;
    height: 44px;
    box-sizing: border-box;
    padding: 10px;
    border-radius: 11px;
    background: #c51b2d;
    color: #fff;
  }
  .storefront .category-mega .mega-global-all .category-all-label {
    min-width: 0;
    color: #23364e;
    font-size: 14px;
    line-height: 1.3;
  }
  .storefront .category-mega .mega-global-all .category-all-arrow {
    display: grid;
    place-items: center;
    justify-self: end;
    width: 20px;
    height: 20px;
    margin: 0;
    border: 0;
    background: none;
    color: #c51b2d;
    font-size: 25px;
    font-weight: 400;
    line-height: 1;
  }
}
@media (min-width: 801px) {
  .storefront .category-mega { display: none !important; }
}
