.bp-megamenu,
.bp-megamenu * {
  box-sizing: border-box;
}

.bp-megamenu {
  --bpmm-bg: #fff;
  --bpmm-text: #202124;
  --bpmm-muted: #687385;
  --bpmm-border: #e8ebf0;
  --bpmm-soft: #f5f6f8;
  --bpmm-active: #111827;
  --bpmm-shadow: 0 16px 44px rgba(15, 23, 42, .18);
  color: var(--bpmm-text);
  font-size: 14px;
  line-height: 1.7;
}

.bp-megamenu__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 42px;
  padding: .55rem .9rem;
  border: 1px solid var(--bpmm-border);
  border-radius: 12px;
  color: var(--bpmm-text);
  background: var(--bpmm-bg);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.bp-megamenu__trigger:hover,
.bp-megamenu__trigger:focus-visible {
  background: var(--bpmm-soft);
  border-color: #d7dce4;
  outline: none;
}

.bp-megamenu__trigger-icon {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.bp-megamenu__trigger-icon span {
  display: block;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.bp-megamenu__trigger-icon svg,
.bp-megamenu__trigger-icon i {
  display: block;
  width: 20px;
  height: 20px;
  line-height: 1;
}

.bp-megamenu__overlay {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(15, 23, 42, .42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}

.bp-megamenu__panel {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: auto;
  z-index: 10002;
  width: min(940px, 94vw);
  max-width: 100vw;
  background: var(--bpmm-bg);
  box-shadow: var(--bpmm-shadow);
  transform: translate3d(-110%, 0, 0);
  visibility: hidden;
  pointer-events: none;
  transition: transform .24s ease, visibility .24s ease;
  touch-action: pan-y;
  will-change: transform;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bp-megamenu[dir="rtl"] .bp-megamenu__panel {
  left: auto;
  right: 0;
  transform: translate3d(110%, 0, 0);
}

.bp-megamenu.is-open .bp-megamenu__overlay {
  opacity: 1;
  pointer-events: auto;
}

.bp-megamenu.is-open .bp-megamenu__panel,
.bp-megamenu.is-open[dir="rtl"] .bp-megamenu__panel {
  transform: translate3d(0, 0, 0);
  visibility: visible;
  pointer-events: auto;
}

body.bp-megamenu-lock {
  overflow: hidden;
}

.bp-megamenu__panel.is-swiping {
  transition: none !important;
}

.bp-megamenu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding: 0 1rem;
  border-bottom: 1px solid var(--bpmm-border);
}

.bp-megamenu__title {
  font-size: 1rem;
  font-weight: 700;
}

.bp-megamenu__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--bpmm-text);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    gap: 5px;
    border: 1px solid var(--bpmm-border);
}
.megamenu__close__text {
    font-size: 15px;
}
.bp-megamenu__close:hover,
.bp-megamenu__close:focus-visible {
  background: var(--bpmm-soft);
  outline: none;
}

.bp-megamenu__body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(210px, 30%) 1fr;
  overflow: hidden;
}

.bp-megamenu__tabs {
  min-width: 0;
  overflow-y: auto;
  padding: .75rem;
  border-inline-end: 1px solid var(--bpmm-border);
  background: #fbfbfc;
}

.bp-megamenu__tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 44px;
  padding: .7rem .85rem;
  border-radius: 12px;
  color: var(--bpmm-text);
  text-decoration: none;
  font-weight: 600;
  transition: background .18s ease, color .18s ease;
}

button.bp-megamenu__tab {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: inherit;
  font-family: inherit;
  cursor: pointer;
}

.bp-megamenu__tab:hover,
.bp-megamenu__tab:focus-visible,
.bp-megamenu__tab.is-active {
  background: var(--bpmm-bg);
  color: var(--bpmm-active);
  outline: none;
  box-shadow: inset 0 0 0 1px var(--bpmm-border);
  padding: 0 10px;
}

.bp-megamenu__tab.is-current {
  color: var(--bpmm-active);
}

.bp-megamenu__chevron,
.bp-megamenu__list-chevron,
.bp-megamenu__accordion span {
  width: .55rem;
  height: .55rem;
  border-block-start: 2px solid currentColor;
  border-inline-end: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: .55;
  flex: 0 0 auto;
}

.bp-megamenu[dir="rtl"] .bp-megamenu__chevron {
  transform: rotate(-135deg);
}

.bp-megamenu__contents {
  min-width: 0;
  overflow-y: auto;
  padding: 1rem;
}

.bp-megamenu__content[hidden] {
  display: none !important;
}

.bp-megamenu__content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block-end: .85rem;
  margin-block-end: .85rem;
  border-bottom: 1px solid var(--bpmm-border);
}

