/* 編輯器內容區 */
.html_content {
  width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

/* 圖片 */
.html_content img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* iframe / Youtube */
.html_content iframe,
.html_content video,
.html_content embed,
.html_content object {
  max-width: 100%;
}
.html_content iframe[src*='youtube'],
.html_content iframe[src*='youtu.be'] {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
}
/* 表格 */
.html_content table {
  width: 100%;
  max-width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
}

/* 長程式碼 */
.html_content pre {
  overflow-x: auto;
  white-space: pre;
}

.html_content code {
  word-break: break-word;
}

/* 長網址 */
.html_content a {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* 防止內容超出 */
.html_content * {
  max-width: 100%;
}

/* =======header====== */
.rs-header-area.has-theme-blue.rs-sticky-header {
  background: rgba(31, 31, 31, 0.9);
}
.rs-header-logo a {
  display: inline-block;
}
.rs-header-logo img {
  width: 200px;
  max-width: 100%;
}
.rs-header-area.has-theme-blue .main-menu ul li.active > a {
  color: rgba(255, 255, 255, 0.76);
}
.rs-header-area.has-theme-blue .main-menu ul li a.active {
  color: rgba(255, 255, 255, 0.76);
}
.rs-header-area.has-theme-blue .main-menu .submenu {
  background: var(--rs-theme-blue);
}
.rs-header-area.has-theme-blue .main-menu .submenu li:hover > a {
  color: rgba(255, 255, 255, 0.76);
}
.rs-header-area.has-theme-blue .main-menu .submenu li a:hover {
  color: rgba(255, 255, 255, 0.76);
}
.rs-header-area.has-theme-blue .main-menu .submenu li a.active {
  color: rgba(255, 255, 255, 0.76);
}
/* .rs-header-area.has-theme-blue .main-menu > ul > li:hover > a {
  color: var(--rs-theme-red);
} */
.rs-header-area.has-theme-blue .main-menu > ul > li a {
  color: var(--rs-white);
}
.rs-header-area.has-theme-blue .bar-icon span {
  background: var(--rs-theme-tertiary);
}
.rs-header-area.has-theme-blue .mega-menu {
  background: var(--rs-theme-blue);
}
.rs-header-area.has-theme-blue .mega-menu li a {
  border-color: rgba(255, 255, 255, 0.21);
}
.rs-header-area.has-theme-blue .mega-menu li a:hover {
  color: rgba(255, 255, 255, 0.76);
}

.rs-header-two .rs-header-left {
  padding-right: 30px;
}

.rs-header-left::before {
  display: none;
}

.rs-header-call::before {
  display: none;
}

.rs-header-two .rs-header-call h6 a:hover {
  color: var(--rs-theme-blue);
}
.rs-header-two .rs-header-call {
  padding-right: 0;
  margin-right: 0px;
}
.rs-header-two .rs-header-right {
  gap: 10px;
}

/* 語系切換選單 */
.rs-header-lang {
  position: relative;
  display: flex;
  align-items: center;
  margin-inline-start: 14px;
}
.rs-lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  padding: 5px 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 0.2s,
    background 0.2s;
  line-height: 1;
}
.rs-lang-btn:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
}
.rs-lang-arrow {
  transition: transform 0.2s;
  flex-shrink: 0;
}
.rs-lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  min-width: 90px;
  z-index: 999;
}
.rs-header-lang.open .rs-lang-dropdown {
  display: block;
}
.rs-header-lang.open .rs-lang-arrow {
  transform: rotate(180deg);
}
.rs-lang-dropdown li a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s;
  white-space: nowrap;
}
.rs-lang-dropdown li a:hover {
  background: #f0f6ff;
  color: var(--rs-theme-blue);
}
.rs-lang-dropdown li.active a {
  color: var(--rs-theme-blue);
}
@media (max-width: 575px) {
  .rs-header-lang {
    display: none;
  }
}

