:root {
  /* 排版 */
  --font-family-base: "Noto Sans TC", sans-serif;
  --font-family-en: "Inter", sans-serif;
  /* 英文標題使用 Inter，否則使用預設 */

  --font-size-h1: 3.5rem;
  /* 56px */
  --font-size-h2: 2.5rem;
  /* 40px */
  --font-size-h3: 2.125rem;
  /* 34px - New intermediate size */
  --font-size-h4: 1.75rem;
  /* 28px - Was h3 */
  --font-size-h5: 1.25rem;
  /* 20px - Was h4 */
  --font-size-h6: 1.5rem;
  /* 24px - 18pt */
  --font-size-body: 1rem;
  /* 16px */
  --font-size-small: 0.875rem;
  /* 14px */

  --line-height-tight: 1.2;
  --line-height-normal: 1.6;
  --line-height-loose: 1.8;

  /* 間距 */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 60px;
  --spacing-xxl: 100px;

  /* 佈局 */
  --container-max-width: 1280px;
  --content-max-width: var(--container-max-width);
  --header-height: 60px;
  /* Standardize with header.css */

  /* === Shop hero buffer === */
  /* design_c 有頂部 header（60px）+ 預設 buffer 56px → 116px 上 padding 合理；
     手機版同樣保 32px 為 SKILL canonical 預設 */
  --shop-hero-top-buffer: 56px;
  --shop-hero-top-buffer-mobile: 32px;
  --shop-hero-bottom-buffer: 48px;

  /* 圓角 - 全網站使用直角設計 (sharp-edge project — 整組設 0) */
  --radius-xs: 0;
  --radius-sm: 0;
  --radius-md: 0;
  --radius-lg: 0;
  --radius-pill: 9999px;
  --radius-circle: 50%;

  /* 轉場效果 */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* === 對齊 SKILL.md css-variables.md 的 canonical token 集 === */

  /* 間距補 xxs / Spacing — 4px 給細節間距 */
  --spacing-xxs: 4px;

  /* 字級 canonical 別名 / Font size canonical aliases */
  --font-size-xs: 0.75rem;
  --font-size-sm: var(--font-size-small);
  --font-size-lg: 1.05rem;

  /* 陰影 / Shadow */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-overlay: -4px 0 20px rgba(0, 0, 0, 0.1);

  /* 層級 / Z-index */
  --z-header: 1000;
  --z-dropdown: 1010;
  --z-cart-overlay: 1100;
  --z-cart-sidebar: 1101;
  --z-modal-overlay: 1200;
  --z-modal: 1201;
  --z-toast: 1300;
}

/* 基礎樣式 */
/* 全站 P 標籤統一規範 */
p {
  font-size: var(--font-size-body);
  line-height: var(--line-height-loose);
  /* 根據觀察通常使用較寬鬆行高 reading experience */
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--color-bg-body);
  color: var(--color-text-primary);
  line-height: var(--line-height-normal);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family-en), var(--font-family-base);
  font-weight: 700;
  line-height: var(--line-height-tight);
  margin-bottom: var(--spacing-sm);
}

h1 {
  font-size: var(--font-size-h1);
}

h2 {
  font-size: var(--font-size-h2);
}

h3 {
  font-size: var(--font-size-h3);
}

h4 {
  font-size: var(--font-size-h4);
}

h5 {
  font-size: var(--font-size-h5);
}

h6 {
  font-size: var(--font-size-h6);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-normal);
}

@media (hover: hover) {
  a:hover {
    color: var(--color-primary);
  }
}

.for_m {
  display: none !important;
}

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

  .for_m {
    display: block !important;
  }
}

/* 佈局工具類 */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  box-sizing: border-box;
}

.wrapper {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  position: relative;
  box-sizing: border-box;
  /* 修復浮動或絕對定位問題 */
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
}

.page-item {
  display: flex;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  color: var(--color-text-primary);
  transition: var(--transition-normal);
}

.page-item.active .page-link {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-white);
}

.page-item.disabled .page-link,
.page-item.disabled .page-link:hover,
.page-link.disabled,
.page-link.disabled:hover {
  opacity: 0.45;
  pointer-events: none;
  color: var(--color-text-light);
  border-color: var(--color-border);
  background: var(--color-bg-white);
}

/* 按鈕樣式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 200px;
  height: 54px;
  padding: 0 20px;
  font-size: var(--font-size-body);
  font-weight: 500;
  border-radius: 0;
  /* 藥丸形狀 */
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-normal);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-sizing: border-box;
}

/* 按鈕變體 */
.btn-style-1 {
  background-color: transparent;
  color: var(--color-text-white);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  border: 1px solid var(--color-bg-white);
  /* 確保邊框存在 */
}

@media (hover: hover) {
  .btn-style-1:hover {
    background-color: var(--color-bg-white);
    color: var(--color-primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border-color: var(--color-bg-white);
  }
}

.btn-style-1:active {
  transform: translateY(1px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.btn-style-2,
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-text-white);
  border: 1px solid var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

@media (hover: hover) {

  .btn-style-2:hover,
  .btn-primary:hover {
    background-color: var(--color-cider-pear);
    color: var(--color-text-white);
    border-color: var(--color-cider-pear);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  }
}

.btn-outline {
  background-color: transparent;
  border-color: var(--color-text-white);
  color: var(--color-text-white);
}

@media (hover: hover) {
  .btn-outline:hover {
    background-color: var(--color-text-white);
    color: var(--color-primary);
  }
}

/* ==============================================
   購物車 / 會員相關頁面 - 共用按鈕樣式
   適用：login, checkout, order_detail, order_success, order_failed,
         atm_payment, account_orders
   ============================================== */

/* 按鈕基底 */
.shop_btn {
  display: inline-block;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-align: center;
  border-radius: 0;
  cursor: pointer;
  line-height: 1.5;
  box-sizing: border-box;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

/* 綠底白字 → hover 深綠 */
.shop_btn_solid {
  background: var(--color-primary);
  color: var(--color-text-white);
  border: 1.5px solid var(--color-primary);
}

@media (hover: hover) {
  .shop_btn_solid:hover {
    background: var(--color-cider-pear);
    color: var(--color-text-white);
    border-color: var(--color-cider-pear);
  }
}

/* 透明底綠字綠邊 → hover 變白底 */
.shop_btn_outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

@media (hover: hover) {
  .shop_btn_outline:hover {
    background: var(--color-bg-white);
    color: var(--color-primary);
    border-color: var(--color-primary);
  }
}

/* 米底灰邊 → hover 加深 */
.shop_btn_ghost {
  background: var(--color-bg-warm-3);
  color: var(--color-text-primary);
  border: 1.5px solid var(--color-moonshine);
}

@media (hover: hover) {
  .shop_btn_ghost:hover {
    background: var(--color-bg-tint-2);
    border-color: var(--color-border-tint);
    color: var(--color-text-primary);
  }
}

/* ==============================================
   麵包屑共用樣式
   適用：account_settings, account_addresses, order_detail, refund
   ============================================== */

.shop_breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: var(--spacing-md);
}

.shop_breadcrumb a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}

@media (hover: hover) {
  .shop_breadcrumb a:hover {
    color: var(--color-primary);
  }
}

.shop_breadcrumb_current {
  color: var(--color-primary);
  font-weight: 500;
}

/* ==============================================
   頁面標題共用樣式
   適用：account_settings, account_addresses, refund 等
   ============================================== */

.shop_page_title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-lg);
}