.bp-megamenu__content-title {
  color: var(--bpmm-active);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 800;
}

.bp-megamenu__content-title:hover,
.bp-megamenu__content-title:focus-visible,
.bp-megamenu a:hover,
.bp-megamenu a:focus-visible {
  color: var(--bpmm-active);
  text-decoration: none;
  outline: none;
}

.bp-megamenu__groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.bp-megamenu__group {
  min-width: 0;
  padding: .8rem;
  border: 1px solid var(--bpmm-border);
  border-radius: 16px;
  background: var(--bpmm-bg);
}

.bp-megamenu__group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
}

.bp-megamenu__group-title {
  color: var(--bpmm-text);
  text-decoration: none;
  font-weight: 800;
}

button.bp-megamenu__group-title {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  cursor: pointer;
}

button.bp-megamenu__group-title:hover,
button.bp-megamenu__group-title:focus-visible {
  color: var(--bpmm-active);
  outline: none;
}

.bp-megamenu__accordion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--bpmm-soft);
  color: var(--bpmm-muted);
  cursor: pointer;
}

.bp-megamenu__accordion[aria-expanded="false"] span {
  transform: rotate(135deg);
}

.bp-megamenu[dir="rtl"] .bp-megamenu__accordion span {
  transform: rotate(-135deg);
}

.bp-megamenu[dir="rtl"] .bp-megamenu__accordion[aria-expanded="false"] span {
  transform: rotate(-45deg);
}

.bp-megamenu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bp-megamenu__list--level-1,
.bp-megamenu__list--level-2,
.bp-megamenu__list--level-3,
.bp-megamenu__list--level-4,
.bp-megamenu__list--level-5,
.bp-megamenu__list--level-6,
.bp-megamenu__list--level-7,
.bp-megamenu__list--level-8 {
  padding-inline-start: .85rem;
  margin-block-start: .25rem;
  border-inline-start: 1px dashed var(--bpmm-border);
}

.bp-megamenu__list-link {
  display: block;
  padding: .25rem 0;
  color: var(--bpmm-muted);
  text-decoration: none;
  font-size: .92rem;
}

button.bp-megamenu__list-link {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: inherit;
  cursor: pointer;
}

.bp-megamenu__list-link--toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}

.bp-megamenu__list-link--toggle[aria-expanded="true"],
.bp-megamenu__list-link--toggle:hover,
.bp-megamenu__list-link--toggle:focus-visible {
  color: var(--bpmm-active);
  outline: none;
}

.bp-megamenu__list-link--toggle[aria-expanded="true"] .bp-megamenu__list-chevron {
  transform: rotate(135deg);
}

.bp-megamenu[dir="rtl"] .bp-megamenu__list-link--toggle[aria-expanded="true"] .bp-megamenu__list-chevron {
  transform: rotate(-45deg);
}

.bp-megamenu__accordion-panel.is-collapsed,
.bp-megamenu__sublist-panel.is-collapsed {
  display: none;
}

.bp-megamenu__list-link:hover,
.bp-megamenu__list-item.is-current > .bp-megamenu__list-link,
.bp-megamenu__group.is-current > .bp-megamenu__group-head .bp-megamenu__group-title {
  color: var(--bpmm-active);
}

.bp-megamenu__empty {
  color: var(--bpmm-muted);
  margin: 0;
}


@media (min-width: 992px) {
  .bp-megamenu__groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bp-megamenu__accordion {
    display: none;
  }

  .bp-megamenu__accordion-panel.is-collapsed,
  .bp-megamenu__sublist-panel.is-collapsed {
    display: block;
  }

  button.bp-megamenu__group-title,
  button.bp-megamenu__list-link--toggle {
    cursor: default;
    pointer-events: none;
  }

  .bp-megamenu__list-link--toggle {
    color: var(--bpmm-active);
  }

  .bp-megamenu__list-chevron {
    display: none;
  }
}

@media (max-width: 991px) {
  .bp-megamenu__panel {
    width: min(760px, 96vw);
  }

  .bp-megamenu__body {
    grid-template-columns: minmax(150px, 42%) 1fr;
  }

  .bp-megamenu__groups {
    grid-template-columns: 1fr;
    gap: .7rem;
  }

  .bp-megamenu__tabs,
  .bp-megamenu__contents {
    padding: .65rem;
  }

  .bp-megamenu__tab {
    min-height: 42px;
 padding: .62rem .2rem;
        font-size: .8rem;
  }

  .bp-megamenu__group {
    padding: .68rem;
    border-radius: 14px;
  }

  .bp-megamenu__accordion {
    display: inline-flex;
  }

  .bp-megamenu__accordion-panel.is-collapsed {
    display: none;
  }
}