.rs-header-hamburger {
  display: none;
}
.offcanvas-area.has-theme-red .offcanvas-close {
  background: var(--rs-theme-blue);
}
.offcanvas-area.has-theme-red .mean-container .mean-nav ul li.active > a {
  color: var(--rs-theme-blue);
}
.offcanvas-area.has-theme-red .mean-container .mean-nav ul li a:hover,
.offcanvas-area.has-theme-red .mean-container .mean-nav ul li span:hover {
  color: var(--rs-theme-blue);
}

@media (max-width: 1499px) {
  .rs-header-left {
    padding-right: 20px;
  }
  .main-menu li a {
    padding: 40px 10px;
  }
}
@media (max-width: 1199px) {
  .rs-header-hamburger {
    display: block;
  }
}

/* 中文版導覽列：防止換行，逐段縮小間距 */
html[lang="zh-tw"] .main-menu > ul > li > a {
  white-space: nowrap;
}
@media (max-width: 1399px) {
  html[lang="zh-tw"] .main-menu > ul > li > a {
    font-size: 16px;
    padding: 40px 8px;
  }
}
@media (max-width: 1299px) {
  html[lang="zh-tw"] .main-menu > ul > li > a {
    font-size: 14px;
    padding: 40px 5px;
  }
}

/* 英文版導覽列：縮小字體與間距，防止長文字換行增高 header */
html[lang="en"] .main-menu > ul > li > a {
  font-size: 13px;
  padding: 40px 7px;
  white-space: nowrap;
}
@media (max-width: 1499px) {
  html[lang="en"] .main-menu > ul > li > a {
    font-size: 12px;
    padding: 40px 5px;
  }
}

#rs-mouse #cursor-ball:after {
  background: var(--rs-theme-blue);
}
/* ========首頁主輪播======== */

/* 非 active slide 的文字元素預設隱藏，避免長標題撐高 banner 時內容外露 */
.rs-banner-two .rs-banner-title,
.rs-banner-two .rs-banner-descrip,
.rs-banner-two .rs-banner-btn {
  opacity: 0;
}

.rs-banner-two.rs-swiper .swiper-slide-active .rs-banner-title,
.rs-banner-two.rs-swiper .swiper-slide-active .rs-banner-descrip,
.rs-banner-two.rs-swiper .swiper-slide-active .rs-banner-btn {
  animation-fill-mode: both;
  animation-name: fadeInUp;
}
.rs-banner-two .swiper-slide-active .rs-banner-title {
  animation-delay: 0.3s;
  animation-duration: 0.7s;
}
.rs-banner-two .swiper-slide-active .rs-banner-descrip {
  animation-delay: 0.5s;
  animation-duration: 0.9s;
}
.rs-banner-two .swiper-slide-active .rs-banner-btn {
  animation-delay: 0.7s;
  animation-duration: 1.1s;
}

/* 內容區超出高度時出現 Y 軸滾動條，防止撐開 banner 區塊 */
.rs-banner-two .rs-banner-content {
  max-height: 500px;
  /* overflow-y: auto; */
}
@media (max-width: 767px) {
  .rs-banner-two .rs-banner-content {
    max-height: 220px;
  }
}
.rs-banner-two .swiper-button-prev,
.rs-banner-two .swiper-button-next {
  top: auto;
  bottom: 40px;
}
.rs-banner-two .swiper-pagination {
  bottom: 40px;
}
@media (max-width: 767px) {
  .rs-banner-two .swiper-button-prev,
  .rs-banner-two .swiper-button-next {
    display: none;
  }
}
/* ========首頁服務======== */
.rs-section-subtitle img {
  width: 20px;
}
.rs-section-subtitle.has-theme-red {
  color: var(--rs-theme-blue);
}
.rs-section-subtitle.has-theme-red svg path {
  fill: var(--rs-theme-blue);
}
.rs-section-title {
  font-size: var(--rs-fs-h5);
}
.rs-section-title .has-theme-blue {
  color: var(--rs-theme-blue);
}