@media (max-width: 768px) {
  .shop_page_title {
    font-size: 1.4rem;
  }
}

/* ==============================================
   訂單卡片共用樣式
   適用：account, account_orders
   ============================================== */

/* 訂單列表 */
.shop_order_list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 訂單卡片 */
.shop_order_card {
  display: block;
  background: var(--color-bg-white);
  border: 1px solid rgba(var(--color-primary-rgb), 0.25);
  text-decoration: none;
  transition: box-shadow 0.2s ease;
}

@media (hover: hover) {
  .shop_order_card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }
}

/* 卡片 header */
.shop_order_card_header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: transparent;
  border-bottom: 1px solid #eee;
}

.shop_order_card_info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shop_order_number {
  font-weight: 400;
  font-size: 0.8rem;
  color: #555;
  font-family: var(--font-family-en), var(--font-family-base);
  font-variant-numeric: tabular-nums;
}

.shop_order_date {
  font-size: 0.95rem;
  color: #555;
  font-family: var(--font-family-en), var(--font-family-base);
  font-variant-numeric: tabular-nums;
}

/* 狀態徽章 */
.shop_order_badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  background: transparent;
}

.shop_order_badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.shop_order_badge_pending,
.shop_order_badge_confirming {
  color: var(--color-warning);
}

.shop_order_badge_processing {
  color: var(--color-primary);
}

.shop_order_badge_packing,
.shop_order_badge_shipped,
.shop_order_badge_delivered {
  color: var(--color-success);
}

.shop_order_badge_completed,
.shop_order_badge_cancelled {
  color: var(--color-grey-600);
}

/* 卡片 body */
.shop_order_card_body {
  padding: 14px 20px;
}

.shop_order_thumbs {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.shop_order_thumb {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-grey-100);
  border: 1px solid var(--color-grey-200);
  flex-shrink: 0;
}

.shop_order_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop_order_thumb_more {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-md);
  background: var(--color-grey-100);
  border: 1px solid var(--color-grey-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #666;
  font-weight: 600;
  flex-shrink: 0;
}

.shop_order_item {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* 卡片 footer */
.shop_order_card_footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid #eee;
  margin: 0 20px;
  padding: 14px 0;
}

.shop_order_total {
  font-size: 0.95rem;
  color: #555;
}

.shop_order_total span {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text-primary);
  font-family: var(--font-family-en), var(--font-family-base);
  font-variant-numeric: tabular-nums;
}

.shop_order_payment_method {
  font-size: 0.82rem;
  color: #666;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shop_order_actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 訂單卡片 RWD */
@media (max-width: 768px) {
  .shop_order_card_header {
    padding: 14px 16px;
  }

  .shop_order_card_info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .shop_order_card_body {
    padding: 12px 16px;
  }

  .shop_order_card_footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin: 0 16px;
    padding: 14px 0;
  }

  /* 手機版訂單卡按鈕：靠右對齊，務顆按鈕同寬（寬度以 3-button 卡為基準）。 */
  .shop_order_actions {
    width: 100%;
    justify-content: flex-end;
    gap: 10px;
  }

  .account .shop_order_actions .shop_btn,
  .account_orders .shop_order_actions .shop_btn,
  .shop_order_actions .shop_btn {
    flex: 0 0 auto;
    /* 寬度 = (容器 - 2 個 gap) / 3，三顆填滿，兩顆 / 一顆同寬靠右留空 */
    width: calc((100% - 20px) / 3);
    min-width: 0;
    text-align: center;
    padding: 8px 6px;
    font-size: 0.78rem;
    letter-spacing: 0;
    white-space: nowrap;
    box-sizing: border-box;
  }
}

/* ==============================================
   自訂下拉選單共用樣式
   適用：checkout, account_addresses 等
   ============================================== */

.shop_dropdown {
  position: relative;
  width: 100%;
}

.shop_dropdown_toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  font-size: 0.93rem;
  font-family: inherit;
  color: var(--color-text-primary);
  background: var(--color-bg-white);
  border: 1.5px solid #ddd;
  border-radius: 0;
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.shop_dropdown_toggle i {
  font-size: 0.75rem;
  color: #666;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.shop_dropdown.is-open .shop_dropdown_toggle {
  border-color: var(--color-primary);
}

.shop_dropdown.is-open .shop_dropdown_toggle i {
  transform: rotate(180deg);
}

.shop_dropdown_text {
  color: #666;
}

.shop_dropdown_text.is-selected {
  color: var(--color-text-primary);
}

.shop_dropdown_menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  background: var(--color-bg-white);
  border: 1.5px solid #ddd;
  border-top: none;
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.shop_dropdown.is-open .shop_dropdown_menu {
  display: block;
}

.shop_dropdown_menu li {
  padding: 10px 12px;
  font-size: 0.93rem;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background 0.15s;
}

@media (hover: hover) {
  .shop_dropdown_toggle:hover {
    border-color: #666;
  }

  .shop_dropdown_menu li:hover {
    background: rgba(var(--color-primary-rgb), 0.06);
  }
}

.shop_dropdown_menu li.is-active {
  color: var(--color-primary);
}

/* Disabled state（例：鄉鎮在未選縣市前不可點） */
.shop_dropdown.is-disabled .shop_dropdown_toggle {
  background: rgba(var(--color-primary-rgb), 0.06);
  border-color: rgba(var(--color-primary-rgb), 0.18);
  color: var(--color-grey-500);
  cursor: not-allowed;
}

.shop_dropdown.is-disabled .shop_dropdown_toggle i {
  opacity: 0.4;
}

.shop_dropdown.is-disabled .shop_dropdown_text {
  color: #aaa;
}

/* 工具類別 */
.is-hidden {
  display: none;
}

/* 區塊標準樣式 */
section {
  padding: var(--spacing-xxl) 0;
  position: relative;
}

/* 手機版區塊間距統一設定 */
@media (max-width: 768px) {
  section {
    padding: var(--spacing-xl) 0;
  }
}

/* 排版輔助類 */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--color-primary);
}

.text-white {
  color: var(--color-text-white);
}

