* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5% !important;
}

body {
  font-family: "微軟正黑體" !important;
  color: #2b2b2b;
  line-height: 1 !important;
  font-weight: 400;
  width: 100%;
}

html,
body {
  overflow-x: clip; /* 限制橫向捲軸，但不會影響 sticky 行為 */
  /* 超出的內容裁掉，但不影響定位或事件觸發，不會限制 sticky 行為 */
}

body.no-scroll {
  overflow: hidden;
  height: 100vh;
  touch-action: none; /* iOS 阻止彈性滾動 */
}

/* GENERAL */
a:link,
a:visited {
  text-decoration: none;
}

.containter {
  margin: 0 auto;
}

.flex-col {
  display: flex;
  flex-direction: column;
  gap: 4.8rem;
}

.margin_top30 {
  margin-top: 3rem;
}

/* .m-item {
    display: none;
} */

p {
  font-family: "微軟正黑體" !important;
}

/* MAIN */
/* main {
    margin-top: calc(5rem + 5.4rem);   // 使用 after 去撐開 .header 的高度了
} */

.naviBar {
  font-size: 1.6rem;
  width: 130rem;
  margin-right: auto;
  margin-left: auto;
  line-height: 4rem;
  height: 4rem;
  clear: both;
  color: #666;
}

.naviBar a {
  color: #666;
}
.naviBar a:hover,
.naviBar a:active {
  color: #0a65c2;
}

.header {
  width: 100%;
  max-width: 192rem;
  margin: 0 auto;
  height: 5rem;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  border-bottom: 1px solid #ced4da;
  background-color: #fff;
}

body:before {
  content: "";
  display: block;
  height: calc(5rem + 5.4rem);
}

.topLink-wrapper {
  background-color: #2b2b2b;
  padding: 0.6rem;
}

.topLink-left {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.2rem;
}

.topLink-left a:link,
.topLink-left a:visited {
  color: #fff;
}

.pp-header-wrapper {
  display: flex;
  max-width: 130rem;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  height: 100%;
}
.logo {
  display: flex;
  align-items: center;
  align-self: center;
  flex: 0 0 auto;
}

.main-nav {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  align-items: center;
  gap: 3.2rem;
}
.search-input {
  display: flex;
  align-items: center;
  border-radius: 10rem;
  border: 1px solid #ced4da;
  flex: 1 0 auto;
  height: 3.6rem;
}
.search-input > .icon {
  padding: 0.8rem 0 0.8rem 2rem;
}
.search-input > input {
  border: 0;
  outline: none;
  padding: 0.8rem 1.6rem 0.8rem 0.8rem;
  width: 100%;
  background-color: transparent !important;
  flex: 1 1 auto;
}

.search-input > input::placeholder {
  color: #ced4da;
}

.main-nav-items {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1 0 auto;
}

.main-nav-item {
  display: flex;
  position: relative;
  align-items: center;
  cursor: pointer;
  gap: 9px;
  padding: 1.6rem 0;
  transition: all 0.3s ease;
}

.m-main-nav-items {
  display: none;
}

.item-icon {
  stroke: #343a40;
}

.divider {
  width: 0.1rem;
  height: 2rem;
  background-color: #ced4da;
}

.dropdown--item {
  text-decoration: none;
  color: #343a40;
  font-size: 1.4rem;
  display: inline-block;
}
.main-nav-item:hover {
  box-shadow: inset 0 -3px 0 0 #0a65c2;
}

.main-nav-btn {
  display: flex;
  align-items: center;
  border: none;
  background-color: #fff;
  padding: 1rem;
  flex: 0 0 auto;
  cursor: pointer;
}

/* dropdown modal */
.dropdown-modal {
  position: absolute;
  top: 100%; /* 剛好貼齊按鈕底部 */
  left: 0;
  background-color: white;
  border: 1px solid #ccc;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  display: none;
  z-index: 1000;
  border-radius: 8px;
  min-width: 10rem;
  text-align: center;
}

.dropdown-modal ul {
  list-style: none;
  padding: 1rem 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
}

.dropdown-modal li {
  margin: 0.5rem 0;
}

.dropdown-modal a:link,
.dropdown-modal a:visited {
  color: #2b2b2b;
  text-decoration: none;
  font-size: 1.4rem;
  transition: all 0.1s ease-in;
  padding: 0.8rem 1rem;
  border-radius: 8px;
}

.dropdown-modal a:hover,
.dropdown-modal a:active {
  color: #0a65c2;
  background-color: rgba(10, 102, 194, 0.15);
}

/* hamburger modal */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  z-index: 998;
}

.overlay.active {
  display: block;
}

.menu-modal {
  position: fixed;
  top: 0;
  right: 0;
  width: 54rem;
  height: 100vh;
  background-color: #fff;
  z-index: 10001;
  padding: 3.2rem 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.menu-modal.slide-in {
  transform: translateX(0%);
}

.menu-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.4rem;
  padding: 0 1rem;
}

.menu-title {
  font-size: 2rem;
  font-weight: 800;
}

.btn-search-cc {
  border: none;
  background-color: #555;
  padding: 0.8rem 1.6rem;
  display: block;
  color: #fff;
  border-radius: 100px;
  cursor: pointer;
  margin-left: -2.4rem;
  transition: all 0.3s ease;
}

.btn-search-cc:hover {
  background-color: #000;
}