/* ========按鈕 has-theme-red → blue======== */
.rs-btn.has-theme-red {
  background: var(--rs-theme-blue);
}
.rs-btn.has-theme-red:hover {
  filter: brightness(115%);
}
.rs-btn.has-theme-red.has-bg::before {
  background-color: #0070c0;
}

/* ========Swiper 導覽按鈕 hover-red → blue======== */
.rs-swiper-btn.has-bg-white.hover-red:hover {
  background: var(--rs-theme-blue);
  border-color: var(--rs-theme-blue);
  color: var(--rs-white);
}

/* ========文字按鈕 has-theme-red → blue======== */
.rs-text-btn:hover {
  color: var(--rs-theme-blue);
}
.rs-text-btn.has-theme-red {
  color: var(--rs-theme-blue);
}

/* ========播放按鈕 has-theme-red → blue======== */
.rs-play-btn.has-theme-red {
  background: var(--rs-theme-blue);
}
.rs-play-btn.has-theme-red::before {
  background: var(--rs-theme-blue);
}

/* ========計數器 has-theme-red → blue======== */
.rs-counter-one.has-theme-red .rs-counter-number,
.rs-counter-one.has-theme-red .prefix {
  -webkit-text-stroke-color: var(--rs-theme-blue);
  stroke: var(--rs-theme-blue);
}

/* ========Portfolio 標籤 has-theme-red → blue======== */
.rs-portfolio-one.has-theme-red .rs-portfolio-tag a {
  background: var(--rs-theme-blue);
}
.rs-portfolio-one.has-theme-red .rs-portfolio-tag a:hover {
  background: var(--rs-white);
  color: var(--rs-black);
}

/* ========聯絡表單 has-theme-red → blue======== */
.rs-contact-one.has-theme-red .rs-contact-input input:focus,
.rs-contact-one.has-theme-red .rs-contact-input textarea:focus {
  border-color: var(--rs-theme-blue);
}

/* ========FAQ Accordion has-theme-red → blue======== */
.rs-accordion-one.has-theme-red .rs-accordion-item.active {
  border-color: var(--rs-theme-blue);
}
.rs-accordion-one.has-theme-red .accordion-button:not(.collapsed) {
  color: var(--rs-theme-blue);
}
.rs-accordion-one.has-theme-red
  .accordion-button:not(.collapsed)
  .accordion-btn::after {
  background: var(--rs-theme-blue);
}

/* ========Blog 標籤 has-theme-red → blue======== */
.rs-blog-tag.has-theme-red a {
  background: var(--rs-theme-blue);
}
.rs-blog-tag.has-theme-red a:hover {
  background: var(--rs-black);
}

/* ========Services 卡片 hover → blue======== */
.rs-services-two .rs-services-item:hover .rs-text-btn {
  color: var(--rs-theme-blue);
}
.rs-services-two .rs-services-item:hover .rs-square-btn {
  background: var(--rs-theme-blue);
}
.rs-services-two .rs-services-text-link a:hover {
  color: var(--rs-theme-blue);
}
.rs-services-two .rs-services-text-link a:hover::before {
  background: var(--rs-theme-blue);
}
.rs-services-two .rs-services-title a:hover {
  color: var(--rs-theme-blue);
}
/* ======== 知識專欄（列表 + 內頁）共用 ======== */

/* 內頁圖片容器支援分類 tag 浮動定位 */
.rs-postbox-details-thumb {
  position: relative;
  overflow: hidden;
}
.rs-postbox-tag a {
  background: var(--rs-theme-blue);
}
.rs-postbox-tag a:hover {
  background: #0070c8;
  opacity: 1;
}

/* 列表頁標題 hover */
.rs-postbox-title a:hover {
  color: var(--rs-theme-blue);
}

