#menu {
  line-height: 4rem;
  position: sticky;
  z-index: 11;
  top: 0;
  left: 0;
  box-shadow: 0 1px 4px #ccc;
  background-color: #fff;
}

#menu a {
  text-decoration: none;
  color: #494949;
}


#menu a:hover {
  color: #666ba9;
}

/* 選單列表與架構 */
#menu,
#menu .under-menu li {
  height: auto
}

#menu #sort .arrow-down,
#menu .under-menu:hover:before {
  display: none
}

/*  下拉選單 */

#menu .under-menu {
  right: 0;
  top: 100%;
  width: 24.75rem;
  box-shadow: 0 0 1rem #666 !important;
  border-radius: 5px;
  display: none;
  line-height: 1.5;
  z-index: 1030;
  position: absolute
}

#menu,
#menu .under-menu li {
  height: auto
}


#menu ul>li>a {
  display: block
}


#menu .under-menu svg * {
  fill: #666ba9
}



.under-menu-headline .active a {
  display: block
}

.under-menu-headline .active,
.under-menu-headline .active a:hover {
  color: #fff !important;
  background-color: #666ba9 !important;
}

.under-menu-headline .active a {
  color: #fff !important;
  ;
}

#menu li,
#menu ul>li>a,
.menu-button,
.menu-button {
  position: relative
}

.menu-button span,
.menu-button::after,
.menu-button::before {
  position: absolute;
  height: 2px;
  background-color: #6a74ba;
  top: 50%;
  transform-origin: 50% 50%;
  left: 0;
  width: 100%
}

.menu-button {
  width: 2rem;
  height: 3.75rem
}

.menu-button::after,
.menu-button::before {
  content: '';
  transition: .25s
}

.menu-button span {
  transition: opacity .25s
}

.menu-button::before {
  transform: translate3d(0, -10px, 0)
}

.menu-button::after {
  transform: translate3d(0, 10px, 0)
}

.circle .border,
.menu-button.act span {
  opacity: 0
}

.menu-button.act::before {
  transform: rotate3d(0, 0, 1, 45deg)
}

.menu-button.act::after {
  transform: rotate3d(0, 0, 1, -45deg)
}

#mobile-menu {
  display: none;
  z-index: 1021;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: auto;
  background-color: #fff;
  padding-bottom: 20px;
  height: -webkit-fill-available;
  /* iOS 特殊用法 */
  box-sizing: border-box;

}

#mobile-menu a {
  color: #171c61
}

.mobile-menu-list-area {
  padding: 1rem;
  background-color: #f3f6ff
}

.mobile-menu-list li {
  position: relative;
  padding-left: 1rem
}

.mobile-menu-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background-color: #333
}

.fz-0 {
    font-size: 0
}
/* breadcrumbs */
/* 針對 aside 下的 ol 進行深度修正 */
aside.breadcrumb .container ol.breadcrumb {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    /* 核心：強制靠左 */
    justify-content: flex-start !important;
    text-align: left !important;
    /* 移除可能存在的間距 */
    padding-left: 0 !important;
    margin-left: 0 !important;
    list-style: none;
}

/* 確保麵包屑項目不會換行、不會縮小 */
aside.breadcrumb .breadcrumb-item {
    display: inline-block !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

/* 修正 Bootstrap 的偽元素 (斜線分隔符) 不要斷行 */
aside.breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    display: inline-block !important;
}
/* submenu */

.supmenu {
  width: 100%;           
  overflow-x: auto;      
  overflow-y: hidden;    
  -webkit-overflow-scrolling: touch; 
}

.supmenu ul {
  display: flex;         
  flex-wrap: nowrap;      
  justify-content: safe center; 
  list-style: none;
  padding: 0;
}

.supmenu li {
  flex-shrink: 0;         
  padding: 0 15px;        
}

.supmenu a {
  display: block;
  white-space: nowrap;    
  text-decoration: none;
}


@media (min-width:1176px) {

  #menu,
  #menu .under-menu:hover,
  #menu a:focus+.under-menu,
  #menu a:hover+.under-menu {
    display: block
  }

  #menu #sort {
    position: static;
    width: auto;
    display: block !important;
    line-height: 4rem;
    box-shadow: none;
  }

  #menu #sort .arrow-down {
    display: inline;
  }

  #menu li {
    width: auto;
  }

  #menu li.act>a:before,
  #menu ul>li>a:hover:before {
    position: absolute;
    bottom: 0;
    content: '';
    left: -1rem;
    display: block;
    width: calc(100% + 1rem * 2);
    height: 3px;
    background-color: #666ba9;
  }

  #menu li.act>a svg,
  #menu ul>li>a:hover svg {
    fill: #666ba9;
  }

  #menu li.act>a {
    color: #666ba9;
  }

  #menu li.act>a:after {
    position: absolute;
    bottom: 0;
    content: '';
    left: calc(50% - 1rem / 2);
    display: block;
    width: 0;
    height: 0;
    border-style: solid;
    border-color: #666ba9 transparent;
    border-width: 0 .5rem .5rem
  }

  .menu-button:not(.act) {
    display: none;
  }
}

@media (min-width: 992px) {
  #menu #sort {
    position: static !important;
    display: flex !important;    
    top: auto !important;       
    box-shadow: none !important; 
  }

  #menu #sort li.position-static {
    padding-bottom: 20px !important; 
    margin-bottom: -20px !important; 
  }

  .under-menu {
    margin-top: 0; 
  }
}

@media (max-width: 991.98px) {
  #sort {
    display: none !important; 
  }
}