@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

/* 設計變數 */
:root {
  --font-family-tc: 'Noto Sans TC', sans-serif;

  /* 整頁圖層 */
  --z-header: 1000;
  --z-dropdown: 1010;
  --z-cart-overlay: 1100;
  --z-cart-sidebar: 1101;
  --z-modal-overlay: 1200;
  --z-modal: 1201;
  --z-toast: 1300;
  --z-mobile-menu: 1020;
  --z-menu-toggle: 1021;
}

/* 錨點導覽平滑捲動 */
html {
  scroll-behavior: smooth;
}

/* 通用標籤樣式 */
.for_m {
  display: none !important;
}

.wow {
  visibility: hidden;
  opacity: 0;
  animation-fill-mode: forwards;
}

@media(max-width: 768px) {
  .for_pc {
    display: none !important;
  }

  .for_m {
    display: block !important;
  }
}

/* 輪播 Slick 通用樣式 */
/* Slick 點點樣式 */
.slick-dots {
  display: flex !important;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  padding-bottom: 5px;
  position: static;
  bottom: auto;
  left: auto;
}

.slick-dots li {
  margin: 0;
  width: auto;
  height: auto;
  cursor: pointer;
  font-size: 0;
}

.slick-dots li button {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
  background-color: #ddd;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-indent: -9999px;
  appearance: none;
  outline: none;
}

.slick-dots li button:before {
  display: none;
}

.slick-dots li.slick-active button {
  background-color: #000;
}

.slick-dots li:only-child {
  display: none;
}

/* Slick 箭頭樣式 */
.slick-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  color: #000;
  font-size: 16px;
}

.slick-arrow:hover {
  background-color: #000;
  color: #fff;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.slick-arrow:before {
  content: '';
  display: none;
}

.slick-prev {
  left: 0;
}

.slick-next {
  right: 0;
}

/* 懸浮聯繫按鈕 */
.chat_widget {
  position: fixed;
  bottom: 90px;
  right: 30px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  pointer-events: none;
}

.chat_widget .chat_toggle {
  pointer-events: auto;
}

.chat_widget.active {
  pointer-events: auto;
}

.chat_toggle {
  width: 50px;
  height: 50px;
  background-color: #000;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  z-index: 2;
}

.chat_toggle:hover {
  transform: scale(1.05);
}

.chat_widget.active .chat_toggle {
  background-color: #666;
  transform: rotate(90deg);
}

.chat_toggle .fa-times {
  display: none;
}

.chat_widget.active .chat_toggle .fa-comment-dots {
  display: none;
}

.chat_widget.active .chat_toggle .fa-times {
  display: block;
}

.chat_options {
  display: flex;
  flex-direction: column-reverse;
  gap: 15px;
  padding-bottom: 10px;
  pointer-events: none;
}

.chat_widget.active .chat_options {
  pointer-events: auto;
}

.chat_option {
  width: 50px;
  height: 50px;
  background-color: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s ease;
}

.chat_option.messenger,
.chat_option.line,
.chat_option.phone {
  background-color: #fff;
  color: #000;
}

.chat_option:hover {
  background-color: #f5f5f5;
  color: #666666;
}

.chat_widget.active .chat_option {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.chat_widget.active .chat_option:nth-child(1) {
  transition-delay: 0.1s;
}

.chat_widget.active .chat_option:nth-child(2) {
  transition-delay: 0.05s;
}

.chat_widget.active .chat_option:nth-child(3) {
  transition-delay: 0s;
}

@media (max-width: 768px) {
  .chat_widget {
    bottom: 75px;
    right: 20px;
  }

  .chat_toggle,
  .chat_option {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
}

/* 回到頂端按鈕 */
.back_to_top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: #000;
  color: #fff;
  border: 2px solid #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back_to_top.show {
  opacity: 1;
  visibility: visible;
}

.back_to_top:hover {
  background-color: #666666;
  border-color: #666666;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .back_to_top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
}

/* 手機選單：桌機不顯示 */
.menu_toggle,
.mobile_menu {
  display: none;
}

@media (max-width: 768px) {
  .menu_toggle {
    position: fixed;
    top: 2.734vw;
    right: 2.604vw;
    z-index: var(--z-menu-toggle);
    display: block;
    width: 6.641vw;
    min-width: 32px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
  }

  .menu_toggle_close {
    display: none;
    color: var(--color-text);
    font-size: 1.75rem;
    line-height: 1;
  }

  .menu_toggle.active .menu_toggle_icon {
    display: none;
  }

  .menu_toggle.active .menu_toggle_close {
    display: block;
    text-align: center;
  }

  .mobile_menu {
    position: fixed;
    inset: 0;
    z-index: var(--z-mobile-menu);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    background: var(--color-white);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }

  .mobile_menu.active {
    opacity: 1;
    visibility: visible;
  }

  .mobile_menu_list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11vw;
    padding: 60px 0;
  }

  .mobile_menu_item {
    width: min(40vw, 180px);
  }

  .mobile_menu_link {
    display: block;
  }
}