/* 內頁標題顏色與 hover */
.rs-postbox-details-title {
  color: var(--rs-theme-blue);
}
.rs-postbox-details-title a:hover {
  color: var(--rs-theme-blue);
}

/* 分類 meta 連結 hover */
.meta-author:hover {
  color: var(--rs-theme-blue);
}

/* 分頁 hover / 當前頁 */
.common-pagination ul li:hover,
.common-pagination ul li .current {
  color: var(--rs-theme-blue);
}

/* sidebar 分類按鈕 hover / active */
.sidebar-widget.widget-categories-two ul li a:hover,
.sidebar-widget.widget-categories-two ul li a.active {
  background: var(--rs-theme-blue);
  border-color: var(--rs-theme-blue);
  color: var(--rs-white);
}
/* ========About industrie 頁籤 active / hover → blue======== */
.rs-about-two .rs-about-tab .nav-link::after {
  background-color: var(--rs-theme-blue);
}
.rs-about-two .rs-about-tab .nav-link.active {
  color: var(--rs-theme-blue);
}
.rs-about-two .rs-about-tab .nav-link:hover {
  color: var(--rs-theme-blue);
}

/* ========Work Process 流程編號 hover → blue======== */
.rs-work-step-two .rs-work-step-item:hover .rs-work-step-number {
  background: var(--rs-theme-blue);
}

/* ========Ask Us a Question 上方線 → blue======== */
.rs-contact-one.has-theme-red {
  border-top-color: var(--rs-theme-blue);
}

/* ========News & Blog 卡片 hover → blue======== */
.rs-blog-two .rs-blog-item:hover .rs-square-btn {
  background: var(--rs-theme-blue);
  color: var(--rs-white);
}
.rs-blog-two .rs-blog-meta-author:hover {
  color: var(--rs-theme-blue);
}

/* =========聯絡我們頁面 → blue========== */

/* 卡片格線改為 2 欄（兩個廠區） */
.rs-contact-six .rs-contact-wrapper {
  grid-template-columns: repeat(2, 1fr) !important;
}
@media only screen and (max-width: 767px) {
  .rs-contact-six .rs-contact-wrapper {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}

/* 卡片底圖改灰色 */
.rs-contact-six .rs-contact-bg-thumb {
  background-image: none !important;
  background-color: #ebebeb;
}

/* 辦公室卡片：icon 顏色、hover border、title */
.rs-contact-six .rs-contact-icon svg {
  color: var(--rs-theme-blue);
}
.rs-contact-six .rs-contact-item:hover {
  border-color: var(--rs-theme-blue);
}
.rs-contact-six .rs-contact-item:hover .rs-contact-title {
  color: var(--rs-theme-blue);
}

/* 卡片內連結 hover → blue */
.rs-contact-six .rs-contact-list h6 a:hover {
  color: var(--rs-theme-blue);
}

/* 辦公室卡片按鈕：::before 滑入改藍色 */
.rs-contact-six .rs-contact-btn .rs-btn.has-bg::before {
  background-color: var(--rs-theme-blue);
}
/* 辦公室卡片按鈕 hover */
.rs-contact-six .rs-contact-btn .rs-btn:hover,
.rs-contact-six .rs-contact-btn .rs-btn:focus {
  border-color: var(--rs-theme-blue);
  color: var(--rs-white);
}

/* 表單區 input/textarea focus border → blue */
.rs-contact-seven .rs-contact-input input:focus,
.rs-contact-seven .rs-contact-input textarea:focus {
  border-color: var(--rs-theme-blue);
}

/* 表單區 submit btn hover */
.rs-contact-seven .rs-contact-btn .rs-btn.has-theme-blue:hover {
  background: var(--rs-theme-blue);
  opacity: 0.85;
}

/* 服務項目下拉選單 — 與 input 同風格 */
.rs-contact-seven .rs-contact-input-select select {
  width: 100%;
  height: 60px;
  padding: 0 20px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fff;
  font-size: 15px;
  color: #555;
  appearance: auto;
  outline: none;
  transition: border-color 0.2s;
}
.rs-contact-seven .rs-contact-input-select select:focus {
  border-color: var(--rs-theme-blue);
}
@media (max-width: 768px) {
  .rs-contact-seven .rs-contact-input-select select {
    height: 52px;
    font-size: 14px;
  }
}

/* =========QA頁面========== */
.rs-accordion-one .accordion-button:not(.collapsed) {
  color: var(--rs-theme-blue);
}
.rs-accordion-one .accordion-button:not(.collapsed) .accordion-btn::after {
  background: var(--rs-theme-blue);
}

/* =========產品列表頁========== */

/* 分類側欄 */
.rs-product-cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rs-product-cat-list > li {
  border-bottom: 1px solid #f0f0f0;
}
.rs-product-cat-list > li > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  color: #444;
  font-size: 15px;
  transition: color 0.2s;
}
.rs-product-cat-list > li > a:hover,
.rs-product-cat-list > li > a.active {
  color: var(--rs-theme-blue);
}
.rs-product-cat-list > li > a .count {
  font-size: 13px;
  color: #999;
}
.rs-product-sub-cat-list {
  list-style: none;
  padding: 0 0 8px 14px;
  margin: 0;
  display: none;
}
.rs-product-sub-cat-list.d-block {
  display: block;
}
.rs-product-sub-cat-list li a {
  display: block;
  padding: 6px 0;
  color: #666;
  font-size: 14px;
  transition: color 0.2s;
}
.rs-product-sub-cat-list li a:hover,
.rs-product-sub-cat-list li a.active {
  color: var(--rs-theme-blue);
}