/* 標準標題樣式 (以首頁服務項目為準) */
.section_header {
  margin-bottom: var(--spacing-xl);
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section_title-en {
  display: block;
  font-family: var(--font-family-en);
  font-size: var(--font-size-h5);
  /* Updated to 20px (h5) */
  letter-spacing: 0.2em;
  color: var(--color-secondary);
  /* 靜月色 var(--color-moonshine) */
  text-transform: uppercase;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section_title-zh {
  font-size: var(--font-size-h2);
  color: var(--color-text-primary);
  /* 碳黑色 var(--color-carbon) */
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  letter-spacing: 0.05em;
  /* white-space: nowrap; */
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .section_title-zh {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

.section_desc {
  max-width: 100%;
  margin: 0 auto;
  color: var(--color-text-secondary);
  /* 主色（隨色系切換） */
  font-size: var(--font-size-h5);
  /* Updated to 20px */
  line-height: var(--line-height-loose);
  text-align: center;
  /* Desktop: 2 lines */
  /* display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden; */
}

@media (max-width: 768px) {
  .section_desc {
    /* Mobile: 3 lines */
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
}

/* 卡片標題樣式 */
.card_title {
  font-size: var(--font-size-h2);
  color: var(--color-text-primary);
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  line-height: var(--line-height-tight);
}

/* 全局圖片和元素直角設定 */
img {
  border-radius: 0;
}

.card,
.service_card,
.news_card,
.product_card,
.partner_card,
.value_card,
.stat_card {
  border-radius: 0;
}

/* 回到頂部按鈕 */
.btn_top {
  position: fixed;
  bottom: 90px;
  /* 讓出最下方位置給色系切換懸浮鈕 */
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
  border-radius: 0;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: none;
}

.btn_top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn_top:hover {
  background-color: var(--color-cider-pear);
  color: var(--color-text-white);
  border-color: var(--color-cider-pear);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

/* 手機版選單打開時隱藏 top 按鈕 */
body.menu-open .btn_top {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* ==============================================
   Floating Chat Widget
   ============================================== */
.chat_widget {
  position: fixed;
  bottom: 150px;
  /* Above btn_top */
  right: 30px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.chat_toggle {
  width: 50px;
  height: 50px;
  background-color: transparent;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
  border-radius: 0;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: none;
  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);
  background-color: var(--color-accent);
  color: var(--color-text-white);
  border-color: var(--color-accent);
}

/* Expanded State */
.chat_widget.active .chat_toggle {
  background-color: var(--color-accent);
  color: var(--color-text-white);
  border-color: var(--color-accent);
  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;
}

/* Options */
.chat_options {
  display: flex;
  flex-direction: column-reverse;
  gap: 15px;
  padding-bottom: 10px;
}

.chat_option {
  width: 50px;
  height: 50px;
  background-color: var(--color-bg-white);
  border: 2px solid var(--color-secondary);
  border-radius: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--color-secondary);
  box-shadow: none;
  text-decoration: none;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s ease;
}

.chat_option:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-white);
}

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

/* Staggered Animation Delay */
.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) {
  .btn_top {
    bottom: 75px;
    right: 20px;
    width: 45px;
    height: 45px;
  }

  .chat_widget {
    bottom: 130px;
    /* 75 (btn_top bottom) + 45 (btn_top height) + 10 (gap) */
    right: 20px;
  }

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

/* Hide chat widget when mobile menu is open */
body.menu-open .chat_widget {
  display: none !important;
}

/* 內頁 Hero 通用樣式 (Inner Page Hero) */
.hero_section.inner_page {
  height: 70vh;
  min-height: 600px;
  position: relative;
  overflow: hidden;
  padding: 0;
}

.hero_section.inner_page .hero_full_wrap {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero_section.inner_page .hero_full_bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero_section.inner_page .hero_main_img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero_section.inner_page .hero_overlay_dim {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.3),
      rgba(0, 0, 0, 0.6));
  z-index: 2;
}

.hero_section.inner_page .hero_floating_content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* 左對齊 */
  width: calc(100% - 40px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 0 30px;
}

.hero_section.inner_page .hero_text_box {
  max-width: 800px;
  text-align: left;
  align-items: flex-start;
  justify-content: center;
  display: flex;
  flex-direction: column;
  margin-left: 0;
  /* 修正對齊：移除額外的 margin */
}

.hero_section.inner_page .hero_h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--color-text-white);
  margin-bottom: var(--spacing-md);
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  /* Fixed to 2 lines on desktop */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero_section.inner_page .hero_para {
  font-size: 1.125rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
  margin-left: 0;
  /* Fixed to 2 lines on desktop */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 內頁大標題樣式 - 底部左側 */
.hero_section.inner_page .hero_bottom_label {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: 1200px;
  z-index: 5;
  text-align: left;
  pointer-events: none;
  overflow: visible;
  /* 修正裁切：改為 visible */
  line-height: 0.75;
  padding-left: 30px;
}

.hero_section.inner_page .hero_big_brand {
  display: block;
  font-family: var(--font-family-en);
  font-size: clamp(36px, 9vw, 96px);
  font-weight: 800;
  /* 大標靠 translateY 溢出到 hero 圖下方的頁底上，色值必須等於頁底色：
     疊在照片上時看得見，溢出的部分融進背景。原本寫死白色，
     只有頁底是白色時才成立，換色票就會在頁底露出白色下半截。 */
  color: var(--color-bg-page);
  letter-spacing: -0.02em;
  white-space: nowrap;
  transform: translateY(12%);
  opacity: 1;
}

@media (max-width: 768px) {
  .hero_section.inner_page .hero_text_box {
    margin-left: 0;
    padding: 0 var(--spacing-md);
  }

  .hero_section.inner_page .hero_bottom_label {
    padding-left: var(--spacing-md);
  }

  .hero_section.inner_page .hero_h1 {
    font-size: 2.5rem;
  }
}

/* 卡片標題樣式 */
/* 卡片標題一 - 用於產品介紹等大標題 */
.card_title_1,
.card_title_1 h1,
.card_title_1 h2,
.card_title_1 h3 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.3;
}

.card_title_1 p {
  font-size: var(--font-size-body);
  /* 16px */
  font-weight: 400;
  color: var(--color-text-secondary);
}

/* 卡片標題二 - 用於服務項目等中型標題 */
.card_title_2,
.card_title_2 h1,
.card_title_2 h2,
.card_title_2 h3 {
  font-size: var(--font-size-h5);
  /* 20px */
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  color: var(--color-text-primary);
  line-height: 1.4;
}

.card_title_2 p {
  font-size: var(--font-size-body);
  /* 16px */
  font-weight: 400;
  color: var(--color-text-secondary);
}

/* 卡片標題三 - 用於服務項目等中型標題 */
.card_title_3,
.card_title_3 h1,
.card_title_3 h2,
.card_title_3 h3 {
  font-size: var(--font-size-h4);
  /* 28px */
  color: var(--color-carbon);
  margin-bottom: var(--spacing-md);
  font-weight: 700;
  line-height: 1.4;
  /* Fixed 2 lines */
  /* 溢出修正：取消截斷 → display: -webkit-box; */
  /* 溢出修正：取消截斷 → -webkit-line-clamp: 2; */
  /* 溢出修正：取消截斷 → line-clamp: 2; */
  /* 溢出修正：取消截斷 → -webkit-box-orient: vertical; */
  /* 溢出修正：取消截斷 → overflow: hidden; */
}

.card_title_3 p {
  font-size: var(--font-size-body);
  /* 16px */
  font-weight: 400;
  color: var(--color-text-secondary);
  /* Fixed 3 lines */
  /* 溢出修正：取消截斷 → display: -webkit-box; */
  /* 溢出修正：取消截斷 → -webkit-line-clamp: 3; */
  /* 溢出修正：取消截斷 → line-clamp: 3; */
  /* 溢出修正：取消截斷 → -webkit-box-orient: vertical; */
  /* 溢出修正：取消截斷 → overflow: hidden; */
}

/* 卡片標題四 - 用於小型夥伴卡片等 */
.card_title_4 h1,
.card_title_4 h2,
.card_title_4 h3,
.card_title_4 h4,
.card_title_4 h5,
.card_title_4 h6,
h1.card_title_4,
h2.card_title_4,
h3.card_title_4,
h4.card_title_4,
h5.card_title_4,
h6.card_title_4 {
  font-size: 1.125rem;
  /* 18px */
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: var(--spacing-xs);
  height: calc(1.4em * 2);
  /* 固定兩行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card_title_4 p {
  font-size: var(--font-size-body);
  /* 16px */
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text-secondary);
  height: calc(1.6em * 2);
  /* 固定兩行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

/* 專業團隊成員卡片樣式 */
.team_member_card {
  text-align: left;
  /* 全部靠左對齊 */
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* 卡片內容上下置中 */
  gap: 10px !important;
  /* 強制覆蓋 flex gap */
}

.team_member_card .team_name {
  margin-bottom: 0;
  /* 改由 gap 或是統一 margin 處理 */
}

.team_member_card .team_position {
  color: var(--color-primary);
  /* 職稱使用品牌綠色 */
  font-size: var(--font-size-h5);
  /* H5 (20px) */
  font-weight: 600;
  margin-bottom: 0;
  /* 移除額外間距 */
  white-space: nowrap;
  /* 固定一行 */
  overflow: hidden;
  text-overflow: ellipsis;
}

.team_member_card .team_bio {
  font-size: var(--font-size-body);
  /* 16px */
  font-weight: 400;
  /* 移除粗體 */
  color: var(--color-text-secondary);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  /* 等長細線 */
  padding-top: 10px;
  /* 線與文字的間距 */
  margin: 0;
  /* 移除外間距，依靠容器 gap */
  width: fit-content;
  max-width: 100%;
  text-align: left;

  /* 固定五行 */
  line-height: 1.6;
  height: calc(1.6em * 5);
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.partners_slider .slick-track {
  padding: 15px 0;
}

/* 手機版 Hero 通用樣式 */
@media (max-width: 768px) {

  .hero_section,
  .hero_section.inner_page {
    height: 668px;
    min-height: auto;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    content-visibility: auto;
  }

  /* 調整內容垂直位置 */
  .hero_floating_content,
  .hero_section.inner_page .hero_floating_content {
    padding: 0;
    /* 恢復垂直置中，並移除 desktop 的 padding-left */
  }

  .hero_text_box {
    justify-content: center;
  }

  .hero_h1,
  .hero_section.inner_page .hero_h1 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero_para,
  .hero_section.inner_page .hero_para {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* 手機版底部大字置中 */
  .hero_section.inner_page .hero_bottom_label {
    text-align: center;
    padding-left: 0;
    width: 100%;
    left: 0;
    transform: none;
    /* Reset transform */
  }

  /* Center the button on mobile inner pages */
  .hero_section.inner_page .hero_text_box .btn {
    align-self: center;
  }
}

/* ------------------------------------------------------------
   專案合作夥伴輪播 (共通樣式)
------------------------------------------------------------ */
.partners_section {
  background-color: var(--color-bg-white);
  padding: var(--spacing-xxl) 0;
}

@media (max-width: 768px) {
  .partners_section {
    padding: var(--spacing-xl) 0;
  }
}

.partners_slider {
  padding: 10px 0;
}

/* .partners_slider .slick-track {
  display: flex;
  gap: 20px;
} */

.partners_slider .slick-slide {
  margin: 0 10px;
}

.partners_slider .slick-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.partners_slider .slick-dots li {
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
}

.partners_slider .slick-dots li button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #d9d9d9;
  border: none;
  padding: 0;
  font-size: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.partners_slider .slick-dots li.slick-active button {
  background-color: var(--color-primary);
  transform: scale(1.2);
}

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

/* 名稱保留 _link，但已改用 <div>：這區是自動輪播的展示牆，卡片不可點擊
 * （原本掛 href="#" 會讓點擊跳回頁首）。 */
.partner_card_link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* .partner_card {
  width: 230px;
  height: 280px;
} */

/* 合作夥伴卡片不做 hover 效果：這區是自動輪播，滑鼠停在上面時卡片會繼續移動，
 * 浮起／陰影只會跟著位移一起抖動，反而不好看。 */
.partner_card_inner {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: var(--color-bg-white);
  height: 100%;
}

.partner_logo_wrap {
  background-color: transparent;
  width: 100%;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.partner_logo_wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.partner_content {
  padding: 10px 20px 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.partner_content::before {
  content: "";
  display: block;
  height: 1px;
  background-color: rgba(0, 0, 0, 0.1);
  margin: 0 0 15px;
  width: auto;
}

/* 編輯器標題樣式 (Editor Article Header) */
.editor_article_header {
  max-width: 900px;
  margin: 0 auto 40px;
}

.editor_article_header h1 {
  font-size: 48px;
  letter-spacing: 2px;
  margin-bottom: 10px;
  color: #000000;
  font-weight: 700;
  line-height: 1.2;
}

.editor_article_header .article_info {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 20px;
}

.editor_article_header .article_info > div {
  font-size: 14px;
  color: #666666;
  letter-spacing: 1px;
}

/* 單獨的 article_date（products_detail 使用） */
.editor_article_header > .article_date {
  font-size: 14px;
  color: #666666;
  letter-spacing: 1px;
}

/* 產品主圖 (16:9 比例) */
.article_featured_image {
  width: 100%;
  max-width: 900px;
  margin: 20px auto 0;
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid #d0d0d0;
}

.article_featured_image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}

/* 響應式調整 */
@media (max-width: 768px) {
  .article_featured_image {
    padding-bottom: var(--spacing-md);
  }
}

/* ==============================================
   編輯器內頁通用樣式 (Detail Page Common Styles)
   ============================================== */

/* 文章內頁相關報導 */
.related_reports {
  background-color: #ebebeb;
  padding: 40px 15px 30px;
  margin-top: 40px;
}

.related_reports:first-child {
  margin-top: 0;
}

.related_reports h2 {
  text-align: center;
  margin-bottom: 40px;
  color: #000;
  font-family: "Albert Sans", "Noto Sans TC", sans-serif;
}

.related_reports .related_reports_content {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex-wrap: wrap;
  width: 100%;
  padding: 0 15px;
  gap: 20px;
}

.related_reports .related_reports_content::-webkit-scrollbar {
  width: 8px;
}

.related_reports .related_reports_content::-webkit-scrollbar-thumb {
  background-color: #aaaaaa;
  border-radius: 30px;
}

@media (hover: hover) {
  .related_reports .related_reports_content a:hover .img_wrap .img_inner {
    transform: scale(1.1);
  }

  .related_reports .related_reports_content a:hover .txt::after {
    transform: translateX(15px);
  }
}

.related_reports .related_reports_content .item {
  margin-bottom: 3%;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
}

.related_reports .related_reports_content .item .img_wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.related_reports .related_reports_content .item .img_wrap .img_inner {
  background-position: center;
  background-size: 100%;
  background-repeat: no-repeat;
  width: 100%;
  padding-top: calc(200 / 301 * 100%);
  transition: 0.3s;
}

.related_reports .related_reports_content .item .txt {
  background-color: var(--color-bg-white);
  width: 100%;
  padding: 15px 20px;
}

.related_reports .related_reports_content .item .txt h6 {
  width: 100%;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  border: none;
  margin: 0 0 10px;
  padding: 0;
  border-radius: 0;
  color: #333;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0.03em;
  min-height: calc(20px * 1.3 * 2);
}

.related_reports .related_reports_content .item .txt .related_reports_date {
  display: inline-block;
  font-size: 14px;
  color: var(--color-text-light);
  font-weight: 500;
  font-weight: 500;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related_reports .related_reports_content .item .txt .related_reports_word {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 10px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  border-top: solid 1px #333;
  min-height: calc(16px * 1.6 * 2 + 10px);
}

.related_reports .related_reports_content .item .txt .btn-secondary {
  color: #333;
  background-color: transparent;
  margin: 20px auto 0;
  width: 100%;
  text-align: center;
  box-shadow: none;
  transition: 0.3s;
  display: block;
  border: solid 1px #333;
  padding: 5px;
}

@media (hover: hover) {
  .related_reports .related_reports_content .item .txt .btn-secondary:hover {
    color: var(--color-text-white);
    border-color: var(--color-primary);
    background-color: var(--color-primary);
  }
}

@media (max-width: 768px) {
  .related_reports .related_reports_content {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    max-width: 500px;
    margin: 0 auto;
  }

  .related_reports .related_reports_content .item .txt h6 {
    min-height: auto;
  }

  .related_reports .related_reports_content .item .txt .related_reports_word {
    min-height: auto;
  }
}

/* 編輯器內頁導航按鈕 */
/* 編輯器內頁導航按鈕 */
.editor_nav_btns {
  width: 100%;
  margin: 60px auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  border-top: 1px solid #d0d0d0;
  padding-top: var(--spacing-lg);
}

.editor_nav_btns .btn {
  width: 100%;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .editor_nav_btns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .editor_nav_btns {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin-top: 40px;
  }

  .editor_nav_btns .btn {
    width: 100%;
  }
}

.detail .content {
  background-color: var(--color-bg-white);
  padding-bottom: 0;
}

.detail .content #editor {
  max-width: 900px;
  margin: 0 auto;
}

/* 加入購物車：商品飛入動畫（拋物線由 JS WAAPI 控制） */
.fly_to_cart {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  will-change: transform, opacity;
}

/* ==============================================
   會員中心版型（共用於 account / account_orders / account_settings）
   ============================================== */

/* 2 欄版型：左側 sticky 卡片 + 右側主內容 */
.ac_layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.ac_sidebar {
  position: sticky;
  top: 96px;
}

.ac_sidebar_card {
  background: var(--color-bg-white);
  border: 1px solid rgba(var(--color-primary-rgb), 0.15);
  padding: 24px 20px;
}

.ac_main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0; /* grid item 預設 min-width: auto，會被 nowrap 子內容撐開超欄，需明確設 0 */
  max-width: 100%;
}

/* 會員資訊卡 */
.ac_profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.12);
  text-align: center;
}

.ac_profile_top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ac_avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ac_avatar i {
  font-size: 1.5rem;
  color: var(--color-text-white);
}

.ac_name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 2px;
}

.ac_member_id {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ac_member_id_label {
  font-size: 0.7rem;
  color: #999;
  letter-spacing: 0.05em;
}

.ac_member_id_value {
  font-size: 0.82rem;
  color: var(--color-text-primary);
  font-family: var(--font-family-en), var(--font-family-base);
  word-break: break-all;
}

/* 側邊卡片內的快速連結改為垂直排列 */
.ac_sidebar_card .ac_quick_links {
  flex-direction: column;
  gap: 2px;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
  overflow-x: visible;
}

.ac_sidebar_card .ac_quick_link {
  display: flex;
  padding: 10px 12px;
  width: 100%;
}

.ac_sidebar_card .ac_quick_link.is_current {
  background: rgba(var(--color-primary-rgb), 0.06);
}

.ac_sidebar_card .ac_quick_link.is_current::after {
  display: none;
}

@media (max-width: 1024px) {
  .ac_layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .ac_sidebar {
    position: static;
    top: auto;
  }
}

@media (max-width: 768px) {
  .ac_sidebar_card .ac_quick_links {
    flex-direction: column;
    flex-wrap: nowrap;
    overflow-x: visible;
    width: 100%;
    max-width: 100%;
  }

  .ac_sidebar_card .ac_quick_link {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}

/* ==============================================
   會員中心快速連結（共用於 account / account_orders / order_detail）
   ============================================== */
.ac_quick_links {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(var(--color-primary-rgb), 0.25);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.ac_quick_links::-webkit-scrollbar {
  display: none;
}

.ac_quick_link {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 48px 6px 0;
  background: transparent;
  border: none;
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}

.ac_quick_link i {
  font-size: 0.95rem;
  color: #666;
  transition: color 0.2s;
}

.ac_quick_link span {
  font-size: 0.95rem;
  font-weight: 600;
  color: #666;
  transition: color 0.2s;
}

.ac_quick_link.is_current i {
  color: var(--color-primary);
}

.ac_quick_link.is_current span {
  color: var(--color-primary);
  font-weight: 700;
}

.ac_quick_link.is_current::after {
  content: '';
  position: absolute;
  left: 0;
  right: 48px;
  bottom: -17px;
  height: 2px;
  background: var(--color-primary);
}

@media (hover: hover) {
  .ac_quick_link:hover span,
  .ac_quick_link:hover i {
    color: var(--color-primary);
  }
}

/* ==============================================
   產品介紹卡片樣式
   ============================================== */
.product_card {
  background: var(--color-bg-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

a.product_card {
  text-decoration-line: none;
  color: inherit;
}

.product_card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform: translateY(-5px);
}

.product_card_image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--color-bg-white);
}

.product_card_image {
  position: relative;
}

.product_card_image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.product_card:hover .product_card_image img {
  transform: scale(1.05);
}

/* Hover 加入購物車按鈕 */
.btn_card_cart {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 0;
  background-color: rgba(0, 0, 0, 0.75);
  color: var(--color-text-white);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-family-base);
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
  text-align: center;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.3s ease;
  z-index: 2;
}

.product_card:hover .btn_card_cart {
  opacity: 1;
  transform: translateY(0);
}

.btn_card_cart:hover {
  background-color: var(--color-primary);
}

.product_card_content {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Responsive adjustment for card content padding */
@media (max-width: 576px) {
  .product_card_content {
    padding: var(--spacing-md);
  }
}

.product_card_title {
  font-family: var(--font-family-zh);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  /* 固定 2 行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product_card_desc {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 12px;
  flex-shrink: 0;
  /* 固定 2 行 + 省略號 */
  /* 溢出修正：取消截斷 → display: -webkit-box; */
  /* 溢出修正：取消截斷 → -webkit-line-clamp: 2; */
  /* 溢出修正：取消截斷 → line-clamp: 2; */
  /* 溢出修正：取消截斷 → -webkit-box-orient: vertical; */
  /* 溢出修正：取消截斷 → overflow: hidden; */
  min-height: calc(0.85rem * 1.6 * 2);
}

/* 價格 wrapper：原價在上（小灰劃線）+ 現價在下（大主色），固定兩列避免 6 位數價格在窄卡內 wrap 不一致 */
.product_card_price_wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-top: auto;
  padding-top: var(--spacing-xs);
}

.product_card_price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.product_card_price_old {
  font-size: 0.85rem;
  font-weight: 400;
  color: #999;
  text-decoration: line-through;
  line-height: 1.2;
}

.product_card .btn {
  align-self: center;
  /* Center the button */
}

/* 產品卡片按鈕樣式 */
.btn.product_btn {
  border-color: var(--color-moonshine);
  color: var(--color-moonshine);
}

@media (hover: hover) {
  .btn.product_btn:hover {
    background-color: var(--color-moonshine);
    color: var(--color-text-primary);
    border-color: var(--color-moonshine);
  }
}

/* Related Reports Full Width Section */
body.products_detail_page,
body.news_detail_page,
body.privacy_page {
  background-color: var(--color-bg-white);
}

.related_reports_section {
  background-color: #ebebeb;
  padding: 80px 0;
  margin-top: 60px;
  width: 100%;
}

.products_detail_page .content,
.news_detail_page .content {
  background-color: transparent;
}

.related_reports h2 {
  text-align: left;
  margin-bottom: 40px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

/* Center alignment for products_detail_page and news_detail_page related reports heading */
.products_detail_page .related_reports h2,
.news_detail_page .related_reports h2 {
  text-align: center;
}

/* news_detail_page: 1 column vertical news items (left text, right image) */
.news_detail_page .related_reports_news_list {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.news_detail_page .related_reports_news_list .news_item {
  background-color: var(--color-ivory);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: row;
  align-items: stretch;
  transition: all var(--transition-normal);
  height: 350px;
  /* Fixed height for identical appearance */
}

@media (hover: hover) {
  .news_detail_page .related_reports_news_list .news_item:hover {
    box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.08);
    border-color: var(--color-primary-light);
  }
}

.news_detail_page .related_reports_news_list .news_item_content {
  flex: 0 0 60%;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.news_detail_page .related_reports_news_list .news_item_content::after {
  content: "";
  position: absolute;
  top: 40px;
  bottom: 40px;
  right: 0;
  width: 1px;
  background-color: rgba(0, 0, 0, 0.1);
}

.news_detail_page .related_reports_news_list .news_item_title {
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.4;
  font-size: var(--font-size-h4);
  /* Match card_title_3 (28px / 1.75rem) */
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Also ensure card_title_3 h3 doesn't add extra margin */
.news_detail_page .related_reports_news_list .news_item_title.card_title_3 {
  margin-bottom: 12px !important;
}

.news_detail_page .related_reports_news_list .news_item_desc {
  font-size: var(--font-size-body);
  color: var(--color-text-secondary);
  line-height: var(--line-height-loose);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* Match news.css */
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  /* Allow to take space */
}

.news_detail_page .related_reports_news_list .news_item_footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news_detail_page .related_reports_news_list .news_item_date {
  font-family: var(--font-family-en);
  font-size: var(--font-size-small);
  color: var(--color-text-light);
  letter-spacing: 0.05em;
}

.news_detail_page .related_reports_news_list .news_item_btn {
  border-color: var(--color-moonshine) !important;
  color: var(--color-moonshine) !important;
}

@media (hover: hover) {
  .news_detail_page .related_reports_news_list .news_item_btn:hover {
    background-color: var(--color-moonshine) !important;
    color: var(--color-text-primary) !important;
    border-color: var(--color-moonshine) !important;
  }
}

.news_detail_page .related_reports_news_list .news_item_image {
  flex: 1;
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 350px;
  overflow: hidden;
}

.news_detail_page .related_reports_news_list .news_item_image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

/* Button hover image scaling effect */
@media (hover: hover) {
  .news_detail_page .related_reports_news_list .news_item:has(.news_item_btn:hover) .news_item_image img {
    transform: scale(1.05);
  }
}

@media (max-width: 900px) {
  .news_detail_page .related_reports_news_list .news_item {
    flex-direction: column;
    height: auto;
    min-height: auto;
  }

  .news_detail_page .related_reports_news_list .news_item_content {
    flex: 1 1 auto;
    padding: var(--spacing-md);
  }

  /* 手機版將垂直線轉為水平線 */
  .news_detail_page .related_reports_news_list .news_item_content::after {
    top: auto;
    bottom: 0;
    left: var(--spacing-md);
    right: var(--spacing-md);
    width: auto;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.1);
  }

  .news_detail_page .related_reports_news_list .news_item_image {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    padding: var(--spacing-md);
  }
}

@media (max-width: 768px) {

  /* 手機版日期與按鈕改為垂直堆疊 */
  .news_detail_page .related_reports_news_list .news_item_footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-sm);
  }

  .news_detail_page .related_reports_news_list .news_item_btn {
    align-self: center;
    width: 100%;
    /* 手機版按鈕通常建議稍微加寬或置中 */
    max-width: 280px;
    margin: 0 auto;
  }

  .news_detail_page .related_reports_news_list .news_item_date {
    margin-bottom: 4px;
  }
}

/* ==========================================================================
   Shop Flow Hero（購物流程頁面共用 hero）
   用法：
     <section class="shop_hero">
       <div class="container">
         <h1>頁面標題</h1>
         <p class="sub">副標</p>
         <nav class="breadcrumbs">
           <a href="index.html">首頁</a>
           <span class="sep">/</span>
           <span class="cur">當前頁</span>
         </nav>
       </div>
     </section>
   適用頁：checkout / products_list / account / order_* / refund_* / atm_payment 等
   ========================================================================== */

.shop_hero {
  background: var(--color-seaweed);
  color: var(--color-text-white);
  /* 統一公式：上 padding = header 高度 + hero 自身視覺呼吸（buffer） */
  padding: calc(var(--header-height) + var(--shop-hero-top-buffer)) 0 var(--shop-hero-bottom-buffer);
}

.shop_hero .container {
  max-width: 1200px;
}

.shop_hero h1 {
  font-size: 36px;
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-text-white);
}

.shop_hero .sub {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  margin: 0;
}

.shop_hero .breadcrumbs {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 14px;
  letter-spacing: 0.04em;
}

.shop_hero .breadcrumbs a {
  color: inherit;
  transition: color var(--transition-fast);
}

@media (hover: hover) {
  .shop_hero .breadcrumbs a:hover {
    color: var(--color-text-white);
  }
}

.shop_hero .breadcrumbs .sep {
  opacity: 0.4;
}

.shop_hero .breadcrumbs .cur {
  color: var(--color-text-white);
}

@media (max-width: 640px) {
  .shop_hero {
    /* mobile 改用 SKILL canonical token（與 desktop 公式一致） */
    padding: calc(var(--header-height) + var(--shop-hero-top-buffer-mobile)) 0 32px;
  }
  .shop_hero h1 {
    font-size: 28px;
  }
}

/* ==========================================================================
   Shop Flow 結果頁共用元件（訂單完成 / 失敗）
   用法：wrapper.order_success.checkout 或 wrapper.order_failed.checkout
   ========================================================================== */

/* === 結果卡片（勾勾 / 叉叉 + 標題 + 按鈕） === */
.confirm_hero {
  background: var(--color-bg-white);
  border: 1px solid rgba(var(--color-primary-rgb), 0.18);
  padding: 48px 32px 40px;
  text-align: center;
}

.confirm_tick {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-ivory);
  border: 1.5px solid var(--color-cider-pear);
  color: var(--color-seaweed);
  display: grid;
  place-items: center;
  margin: 0 auto 20px;
  font-size: 1.6rem;
}

