.taxonomy-menu ul { list-style: none; }
@media (min-width: 1024px) {
  /* Keep both the top-level menu and its hover panel aligned with Bootstrap's
     page container instead of stretching to the full viewport. */
  #custom-menu-selector.taxonomy-nav {
    position: relative;
    float: none;
    width: 100%;
    max-width: 970px;
    margin-right: auto;
    margin-left: auto;
    box-sizing: border-box;
  }
  #custom-menu-selector.taxonomy-nav > .taxonomy-menu {
    position: relative;
    width: 100%;
    margin: 0;
  }
  .taxonomy-menu > .level_0 { position: static; }
  .taxonomy-menu > .level_0 > .mnlv1 {
    top: 100%; left: 0; right: 0; width: 100%; max-width: 100%;
    max-height: 75vh; overflow-y: auto; box-sizing: border-box;
    padding: 18px; margin: 0; background: #fff; box-shadow: 0 6px 18px #0002;
    grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 24px;
  }
  .taxonomy-menu > .level_0:hover > .mnlv1,
  .taxonomy-menu > .level_0:focus-within > .mnlv1 { display: grid; }
  .taxonomy-menu .mnlv1 > .level_1 { float: none; width: auto; margin: 0; }
  .taxonomy-menu .level_1 > a { font-weight: 700; white-space: normal; }
  .taxonomy-menu .mnlv2 { display: block; position: static; width: auto; padding: 0; margin: 4px 0 0; box-shadow: none; }
  .taxonomy-menu .level_2 { float: none; width: auto; }
  .taxonomy-menu .level_2 > a { display: block; white-space: normal; padding: 5px !important; }
}
@media (min-width: 1200px) {
  #custom-menu-selector.taxonomy-nav { max-width: 1170px; }
}
@media (max-width: 1023px) {
  .taxonomy-menu .level_1 > a { padding-left: 24px; }
  .taxonomy-menu .level_2 > a { padding-left: 40px; }
}

/* Icon + mũi tên xổ xuống cho mục menu cấp 1 (giống thegioididong) */
.taxonomy-menu > .level_0 > a { align-items: center; }
.taxonomy-menu > .level_0 > a .menu-icon {
  flex: 0 0 auto;
  width: 18px;
  font-size: 17px;
  line-height: 1;
  text-align: center;
}
.taxonomy-menu > .level_0 > a .menu-icon.fa-mobile { font-size: 22px; }
.taxonomy-menu > .level_0 > a .menu-caret {
  flex: 0 0 auto;
  margin-left: 4px;
  font-size: 14px;
  line-height: 1;
  transition: transform .2s ease;
}
@media (min-width: 1024px) {
  .taxonomy-menu > .level_0:hover > a .menu-caret,
  .taxonomy-menu > .level_0:focus-within > a .menu-caret { transform: rotate(180deg); }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  /* container 970px: thu khoảng cách để menu có icon vẫn nằm trên 1 hàng */
  .taxonomy-menu > .level_0 { margin: 0 6px; }
}
@media (max-width: 1023px) {
  /* menu thu gọn đã có mũi tên riêng (nav-layout.css) */
  .taxonomy-menu > .level_0 > a .menu-caret { display: none; }
}