/* 產品卡片（無價格版） */
.rs-product-item-no-price .rs-product-thumb {
  overflow: hidden;
  border-radius: 6px;
}
.rs-product-item-no-price .rs-product-thumb img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  transition: transform 0.4s;
}
.rs-product-item-no-price:hover .rs-product-thumb img {
  transform: scale(1.04);
}
.rs-product-item-no-price .rs-product-content {
  padding: 14px 4px 4px;
}
.rs-product-cat {
  display: inline-block;
  font-size: 12px;
  color: var(--rs-theme-blue);
  margin-bottom: 6px;
}
.rs-product-item-no-price .rs-product-title {
  font-size: 16px;
  margin-bottom: 8px;
}
.rs-product-item-no-price .rs-product-title a {
  color: #222;
  transition: color 0.2s;
}
.rs-product-item-no-price .rs-product-title a:hover {
  color: var(--rs-theme-blue);
}
.rs-product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--rs-theme-blue);
  font-weight: 600;
  transition: gap 0.2s;
}
.rs-product-link:hover {
  gap: 10px;
  color: var(--rs-theme-blue);
}

/* =========產品內頁========== */

.rs-product-detail-gallery .rs-product-detail-thumb img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}
.product-detail-main-swiper .rs-product-detail-thumb img {
  max-height: 460px;
  object-fit: contain;
}
.product-detail-thumb-swiper {
  margin-top: 12px;
}
.product-detail-thumb-swiper .swiper-slide {
  width: 80px;
  height: 80px;
  opacity: 0.5;
  transition: opacity 0.2s;
}
.product-detail-thumb-swiper .swiper-slide-thumb-active {
  opacity: 1;
}
.rs-product-thumb-btn {
  width: 80px;
  height: 80px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: none;
  transition: border-color 0.2s;
}
.rs-product-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.swiper-slide-thumb-active .rs-product-thumb-btn {
  border-color: var(--rs-theme-blue);
}