.confirm_title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 8px;
}

.confirm_desc {
  font-size: 0.9rem;
  color: #666;
  margin: 0 auto 18px;
  max-width: 640px;
  line-height: 1.7;
}

.confirm_order_no {
  font-family: var(--font-family-en);
  font-size: 0.8rem;
  color: #666;
  letter-spacing: 0.12em;
  margin-bottom: 28px;
}

.confirm_order_no strong {
  color: var(--color-text-primary);
  font-weight: 600;
  margin-left: 4px;
}

.confirm_actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 auto;
}

.confirm_actions .shop_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 200px;
  padding: 12px 24px;
  font-size: 0.9rem;
}

/* === 右欄 aside：summary 卡 + email banner 堆疊（間距同左側 checkout_form） === */
.confirm_aside {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 配送/付款之間的分段線（hr 元素，左右撐滿 inner 24px padding）
   用 hr 而非 title border-top，避開 .checkout scope 的 specificity 覆蓋 */
.confirm_section_divider {
  border: 0;
  border-top: 1px solid #e0e0e0;
  margin: 40px -24px 28px;
}

/* === 右欄資訊列：英文 label 上 + 中文 value 下 === */
.confirm_info_list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.confirm_info_row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  color: var(--color-text-primary);
  line-height: 1.5;
}

