.rc-shop-flyout-parent {
  position: relative;
}

.rc-shop-flyout-indicator {
  display: inline-block;
  margin-left: 6px;
  width: 0;
  height: 0;
  vertical-align: middle;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 5px solid currentColor;
}

ul.rc-shop-category-flyout {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 100%;
  top: 0;
  width: 260px;
  max-height: 600px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #f1f1f1;
  border-radius: 0;
  z-index: 1001;
  /* overflow must stay visible here (not auto/hidden/scroll): an `overflow`
     other than `visible` clips ALL descendants, including the nested
     rc-shop-subcategory-flyout, to this box's bounds — even though that
     nested flyout is itself position:absolute and would otherwise be free
     to render outside it. The list isn't expected to exceed max-height in
     practice, so no outer scrollbar is lost by leaving this visible. */
  overflow: visible;
  transition: opacity 120ms ease-in;
  transform: none !important;
}

.rc-shop-flyout-parent:hover > ul.rc-shop-category-flyout,
.rc-shop-flyout-parent:focus-within > ul.rc-shop-category-flyout {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

li.rc-shop-category-item {
  list-style: none;
}

a.rc-shop-category-link {
  display: block;
  background: #f1f1f1;
  color: #666;
  font-family: inherit;
  font-size: 14px;
  font-weight: normal;
  padding: 0 10px;
  line-height: 35px;
  text-decoration: none;
  text-transform: none;
  vertical-align: baseline;
  white-space: nowrap;
}

a.rc-shop-category-link:hover,
a.rc-shop-category-link:focus {
  background: #ddd;
  font-weight: normal;
  text-decoration: none;
  color: #666;
}

/* Main-category rows within the flyout — expand to a nested flyout on the
   right on hover/focus, exactly like hovering a shop name opens its
   category flyout.

   Max Mega Menu's own generated stylesheet applies `transform` to submenu
   elements for its fade/slide hover-open animation effects (e.g.
   `[data-effect="fade_up"] li.mega-menu-item.mega-menu-flyout ul.mega-sub-menu`).
   A `transform` on an ancestor creates a new containing block for any
   `position: absolute` descendant, which can throw off this nested
   flyout's `left: 100%` positioning. Forcing `transform: none` on this
   `<li>` keeps it (and therefore its absolutely-positioned child) outside
   that containing-block chain regardless of which effect the menu uses. */
li.rc-shop-category-item-has-children {
  position: relative;
  transform: none;
}

a.rc-shop-main-category-link {
  font-weight: normal;
}

ul.rc-shop-subcategory-flyout {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  left: 100%;
  top: 0;
  width: 220px;
  max-height: 496px;
  margin: 0;
  padding: 0;
  list-style: none;
  background: #f1f1f1;
  border-radius: 0;
  z-index: 1002;
  overflow-y: auto;
  transition: opacity 120ms ease-in;
  transform: none !important;
}

li.rc-shop-category-item-has-children:hover > ul.rc-shop-subcategory-flyout,
li.rc-shop-category-item-has-children:focus-within > ul.rc-shop-subcategory-flyout {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

@media screen and (max-width: 780px) {
  ul.rc-shop-category-flyout {
    position: static;
    visibility: visible;
    opacity: 1;
    pointer-events: none;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 150ms ease-in;
  }

  a.rc-shop-category-link {
    padding-left: 20px;
  }

  .rc-shop-flyout-parent.rc-shop-flyout-open > ul.rc-shop-category-flyout {
    /* large enough for every category plus any expanded subcategory list,
       so nothing is clipped */
    max-height: 5000px;
    pointer-events: auto;
  }

  /* Subcategories are collapsed until their main category is tapped. */
  ul.rc-shop-subcategory-flyout {
    position: static;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 150ms ease-in;
  }

  li.rc-shop-category-item-has-children:hover > ul.rc-shop-subcategory-flyout,
  li.rc-shop-category-item-has-children:focus-within > ul.rc-shop-subcategory-flyout {
    max-height: 0;
  }

  li.rc-shop-category-item-has-children.rc-shop-subcategory-open > ul.rc-shop-subcategory-flyout {
    max-height: none;
    overflow: visible;
  }

  ul.rc-shop-subcategory-flyout a.rc-shop-category-link {
    padding-left: 32px;
  }
}