@media (max-width: 420px) {
  .bp-megamenu__panel {
    width: 100vw;
  }

  .bp-megamenu__body {
    grid-template-columns: 43% 57%;
  }

  .bp-megamenu__trigger-text {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* v1.2.4: make leaf category cards fully clickable. */
.bp-megamenu__group.no-children {
  padding: 0;
  overflow: hidden;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.bp-megamenu__group.no-children:hover,
.bp-megamenu__group.no-children:focus-within {
  border-color: #d7dce4;
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.bp-megamenu__group.no-children .bp-megamenu__group-head {
  min-height: 100%;
  margin: 0;
  align-items: stretch;
}

.bp-megamenu__group.no-children .bp-megamenu__group-title {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: .8rem;
  border-radius: inherit;
}

.bp-megamenu__group.no-children .bp-megamenu__group-title:hover,
.bp-megamenu__group.no-children .bp-megamenu__group-title:focus-visible {
  background: var(--bpmm-soft);
}

@media (max-width: 991px) {
  .bp-megamenu__group.no-children {
    padding: 0;
  }

  .bp-megamenu__group.no-children .bp-megamenu__group-title {
    min-height: 48px;
    padding: .68rem;
  }
}

/* v1.2.5: extra links next to the desktop category button and below the mobile menu. */
.bp-megamenu__bar {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  max-width: 100%;
  vertical-align: middle;
}

.bp-megamenu__extra {
  min-width: 0;
}

.bp-megamenu__extra--desktop {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}

.bp-megamenu__extra--mobile {
  display: none;
}

.bp-megamenu__extra-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: .45rem .75rem;
  border-radius: 10px;
  color: var(--bpmm-text);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease;
}

.bp-megamenu__extra-link:hover,
.bp-megamenu__extra-link:focus-visible {
  background: var(--bpmm-soft);
  color: var(--bpmm-active);
  outline: none;
}

@media (max-width: 991px) {
  .bp-megamenu__bar {
    display: inline-flex;
  }

  .bp-megamenu__extra--desktop {
    display: none;
  }

  .bp-megamenu__extra--mobile {
    display: flex;

    gap: .25rem;
    padding: .75rem;
    border-top: 1px solid var(--bpmm-border);
    background: #fbfbfc;
  }

  .bp-megamenu__extra--mobile .bp-megamenu__extra-link {

    min-height: 42px;
    justify-content: flex-start;
    padding: .6rem .75rem;
    border-radius: 12px;
  }
}


/* v1.2.6: explicit category entry link for items that have submenus. */
.bp-megamenu__view-all {
  color: var(--bpmm-active);
  text-decoration: none;
  font-weight: 700;
}

.bp-megamenu__view-all:hover,
.bp-megamenu__view-all:focus-visible {
  color: var(--bpmm-active);
  text-decoration: none;
  outline: none;
}

/* v1.3.5: keep View all beside parent category titles from level 2 downward. */
.bp-megamenu__group-title-row,
.bp-megamenu__list-link-row {
  display: flex;
  align-items: baseline;
  gap: .45rem;
  min-width: 0;
}

.bp-megamenu__group-title-row {
  flex: 1 1 auto;
}

.bp-megamenu__list-link-row {
  justify-content: space-between;
}

.bp-megamenu__group-title-row .bp-megamenu__group-title,
.bp-megamenu__list-link-row .bp-megamenu__list-link {
  min-width: 0;
  flex: 1 1 auto;
}

.bp-megamenu__view-all--inline {
  flex: 0 0 auto;
  font-size: .76rem;
  line-height: 1.4;
  font-weight: 600;
        text-align: left;
        display: flex;
        justify-content: flex-end;
        white-space: nowrap;
}

.bp-megamenu__view-all--inline:hover,
.bp-megamenu__view-all--inline:focus-visible {
  color: var(--bpmm-active);
}

@media (max-width: 420px) {
  .bp-megamenu__group-title-row,
  .bp-megamenu__list-link-row {
    gap: .35rem;
  }

  .bp-megamenu__view-all--inline {
    font-size: .72rem;
  }
}


/* v1.3.6: optional category images by category depth. */
.bp-megamenu__category-text {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 0;
  max-width: 100%;
}

.bp-megamenu__category-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.bp-megamenu__category-image {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bpmm-soft);
  border: 1px solid var(--bpmm-border);
}

.bp-megamenu__category-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bp-megamenu__category-image--custom img {
  object-fit: contain;
  padding: 5px;
}

.bp-megamenu__tab .bp-megamenu__category-text,
.bp-megamenu__group-title .bp-megamenu__category-text,
.bp-megamenu__list-link .bp-megamenu__category-text {
  text-align: start;
}

.bp-megamenu__list-link .bp-megamenu__category-image {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.bp-megamenu__group-title .bp-megamenu__category-image {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

@media (max-width: 575px) {
  .bp-megamenu__category-image {
    width: 30px;
    height: 30px;
  }

  .bp-megamenu__group-title .bp-megamenu__category-image {
    width: 34px;
    height: 34px;
  }
}

/* v1.4.5: lazy Ajax loading state and small app-like skeleton. */
.bp-megamenu__body--loading {
  position: relative;
  grid-template-columns: minmax(210px, 30%) 1fr;
}

.bp-megamenu__skeleton-tabs,
.bp-megamenu__skeleton-content {
  padding: 1rem;
  overflow: hidden;
}

.bp-megamenu__skeleton-tabs {
  border-inline-end: 1px solid var(--bpmm-border);
  background: #fbfbfc;
}

.bp-megamenu__skeleton-tabs span,
.bp-megamenu__skeleton-line,
.bp-megamenu__skeleton-card {
  display: block;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--bpmm-soft) 0%, #eef1f5 45%, var(--bpmm-soft) 90%);
  background-size: 220% 100%;
  animation: bpmmSkeleton 1.15s ease-in-out infinite;
}

.bp-megamenu__skeleton-tabs span {
  height: 44px;
  margin-bottom: .7rem;
}

.bp-megamenu__skeleton-line {
  height: 18px;
  width: 72%;
  margin-bottom: .75rem;
}

.bp-megamenu__skeleton-line--wide {
  width: 92%;
  height: 24px;
}

.bp-megamenu__skeleton-card {
  height: 92px;
  margin-top: 1rem;
}

.bp-megamenu__body.is-error {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.bp-megamenu__load-error-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  text-align: center;
}

.bp-megamenu__load-error {
  margin: 0;
  color: var(--bpmm-muted);
  text-align: center;
}

.bp-megamenu__retry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: .45rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--bpmm-border);
  background: var(--bpmm-active);
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.bp-megamenu__retry:hover,
.bp-megamenu__retry:focus-visible {
  filter: brightness(.96);
}

@keyframes bpmmSkeleton {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.bp-megamenu__route-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(2px);
}

.bp-megamenu.is-navigating .bp-megamenu__route-loader {
  display: flex;
}

.bp-megamenu__route-loader span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--bpmm-border);
  border-top-color: var(--bpmm-active);
  animation: bpmmSpin .75s linear infinite;
}