.confirm_info_label {
  font-family: var(--font-family-en);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--color-text-muted-tint);
  text-transform: uppercase;
}

.confirm_status_ok {
  display: inline-block;
  padding: 3px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
  background: rgba(var(--color-success-rgb), 0.1);
  color: var(--color-success);
}

.confirm_status_pending {
  display: inline-block;
  padding: 3px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.5;
  background: rgba(var(--color-warning-rgb), 0.15);
  color: var(--color-warning);
}

/* === Email 提示 banner === */
.confirm_email_banner {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  background: var(--color-bg-white);
  border: 1px solid rgba(var(--color-primary-rgb), 0.18);
  font-size: 0.8rem;
  color: #666;
  line-height: 1.7;
  align-items: flex-start;
}

.confirm_email_banner i {
  margin-top: 2px;
  flex-shrink: 0;
  color: var(--color-seaweed);
}

.confirm_email_banner strong {
  color: var(--color-text-primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  .confirm_hero {
    padding: 36px 20px 28px;
  }
  .confirm_title {
    font-size: 1.35rem;
  }
  /* 手機版：主按鈕（solid，markup 順序在最後）翻到最上方，次按鈕（ghost）堆在下面。詳見 SKILL.md「Mobile button stacking」。 */
  .confirm_actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .confirm_actions .shop_btn {
    width: 100%;
  }
}

/* ==========================================================================
   Shop Flow Layout & Components（購物流程頁共用）
   適用頁：checkout / payment / order_success / order_failed
   這些頁 wrapper 都帶 .checkout class（雙 class 共用），其他頁不受影響
   ========================================================================== */

body.checkout_page,
body.payment_page,
body.order_success_page,
body.order_failed_page {
  overflow-x: clip;
}

.wrapper.checkout {
  overflow: visible;
}

/* === Steps（購物車 / 結帳 / 付款 / 完成 步驟條） === */
.shop_steps {
  background: var(--color-bg-white);
  border-bottom: 1px solid var(--color-border);
  padding: 0;
}

.shop_steps .container {
  max-width: 1200px;
}

.steps-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 22px 0;
  flex-wrap: nowrap;       /* 防呆：禁止中間 viewport wrap 出孤兒，窄 viewport 由 mobile @media 接管 */
}