.rs-product-detail-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rs-product-cat-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--rs-theme-blue);
  border: 1px solid var(--rs-theme-blue);
  border-radius: 4px;
  padding: 2px 10px;
  transition:
    background 0.2s,
    color 0.2s;
}
.rs-product-cat-tag:hover {
  background: var(--rs-theme-blue);
  color: #fff;
}
.rs-product-detail-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 10px 0 0;
  line-height: 1.3;
}
.rs-product-detail-divider {
  height: 1px;
  background: #e8e8e8;
  margin: 20px 0;
}
.rs-product-detail-tab-label {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--rs-theme-blue);
  display: inline-block;
}
.rs-product-related-title {
  font-size: 22px;
  font-weight: 700;
}

@media (max-width: 768px) {
  .rs-product-detail-title {
    font-size: 22px;
  }
  .product-detail-main-swiper .rs-product-detail-thumb img {
    max-height: 300px;
  }
}

/* =========產品頁 orange → blue 覆寫========== */

.sidebar-widget::before {
  content: '';
  background: var(--rs-theme-blue);
}
/* 產品卡片標題 hover */
.rs-shop-area .rs-product-title:hover,
.rs-product-related .rs-product-title:hover {
  color: var(--rs-theme-blue);
}

/* 產品卡片底部 Add-to-Cart 按鈕 hover（安全覆寫） */
.rs-shop-area .rs-product-btn .rs-btn:hover {
  background: var(--rs-theme-blue);
}

/* 返回列表 / 輪廓透明按鈕 hover 邊框 */
.rs-shop-area .rs-btn.has-bg-transparent:hover {
  border-color: var(--rs-theme-blue);
}

/* 縮圖排序選單 hover（sidebar nice-select） */
.rs-shop-area .rs-shorting-select .nice-select .list .option:hover {
  color: var(--rs-theme-blue);
}

.common-pagination ul li .current,
.common-pagination ul li:hover {
  color: var(--rs-theme-blue);
}

/* ======== 首頁跑馬燈無縫循環 ======== */
.kcf-infinite-marquee {
  overflow: hidden;
  width: 100%;
}

.kcf-infinite-marquee .rs-text-slide-inner {
  will-change: transform;
}

/* 跑馬燈標題改為實心字（覆蓋 main.css 的空心線條樣式） */
.rs-text-slide-one .rs-text-slide-title {
  -webkit-text-fill-color: var(--rs-white);
  -webkit-text-stroke-width: 0;
  color: var(--rs-white);
}

/* ======== Footer 連結 hover → 藍色 ======== */

/* Useful Links 箭頭icon 與文字 hover */
.rs-footer-widget-links.has-theme-blue ul li a::before {
  color: var(--rs-theme-blue);
}
.rs-footer-widget-links.has-theme-blue ul li a:hover {
  color: var(--rs-theme-blue);
}

/* 地址、信箱、電話 hover */
.rs-footer-two .rs-footer-widget-address a:hover,
.rs-footer-two .rs-footer-widget-email a:hover,
.rs-footer-two .rs-footer-widget-number span a:hover {
  color: var(--rs-theme-blue);
}

/* 社群 icon hover */
.rs-theme-social.has-theme-blue a:hover {
  background: var(--rs-theme-blue);
  border-color: var(--rs-theme-blue);
  color: var(--rs-white);
}

/* ======== 鐵材重量計算頁 ======== */
.rs-weight-calc-note {
  background: #f0f7ff;
  border-left: 4px solid var(--rs-theme-blue);
  padding: 12px 18px;
  border-radius: 4px;
  color: #555;
  font-size: 14px;
  margin-bottom: 28px;
  line-height: 1.7;
}

.rs-weight-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.rs-weight-type-tabs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 22px;
  border: 2px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #555;
  transition:
    border-color 0.2s,
    color 0.2s,
    background 0.2s;
  user-select: none;
}

.rs-tab-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: #e74c3c;
  color: #fff;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.rs-weight-type-tabs li.active .rs-tab-badge {
  background: rgba(255, 255, 255, 0.9);
  color: var(--rs-theme-blue, #1a3a5c);
}

.rs-weight-type-tabs li:hover {
  border-color: var(--rs-theme-blue);
  color: var(--rs-theme-blue);
}

