html {
  scroll-behavior: smooth;
}

.editor {
  padding: 10px;
}

.spec-description-container {
  font-family: "微軟正黑體", "Microsoft JhengHei", sans-serif;
  background: #f7f9fc;
  color: #333;
  margin: 0;
  padding: 0;
  line-height: 1.8;
}

.spec-description-container main {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  padding: 10px 5px;
}

.spec-description-container main h3 {
  color: #004d99;
  text-align: center;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
}

.spec-description-container main h4 {
  color: #004d99;
  border-left: 8px solid #9ac51e;
  padding-left: 10px;
  margin-top: 40px;
  font-size: 24px;
  font-weight: bold;
}

.spec-description-container main h5 {
  color: #000;
  margin-top: 25px;
  font-size: 20px;
  font-weight: bold;
}

.spec-description-container main p {
  margin: 8px 0 16px;
  font-size: 16px;
}

.spec-description-container main img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px auto;
  border-radius: 6px;
}

@media (max-width: 768px) {
  .spec-description-container {
    font-size: 15px;
  }

  .spec-description-container main h3 {
    font-size: 26px;
  }

  .spec-description-container main h4 {
    font-size: 20px;
  }
}

/* ====== 導覽列 ====== */
.spec-description-container main nav {
  position: sticky;
  top: 0;
  z-index: 9000;
  background-color: #8eb51c;
  background-image: url("https://www.toptech.tw/Upload/product/detail/nav-bg.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: 10px 0;
  text-align: center;
  margin-bottom: 20px;
}

.spec-description-container main nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* === 新增的預設隱藏/顯示規則 (適用於 > 520px) === */
.spec-description-container main nav ul li.show-on-mobile {
  display: none;
}

.spec-description-container main nav ul li.hide-on-mobile {
  display: list-item;
  /* 預設顯示 */
}
/* ============================================== */

.spec-description-container main nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 20px;
  border-bottom: 2px solid transparent;
  transition: border-bottom-color 0.3s;
}

.spec-description-container main nav a:hover {
  border-bottom-color: 5px solid #f0ad4e;
}

@media (max-width: 768px) {
  .spec-description-container main nav a {
    font-size: 18px;
  }
}

@media (max-width: 540px) {
  .spec-description-container main nav {
    line-height: 1;
  }

  .spec-description-container main nav ul {
    gap: 0;
  }

  /* 隱藏在小螢幕上不需要的項目 */
  .spec-description-container main nav ul li.hide-on-mobile {
    display: none;
  }

  /* 顯示在小螢幕上需要的項目 */
  .spec-description-container main nav ul li.show-on-mobile {
    display: list-item;
  }

  /* 讓每個清單項目平均分配寬度 */
  .spec-description-container main nav ul li {
    width: 20%;
    /* 總共有 5 個項目，每個佔 20% 寬度 */
  }

  .spec-description-container main nav a {
    padding: 5px 5px;
    position: relative;
    display: inline-block;
    text-align: center;
    color: transparent;
    /* 將原始4個字文字顏色設為透明 */
    font-size: 0;
    /* 讓原始文字不佔空間 */
    line-height: 0;
    /* 確保行高不被原始文字影響 */
  }

  .spec-description-container main nav a::after {
    content: attr(data-short);
    visibility: visible;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    line-height: 1.2;
    /* 確保短文字的行高正常 */
    white-space: nowrap;
    /* 強制文字不換行 */

    /* 這一行解決 ::after 蓋住下方連結 的點擊問題 */
    pointer-events: none;
  }
}

@media (max-width: 450px) {
  .spec-description-container main nav {
    line-height: 0.8;
  }
}

/* ====== RWD 影片置中樣式 ====== */
.spec-description-container main .video-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 30px auto;
  padding-top: 56.25%;
  /* 16:9 比例 */
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

.spec-description-container main .video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ====== 表格樣式 ====== */
.spec-description-container .table,
.spec-description-container .table-responsive {
  all: unset;
  display: block;
}

.spec-description-container main table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 15px !important;
}