.step {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--color-text-muted-tint);
}

.step .num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border-tint-2);
  display: grid;
  place-items: center;
  font-family: var(--font-family-en);
  font-weight: 600;
  font-size: 14px;
  background: var(--color-bg-white);
  flex-shrink: 0;
}

.step_label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.step_en {
  font-family: var(--font-family-en);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.step_zh {
  font-size: 12px;
  letter-spacing: 0.05em;
}

.step.active {
  color: var(--color-seaweed);
}

.step.active .num {
  background: var(--color-seaweed);
  color: var(--color-text-white);
  border-color: var(--color-seaweed);
}

.step.done {
  color: var(--color-carbon);
}

.step.done .num {
  background: var(--color-ivory);
  color: var(--color-seaweed);
  border-color: var(--color-cider-pear);
}

.step-line {
  width: 80px;
  height: 1px;
  background: var(--color-border-tint-2);
  flex-shrink: 0;
}

.step-line.done {
  background: var(--color-cider-pear);
}

@media (max-width: 900px) {
  .steps-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: start;
    column-gap: 6px;
    padding: 16px 12px;
  }
  .step {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    width: 100%;
  }
  .step .num {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  .step_label {
    align-items: center;
    text-align: center;
  }
  .step_en {
    font-size: 10px;
    letter-spacing: 0.04em;
  }
  .step_zh {
    font-size: 11px;
  }
  .step-line {
    display: block;
    width: 24px;             /* 顯式寬度，避免在 grid auto cell 中塌成 0 */
    height: 1px;
    margin-top: 15px;        /* icon 32px / 2 = 16，扣 line 0.5 ≈ 對齊 icon 中心 */
    align-self: start;
  }
}

/* === 主區塊 + 雙欄 layout === */
.checkout_section {
  padding: 40px 0 80px;
}

.checkout_section .container {
  max-width: 1200px;
}

.checkout_layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 40px;
  align-items: flex-start;
}