.rs-weight-type-tabs li.active {
  background: var(--rs-theme-blue);
  border-color: var(--rs-theme-blue);
  color: #fff;
}

.rs-weight-formula {
  background: #f8f9fa;
  border: 1px solid #e2e2e2;
  border-radius: 6px;
  padding: 10px 16px;
  font-size: 14px;
  color: #555;
  margin-bottom: 16px;
}

.rs-weight-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rs-weight-table th {
  background: var(--rs-theme-blue);
  color: #fff;
  padding: 10px 12px;
  text-align: center;
  white-space: nowrap;
  font-weight: 600;
}

.rs-weight-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
  text-align: center;
  vertical-align: middle;
}

.rs-weight-table tbody tr:hover {
  background: #f5f9ff;
}

.rs-weight-table tfoot td {
  padding: 10px 12px;
  border-top: 2px solid var(--rs-theme-blue);
  background: #f0f7ff;
  font-weight: 700;
}

.rs-weight-input {
  width: 100%;
  min-width: 68px;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 6px;
  font-size: 14px;
  text-align: center;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.rs-weight-input:focus {
  border-color: var(--rs-theme-blue);
}

.rs-weight-input::-webkit-outer-spin-button,
.rs-weight-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.rs-weight-input[type='number'] {
  -moz-appearance: textfield;
}

.rs-weight-cell {
  color: #333;
  font-weight: 500;
  white-space: nowrap;
}

.rs-weight-subtotal {
  color: var(--rs-theme-blue);
  font-weight: 700;
}

.rs-weight-total {
  font-size: 17px;
  font-weight: 700;
  color: var(--rs-theme-blue);
  white-space: nowrap;
}

.rs-weight-add-btn {
  display: inline-block;
  margin-top: 16px;
  background: var(--rs-theme-blue);
  color: #fff;
  border: none;
  padding: 9px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: filter 0.2s;
}

.rs-weight-add-btn:hover {
  filter: brightness(115%);
}

.rs-weight-table td:has(.rs-weight-calc-btn),
.rs-weight-table td:has(.rs-weight-del-btn) {
  width: 1%;
  white-space: nowrap;
}

.rs-weight-calc-btn {
  background: #2d6cdf;
  border: none;
  color: #fff;
  padding: 4px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  white-space: nowrap;
  transition: background 0.2s;
}

.rs-weight-calc-btn:hover {
  background: #1a55c4;
}

.rs-weight-del-btn {
  background: #fff;
  border: 1px solid #e0e0e0;
  color: #aaa;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
  padding: 0;
}

.rs-weight-del-btn:hover {
  background: #ff4d4f;
  border-color: #ff4d4f;
  color: #fff;
}

@media (max-width: 768px) {
  .rs-weight-type-tabs li {
    padding: 6px 14px;
    font-size: 13px;
  }
  .rs-weight-input {
    min-width: 52px;
    font-size: 13px;
    padding: 5px 4px;
  }
  .rs-weight-table th,
  .rs-weight-table td {
    padding: 6px 6px;
    font-size: 13px;
  }
}

.rs-weight-contact-wrap {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px dashed #d0d0d0;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.rs-weight-contact-tip {
  color: #888;
  font-size: 13px;
  margin: 0;
}

/* ======== 聯絡頁 - 重量詢價清單渲染區塊 ======== */
.rs-weight-inquiry-block {
  background: #f0f7ff;
  border: 1px solid #c8e0f8;
  border-radius: 8px;
  padding: 20px 20px 16px;
}

.rs-weight-inquiry-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--rs-theme-blue);
  margin-bottom: 14px;
}

.rs-weight-inquiry-header svg {
  flex-shrink: 0;
}