.spec-description-container main th,
.spec-description-container main td {
  border: 1px solid #ccc;
  text-align: center;
  padding: 10px 6px;
  /* 新增：讓表格內容可以換行，幫助單元格縮小 */
  word-break:break-all; 
  /* 適用於新瀏覽器 */
}

.spec-description-container main th {
  background: #d9d9d9;
  color: #c00;
}

.spec-description-container main tr:nth-child(even) {
  background-color: #f8f8f8;
}

.spec-description-container main table img {
  max-width: 100%;
  width: 100%;
  height: auto;
  min-width: 0;
  /* 關鍵：取消最小寬度限制 */
  object-fit: contain;
  /* 保持比例不變形 */
}

@media (max-width: 768px) {
  .spec-description-container main table {
    font-size: 14px;
    width: 100%;
    max-width: calc(100% - 10px);
    /* 讓表格略小於父層，避免邊界外溢 */
    margin: 0 auto;
    /* 置中 */
  }

  .spec-description-container main th,
  .spec-description-container main td {
    padding: 6px 4px;
  }
}

/* ====== 國際認證 ====== */
.spec-description-container .certification {
  text-align: center;
  margin: 30px 0;
}

.spec-description-container .certification img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* ====== 耗材 ====== */
.consumable-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 0px;
  box-sizing: border-box;
}

.consumable-product {
  padding: 10px;
  border-radius: 10px;
  width: 250px;
  text-align: center;
  box-sizing: border-box;
}

.consumable-product a {
  text-decoration: none;
  color: black;
}

.consumable-product a:hover {
  color: #9ac51e;
}

.consumable-product img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.consumable-product .consumable-name {
  margin: 10px 0;
  font-size: 18px;
  text-align: center;
}

.consumable-product .button {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 15px;
  border: 1px solid #9ac51e;
  border-radius: 5px;
  text-decoration: none;
  color: #9ac51e;
  width: 100%;
  box-sizing: border-box;
}

.consumable-product .button:hover {
  background-color: #9ac51e;
  color: white;
}

/* 新增 RWD 設定：當螢幕寬度 <= 768px，讓每列固定 2 個商品 */
@media (max-width: 576px) {
  .consumable-container {
    /* center改成flex-start，第二列從左邊開始排 */
    justify-content: flex-start;
    gap: 10px;
  }

  .consumable-product {
    /* 讓每個商品佔據 50% 空間，扣除 padding */
    width: calc(50% - 10px);
  }
}

/* ====== 信賴與承諾 ====== */
.trust-commitment-container {
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
}