.checkout_form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* === Block 容器 + 淺米綠 header 標題 === */
.checkout_block {
  border: 1px solid rgba(var(--color-primary-rgb), 0.25);
  padding: 24px;
  background: var(--color-bg-white);
  overflow: visible;
}

.checkout_block_title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: -24px -24px 20px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(var(--color-primary-rgb), 0.18);
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout_block_title i {
  color: var(--color-primary);
  font-size: 0.95rem;
}

.checkout_block_note {
  font-size: 0.8rem;
  color: #666;
  margin: -10px 0 16px;
}

/* === Invoice / Payment radio 卡片（多頁共用） === */
.invoice_options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.invoice_option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--color-bg-white);
  border: 1px solid rgba(var(--color-primary-rgb), 0.18);
  cursor: pointer;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
}

.invoice_option > input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.invoice_option_radio {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(var(--color-primary-rgb), 0.4);
  border-radius: 50%;
  position: relative;
  background: var(--color-bg-white);
  transition: border-color 0.15s;
}

.invoice_option_radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--color-primary);
  transform: scale(0);
  transition: transform 0.15s;
}

.invoice_option:has(input:checked) .invoice_option_radio {
  border-color: var(--color-primary);
}

.invoice_option:has(input:checked) .invoice_option_radio::after {
  transform: scale(1);
}

