/* TopRayan-style desktop category mega menu */

.desk-menu-box {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 0;
  position: relative;
  z-index: 50;
  height: 48px;
  overflow: visible;
}

body.night .desk-menu-box {
  background: var(--surface);
}

.desk-menu-box > .container {
  position: relative;
  z-index: 10;
}

.desk-menu {
  display: none;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  height: 48px;
  position: relative;
}

@media (min-width: 768px) {
  .desk-menu {
    display: flex;
  }
}

.desk-menu > .dropdown {
  position: static;
}

.desk-menu > .online-assemble {
  margin-right: auto;
}

.desk-1 {
  padding: 13px 0;
  margin: 0 12px 0 25px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  display: block;
  white-space: nowrap;
  position: relative;
  cursor: pointer;
  border: 0;
  background: none;
  font-family: inherit;
  text-decoration: none;
}

.desk-menu > .dropdown:first-child .desk-1 {
  margin-right: 0;
}

body.night .desk-1 {
  color: #eee;
}

.desk-1::after {
  content: "▾";
  font-size: 8px;
  color: #ccc;
  margin-right: 4px;
}

.desk-1:hover,
.dropdown:hover > .desk-1,
.dropdown.open > .desk-1 {
  color: var(--red);
}

.desk-1.show-up-mnu::before {
  content: "";
  display: block;
  background: #fff;
  width: 8px;
  height: 8px;
  z-index: 8;
  position: absolute;
  bottom: -1px;
  border-radius: 8px 8px 0 0;
  right: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

body.night .desk-1.show-up-mnu::before {
  background: var(--surface);
}

.online-assemble .desk-1.assemble {
  margin-left: 0;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 7px 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  transition: border-color 0.2s ease;
}

.online-assemble .desk-1.assemble::after {
  display: none;
}

.online-assemble .desk-1.assemble:hover {
  color: #000;
  border-color: #ccc;
}

body.night .online-assemble .desk-1.assemble {
  border-color: #444;
  color: #eee;
}

/* Dropdown panel */
.dropdown-menu.desk-2-list {
  position: absolute !important;
  left: 15px !important;
  right: 15px !important;
  top: 100% !important;
  display: block;
  transform: none !important;
  background: #fff;
  border: none;
  padding: 0;
  margin: 1px 0 0;
  z-index: 100;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.18);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  float: none;
  min-width: 0;
}

body.night .dropdown-menu.desk-2-list {
  background: var(--surface);
}

.dropdown:hover > .desk-2-list,
.dropdown.open > .desk-2-list,
.desk-2-list.show-up {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.desk-2-ul {
  list-style: none;
  margin: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 15px 0;
  position: relative;
  height: 500px;
  max-height: min(500px, 70vh);
  overflow-y: auto;
  overflow-x: hidden;
}

.desk-2-ul > li {
  padding: 0 10px;
}

.desk-3-page {
  width: 200px;
  flex-grow: 0;
  flex-shrink: 0;
}

.desk-2 {
  font-size: 13px;
  font-weight: 400;
  color: #535353;
  display: block;
  position: relative;
  padding: 8px 10px 8px 28px;
  cursor: default;
  user-select: none;
}

body.night .desk-2 {
  color: #ccc;
}

.desk-2::before {
  content: "";
  display: block;
  width: 3px;
  height: 12px;
  background: #555;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.desk-2::after {
  content: "‹";
  color: #ccc;
  font-size: 12px;
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
}

.desk-3-page:hover .desk-2,
.desk-3-page.is-active .desk-2 {
  color: #333;
}

body.night .desk-3-page:hover .desk-2,
body.night .desk-3-page.is-active .desk-2 {
  color: #fff;
}

.desk-3-page:hover .desk-2::before,
.desk-3-page.is-active .desk-2::before {
  background: var(--red);
}

.desk-3-page:hover .desk-2::after,
.desk-3-page.is-active .desk-2::after {
  color: var(--red);
}

/* Right content panel */
.desk-3-list {
  position: absolute;
  right: 210px;
  left: 0;
  top: 0;
  height: 100%;
  margin: 0 -15px;
  padding: 20px;
  background: #fff;
  border-right: 1px solid #ddd;
  z-index: 13;
  visibility: hidden;
  overflow-y: auto;
}

body.night .desk-3-list {
  background: var(--surface);
  border-right-color: #444;
}

.desk-2-list.show-up:not(.hovered-once) .desk-3-page.is-active:first-child .desk-3-list,
.desk-2-list.show-up:not(.hovered-once) .desk-3-page:first-child .desk-3-list,
.desk-3-page:hover .desk-3-list,
.desk-3-page.is-active .desk-3-list {
  visibility: visible;
}

.menu-cols {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0;
}

.menu-col {
  flex: 0 0 20%;
  max-width: 20%;
  min-width: 0;
}

@media (max-width: 1100px) {
  .menu-col {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

ul.menu-level2 {
  margin: 0 18px 0 0;
  padding: 0;
  border-right: none;
  list-style: none;
}

.desk-3-list ul.menu-level2 {
  padding: 0;
  margin: 0;
  border-right: none;
}

ul.menu-level2 > li {
  list-style: none;
  margin: 0 0 10px;
  line-height: 1.5;
}

.desk-3-list ul.menu-level2 > li {
  line-height: 30px;
  margin-top: 0;
  border-bottom: none;
}

ul.menu-level2 > li .L2Item {
  color: #000;
  font-weight: 600;
  font-size: 13.5px;
  position: relative;
  display: block;
  padding-right: 12px;
  margin: 0 10px 5px 0;
  text-decoration: none;
  cursor: pointer;
}

body.night ul.menu-level2 > li .L2Item {
  color: #eee;
}

.desk-3-list ul.menu-level2 > li .L2Item::before {
  content: "";
  color: var(--red);
  background: var(--red);
  width: 6px;
  height: 6px;
  position: absolute;
  right: 0;
  top: 8px;
  display: block;
  border-radius: 50%;
}

ul.menu-level2 > li a.L2Item:hover,
.desk-3-list a:hover {
  color: var(--red) !important;
  text-decoration: none;
}

ul.menu-level3 {
  padding-right: 0;
  list-style: none;
  border-right: none;
  margin: 0 22px 10px 0;
  display: block;
}

ul.menu-level3 li {
  margin-top: 5px;
  position: relative;
  line-height: initial;
}

ul.menu-level3 li .L3Item {
  font-weight: 300;
  font-size: 12.5px;
  color: #616161;
  padding: 4px 0;
  display: block;
  text-decoration: none;
  line-height: 1.6;
}

body.night ul.menu-level3 li .L3Item {
  color: #aaa;
}

ul.menu-level3 li .L3Item:hover {
  color: var(--red);
}