.trust-commitment-container .trust-commitment-content {
  background: #fff
    url("https://www.toptech.tw/Upload/product/detail/trust-commitment-bg.webp")
    center/cover no-repeat;
  width: 780px;
  height: auto;
  padding: 20px 50px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: fadeIn 1.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.trust-commitment-container .trust-commitment-content .caption {
  font-size: 42px;
  font-weight: bold;
  color: #000;
  margin-top: 0px;
  margin-bottom: 15px;
}

.trust-commitment-container .trust-commitment-content hr {
  height: 1px;
  background: #ccc;
  margin: 5px 0 5px 0;
}

.trust-commitment-container .trust-commitment-content .trust-commitment-text {
  width: 70%;
}

.trust-commitment-container .highlight {
  color: #e64545;
  font-weight: bold;
}

.trust-commitment-container .trust-commitment-content p {
  font-size: 18px;
  color: #444;
}

.trust-commitment-container .trust-commitment-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.trust-commitment-container .trust-commitment-content li {
  font-size: 18px;
  position: relative;
  padding-left: 1.4em;
}

.trust-commitment-container .trust-commitment-content li::before {
  content: "○";
  color: #555;
  position: absolute;
  left: 0;
  top: 0;
}

/* 手機版 */
@media (max-width: 600px) {
  .trust-commitment-container {
    padding: 40px 10px;
  }

  .trust-commitment-container .trust-commitment-content {
    width: 90%;
    height: auto;
    padding: 25px 20px;
  }

  .trust-commitment-container .trust-commitment-content .trust-commitment-text {
    width: 75%;
  }

  .trust-commitment-container .trust-commitment-content .caption {
    font-size: 30px;
    text-align: center;
  }

  .trust-commitment-container .trust-commitment-content p {
    font-size: 15px;
  }

  .trust-commitment-container .trust-commitment-content li {
    font-size: 13px;
    line-height: 1.6;
  }
}

@media (max-width: 420px) {
  .trust-commitment-container .trust-commitment-content .trust-commitment-text {
    width: 85%;
  }
}

/* ====== 服務 ====== */
.service-container {
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
}

.service-container .service-content {
  background: #fff
    url("https://www.toptech.tw/Upload/product/detail/service-bg.webp")
    center/cover no-repeat;
  width: 780px;
  height: auto;
  padding: 20px 50px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  animation: fadeIn 1.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-container .service-content .caption {
  font-size: 42px;
  font-weight: bold;
  color: #000;
  margin-top: 0px;
  margin-bottom: 15px;
}

.service-container .service-content hr {
  height: 1px;
  background: #ccc;
  margin: 5px 0 5px 0;
}

.service-container .highlight {
  color: #e64545;
  font-weight: bold;
}

.service-container .service-content p {
  font-size: 18px;
  color: #444;
}

.service-container .service-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.service-container .service-content li {
  font-size: 18px;
  position: relative;
  padding-left: 1.4em;
}

.service-container .service-content li::before {
  content: "○";
  color: #555;
  position: absolute;
  left: 0;
  top: 0;
}

/* 手機版 */
@media (max-width: 600px) {
  .service-container {
    padding: 40px 10px;
  }

  .service-container .service-content {
    width: 90%;
    height: auto;
    padding: 25px 20px;
  }

  .service-container .service-content .caption {
    font-size: 30px;
    text-align: center;
  }

  .service-container .service-content p {
    font-size: 15px;
  }

  .service-container .service-content li {
    font-size: 15px;
    line-height: 1.6;
  }
}

/* ====== 關於我們 ====== */
.aboutus-container {
  width: 100%;
  max-width: 773px;
  background: #f8f8f8;
  background-size: cover;
  margin: auto;
  padding: 20px 0;
  text-align: center;
  color: #fff;
  margin-bottom: 20px;
  line-height: normal;
}

.aboutus-container a {
  text-decoration: none;
  color: #9ac51e;
}

.aboutus-banner {
  width: 100%;
  max-width: 754px;
  height: auto;
  padding: 20px;
  box-sizing: border-box;
  margin: auto;
}

.aboutus-caption {
  font-size: 42px;
  margin: 0;
  text-align: center;
  font-weight: bold;
}

.aboutus-hr {
  width: 100%;
  /* 設置一個較短的長度 */
  height: 2px;
  background-color: #9ac51e;
  /* 設置為亮綠色 */
  border: none;
  margin: 10px auto;
  /* 設置上下間距 */
}

.aboutus-description {
  font-size: 22px;
  margin: 10px 0;
  text-align: center;
}

.aboutus-container .stats {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-top: 20px;
}

.aboutus-container .stat-item {
  text-align: center;
  color: #fff;
  width: 120px;
  height: 120px;
  background-color: #9ac51e;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.aboutus-container .stat-item .stat-number {
  font-size: 34px;
  margin: 0;
}

.aboutus-container .stat-item .stat-description {
  font-size: 16px;
  margin: 5px 0 0;
}

/* !!! for 英文版 關於我們 圈圈內的文字樣式 !!! */
.aboutus-container .stat-item .eng-stat-number {
  font-size: 20px;
  font-weight: bold;
  margin: 0;
  text-align: center;
}

/* !!! for 英文版 關於我們 圈圈內的文字樣式 !!! */
.aboutus-container .stat-item .eng-stat-description {
  font-size: 14px;
  margin: 5px 0 0;
  text-align: center;
}

@media (max-width: 768px) {
  .aboutus-container .stats {
    flex-wrap: wrap;
    justify-content: center;
  }

  .aboutus-container .stat-item {
    width: 120px;
    height: 120px;
    margin: 10px;
  }
}

/* ======= 試樣支援 ======= */
.preparation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  background: #f8f8f8;
  padding: 20px;
  border-radius: 8px;
  margin: auto;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 10px;
  line-height: normal;
}

.preparation .image-container {
  flex: 1 1 100px;
  text-align: center;
}

.preparation .image-container img {
  max-width: 100%;
  border-radius: 8px;
  min-width: 240px;
  height: auto;
}

.preparation .content {
  flex: 1 1 150px;
  padding: 20px;
  margin-top: 0px;
}

.preparation .content h3 {
  text-align: center;
  font-size: 26px;
  color: #4a8000;
  font-weight: bold;
  margin-top: 0px;
}

.preparation .description {
  margin-top: 10px;
  font-size: 18px;
  color: #555;
}

.preparation .button {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 40px;
  background: #9ac51e;
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  font-size: 16px;
  font-weight: bold;
  line-height: 15px;
}

.preparation .button:hover {
  background: #f0f7d9;
  color: black;
  border: 1px solid #9ac51e;
}

@media (max-width: 760px) {
  .preparation {
    flex-direction: column;
    text-align: center;
  }

  .preparation .content {
    text-align: center;
    padding: 10px;
  }
}

@media (max-width: 400px) {
  .preparation .image-container img {
    text-align: center;
    min-width: 120px;
  }

  .preparation .button {
    font-size: 14px;
    line-height: 14px;
    padding: 10px 20px;
  }
}

/* =======  聯絡我們 ======= */
.contact-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  background: #f8f8f8;
  padding: 20px;
  border-radius: 8px;
  margin: auto;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 10px;
  line-height: normal;
}