.close-btn {
  border: none;
  background-color: transparent;
  font-size: 3.2rem;
  cursor: pointer;
}

.close-btn:hover {
  color: #ff6473;
}

.menu-content {
  display: flex;
}

.menu-content a:link,
.menu-content a:visited {
  color: #2b2b2b;
}

.menu-tab {
  padding: 1rem 1.6rem;
  line-height: 2rem;
  cursor: pointer;
  border-radius: 8px;
  width: 20rem;
  transition: background-color 0.2s ease;
}

.menu-tab.active {
  background-color: rgba(10, 102, 194, 0.15);
  color: #0a65c2;
}

.menu-tab:hover {
  background-color: #f3f3f3;
}

.menu-tab a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  color: inherit; /* 繼承外層顏色 */
  text-decoration: none;
}

.menu-left {
  flex: 1 1 auto;
  border-right: 1px solid #eee;
  padding: 0 1.2rem;
}

.menu-left li {
  padding: 1rem 1.6rem;
  line-height: 2rem;
  cursor: pointer;
  border-radius: 8px;
  width: 20rem;
}

.menu-left li:hover {
  background-color: #f3f3f3;
}

.menu-left,
.submenu {
  list-style: none;
  font-size: 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.menu-right {
  flex: 1 0 30rem;
  padding: 1rem 2rem;
}

.submenu-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0a65c2;
  margin-bottom: 1rem;
}
.menu-right li {
  display: inline-flex;
  width: 50%;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
}
.menu-right li:hover {
  background-color: #f3f3f3;
}

/* 專區 nav */
.pp-header-down-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 4.8rem;
  background-color: #fff;
  border-bottom: 1px solid #ced4da;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.nav-area {
  padding: 0 3.2rem;
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
}

.nav-area ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: auto;
}

.area-link {
  display: flex;
  position: relative;
  align-items: center;
  gap: 6px;
  padding: 1.6rem 0.4rem;
  transition: all 0.1s ease-in;
}

.area-link:hover a {
  color: #0a65c2;
}

.area-link::after {
  content: "";
  border-left: 0.8rem solid transparent;
  border-right: 0.8rem solid transparent;
  border-bottom: 0.8rem solid #0a65c2;
  display: none; /* 預設不顯示 */
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.area-link:hover:after {
  display: block; /* 加上 active 顯示三角形 */
}

.area-link:hover .nav-btn-icon path {
  fill: #0a65c2;
}

.area-link.actived {
  box-shadow: inset 0 -4px 0 #0a65c2;
}

.area-link a {
  font-size: 1.6rem;
  color: #2b2b2b;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.1s ease-in;
  position: relative;
}

.nav-area .nav-subcategory {
  display: none;
  gap: 0.8rem;
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 98;
  background-color: #0a65c2;
  padding: 1.6rem 0;
  list-style: none;
  justify-content: center;
}
.nav-subcategory a {
  padding: 0.4rem 1rem;
  border-radius: 2rem;
  transition: all 0.1s ease-in;
}

.nav-subcategory a:link,
.nav-subcategory a:visited {
  font-size: 1.4rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1px;
}
.nav-subcategory a:hover,
.nav-subcategory a:active {
  background-color: #fff;
  color: #0a65c2;
}

@media (max-width: 1024px) {
  .pp-header-wrapper {
    max-width: 100rem;
  }

  .nav-btn-icon {
    width: 2.2rem;
    height: 2.2rem;
  }

  .naviBar {
    width: 100rem;
  }

  .area-link {
    padding: 0.8rem 0.4rem;
  }

  .nav-subcategory a:link,
  .nav-subcategory a:visited {
    display: contents;
  }
}
@media (max-width: 890px) {
  body:before {
    height: 5rem;
  }

  .f-nodisplay {
    display: none;
  }
}

@media (max-width: 768px) {
  .pp-header-wrapper {
    padding: 0 1.2rem 0 1.6rem;
  }

  .naviBar {
    width: 100%;
    padding: 0 1.2rem 0 1.6rem;
  }

  .menu-modal {
    width: 40rem;
  }

  .menu-left li {
    width: 15rem;
  }
}

@media (max-width: 720px) {
  .m-nodisplay {
    display: none;
  }

  .m-main-nav-items {
    display: flex;
    gap: 1.8rem;
    align-items: center;
  }

  .main-nav {
    gap: 1.2rem;
  }
  .m-main-nav-items {
    display: flex;
  }
}

@media (max-width: 430px) {
  .logo {
    transform: scale(0.9);
  }

  .pp-header-wrapper {
    padding: 0 1.2rem 0 1.6rem;
  }

  .main-nav {
    gap: 1.8rem;
  }

  .search-input input {
    border: none;
    font-size: ;
  }

  .m-main-nav-item {
    padding: 1rem 0;
    position: relative;
  }

  .main-nav-btn {
    padding: 1rem 0;
  }

  .shift-left-half {
    transform: translateX(-50%);
  }

  .menu-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.8rem;
  }

  .menu-modal {
    max-width: 430px;
    width: 100%;
  }

  .height50vh {
    height: 20vh;
  }

  .btn-search-c {
    border: none;
    background-color: #00a693;
    padding: 0.8rem 3.2rem;
    display: block;
    margin: 3.2rem auto 2.4rem auto;
    color: #fff;
    border-radius: 6px;
  }

  .menu-left li {
    width: 16rem;
  }
}
