/*
Theme Name: CARTRUCK TW
Theme URI: https://cartruck.tw
Author: CARTRUCK Team
Author URI: https://cartruck.tw
Description: 綜合電商主題 — 為 WooCommerce 設計，提供商品列表、商品詳情、購物車、結帳、會員中心的完整 UI 覆寫。需安裝 WooCommerce 外掛。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cartruck
Tags: woocommerce, ecommerce, shop, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready

CARTRUCK TW WordPress Theme, (C) 2026
*/

/* === Design Tokens — 信任藍 / 簡潔現代 (與原型一致) === */
:root {
  /* 主色：信任藍 trust blue */
  --brand-50:  oklch(0.97 0.02 248);
  --brand-100: oklch(0.93 0.05 248);
  --brand-200: oklch(0.85 0.09 248);
  --brand-300: oklch(0.74 0.13 248);
  --brand-500: oklch(0.55 0.17 248);
  --brand-600: oklch(0.48 0.17 248);
  --brand-700: oklch(0.40 0.15 248);
  --brand-900: oklch(0.22 0.08 248);

  /* 中性色：冷灰基底 */
  --ink-50:   oklch(0.985 0.003 248);
  --ink-100:  oklch(0.96 0.005 248);
  --ink-200:  oklch(0.92 0.005 248);
  --ink-300:  oklch(0.82 0.005 248);
  --ink-400:  oklch(0.68 0.01 248);
  --ink-500:  oklch(0.55 0.01 248);
  --ink-700:  oklch(0.38 0.01 248);
  --ink-800:  oklch(0.28 0.01 248);
  --ink-900:  oklch(0.18 0.01 248);

  --hot:     oklch(0.65 0.20 28);     /* 限時/特賣 紅 */
  --hot-bg:  oklch(0.96 0.04 28);
  --success: oklch(0.62 0.16 155);
  --warning: oklch(0.78 0.16 75);
  --info:    oklch(0.65 0.13 220);

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-full: 999px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 2px 6px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);

  --header-h: 64px;
  --topbar-h: 32px;

  --font-sans: "Noto Sans TC", -apple-system, "PingFang TC", "Microsoft JhengHei", sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink-900);
  background: var(--ink-100);
  line-height: 1.6;
}
.num { font-family: var(--font-mono); font-feature-settings: "tnum"; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* === Header（白底，與原型一致）=== */
.ct-topbar {
  background: var(--ink-900);
  color: var(--ink-300);
  font-size: 12px;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
}
.ct-topbar .container { display: flex; align-items: center; gap: 16px; width: 100%; }
.ct-topbar a { color: var(--ink-300); padding: 0 4px; cursor: pointer; }
.ct-topbar a:hover { color: #fff; }
.ct-topbar .seller-link { color: var(--brand-300); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.ct-topbar .sep { color: var(--ink-700); }
.ct-topbar .right { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.ct-header {
  background: #fff;
  color: var(--ink-900);
  box-shadow: var(--shadow-xs);
}
.ct-header .ct-header-main {
  display: flex;
  align-items: center;
  gap: 32px;
  height: calc(var(--header-h) + 24px);
}
.ct-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--brand-700);
  white-space: nowrap;
}
.ct-logo-mark {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
}
.ct-logo .tw { color: var(--brand-500); margin-left: 4px; }
.ct-logo-img { height: 38px !important; width: auto !important; max-height: 38px; display: block; }
.ct-footer .ct-logo-img { height: 34px !important; max-height: 34px; }

/* ============== 會員中心 My Account(App 式自訂外殼) ============== */
.woocommerce-account .woocommerce { display: block; max-width: 1040px; margin: 20px auto 48px; }
.ctma { max-width: 1040px; margin: 0 auto; }
/* 蓋掉 WC 外掛預設的兩欄浮動版面(float:right; width:68%) */
.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce-account .woocommerce-MyAccount-navigation { float: none !important; width: 100% !important; }
.ctma-hero { display: flex; align-items: center; gap: 16px; background: linear-gradient(125deg, var(--brand-600, #2563eb), var(--brand-800, #1e3a8a)); color: #fff; padding: 22px 26px; border-radius: 16px; box-shadow: 0 6px 20px rgba(29, 78, 216, .22); }
.ctma-avatar { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 25px; font-weight: 700; flex: 0 0 auto; }
.ctma-who { flex: 1; min-width: 0; }
.ctma-name { font-size: 19px; font-weight: 700; }
.ctma-chips { display: flex; gap: 8px; margin-top: 7px; flex-wrap: wrap; }
.ctma-chip { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); padding: 2px 11px; border-radius: 20px; font-size: 12px; }
.ctma-chip-tier { background: #fff; color: var(--brand-700); font-weight: 700; border-color: #fff; }
.ctma-hero-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex: 0 0 auto; }
.ctma-shop { color: #fff; font-size: 13px; opacity: .92; white-space: nowrap; }
.ctma-shop:hover { opacity: 1; color: #fff; text-decoration: underline; }
.ctma-backend { background: #fff; color: var(--brand-700, #1d4ed8); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 20px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.14); transition: transform .15s, box-shadow .15s; }
.ctma-backend:hover { color: var(--brand-800, #1e3a8a); transform: translateY(-1px); box-shadow: 0 4px 13px rgba(0,0,0,.2); }
/* 橫向頁籤 */
.ctma-tabs { display: flex; gap: 8px; margin: 16px 0 18px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.ctma-tab { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 86px; padding: 12px 10px; background: #fff; border: 1px solid var(--ink-200); border-radius: 12px; color: var(--ink-700); font-size: 12.5px; white-space: nowrap; transition: border-color .15s, box-shadow .15s, transform .15s; flex: 0 0 auto; }
.ctma-tab .ic { font-size: 21px; line-height: 1; }
.ctma-tab:hover { border-color: var(--brand-400, #60a5fa); transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.06); color: var(--brand-700); }
.ctma-tab.is-active { background: var(--brand-600, #2563eb); border-color: var(--brand-600, #2563eb); color: #fff; font-weight: 600; box-shadow: 0 4px 12px rgba(37, 99, 235, .3); }
.ctma-tab-out { border-style: dashed; color: var(--ink-500); }
/* 內容區 */
.ctma-body { background: #fff; border: 1px solid var(--ink-200); border-radius: 14px; padding: 24px 26px; min-height: 320px; }
.ctma-body > p:first-child { margin-top: 0; }
@media (max-width: 640px) {
  .ctma-hero { padding: 16px 16px; border-radius: 12px; }
  .ctma-name { font-size: 16px; }
  .ctma-shop { display: none; }
  .ctma-tab { min-width: 74px; padding: 10px 6px; font-size: 11.5px; }
  .ctma-body { padding: 16px 14px; border-radius: 12px; }
}

/* 會員卡 */
.ct-acc-hero { display: flex; align-items: center; gap: 16px; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff; padding: 22px 24px; border-radius: var(--r-md); margin-bottom: 16px; }
.ct-acc-avatar { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.22); display: grid; place-items: center; font-size: 24px; font-weight: 700; flex: 0 0 auto; }
.ct-acc-hero-info { flex: 1; }
.ct-acc-name { font-size: 18px; font-weight: 600; }
.ct-acc-meta { font-size: 12px; opacity: .9; margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.ct-acc-tier { background: rgba(255,255,255,.25); padding: 1px 8px; border-radius: 20px; font-weight: 600; }
.ct-acc-hero-link { color: #fff; font-size: 13px; opacity: .92; white-space: nowrap; }
.ct-acc-hero-link:hover { opacity: 1; text-decoration: underline; }

/* 訂單統計 */
.ct-acc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.ct-acc-stat { background: #fff; border: 1px solid var(--ink-200); border-radius: var(--r-md); padding: 16px 8px; text-align: center; color: var(--ink-900); transition: border-color .15s; }
.ct-acc-stat:hover { border-color: var(--brand-400, #60a5fa); }
.ct-acc-stat .n { display: block; font-size: 26px; font-weight: 700; color: var(--brand-600); }
.ct-acc-stat .l { display: block; font-size: 12px; color: var(--ink-600); margin-top: 4px; }

/* 快捷功能 */
.ct-acc-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px; }
.ct-acc-actions a { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--ink-200); border-radius: var(--r-md); padding: 14px 16px; color: var(--ink-800); font-size: 14px; transition: border-color .15s, background .15s; }
.ct-acc-actions a:hover { border-color: var(--brand-400, #60a5fa); background: var(--brand-50); }
.ct-acc-actions a span { font-size: 20px; }

/* 最近訂單 */
.ct-acc-recent h3 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.ct-acc-orders { width: 100%; border-collapse: collapse; font-size: 14px; }
.ct-acc-orders td { padding: 12px 8px; border-bottom: 1px solid var(--ink-100); }
.ct-acc-orders .o-id { font-weight: 600; }
.ct-acc-orders .o-date { color: var(--ink-500); }
.ct-acc-orders .st { font-size: 12px; padding: 2px 10px; border-radius: 20px; background: var(--ink-100); color: var(--ink-700); }
.ct-acc-orders .st-completed { background: #dcfce7; color: #166534; }
.ct-acc-orders .st-processing { background: var(--brand-50); color: var(--brand-700); }
.ct-acc-orders .o-act a { color: var(--brand-600); }
.ct-acc-empty { padding: 28px; text-align: center; color: var(--ink-500); border: 1px dashed var(--ink-200); border-radius: var(--r-md); }

/* 會員等級價標籤 */
.ct-tier-tag { display: inline-block; font-size: 11px; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-200); padding: 1px 8px; border-radius: 20px; margin-left: 6px; vertical-align: middle; font-weight: 600; }
.price ins { text-decoration: none; color: var(--brand-700); font-weight: 700; }
.price del { color: var(--ink-400, #94a3b8); font-weight: 400; }

/* 常購收藏 ♥ */
.woocommerce ul.products li.product { position: relative; }
.ct-fav { background: rgba(255,255,255,.92); border: 1px solid var(--ink-200); border-radius: 50%; width: 34px; height: 34px;
  cursor: pointer; color: var(--ink-400, #94a3b8); font-size: 17px; line-height: 1; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  transition: color .15s, border-color .15s, background .15s; }
li.product .ct-fav { position: absolute; top: 10px; right: 10px; z-index: 3; }
.ct-fav.is-active { color: #e0245e; border-color: #f3b6c6; }
.ct-fav:hover { color: #e0245e; border-color: #e0245e; }
.ct-fav.ct-loading { opacity: .45; }
.ct-fav-line { margin: 14px 0; }
.ct-fav-line .ct-fav { width: auto; height: auto; border-radius: var(--r-md); padding: 9px 18px; gap: 8px; font-size: 14px; }
/* 常購清單 */
.ct-fav-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ct-fav-card { border: 1px solid var(--ink-200); border-radius: var(--r-md); padding: 12px; display: flex; flex-direction: column; }
.ct-fav-thumb img { width: 100%; height: auto; border-radius: 4px; }
.ct-fav-name { font-size: 13px; color: var(--ink-800); margin: 8px 0 4px; line-height: 1.4; min-height: 2.6em; }
.ct-fav-price { font-size: 14px; margin-bottom: 10px; }
.ct-fav-act { display: flex; gap: 8px; align-items: center; margin-top: auto; }
.ct-fav-act .button { flex: 1; text-align: center; padding: 9px !important; font-size: 13px !important; }
.ct-fav-remove { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 6px; color: var(--ink-500) !important; border-color: var(--ink-300) !important; font-size: 16px; }
.ct-fav-remove:hover { color: #d33 !important; border-color: #d33 !important; }
@media (max-width: 820px) { .ct-fav-grid { grid-template-columns: repeat(2, 1fr); } }

/* 帳戶詳細資料 — 公司資料 / 多筆欄位 */
.ct-acc-hr { border: 0; border-top: 1px solid var(--ink-200); margin: 26px 0; }
.ct-acc-h { font-size: 15px; font-weight: 600; margin: 0 0 14px; display: flex; align-items: center; gap: 12px; }
.ct-rep-add { font-size: 12px; color: var(--brand-600); background: var(--brand-50); border: 1px solid var(--brand-200); border-radius: 20px; padding: 3px 12px; cursor: pointer; font-weight: 500; }
.ct-rep-add:hover { background: var(--brand-100, #dbeafe); }
.ct-rep-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.ct-rep-row input { flex: 1; border: 1px solid var(--ink-300); border-radius: 4px; padding: 9px 11px; font-size: 14px; min-width: 0; }
.ct-rep-addr input:nth-child(3) { flex: 2.6; }
.ct-rep-del { flex: 0 0 auto; width: 36px; height: 36px; border: 1px solid var(--ink-300); background: #fff; border-radius: 6px; color: var(--ink-500); cursor: pointer; font-size: 18px; line-height: 1; }
.ct-rep-del:hover { color: #d33; border-color: #d33; }
.woocommerce-EditAccountForm .woocommerce-form-row label { display: block; font-size: 13px; color: var(--ink-700); margin-bottom: 6px; }
.woocommerce-EditAccountForm input.input-text, .woocommerce-EditAccountForm input[type="email"], .woocommerce-EditAccountForm input[type="password"] { border: 1px solid var(--ink-300); border-radius: 4px; padding: 10px 12px; font-size: 15px; width: 100%; max-width: 480px; box-sizing: border-box; }
.woocommerce-EditAccountForm input[disabled] { background: var(--ink-50); color: var(--ink-500); }
/* 變更密碼:預設收合,點按鈕才展開 */
.woocommerce-EditAccountForm fieldset { display: none; border: 1px solid var(--ink-200); border-radius: var(--r-md); padding: 14px 18px; margin-top: 8px; max-width: 480px; }
.woocommerce-EditAccountForm fieldset.ct-pw-open { display: block; }
.woocommerce-EditAccountForm fieldset legend { font-size: 14px; font-weight: 600; padding: 0 6px; }
.ct-pw-toggle { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--ink-300); border-radius: var(--r-md); padding: 10px 18px; font-size: 14px; color: var(--ink-800); cursor: pointer; margin-top: 8px; }
.ct-pw-toggle:hover { border-color: var(--ink-900); }

/* 帳號表單(發票資訊等) */
.ct-acc-form .ct-field { margin-bottom: 16px; }
.ct-acc-form .ct-field label { display: block; font-size: 13px; color: var(--ink-700); margin-bottom: 6px; }
.ct-acc-form input[type="text"], .ct-acc-form select { width: 100%; max-width: 420px; box-sizing: border-box; border: 1px solid var(--ink-300); border-radius: 4px; padding: 10px 12px; font-size: 15px; font-family: inherit; }
.ct-acc-btn, .woocommerce-account .button { background: var(--ink-900) !important; color: #fff !important; border: 0 !important; border-radius: 4px !important; padding: 12px 28px !important; cursor: pointer; }
.ct-acc-btn:hover, .woocommerce-account .button:hover { background: var(--brand-700) !important; }

@media (max-width: 820px) {
  .ct-acc-stats { grid-template-columns: repeat(2, 1fr); }
  .ct-acc-actions { grid-template-columns: repeat(2, 1fr); }
}

/* 搜尋 */
.ct-search-wrap { flex: 1; max-width: 640px; }
.ct-search {
  display: flex;
  align-items: center;
  border: 2px solid var(--brand-500);
  border-radius: var(--r-md);
  background: #fff;
  overflow: hidden;
}
.ct-search input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 10px 14px;
  background: transparent;
  font-family: inherit;
}
.ct-search button {
  padding: 10px 20px;
  background: var(--brand-500);
  color: #fff;
  font-weight: 500;
  display: grid;
  place-items: center;
}
.ct-search button:hover { background: var(--brand-600); }
.ct-hotwords { display: flex; align-items: center; gap: 12px; margin-top: 6px; font-size: 11px; color: var(--ink-500); flex-wrap: wrap; }
.ct-hotwords a { color: var(--ink-700); cursor: pointer; }
.ct-hotwords a:hover { color: var(--brand-500); }

/* 右側動作 icon */
.ct-header-actions { display: flex; align-items: center; gap: 6px; }
.ct-iconbtn {
  position: relative;
  padding: 10px;
  border-radius: var(--r-md);
  color: var(--ink-700);
  display: grid;
  place-items: center;
}
.ct-iconbtn:hover { background: var(--ink-100); }
.ct-iconbtn .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--hot); }
.ct-cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  background: var(--hot);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  border-radius: 9px;
  padding: 0 4px;
  display: grid;
  place-items: center;
}
.ct-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--ink-900);
}
.ct-member:hover { border-color: var(--brand-500); }
.ct-member .av {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-300), var(--brand-600));
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600;
}

/* 分類列 */
.ct-catbar { border-top: 1px solid var(--ink-200); border-bottom: 1px solid var(--ink-200); background: #fff; }
.ct-catbar .container { display: flex; align-items: center; gap: 4px; height: 44px; overflow-x: auto; }
.ct-catbar-all {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--brand-700);
  padding: 8px 12px; white-space: nowrap;
}
.ct-catbar .vline { width: 1px; height: 18px; background: var(--ink-200); margin: 0 8px; flex-shrink: 0; }
.ct-catbar a.ct-catlink {
  padding: 8px 12px; font-size: 13px; color: var(--ink-700);
  border-radius: var(--r-md); display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.ct-catbar a.ct-catlink:hover { background: var(--ink-100); color: var(--brand-600); }
.ct-catbar a.ct-catlink .em { font-size: 14px; }

/* === 首頁 Hero === */
.ct-hero { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 12px; margin-top: 16px; }
.ct-hero-stage { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 5.5; }
.ct-hero-slide {
  position: absolute; inset: 0; display: flex; align-items: center; padding: 0 56px;
  opacity: 0; transition: opacity .6s ease; color: #fff;
}
.ct-hero-slide.is-active { opacity: 1; }
.ct-hero-slide.tone-brand { background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); }
.ct-hero-slide.tone-hot   { background: linear-gradient(135deg, oklch(0.65 0.20 28), oklch(0.50 0.18 18)); }
.ct-hero-slide.tone-ink   { background: linear-gradient(135deg, var(--ink-900), var(--ink-700)); }
.ct-hero-kicker { font-size: 12px; opacity: 0.8; letter-spacing: 0.2em; margin-bottom: 12px; }
.ct-hero-h { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 12px; }
.ct-hero-sub { font-size: 15px; opacity: 0.9; margin-bottom: 24px; }
.ct-hero-btn { background: #fff; color: var(--ink-900); padding: 12px 24px; border-radius: var(--r-md); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.ct-hero-glyph { position: absolute; right: 56px; font-size: 160px; opacity: 0.15; pointer-events: none; }
.ct-hero-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }
.ct-hero-dots button { width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.5); transition: all .3s ease; }
.ct-hero-dots button.is-active { width: 24px; background: #fff; }
.ct-hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; }
.ct-sidecard {
  padding: 20px; display: flex; align-items: center; gap: 16px;
  border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-sm);
}
.ct-sidecard.tone-brand { background: var(--brand-50); }
.ct-sidecard.tone-hot   { background: var(--hot-bg); }
.ct-sidecard-ic { width: 48px; height: 48px; border-radius: var(--r-md); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.ct-sidecard.tone-brand .ct-sidecard-ic { background: var(--brand-500); }
.ct-sidecard.tone-hot   .ct-sidecard-ic { background: var(--hot); }
.ct-sidecard-t { font-size: 14px; font-weight: 600; }
.ct-sidecard-d { font-size: 12px; }
.ct-sidecard.tone-brand .ct-sidecard-d { color: var(--brand-700); }
.ct-sidecard.tone-hot   .ct-sidecard-d { color: var(--hot); }

/* === 首頁分類九宮格 === */
.ct-home-cats { margin-top: 24px; padding: 20px 24px; }
.ct-home-cats-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }
.ct-home-cat { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: var(--r-md); }
.ct-home-cat:hover { background: var(--ink-100); }
.ct-home-cat .tile { width: 56px; height: 56px; border-radius: var(--r-lg); background: var(--brand-50); display: grid; place-items: center; font-size: 26px; overflow: hidden; }
.ct-home-cat .tile img { width: 100%; height: 100%; object-fit: cover; }
.ct-home-cat .nm { font-size: 12px; color: var(--ink-700); text-align: center; }

/* === 限時搶購 === */
.ct-flash { margin-top: 24px; padding: 24px; }
.ct-flash-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.ct-flash-head-l { display: flex; align-items: center; gap: 12px; color: var(--hot); }
.ct-flash-head-l h2 { font-size: 20px; font-weight: 700; color: var(--ink-900); margin: 0; }
.ct-countdown { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.ct-countdown .lbl { font-size: 13px; color: var(--ink-500); }
.ct-countdown .seg { background: var(--ink-900); color: #fff; padding: 3px 8px; border-radius: 4px; font-size: 13px; font-weight: 600; min-width: 28px; text-align: center; }
.ct-countdown .colon { color: var(--ink-400); }
.ct-seemore { color: var(--brand-500); font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }

/* === 推薦分頁 === */
.ct-tabs { display: flex; align-items: center; border-bottom: 2px solid var(--ink-200); margin: 24px 0 16px; }
.ct-tab { padding: 12px 20px; font-size: 15px; font-weight: 600; color: var(--ink-700); margin-bottom: -2px; border-bottom: 2px solid transparent; }
.ct-tab.is-active { color: var(--brand-500); border-bottom-color: var(--brand-500); }
.ct-tabpanel { display: none; }
.ct-tabpanel.is-active { display: block; }

/* WooCommerce 商品卡：折扣標籤 + 已售/評分 */
.woocommerce ul.products li.product { position: relative; }

/* === Buttons === */
.ct-btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce .button,
.woocommerce-page button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  transition: all 120ms ease;
  text-decoration: none;
}
.ct-btn-primary,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce #respond input#submit,
.woocommerce .checkout-button,
.woocommerce .single_add_to_cart_button {
  background: var(--brand-500) !important;
  color: white !important;
}
.ct-btn-primary:hover,
.woocommerce button.button.alt:hover,
.woocommerce .single_add_to_cart_button:hover {
  background: var(--brand-600) !important;
}
.ct-btn-secondary {
  background: white;
  color: var(--ink-900);
  border: 1px solid var(--ink-300);
}
.ct-btn-secondary:hover { border-color: var(--brand-500); color: var(--brand-500); }

/* === Cards / Products === */
.ct-card {
  background: white;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

/* WooCommerce 商品列表 — 緊湊 Grid 排列 */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 12px;
  margin: 0 0 24px !important;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none !important; display: none !important; }
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  background: white;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 9px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.woocommerce ul.products li.product:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-900);
  line-height: 1.4;
  padding: 8px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.woocommerce ul.products li.product .price {
  color: var(--brand-500) !important;
  font-family: var(--font-mono);
  font-weight: 700 !important;
  font-size: 18px !important;
}
.woocommerce ul.products li.product .price del {
  color: var(--ink-500);
  font-size: 12px;
  font-weight: 400 !important;
  margin-right: 6px;
}
.woocommerce ul.products li.product .onsale,
.woocommerce span.onsale {
  background: var(--hot) !important;
  color: white !important;
  border-radius: var(--r-sm) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  padding: 3px 6px !important;
  min-height: auto !important;
  line-height: 1.2 !important;
  top: 8px !important;
  right: 8px !important;
  left: auto !important;
  margin: 0 !important;
  position: absolute !important;
}

/* 單一商品頁 */
.woocommerce div.product .product_title {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
}
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--brand-500) !important;
  font-family: var(--font-mono);
  font-size: 28px !important;
  font-weight: 700 !important;
}

/* 購物車 / 結帳 */
.woocommerce table.shop_table,
.woocommerce-page table.shop_table {
  border-radius: var(--r-md);
  border-collapse: separate;
  background: white;
  box-shadow: var(--shadow-sm);
  border: none;
}
.woocommerce table.shop_table th {
  background: var(--ink-50);
  color: var(--ink-700);
  font-weight: 500;
  font-size: 13px;
}
.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
  background: white;
  padding: 20px;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}

/* Form fields */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  padding: 10px 14px;
  border: 1px solid var(--ink-300);
  border-radius: var(--r-md);
  font-size: 14px;
  font-family: inherit;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
  border-color: var(--brand-500);
  outline: 2px solid var(--brand-100);
}

/* Footer */
.ct-footer {
  background: white;
  border-top: 1px solid var(--ink-200);
  padding: 48px 0 24px;
  margin-top: 48px;
}
.ct-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 32px;
}
.ct-footer h4 {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--ink-900);
}
.ct-footer ul { list-style: none; padding: 0; margin: 0; }
.ct-footer li { font-size: 13px; color: var(--ink-700); padding: 4px 0; }
.ct-footer li a:hover { color: var(--brand-500); }
.ct-footer-bottom {
  border-top: 1px solid var(--ink-200);
  margin-top: 32px;
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-500);
}

/* Responsive */
@media (max-width: 768px) {
  .ct-topbar, .ct-footer-grid { display: none; }
  .ct-header { padding: 8px 0; height: auto; }
  .ct-header .container { flex-wrap: wrap; }
  .ct-search { order: 3; flex-basis: 100%; }
}

/* ============================================================
   品牌官網 — Editorial 編輯式留白（與商城共用 token）
   ============================================================ */
html { scroll-behavior: smooth; }
.serif { font-family: "Noto Serif TC", "Songti TC", serif; }
.ct-official { background: #fff; color: var(--ink-900); }
.ct-official [id^="off-"] { scroll-margin-top: 100px; }
.off-wrap { max-width: 1280px; margin: 0 auto; padding: 0 60px; }
.off-imgph {
  background: repeating-linear-gradient(45deg, var(--ink-100) 0 8px, var(--ink-50) 8px 16px);
  display: grid; place-items: center; color: var(--ink-500);
  font-family: var(--font-mono); font-size: 12px; border-radius: 2px; margin-top: 64px;
}
.off-ic { width: 26px; height: 26px; }

/* Header */
.off-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-200);
}
.off-header-inner { height: 84px; display: flex; align-items: center; justify-content: space-between; }
.off-logo { display: inline-flex; align-items: center; gap: 10px; }
.off-logo-img { height: 36px; width: auto; display: block; }
.off-logo .serif { font-size: 26px; font-weight: 600; letter-spacing: 0.04em; color: var(--ink-900); }
.off-logo-sub { font-size: 13px; color: var(--ink-500); }
.off-tw { font-size: 12px; color: var(--brand-600); letter-spacing: 0.1em; }
.off-nav { display: flex; gap: 30px; }
.off-nav a { font-size: 14px; color: var(--ink-700); letter-spacing: 0.02em; }
.off-nav a:hover { color: var(--ink-900); }
.off-header-right { display: flex; align-items: center; gap: 28px; }
.off-toggle { display: inline-flex; gap: 22px; }
.off-toggle a { font-size: 13px; letter-spacing: 0.04em; color: var(--ink-400); padding-bottom: 6px; position: relative; }
.off-toggle a.is-active { color: var(--ink-900); font-weight: 600; }
.off-toggle a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--brand-600); }
.off-enter { font-size: 13px; color: var(--ink-900); border-bottom: 1px solid var(--ink-900); padding-bottom: 2px; white-space: nowrap; }

/* Hero */
.off-hero { padding-top: 96px; }
.off-kicker { font-size: 12px; letter-spacing: 0.22em; color: var(--ink-500); text-transform: uppercase; }
.off-hero-h { font-size: 88px; font-weight: 400; line-height: 1.08; letter-spacing: 0.01em; margin: 28px 0 0; }
.off-hero-row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 48px; gap: 64px; }
.off-lead { font-size: 18px; line-height: 1.9; color: var(--ink-700); max-width: 540px; font-weight: 300; }
.off-textlink { font-size: 14px; color: var(--ink-900); white-space: nowrap; border-bottom: 1px solid var(--ink-900); padding-bottom: 4px; display: inline-flex; align-items: center; gap: 8px; }
.off-textlink .off-ic { width: 14px; height: 14px; }

/* Stats */
.off-stats { display: grid; grid-template-columns: repeat(4,1fr); border-top: 1px solid var(--ink-200); border-bottom: 1px solid var(--ink-200); }
.off-stat { padding: 40px 0; }
.off-stat + .off-stat { border-left: 1px solid var(--ink-200); padding-left: 40px; }
.off-stat-n { font-size: 52px; font-weight: 400; letter-spacing: -0.01em; }
.off-stat-n span { font-size: 22px; color: var(--brand-600); margin-left: 2px; }
.off-stat-l { font-size: 14px; color: var(--ink-500); margin-top: 10px; letter-spacing: 0.04em; }

/* Section heads */
.off-secnum { display: flex; align-items: baseline; gap: 14px; }
.off-num { font-size: 13px; color: var(--brand-600); }
.off-row-between { display: flex; justify-content: space-between; align-items: baseline; }
.off-2col { display: grid; gap: 88px; margin-top: 44px; align-items: start; }
.off-h2 { font-size: 40px; font-weight: 400; line-height: 1.4; }
.off-h2-lg { font-size: 44px; font-weight: 400; line-height: 1.3; }
.off-body { font-size: 16px; line-height: 2; color: var(--ink-700); font-weight: 300; }
.off-miles { margin-top: 40px; }
.off-mile { display: flex; gap: 28px; padding: 20px 0; border-top: 1px solid var(--ink-200); }
.off-year { font-size: 14px; color: var(--brand-600); width: 52px; flex-shrink: 0; }
.off-mile span:last-child { font-size: 15px; line-height: 1.7; color: var(--ink-700); }

/* News */
.off-news { margin-top: 36px; }
.off-news-row { display: grid; grid-template-columns: 130px 90px 1fr 24px; gap: 28px; align-items: center; padding: 26px 0; border-top: 1px solid var(--ink-200); }
.off-news-row:hover { background: var(--ink-50); }
.off-news-row:hover .off-news-title { color: var(--brand-700); }
.off-news-date { font-size: 13px; color: var(--ink-500); }
.off-news-tag { font-size: 12px; color: var(--brand-700); letter-spacing: 0.06em; }
.off-news-title { font-size: 19px; color: var(--ink-900); line-height: 1.5; }
.off-news-row .off-ic { width: 16px; height: 16px; }

/* Services */
.off-svc { display: grid; grid-template-columns: repeat(4,1fr); margin-top: 40px; }
.off-svc-item { padding: 32px 28px 32px 0; border-top: 1.5px solid var(--ink-900); }
.off-svc-t { font-size: 22px; font-weight: 500; margin: 20px 0 12px; }
.off-svc-d { font-size: 14px; line-height: 1.8; color: var(--ink-500); font-weight: 300; }
.off-cta-row { margin-top: 44px; display: flex; gap: 16px; flex-wrap: wrap; }
.off-btn-dark { font-size: 14px; color: #fff; background: var(--ink-900); padding: 14px 28px; border-radius: 2px; }
.off-btn-line { font-size: 14px; color: var(--ink-900); border: 1px solid var(--ink-900); padding: 14px 28px; border-radius: 2px; }

/* Catalog */
.off-catalog-lead { font-size: 24px; font-weight: 400; margin: 20px 0 40px; max-width: 620px; line-height: 1.5; }
.off-catgrid { display: grid; grid-template-columns: repeat(5,1fr); border-top: 1px solid var(--ink-200); border-left: 1px solid var(--ink-200); }
.off-cat { padding: 30px 24px; border-right: 1px solid var(--ink-200); border-bottom: 1px solid var(--ink-200); display: flex; flex-direction: column; gap: 16px; min-height: 132px; justify-content: space-between; }
.off-cat:hover { background: var(--ink-50); }
.off-cat-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--brand-50); color: var(--brand-700); display: grid; place-items: center; font-size: 18px; font-weight: 600; }
.off-cat-name { font-size: 15px; color: var(--ink-900); display: flex; align-items: center; justify-content: space-between; }
.off-cat-name .off-ic { width: 13px; height: 13px; }
.off-cat-code { font-size: 12px; color: var(--brand-600); letter-spacing: 0.1em; }

/* Clients / 合作實績 */
.off-clients { display: grid; grid-template-columns: repeat(4,1fr); }
.off-client { padding: 28px 28px 28px 0; border-top: 1px solid var(--ink-200); }
.off-client-t { font-size: 16px; font-weight: 600; color: var(--ink-900); margin: 0 0 10px; }
.off-client-d { font-size: 14px; line-height: 1.7; color: var(--ink-500); font-weight: 300; margin: 0; }
.off-clients-note { font-size: 13px; color: var(--ink-400); margin-top: 28px; letter-spacing: 0.02em; }

/* 車輛管理系統 — 深色橫幅 + 客戶登入 */
.off-login { font-size: 13px; color: var(--ink-500); white-space: nowrap; }
.off-login:hover { color: var(--ink-900); }
.off-vms { background: var(--ink-900); color: #fff; margin-top: 8px; }
.off-vms .off-kicker { color: rgba(255,255,255,0.55); }
.off-vms-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 64px; margin-top: 28px; align-items: center; }
.off-vms-num { font-size: 13px; color: var(--brand-300); }
.off-vms-h { color: #fff; font-size: 40px; line-height: 1.35; margin: 12px 0 20px; }
.off-vms-lead { font-size: 16px; line-height: 1.9; color: rgba(255,255,255,0.75); max-width: 520px; font-weight: 300; }
.off-vms-cta { display: flex; gap: 16px; margin-top: 32px; flex-wrap: wrap; }
.off-btn-white { font-size: 14px; color: var(--ink-900); background: #fff; padding: 14px 28px; border-radius: 2px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.off-btn-ghostw { font-size: 14px; color: #fff; border: 1px solid rgba(255,255,255,0.5); padding: 14px 28px; border-radius: 2px; }
.off-vms-note { font-size: 12.5px; color: rgba(255,255,255,0.45); margin-top: 16px; }
.off-feats { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(255,255,255,0.15); border-left: 1px solid rgba(255,255,255,0.15); }
.off-feat { padding: 22px 20px; border-right: 1px solid rgba(255,255,255,0.15); border-bottom: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: rgba(255,255,255,0.9); }
.off-feat .off-ic { width: 16px; height: 16px; color: var(--brand-300); flex-shrink: 0; }

/* Contact */
.off-contact-list { display: flex; flex-direction: column; gap: 18px; }
.off-contact-item { font-size: 15px; color: var(--ink-700); border-top: 1px solid var(--ink-200); padding-top: 16px; }

/* Footer */
.off-footer { background: #fff; border-top: 1px solid var(--ink-200); }
.off-footer-inner { padding: 48px 60px; display: flex; justify-content: space-between; align-items: center; }
.off-footer .off-logo .serif { font-size: 20px; }
.off-footer .off-logo-sub { font-size: 11px; }
.off-footer .off-logo-img { height: 28px; }
.off-footer-links { display: flex; gap: 28px; font-size: 13px; color: var(--ink-500); flex-wrap: wrap; }
.off-footer-links a:hover { color: var(--brand-600); }
.off-footer-line { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-500); line-height: 1.5; flex: 0 0 auto; }
.off-footer-line img { width: 56px; height: 56px; border: 1px solid var(--ink-200); border-radius: 4px; background: #fff; padding: 3px; box-sizing: border-box; }
.off-footer-line:hover { color: var(--brand-600); }
.off-copy { font-size: 12px; color: var(--ink-400); }

/* 商城頂列的「品牌官網 / 購物商城」切換 */
.ct-mode-toggle { display: inline-flex; gap: 16px; align-items: center; }
.ct-mode-toggle a { color: rgba(255,255,255,0.55); padding: 0 0 4px; position: relative; }
.ct-mode-toggle a.is-active { color: #fff; font-weight: 600; }
.ct-mode-toggle a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--brand-300); }

@media (max-width: 900px) {
  .off-wrap { padding: 0 24px; }
  .off-footer-inner { padding: 36px 24px; }
  .off-nav { display: none; }
  .off-hero-h { font-size: 52px; }
  .off-hero-row { flex-direction: column; align-items: flex-start; gap: 28px; }
  .off-2col { grid-template-columns: 1fr !important; gap: 28px; }
  .off-stats, .off-svc { grid-template-columns: 1fr; }
  .off-clients { grid-template-columns: 1fr 1fr; }
  .off-vms-grid { grid-template-columns: 1fr; gap: 36px; }
  .off-stat + .off-stat { border-left: none; padding-left: 0; border-top: 1px solid var(--ink-200); }
  .off-svc-item { border-top: 1.5px solid var(--ink-900); }
  .off-catgrid { grid-template-columns: repeat(2,1fr); }
  .off-news-row { grid-template-columns: 1fr; gap: 6px; }
  .off-news-row .off-ic { display: none; }
  .off-footer-inner { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ============================================
   多頁官網（首頁區塊卡 / 子頁 / 型錄翻書 / 頁底導覽）
   ============================================ */

/* 導覽 active */
.off-nav a.is-active { color: var(--ink-900); font-weight: 600; border-bottom: 1.5px solid var(--brand-500); padding-bottom: 3px; }

/* 子頁標題 */
.off-pagehead-h { font-size: 60px; font-weight: 400; line-height: 1.18; letter-spacing: 0.01em; margin: 24px 0 0; font-family: "Noto Serif TC", serif; }

/* 首頁：區塊導引卡 */
.off-secgrid { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--ink-200); border-left: 1px solid var(--ink-200); margin-top: 32px; }
.off-seccard { padding: 36px 32px; border-right: 1px solid var(--ink-200); border-bottom: 1px solid var(--ink-200); display: flex; flex-direction: column; gap: 16px; min-height: 220px; justify-content: space-between; transition: background .15s ease; }
.off-seccard:hover { background: var(--ink-50); }
.off-seccard-k { font-size: 12px; color: var(--brand-600); letter-spacing: 0.1em; display: block; }
.off-seccard-t { font-size: 28px; font-weight: 400; color: var(--ink-900); margin: 16px 0 12px; }
.off-seccard-d { font-size: 14px; line-height: 1.8; color: var(--ink-500); font-weight: 300; margin: 0; }
.off-seccard-arrow { color: var(--ink-900); }
.off-seccard-arrow .off-ic { width: 18px; height: 18px; }
.off-seccard:hover .off-seccard-arrow { transform: translateX(4px); }
.off-seccard-arrow { transition: transform .2s ease; }

/* 頁底：上一頁 / 下一頁 */
.off-pagenav { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--ink-200); padding-top: 28px; padding-bottom: 56px; }
.off-pagenav-a { display: inline-flex; align-items: center; gap: 10px; font-size: 16px; color: var(--ink-900); }
.off-pagenav-a:hover { color: var(--brand-700); }
.off-pagenav-a .off-ic { width: 16px; height: 16px; }
.off-pagenav-next { margin-left: auto; }

/* CTA 深色橫幅（型錄 / 合作實績共用） */
.off-ctaband { margin-top: 8px; margin-bottom: 56px; }
.off-ctaband-inner { padding-top: 56px; padding-bottom: 56px; display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }

/* 型錄：翻書清單 — 4 列封面（點封面才在燈箱開整本） */
.off-books { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px 24px; }
.off-book { border-top: 1.5px solid var(--ink-900); padding-top: 16px; }
.off-book-head { display: flex; flex-direction: column; gap: 4px; }
.off-book-head-l { display: flex; align-items: baseline; gap: 10px; }
.off-book-t { font-size: 18px; font-weight: 500; color: var(--ink-900); margin: 0; line-height: 1.4; }
.off-book-meta { font-size: 11px; color: var(--ink-500); letter-spacing: 0.04em; }
.off-book-stage { margin-top: 14px; background: var(--ink-50); border: 1px solid var(--ink-200); border-radius: 2px; padding: 10px; min-height: 220px; display: grid; place-items: center; }
.off-book-stage img { max-width: 100%; height: auto; cursor: pointer; display: block; }
.off-book-stage .df-container, .off-book-stage ._df_book, .off-book-stage .dflip-container,
.off-book-stage .fb3d-thumbnail-lightbox-mode, .off-book-stage [class*="thumbnail"] { margin: 0 auto; max-width: 100%; cursor: pointer; }
.off-book-fallback { min-height: 200px; display: grid; place-items: center; text-align: center; color: var(--ink-500); font-size: 13px; line-height: 1.8; }
/* 禁止下載型錄：隱藏 3D FlipBook 工具列的「下載(cmdSave)」按鈕 */
.cmd.cmdSave, a.cmdSave, .cmdSave,
li:has(> .cmdSave), li:has(> a.cmdSave) { display: none !important; }

/* 聯絡：資訊格 */
.off-contact-grid { display: flex; flex-direction: column; }
.off-contact-row { border-top: 1px solid var(--ink-200); padding: 16px 0; }
.off-contact-k { font-size: 11px; color: var(--brand-600); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px; }
.off-contact-v { font-size: 15px; color: var(--ink-800); }
.off-contact-link { font-size: 14px; color: var(--ink-900); display: inline-flex; align-items: center; gap: 6px; }
.off-contact-link:hover { color: var(--brand-700); }

/* 聯絡：快速詢問表單 */
.off-inquiry .off-form { max-width: 640px; }
.off-form .off-field { margin: 0 0 20px; }
.off-form .off-field label { display: block; font-size: 13px; color: var(--ink-700); margin-bottom: 8px; letter-spacing: 0.02em; }
.off-form .off-field .req { color: var(--brand-600); }
.off-form input[type="text"], .off-form input[type="email"], .off-form textarea {
  width: 100%; box-sizing: border-box; font-family: inherit; font-size: 15px; color: var(--ink-900);
  background: #fff; border: 1px solid var(--ink-300); border-radius: 2px; padding: 12px 14px; }
.off-form input[type="text"]:focus, .off-form input[type="email"]:focus, .off-form textarea:focus {
  outline: none; border-color: var(--ink-900); }
.off-form textarea { min-height: 140px; resize: vertical; }
.off-form input[type="file"] { font-size: 14px; color: var(--ink-700); padding: 8px 0; width: 100%; }
.off-form .off-field-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-500); }
/* 聯絡表單：拖曳 / 貼上 上傳區 */
.off-dz-hidden { position: absolute !important; width: 1px; height: 1px; opacity: 0; overflow: hidden; padding: 0 !important; margin: -1px; }
.off-dropzone { border: 1.5px dashed var(--ink-300); border-radius: 4px; padding: 24px 16px; text-align: center; cursor: pointer; background: var(--ink-50); transition: border-color .2s, background .2s; }
.off-dropzone:hover, .off-dropzone.is-over { border-color: var(--ink-900); background: #fff; }
.off-dz-text { font-size: 13px; color: var(--ink-500); }
.off-dz-text b { color: var(--ink-800); font-weight: 600; }
.off-dz-preview:not(:empty) { margin-top: 14px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.off-dz-preview img { max-width: 130px; max-height: 130px; border: 1px solid var(--ink-200); border-radius: 4px; }
.off-dz-name { font-size: 12px; color: var(--ink-700); }
.off-dz-clear { font-size: 12px; color: var(--brand-600); text-decoration: underline; cursor: pointer; }
.off-form .off-submit { margin: 6px 0 0; }
.off-form .wpcf7-submit {
  background: var(--ink-900); color: #fff; border: 0; border-radius: 2px;
  padding: 14px 34px; font-size: 15px; letter-spacing: 0.05em; cursor: pointer; transition: background .2s; }
.off-form .wpcf7-submit:hover { background: var(--brand-700); }
.off-form .wpcf7-spinner { margin: 0 0 0 10px; }
.off-form .wpcf7-not-valid-tip { color: #d33; font-size: 12px; margin-top: 6px; }
.off-form .wpcf7-response-output { margin: 18px 0 0 !important; padding: 12px 14px !important; font-size: 14px; border-radius: 2px; }

/* 聯絡：地圖 */
.off-map { width: 100%; height: 380px; border: 0; border-radius: 2px; display: block; background: var(--ink-50); }
/* 聯絡：官方 LINE QR */
.off-line-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.off-line-qr { width: 112px; height: 112px; flex: 0 0 auto; border: 1px solid var(--ink-200); border-radius: 4px; background: #fff; padding: 4px; box-sizing: border-box; }

/* 官網手機選單（漢堡） */
.off-burger { display: none; }
.off-mnav { display: none; }
@media (max-width: 1080px) {
  .off-nav { display: none; }
  .off-header-right { display: none; }
  .off-burger { display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; margin-left: auto; padding: 0; background: none; border: 0; cursor: pointer; }
  .off-burger span { display: block; width: 24px; height: 2px; background: var(--ink-900); transition: transform .25s, opacity .2s; }
  .off-burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .off-burger.is-active span:nth-child(2) { opacity: 0; }
  .off-burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .off-header-inner { flex-wrap: nowrap; }
  .off-mnav.is-open { display: block; }
  .off-mnav-inner { display: flex; flex-direction: column; padding-top: 6px; padding-bottom: 18px; }
  .off-mnav a { padding: 14px 2px; font-size: 16px; color: var(--ink-900); border-bottom: 1px solid var(--ink-100); }
  .off-mnav a.is-active { color: var(--brand-600); }
  .off-mnav-sep { height: 6px; }
  .off-mnav-cta { color: var(--brand-700) !important; font-weight: 600; border-bottom: 0 !important; }
}
@media (max-width: 900px) {
  .off-pagehead-h { font-size: 40px; }
  .off-secgrid { grid-template-columns: 1fr; }
  .off-ctaband-inner { flex-direction: column; align-items: flex-start; }
  .off-books { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 480px) {
  .off-books { grid-template-columns: 1fr; }
}
@media (min-width: 901px) and (max-width: 1180px) {
  .off-secgrid { grid-template-columns: repeat(2,1fr); }
  .off-books { grid-template-columns: repeat(3,1fr); }
}

/* 頂部通知下拉 */
.ct-noti-wrap { position: relative; display: inline-block; }
.ct-noti-panel { position: absolute; right: 0; top: calc(100% + 10px); width: 290px; background: #fff; border: 1px solid var(--ink-200); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); display: none; z-index: 99; padding: 6px; }
.ct-noti-panel.open { display: block; }
.ct-noti-title { display: block; font-size: 13px; font-weight: 700; color: var(--ink-900); padding: 8px 10px; border-bottom: 1px solid var(--ink-100); }
.ct-noti-wrap .ct-iconbtn { position: relative; }
.ct-noti-badge { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; border-radius: 9px; box-sizing: border-box; }
.ct-noti-tabs { display: flex; border-bottom: 1px solid var(--ink-100); margin-bottom: 4px; }
.ct-noti-tab { flex: 1; background: none; border: 0; padding: 9px 4px; font-size: 13px; font-weight: 600; color: var(--ink-500); cursor: pointer; border-bottom: 2px solid transparent; }
.ct-noti-tab.on { color: var(--brand-700); border-bottom-color: var(--brand-600); }
.ct-noti-item .m { display: block; font-size: 12px; color: var(--ink-700); margin-top: 2px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; }
.ct-noti-item { display: block; padding: 9px 10px; border-radius: 8px; }
.ct-noti-item:hover { background: var(--brand-50); }
.ct-noti-item .t { display: block; font-size: 13px; color: var(--ink-800); font-weight: 500; }
.ct-noti-item .d { display: block; font-size: 11px; color: var(--ink-500); margin-top: 2px; }
.ct-noti-empty { display: block; padding: 16px 10px; font-size: 12.5px; color: var(--ink-500); text-align: center; }
.ct-noti-all { display: block; text-align: center; font-size: 12px; color: var(--brand-600); padding: 8px 0 6px; border-top: 1px solid var(--ink-100); }

/* 商城公告列 */
.ct-annbar { font-size: 13px; transition: background .45s ease, color .45s ease; }
.ct-annbar .container { display: flex; align-items: center; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.ct-ann-track { position: relative; flex: 1; height: 20px; overflow: hidden; }
.ct-ann-item { position: absolute; inset: 0; display: flex; align-items: center; opacity: 0; transition: opacity .45s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-ann-item.on { opacity: 1; }
.ct-ann-item a, .ct-ann-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-ann-nav { background: none; border: 0; cursor: pointer; font-size: 20px; line-height: 1; color: inherit; opacity: .55; padding: 0 6px; flex: 0 0 auto; }
.ct-ann-nav:hover { opacity: 1; }
.ct-ann-dots { display: flex; gap: 5px; align-items: center; flex: 0 0 auto; }
.ct-ann-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .3; cursor: pointer; padding: 0; border: 0; }
.ct-ann-dot.on { opacity: .9; }
.ct-annbar a { text-decoration: underline; }
.ct-annbar .x { margin-left: auto; font-size: 16px; opacity: .6; padding: 0 4px; }
.ct-annbar .x:hover { opacity: 1; }
.ct-annbar.tone-blue { background: var(--brand-50); color: var(--brand-700); border-bottom: 1px solid var(--brand-100); }
.ct-annbar.tone-orange { background: #fff7ed; color: #c2410c; border-bottom: 1px solid #fed7aa; }
.ct-annbar.tone-red { background: #fef2f2; color: #b91c1c; border-bottom: 1px solid #fecaca; }

/* 商品影片(單一商品頁) */
.ct-pvideo-sec { margin: 34px 0; }
.ct-pvideo-h { font-size: 18px; font-weight: 700; color: var(--ink-900, #1f2937); margin: 0 0 14px; }
.ct-pvideo { position: relative; width: 100%; max-width: 760px; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; }
.ct-pvideo iframe, .ct-pvideo video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ct-pvideo-link a { display: inline-block; padding: 10px 18px; background: var(--brand-600, #2563eb); color: #fff; border-radius: 8px; font-weight: 600; }