/* 分頁按鈕樣式 */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.pagination .page-item {
  flex-shrink: 0;
}

.pagination .page-prev,
.pagination .page-next,
.pagination .page-first,
.pagination .page-last {
  display: flex;
  align-items: center;
  text-indent: -9999px;
  /* Prev, Next, First, Last 隱藏文字 */
}

.pagination .page-prev::after,
.pagination .page-next::after,
.pagination .page-first::after,
.pagination .page-last::after {
  content: "";
  display: block;
  height: 15px;
  background: currentColor;
  /* 會與當前文字的顏色一致 */
}

/* 單箭頭寬度 */
.pagination .page-prev::after,
.pagination .page-next::after {
  width: 8px;
}

/* 雙箭頭寬度 */
.pagination .page-first::after,
.pagination .page-last::after {
  width: 14px;
}

/* 單箭頭 - 向左 */
.pagination .page-prev::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='15' viewBox='0 0 8 15' fill='none'%3E%3Cpolyline points='7 1 1 7.5 7 14' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='15' viewBox='0 0 8 15' fill='none'%3E%3Cpolyline points='7 1 1 7.5 7 14' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* 單箭頭 - 向右 */
.pagination .page-next::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='15' viewBox='0 0 8 15' fill='none'%3E%3Cpolyline points='1 1 7 7.5 1 14' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='15' viewBox='0 0 8 15' fill='none'%3E%3Cpolyline points='1 1 7 7.5 1 14' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* 雙箭頭 - 向左 */
.pagination .page-first::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='15' viewBox='0 0 14 15' fill='none'%3E%3Cpolyline points='7 1 1 7.5 7 14' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpolyline points='13 1 7 7.5 13 14' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='15' viewBox='0 0 14 15' fill='none'%3E%3Cpolyline points='7 1 1 7.5 7 14' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpolyline points='13 1 7 7.5 13 14' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* 雙箭頭 - 向右 */
.pagination .page-last::after {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='15' viewBox='0 0 14 15' fill='none'%3E%3Cpolyline points='1 1 7 7.5 1 14' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpolyline points='7 1 13 7.5 7 14' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='15' viewBox='0 0 14 15' fill='none'%3E%3Cpolyline points='1 1 7 7.5 1 14' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpolyline points='7 1 13 7.5 7 14' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* 內頁導覽按鈕樣式 */
.article_navigation {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0;
  margin-top: 60px;
  width: 100%;
  border-top: solid 1px #000;
  padding-top: 40px;
  gap: 15px;
}

.article_navigation a {
  text-decoration: none;
}

.article_navigation span {
  color: #000;
}

/* 編輯器文字粗體樣式(不寫在 editor.css 裡面，會影響後台編輯器設定「粗體」功能) */
#editor h1 {
  font-weight: 500;
}

#editor h2 {
  font-weight: 500;
}

#editor h3 {
  font-weight: 500;
}

#editor h4 {
  font-weight: 500;
}

#editor h5 {
  font-weight: 500;
}

#editor h6 {
  font-weight: 500;
}

#editor h1 b {
  font-weight: 600;
}

#editor h2 b {
  font-weight: 600;
}

#editor h3 b {
  font-weight: 600;
}

#editor h4 b {
  font-weight: 600;
}

#editor h5 b {
  font-weight: 600;
}

#editor h6 b {
  font-weight: 600;
}

#editor p b {
  font-weight: 500;
}

/* 移除後台編輯器功能按鈕 */
#editor .for_editor_btn {
  display: none;
}