.contact-section .image-container {
  flex: 1 1 100px;
  text-align: center;
}

.contact-section .image-container img {
  max-width: 100%;
  border-radius: 8px;
  min-width: 240px;
  height: auto;
}

.contact-section .content {
  flex: 1 1 150px;
  padding: 20px;
  margin-top: 0px;
}

.contact-section .content h3 {
  text-align: center;
  font-size: 26px;
  color: #4a8000;
  font-weight: bold;
  margin-top: 0px;
}

.contact-section .description {
  margin-top: 10px;
  font-size: 18px;
  color: #555;
}

.contact-section .button {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 40px;
  background: #9ac51e;
  color: #fff;
  text-decoration: none;
  border-radius: 20px;
  font-size: 16px;
  font-weight: bold;
  line-height: 15px;
}

.contact-section .button:hover {
  background: #f0f7d9;
  color: black;
  border: 1px solid #9ac51e;
}

@media (max-width: 760px) {
  .contact-section {
    flex-direction: column;
    text-align: center;
  }

  .contact-section .content {
    text-align: center;
    padding: 10px;
  }
}

@media (max-width: 400px) {
  .contact-section .image-container img {
    text-align: center;
    min-width: 120px;
  }

  .contact-section .button {
    font-size: 14px;
    line-height: 14px;
    padding: 10px 20px;
  }
}

/* ====== Footer NAV 樣式 (預設隱藏) ====== */
.footNav {
  display: none;
  /* 預設隱藏在桌面視圖 */
}

/* 響應式佈局 (<= 520px) */
@media (max-width: 520px) {
  /* 啟用底部導覽列並固定 */
  .footNav {
    display: flex;
    /* 在小螢幕時顯示 */
    position: fixed;
    /* 固定在視窗底部 */
    bottom: 0;
    left: 0;
    width: 100%;
    /* 沿用頂部 NAV 的背景樣式 */
    background-color: #8eb51c;
    background-image: url("https://www.toptech.tw/Upload/product/detail/nav-bg.webp");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;

    z-index: 1001;
    /* 確保它在最上層 */
    padding: 5px 0;
    text-align: center;
    justify-content: center;
    /* 讓內容居中 */

    line-height: 0.8;
  }

  .footNav a {
    /* 連結樣式沿用頂部 NAV 連結的字體與顏色 */
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 20px;
    /* 移除底線，讓按鈕看起來更像行動版底部的動作按鈕 */
    border-bottom: none;
    padding: 5px 20px;
    display: inline-block;
  }

  .footNav a:hover {
    color: #4a8000;
    /* 懸停時變色 */
  }
}