/* ── 詢問清單浮動面板 ── */
.rs-inquiry-panel {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 272px;
  max-height: 72vh;
  background: #fff;
  border-radius: 12px 0 0 12px;
  box-shadow: -3px 0 24px rgba(0, 0, 0, 0.13);
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.rs-inquiry-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  background: #1a3a5c;
  color: #fff;
  flex-shrink: 0;
}

.rs-inquiry-panel-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.rs-inquiry-badge {
  background: #e74c3c;
  color: #fff;
  border-radius: 50%;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  padding: 0 4px;
}

.rs-inquiry-panel-body {
  flex: 1 1 0;
  min-height: 100px;
  overflow-y: auto;
  padding: 10px 14px;
}

.rs-inquiry-panel-body::-webkit-scrollbar {
  width: 4px;
}
.rs-inquiry-panel-body::-webkit-scrollbar-track {
  background: transparent;
}
.rs-inquiry-panel-body::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 2px;
}

.rs-inquiry-empty {
  color: #aaa;
  font-size: 13px;
  text-align: center;
  line-height: 1.7;
  margin: 18px 0;
}

.rs-inquiry-empty small {
  font-size: 12px;
}

.rs-inquiry-item {
  border-bottom: 1px solid #f0f0f0;
  padding: 10px 0;
}

.rs-inquiry-item:last-child {
  border-bottom: none;
}

.rs-inquiry-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3px;
}

.rs-inquiry-item-type {
  font-size: 11px;
  font-weight: 700;
  color: var(--rs-theme-blue, #1a3a5c);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.rs-inquiry-item-del {
  background: none;
  border: none;
  color: #bbb;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.15s;
}

.rs-inquiry-item-del:hover {
  color: #e74c3c;
}

.rs-inquiry-item-desc {
  font-size: 12px;
  color: #444;
  line-height: 1.5;
}

.rs-inquiry-item-meta {
  font-size: 11px;
  color: #888;
  margin-top: 3px;
}

.rs-inquiry-item-subtotal {
  font-size: 13px;
  font-weight: 700;
  color: #222;
  text-align: right;
  margin-top: 4px;
}

.rs-inquiry-panel-footer {
  border-top: 1px solid #eee;
  padding: 12px 14px;
  flex-shrink: 0;
  background: #f8fafc;
}

.rs-inquiry-total-row {
  font-size: 13px;
  color: #555;
  text-align: right;
  margin-bottom: 10px;
}

.rs-inquiry-total-row strong {
  font-size: 15px;
  color: #1a3a5c;
}

#inquiry_contact_btn {
  width: 100%;
  justify-content: center;
  font-size: 13px;
  padding: 9px 12px;
}

#inquiry_contact_btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 991px) {
  .rs-inquiry-panel {
    position: fixed;
    right: 0;
    left: 0;
    bottom: 0;
    top: auto;
    transform: none;
    width: 100%;
    max-height: 52vh;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -3px 20px rgba(0, 0, 0, 0.13);
  }
}

/* ── (舊) 詢問清單表格（備用） ── */
.rs-weight-inquiry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}

.rs-weight-inquiry-table th {
  background: var(--rs-theme-blue);
  color: #fff;
  padding: 8px 12px;
  text-align: center;
  white-space: nowrap;
  font-weight: 600;
}

.rs-weight-inquiry-table td {
  padding: 7px 12px;
  border-bottom: 1px solid #e8f2fd;
  text-align: center;
  color: #333;
}

.rs-weight-inquiry-table tbody tr:last-child td {
  border-bottom: none;
}

.rs-weight-inquiry-table tbody tr:hover {
  background: #f5f9ff;
}

.rs-weight-inquiry-table tfoot td {
  padding: 8px 12px;
  border-top: 2px solid var(--rs-theme-blue);
  background: #e8f2fd;
  color: var(--rs-theme-blue);
  font-weight: 700;
}

@media (max-width: 576px) {
  .rs-weight-inquiry-table th,
  .rs-weight-inquiry-table td {
    padding: 6px 8px;
    font-size: 13px;
  }
}
