.mega-menu-v8 {
  max-height: 50dvh;
  --width: 6px;
  --scrollbar-thumb-color: rgba(var(--color-foreground), 0.08);
  --scrollbar-thumb-color-hover: rgba(var(--color-foreground), 0.1);
}

.mega-menu-v8__title {
  font-size: calc(var(--font-heading-scale) * var(--font-body-scale) * 1.5rem);
  padding-bottom: 0.9rem;
  margin-bottom: 1.4rem;
  position: relative;
  font-family: var(--font-custom-family);
}
.mega-menu-v8__title::after {
  content: "";
  position: absolute;
  bottom: 0rem;
  background-color: rgba(var(--color-foreground), 0.15);
  width: 4rem;
  height: 0.1rem;
}
[dir=ltr] .mega-menu-v8__title::after {
  left: 0;
}
[dir=rtl] .mega-menu-v8__title::after {
  right: 0;
}

.mega-menu-v8__item {
  padding: 0.25rem 0;
}

.mega-menu-v8__link {
  position: relative;
  transition: 0.3s;
}
.mega-menu-v8__link:hover {
  padding-inline-start: 0.5rem;
}

.mega-menu-v8__link:hover .mega-menu-v8__label {
  color: rgba(var(--color-foreground));
}

.mega-menu-v8__label {
  font-size: calc(var(--font-body-scale) * 1.5rem);
  line-height: calc(1 + 0.6 / var(--font-heading-scale));
  color: rgba(var(--color-foreground), 0.5);
  font-weight: 500;
  transition: 0.3s;
}

.mega-menu-v8__label-filter {
  position: absolute;
  top: 50%;
  transform: translate(25%, -50%);
  border-radius: 3rem;
  font-size: calc(var(--font-body-scale) * 0.8rem);
  text-transform: uppercase;
  padding: 0 0.6rem;
  font-weight: 500;
  line-height: calc(1 + 1 / var(--font-heading-scale));
  color: #fff;
  background-color: var(--bg-color);
}
[dir=ltr] .mega-menu-v8__label-filter {
  left: 100%;
}
[dir=rtl] .mega-menu-v8__label-filter {
  right: 100%;
}

.mega-menu-v8__image {
  overflow: hidden;
  border-radius: 1.8rem;
  height: fit-content;
}
@media (max-width: 1199px) {
  .mega-menu-v8__image {
    display: none;
  }
}
.mega-menu-v8__image:hover img {
  transform: scale(1.05);
}
.mega-menu-v8__image a {
  display: block;
}
.mega-menu-v8__image .xo-image {
  border-radius: 1.8rem;
}
.mega-menu-v8__image img {
  transition: 0.5s;
  border-radius: 1.8rem;
  max-height: 40rem;
}