@media screen and (min-width: 999px) {
  header.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    transition: top 0.1s ease-in-out;
    z-index: 10;
  }
}
@media screen and (min-width: 999px) {
  header.main-header.nav-up {
    top: -88px;
  }
}

#pageHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}
@media screen and (max-width: 999px) {
  #pageHeader {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 0;
    border-bottom: 2px solid #AA0000;
    background-color: #FFF;
    z-index: 1000;
  }
}
@media screen and (max-width: 999px) {
  #pageHeader > .searchForm {
    display: none;
  }
}
#pageHeader > .searchForm input[name=keywords] {
  border: 2px solid #333;
}
#pageHeader .m_menu {
  display: none;
}
@media screen and (max-width: 999px) {
  #pageHeader .m_menu {
    display: block;
    margin-left: 10px;
  }
}
#pageHeader .m_menu p {
  width: 30px;
  height: 30px;
}
#pageHeader .m_menu p > span {
  height: 2px;
  background-color: #666;
}

#logo {
  display: flex;
  align-items: center;
}
#logo > a {
  display: flex;
}
@media screen and (max-width: 999px) {
  #logo > a > img[alt=logo] {
    display: none;
  }
}
#logo > a > img[alt=logo-mobile] {
  display: none;
}
@media screen and (max-width: 999px) {
  #logo > a > img[alt=logo-mobile] {
    display: block;
  }
}

.searchForm {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}
.searchForm input[name=keywords] {
  width: 500px;
  height: 30px;
  padding: 0 0 0 10px;
  font-family: "Microsoft JhengHei";
  font-size: 1rem;
  color: #707070;
  line-height: 30px;
  border-radius: 5px 0 0 5px;
  border: 1px solid #ccc;
  border-right: 0;
  transition: all 0.25s;
}
@media screen and (max-width: 999px) {
  .searchForm input[name=keywords] {
    width: calc(100% - 40px);
  }
}
.searchForm input[name=keywords]:focus {
  color: #fff;
  background: #ffb842;
  outline: 0;
}
.searchForm button[name=imageField] {
  width: 40px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 0 5px 5px 0;
  background-color: #333;
  background-image: url(../images/icon-search.png);
  background-size: 25px 25px;
  background-position: center center;
  background-repeat: no-repeat;
  transition: all 0.25s;
  cursor: pointer;
}

#mainNav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}
#mainNav li {
  margin-right: 15px;
}
@media screen and (max-width: 999px) {
  #mainNav li {
    display: none;
  }
}
#mainNav li.company {
  display: flex;
  flex: 0 0 auto;
}
@media screen and (max-width: 999px) {
  #mainNav li.company {
    display: none;
  }
}
#mainNav li.company span {
  flex: 0 0 auto;
  color: #0000ff;
}
#mainNav li.message {
  padding-left: 15px;
  border-left: 1px solid #ccc;
}
#mainNav li.cart {
  position: relative;
  margin-right: 0;
  border-radius: 25px;
  background-color: #fff;
  background-image: url(../images/cart.gif);
  background-position: 50% 50%;
  background-repeat: no-repeat;
  z-index: 99;
}
@media screen and (max-width: 999px) {
  #mainNav li.cart {
    display: block;
  }
}
#mainNav li.cart a {
  display: block;
  width: 50px;
  height: 50px;
}
#mainNav li.cart #cart_num {
  position: absolute;
  top: 15%;
  right: 35%;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 20px;
  color: #fff;
  text-align: center;
  border-radius: 100%;
  background: rgba(255, 0, 0, 0.8);
}
#mainNav li.member {
  width: 40px;
  margin-right: 0;
  margin-left: 10px;
}
@media screen and (max-width: 999px) {
  #mainNav li.member {
    display: block;
    margin-left: 0;
  }
}
#mainNav li.member > a > div {
  width: 40px;
  height: 40px;
  border-radius: 100%;
  background-image: url(https://img.empyrean.tw/FEBF2EE5-7D65-42E6-8EF0-D9B3657370F1.png);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
#mainNav li a {
  color: #000;
  white-space: nowrap;
}

#pageHeader_sub {
  border-bottom: 1px solid #fff;
  background-color: #ab1d33;
}
@media screen and (max-width: 999px) {
  #pageHeader_sub {
    margin: 52px 0 0 0;
    padding: 0;
    border-bottom: 0;
  }
}
#pageHeader_sub .row {
  display: flex;
}
@media screen and (max-width: 999px) {
  #pageHeader_sub .row {
    flex-direction: column;
  }
}
#pageHeader_sub .row > div {
  display: flex;
  align-items: center;
  justify-content: center;
}
@media screen and (max-width: 999px) {
  #pageHeader_sub .row > div {
    width: 100%;
    padding: 5px 8px;
  }
}
#pageHeader_sub .row > div.search-box {
  display: none;
}
@media screen and (max-width: 999px) {
  #pageHeader_sub .row > div.search-box {
    display: block;
  }
}
#pageHeader_sub ul {
  display: flex;
  padding: 3px 10px;
  color: #fff;
}
@media screen and (max-width: 999px) {
  #pageHeader_sub ul {
    flex-wrap: wrap;
    background-color: #8b081b;
  }
}
#pageHeader_sub ul li {
  color: #fff;
}
@media screen and (max-width: 999px) {
  #pageHeader_sub ul li {
    flex: 0 0 25%;
  }
}
@media screen and (max-width: 999px) {
  #pageHeader_sub ul li:first-child {
    display: none;
  }
}
#pageHeader_sub ul li:last-child {
  border-right: 0;
}
#pageHeader_sub ul li a {
  display: flex;
  align-items: center;
  height: 26px;
  padding: 2px 10px;
  color: #fff;
  border-radius: 2px;
  border: 1px solid #ab1d33;
}
@media screen and (max-width: 999px) {
  #pageHeader_sub ul li a {
    justify-content: center;
    border: 0;
  }
}
#pageHeader_sub ul li a:hover {
  border: 1px solid #fff;
}

.m_menu {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.m_menu p {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 20px;
  min-width: 20px;
  height: 20px;
  margin-right: 5px;
}
.m_menu p > span {
  display: block;
  width: 100%;
  height: 1px;
  margin: 3px 0;
  border-radius: 2px;
  background-color: #fff;
}
@media screen and (max-width: 999px) {
  #pageHeader_sub .row > div.function-menu {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0;
    background-color: #8b081b;
    overflow-x: auto;
  }
}
@media screen and (max-width: 999px) {
  #pageHeader_sub .row > div.function-menu ul {
    flex: 0 0 100%;
  }
}
#pageHeader_sub .row > div.function-menu ul:first-child {
  padding: 3px 0 3px 10px;
}
@media screen and (max-width: 999px) {
  #pageHeader_sub .row > div.function-menu ul:first-child {
    padding: 3px 10px;
  }
}
#pageHeader_sub .row > div.function-menu ul:nth-child(2) {
  padding: 3px 10px 3px 0;
}
@media screen and (max-width: 999px) {
  #pageHeader_sub .row > div.function-menu ul:nth-child(2) {
    padding: 3px 10px;
  }
}
@media screen and (max-width: 999px) {
  #pageHeader_sub .row > div.function-menu ul:nth-child(2) li:first-child {
    display: inline;
  }
}