@keyframes bpmmSpin {
  to { transform: rotate(360deg); }
}

.bp-megamenu__content-head--minimal {
  justify-content: flex-start;
  padding-block-end: .5rem;
  margin-block-end: .65rem;
}

.bp-megamenu__view-all--top,
.bp-megamenu__view-all--group-inline,
.bp-megamenu__view-all--nested-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: .12rem .48rem;
  border-radius: 999px;
  border: 1px solid var(--bpmm-border);
  background: var(--bpmm-soft);
  font-size: .72rem;
  line-height: 1.35;
  font-weight: 600;
}

.bp-megamenu__view-all--top:hover,
.bp-megamenu__view-all--top:focus-visible,
.bp-megamenu__view-all--group-inline:hover,
.bp-megamenu__view-all--group-inline:focus-visible,
.bp-megamenu__view-all--nested-inline:hover,
.bp-megamenu__view-all--nested-inline:focus-visible {
  border-color: #d7dce4;
  background: #fff;
}


/* v1.4.8: place View all after all submenu items of its own parent category. */
.bp-megamenu__view-all--after-submenus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: .12rem .48rem;
  border-radius: 999px;
  border: 1px solid var(--bpmm-border);
  background: var(--bpmm-soft);
  font-size: .72rem;
  line-height: 1.35;
  font-weight: 600;
}

.bp-megamenu__view-all--after-submenus:hover,
.bp-megamenu__view-all--after-submenus:focus-visible {
  border-color: #d7dce4;
  background: #fff;
}

.bp-megamenu__view-all--top-end {
  margin-block-start: 1rem;
}

.bp-megamenu__view-all--group-end {
  margin-block-start: .55rem;
}

.bp-megamenu__view-all--nested-end {
  margin-block-start: .35rem;
  margin-inline-start: .85rem;
}

.bp-megamenu__extra-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.bp-megamenu__extra-icon .material-icons {
  font-size: 20px;
  line-height: 1;
}

.bp-megamenu__extra-link {
  gap: .38rem;
}

@media (max-width: 991px) {
  .bp-megamenu__body--loading {
    grid-template-columns: minmax(150px, 42%) 1fr;
  }

  .bp-megamenu__skeleton-tabs,
  .bp-megamenu__skeleton-content {
    padding: .65rem;
  }
}

@media (max-width: 420px) {
  .bp-megamenu__body--loading {
    grid-template-columns: 43% 57%;
  }
}