.invoice_option:has(input:checked) {
  background: rgba(var(--color-primary-rgb), 0.08);
  border-color: var(--color-primary);
}

.invoice_option_body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.invoice_option_title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.invoice_option_hint_inline {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.4;
}

.invoice_option_extra {
  flex: 0 1 260px;
  max-width: 260px;
  display: none;
}

.invoice_option:has(input:checked) .invoice_option_extra {
  display: block;
}

@media (max-width: 640px) {
  .invoice_option {
    flex-wrap: wrap;
  }
  /* 手機版：extra 換行後撐滿卡片內容寬度、左右間距與卡片 padding 一致 */
  .invoice_option_extra {
    flex: 0 0 100%;
    max-width: 100%;
    margin-left: 0;
    margin-top: 8px;
  }
}

/* === 右欄訂單摘要 sticky === */
.checkout_summary {
  position: sticky;
  top: calc(var(--header-height) + 40px);
}

.checkout_summary_inner {
  border: 1px solid rgba(var(--color-primary-rgb), 0.25);
  padding: 24px;
  background-color: var(--color-bg-white);
}

.checkout_summary_title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout_summary_title i {
  color: var(--color-primary);
  font-size: 0.95rem;
}

/* 商品列表 */
.checkout_items {
  margin-bottom: 20px;
}

.checkout_item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.checkout_item:last-child {
  border-bottom: none;
}

.checkout_item_img {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  background: #f5f5f5;
  border: 1px solid #eee;
}

.checkout_item_img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.checkout_item_info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.checkout_item_name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.checkout_item_spec {
  font-size: 0.78rem;
  color: #666;
}

.checkout_item_detail {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.checkout_item_qty {
  font-size: 0.8rem;
  color: #666;
}

.checkout_item_price {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-primary);
}

.checkout_item_price del {
  font-size: 0.75rem;
  font-weight: 400;
  color: #999;
  margin-right: 4px;
}

@media (max-width: 640px) {
  .checkout_item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 6px;
    align-items: start;
  }
  .checkout_item_img {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
  }
  .checkout_item_info {
    grid-column: 2;
    grid-row: 1;
  }
  .checkout_item_detail {
    grid-column: 2;
    grid-row: 2;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .checkout_item_name,
  .checkout_item_spec {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* 金額明細 */
.checkout_amounts {
  border-top: 1px solid #e0e0e0;
  padding-top: 16px;
  margin-bottom: 20px;
}

.checkout_amount_row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 0.9rem;
  color: #666;
}

.checkout_total {
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid #e0e0e0;
  font-weight: 700;
  color: var(--color-text-primary);
}

.checkout_total_price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
}

.checkout_secure_note {
  font-size: 0.75rem;
  color: #666;
  text-align: center;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.checkout_secure_note i {
  font-size: 0.7rem;
}

/* === 底部動作列（左次右主按鈕，寬度 200px） === */
.checkout_submit_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 1rem;
}

.checkout_actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  /* Desktop：保持在左欄 form 下方；mobile (single-col) 自動流到 summary 後（form → summary → actions）。
     SKILL canonical Option B markup 重構（actions 是 .checkout_layout 兄弟元素，不在 .checkout_form 內）。 */
  grid-column: 1;
}

.checkout_actions > .shop_btn {
  width: 200px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .checkout_actions {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
  }
  .checkout_actions > .shop_btn {
    width: 100%;
  }
}

/* === 響應式：900px 雙欄摺單欄 + sticky 失效 === */
@media (max-width: 900px) {
  .checkout_layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }
  .checkout_summary {
    position: static;
  }
  /* 手機版視覺順序：form → summary → actions。
     由 markup 重構（Option B）天然提供：.checkout_actions 已從 .checkout_form
     抽出為 .checkout_layout 兄弟元素，DOM 順序 = form → summary → actions。
     不需要任何 order / display: contents hack。 */
}

@media (max-width: 768px) {
  .checkout_block {
    padding: 18px;
  }
  .checkout_block_title {
    margin: -18px -18px 16px;
    padding: 12px 18px;
  }
}

/* ==============================================
   Theme Switcher (色系切換懸浮鈕)
   ============================================== */
.theme-switcher {
  position: fixed;
  right: 30px;
  bottom: 30px;
  /* 999：必須低於 header、購物車側邊欄與登入彈窗（1100 以上），
   * 這些開啟時要能蓋住切換器 */
  z-index: 999;
  font-family: var(--font-family-base);
  user-select: none;
}

.theme-switcher__panel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg-white);
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.theme-switcher__label {
  font-size: 13px;
  color: #666;
  margin-right: 2px;
}

.theme-switcher__swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 4px;
  border-radius: 999px;
  border: 1px solid #e0e0e0;
  background: var(--color-bg-white);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.theme-switcher__swatch-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
}

.theme-switcher__swatch-name {
  font-size: 13px;
  color: #333;
  line-height: 1;
}

.theme-switcher__swatch:hover {
  border-color: #999;
  transform: translateY(-1px);
}

.theme-switcher__swatch.is-active {
  border-color: #333;
  background: #f5f5f5;
}

.theme-switcher__close {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #999;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  margin-left: 2px;
  transition: color 0.2s ease, background 0.2s ease;
}

.theme-switcher__close:hover {
  color: #333;
  background: #f0f0f0;
}

.theme-switcher__toggle {
  display: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--color-bg-white);
  border: none;
  color: #666;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.theme-switcher__toggle:hover {
  color: var(--color-primary);
  transform: scale(1.05);
}

/* 色系已定案為藍黃，切換器平常整組隱藏（交付客戶時看不到）。
 * 需要調色時在網址加 ?theme=sage 或 ?theme=bluegold，
 * main.js 會補上 .is-forced 讓切換器再次顯示。 */
.theme-switcher {
  display: none;
}

.theme-switcher.is-forced {
  display: block;
}

.theme-switcher.is-collapsed .theme-switcher__panel {
  display: none;
}

.theme-switcher.is-collapsed .theme-switcher__toggle {
  display: inline-flex;
}

@media (max-width: 640px) {
  .theme-switcher {
    right: 20px;
    bottom: 20px;
  }
  .theme-switcher__toggle {
    width: 45px;
    height: 45px;
  }
}
