/* ============================================================
   Barlow Condensed — 英文小標籤用的窄體（自帶，Latin 子集，500/600）
   設計稿 (*.dc.html) 用它排 kicker / READ MORE / VIEW ALL / 編號…等大寫標籤。
   佈景各處的字堆已寫 "Barlow Condensed" 在最前面，載入後自動生效。
   ============================================================ */
@font-face {
	font-family: "Barlow Condensed";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("fonts/barlow-condensed-500.woff2") format("woff2");
}
@font-face {
	font-family: "Barlow Condensed";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("fonts/barlow-condensed-600.woff2") format("woff2");
}

/* ============================================================
   reveal.css — scroll-in animations (replaces WOW.js + animate.css)
   Hook class: .wow  (kept for template compatibility)
   Direction classes kept: fadeInUp / fadeInDown / fadeInRight / zoomIn
   Driven by js/theme.js (IntersectionObserver).
   ============================================================ */

/* Base: hidden until revealed */
.wow {
	opacity: 0;
	animation-duration: .8s;
	animation-fill-mode: both;
	animation-play-state: paused;
	will-change: transform, opacity;
}
/* When JS is disabled or IO unsupported, don't hide content */
.no-reveal .wow {
	opacity: 1;
	animation: none;
}

/* Trigger */
.wow.is-visible {
	animation-play-state: running;
}

.wow.fadeInUp    { animation-name: revealFadeInUp; }
.wow.fadeInDown  { animation-name: revealFadeInDown; }
.wow.fadeInRight { animation-name: revealFadeInRight; }
.wow.fadeInLeft  { animation-name: revealFadeInLeft; }
.wow.zoomIn      { animation-name: revealZoomIn; }
.wow.fadeIn      { animation-name: revealFadeIn; }

/* Standalone helpers used by mainvision inline script (.animated.fadeInDown etc.) */
.animated { animation-duration: .8s; animation-fill-mode: both; }
.animated.fadeInDown { animation-name: revealFadeInDown; }
.animated.fadeInUp   { animation-name: revealFadeInUp; }
.animated.fadeInRight{ animation-name: revealFadeInRight; }

@keyframes revealFadeInUp {
	from { opacity: 0; transform: translate3d(0, 40px, 0); }
	to   { opacity: 1; transform: none; }
}
@keyframes revealFadeInDown {
	from { opacity: 0; transform: translate3d(0, -40px, 0); }
	to   { opacity: 1; transform: none; }
}
@keyframes revealFadeInRight {
	from { opacity: 0; transform: translate3d(40px, 0, 0); }
	to   { opacity: 1; transform: none; }
}
@keyframes revealFadeInLeft {
	from { opacity: 0; transform: translate3d(-40px, 0, 0); }
	to   { opacity: 1; transform: none; }
}
@keyframes revealZoomIn {
	from { opacity: 0; transform: scale3d(.85, .85, .85); }
	to   { opacity: 1; transform: none; }
}
@keyframes revealFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.wow, .animated { opacity: 1 !important; animation: none !important; transform: none !important; }
}

/* ============================================================
   .mgrid / .mgrid-item — masonry plugin removed; render as a
   plain responsive flex grid (equal rows). Bottom spacing only.
   ============================================================ */
.mgrid > .mgrid-item { margin-bottom: 1.5rem; }

/* ============================================================
   Back-to-top button (replaces UItoTop plugin markup)
   #toTop styling still lives in css/ui.totop.css; this just
   handles the visible state toggled by js/theme.js
   ============================================================ */
#toTop.is-visible { display: block; }

/* ============================================================
   Horizontal product slider (replaces Owl Carousel)
   Faithful 2-up strip mirroring the old owl config
   (items:2, itemsMobile:1). Applied to #assos-item,
   #nc_product_block_new_product, #nc_product_block_best_product
   via .hscroll. Arrows + autoplay: js/theme.js.
   ============================================================ */
.hscroll {
	display: flex;
	gap: 6px;                         /* == old .item{margin:3px} gutter */
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;          /* Firefox — hide native bar, use dots */
}
.hscroll::-webkit-scrollbar { display: none; }   /* WebKit/Blink */
.hscroll > .item {
	scroll-snap-align: start;
	flex: 0 0 auto;
	width: 100%;                      /* < 480px: 1-up (owl itemsMobile) */
	margin: 0;                        /* gutter handled by flex gap */
}
@media (min-width: 480px) {
	.hscroll > .item { width: calc(50% - 3px); }   /* 2-up */
}
@media (min-width: 1200px) {
	#assos-item.hscroll > .item { width: calc(33.333% - 4px); }  /* assoc: 3-up */
}

/* Uniform card images so the 2-up row lines up cleanly (owl rows were ragged) */
/* NOTE: wr bid 35 (最新商品) no longer uses .hscroll — it's the Home Products
   scroller (.hp-*) in css/btp.css. These rules now cover the nc_product blocks only. */
#nc_product_block_new_product .thumbnails-product,
#nc_product_block_best_product .thumbnails-product {
	aspect-ratio: 4 / 3;
	background: #f2f2f2;
}
#nc_product_block_new_product .thumbnails-product img,
#nc_product_block_best_product .thumbnails-product img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* prev/next arrows — black square, edge-hung, vertically centred on the
   image (top offset set per-strip by js/theme.js: --hscroll-arrow-top) */
.hscroll-wrap { position: relative; }
.hscroll-nav {
	position: absolute;
	top: var(--hscroll-arrow-top, 40%);
	transform: translateY(-50%);
	z-index: 3;
	width: 30px;
	height: 30px;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #000;
	color: #fff;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s, opacity .2s;
}
.hscroll-wrap.has-nav .hscroll-nav { display: flex; }
.hscroll-nav:hover { background: #4555B9; }
.hscroll-nav:disabled { opacity: .25; cursor: default; }
.hscroll-nav-prev { left: -7px; }
.hscroll-nav-next { right: -7px; }

/* pagination dots (js/theme.js builds them; count follows the viewport) */
.hscroll-dots {
	display: none;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
}
.hscroll-wrap.has-nav .hscroll-dots { display: flex; }
.hscroll-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #cfcfcf;
	cursor: pointer;
	transition: background .2s, transform .2s;
}
.hscroll-dot:hover { background: #999; }
.hscroll-dot.is-active { background: #4555B9; transform: scale(1.2); }

@media (prefers-reduced-motion: reduce) {
	.hscroll { scroll-behavior: auto; }
}

/* ============================================================
   wr 商品目錄區塊 (bid 34) — themes/…/modules/wr/blocks/wr_block.html
   設計稿：CADCH_00025A/WR Categories.dc.html 左欄。
   （佈景不會自動掛載區塊同名 .css，故區塊樣式一律寫在本檔；
    清單頁 wr_index.html 的樣式則內嵌在該樣板的 <style>。）
   ============================================================ */
.wrcat { font-size: 15px; color: #3a4348; }
.wrcat-eyebrow {
	font-family: "Barlow Condensed","Oswald","Segoe UI",sans-serif;
	font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
	color: #8b9296; margin-bottom: 14px;
}
.wrcat-head {
	font-size: 20px; font-weight: 700; color: #0c1013;
	padding-bottom: 16px; border-bottom: 2px solid #0c1013;
}
.wrcat-tree, .wrcat-sub { list-style: none; margin: 0; padding: 0; }
.wrcat-node { border-bottom: 1px solid rgba(12,16,19,.08); }
.wrcat-link {
	display: flex; align-items: baseline; gap: 10px;
	padding: 13px 0; color: #3a4348; text-decoration: none; line-height: 1.5;
	transition: color .2s ease, padding-left .2s ease;
}
.wrcat-link:hover, .wrcat-link:focus { color: #0c1013; padding-left: 6px; }
.wrcat-link i { color: #a37700; font-size: .9em; flex-shrink: 0; }
.wrcat-name { min-width: 0; }
.wrcat-node.is-current > .wrcat-link {
	color: #0c1013; font-weight: 700;
	box-shadow: inset 3px 0 0 #FFBA00; padding-left: 12px;
}
.wrcat-node.is-off > .wrcat-link { opacity: .45; }
.wrcat-sub .wrcat-link { padding-left: 16px; font-size: 14px; color: #5b6669; }
.wrcat-sub .wrcat-link:hover { padding-left: 22px; }
.wrcat-sub .wrcat-node:last-child { border-bottom: 0; }
.wrcat-empty { color: #8b9296; padding: 13px 0; margin: 0; }
/* 本區塊自帶標頭 → 隱藏佈景 .block-title 的深色列，避免兩個標頭
   （後台把區塊標題留空是更保險的做法） */
.xoops-side-blocks aside:has(.wrcat) > h4.block-title { display: none; }


/* ============================================================
   pages 模組（內容管理系統）—— 版型設計系統
   設計稿：CADCH_00025A/About Map.dc.html
   由 modules/pages/templates/mode/1..5.tpl 的語意標記套用。
   色票 ink #0c1013 / 內文 #384146 / 次要 #8b9296·#5b6669 /
        金字 #a37700 / 強調黃 #FFBA00 / 深底 #0b0d0f / 髮絲線 rgba(12,16,19,.12)
   ============================================================ */
/* 變數掛在 body#pages（pages_index.html 無外層 wrapper；mode/1 的 <script>
   還會把 .pg-hero/.pg-crumb 提到主欄外，掛低了 var() 會失效）*/
body#pages{ --pg-ink:#0c1013; --pg-body:#384146; --pg-mut:#8b9296; --pg-mut2:#5b6669;
	--pg-gold:#a37700; --pg-accent:#FFBA00; --pg-dark:#0b0d0f; --pg-line:rgba(12,16,19,.12);
	--pg-line-2:rgba(12,16,19,.08); --pg-soft:#f6f6f4;
}
.pg-cond,
.pg-eyebrow,.pg-hero-kicker,.pg-card-eyebrow,.pg-cta,.pg-crumb,.pg-map-cta,.pg-addr-lb{
	font-family:"Barlow Condensed","Oswald","Helvetica Neue",-apple-system,"Segoe UI",sans-serif;
}

/* ---- 佈景版位整合：pages 頁把 canvas_left 從 col-md-2 調成 3/9（比照 wr）---- */
body#pages .maincontainer{ margin-top:clamp(16px,2.5vw,32px); }
body#pages .maincontainer > .row{ margin-left:0; margin-right:0; }
body#pages .maincontainer > .row > [class*="col-"]{ padding-left:0; padding-right:0; }
@media (min-width:768px){
	body#pages .maincontainer > .row > .xoops-side-blocks{ width:25%; max-width:25%; padding-right:34px; }
	body#pages .maincontainer > .row > .xoops-side-blocks + div[class*="col-"]{ width:75%; max-width:75%; }
}
@media (max-width:767.98px){
	body#pages .maincontainer > .row > .xoops-side-blocks{ width:100%; max-width:100%; margin-bottom:8px; }
}

/* ------------------------------------------------------------------
   手機版：左/右側區塊(.xoops-side-blocks)排到內容「下方」
   來源順序是「側欄 → 內容」，堆疊時側欄會佔滿最上面，使用者要往下捲才
   看得到正文。.row 是 flexbox，用 order 把側欄挪到內容之後即可
   （不改 DOM 順序，pages/wr 用的相鄰選擇器 .xoops-side-blocks + div 仍成立）。
   ------------------------------------------------------------------ */
@media (max-width:767.98px){
	.maincontainer > .row > .xoops-side-blocks{
		order:99;
		margin-top:clamp(24px,6vw,40px);
	}
}
/* pages_index.html 把「列標題」印成 <h2 class="col-sm-12">；給它段落一致的左右留白 */
body#pages .maincontainer .row > h2.col-sm-12{
	padding:clamp(44px,6vw,70px) clamp(20px,4vw,40px) 0; margin:0;
	font-size:clamp(24px,2.6vw,36px); line-height:1.25; font-weight:700; color:var(--pg-ink); border:0;
}

/* ---- 深色頁首（mode 1，item 標題含「|」時才輸出）---- */
body#pages #maincontent > .pg-hero{ width:100%; }
.pg-hero{ position:relative; overflow:hidden; background:var(--pg-dark); color:#fff; }
.pg-hero::before{ content:""; position:absolute; inset:0;
	background:repeating-linear-gradient(115deg,#12171b 0 22px,#0f1418 22px 44px); opacity:.9; }
.pg-hero::after{ content:""; position:absolute; inset:0; z-index:1;
	background:linear-gradient(to right,rgba(6,9,11,.92),rgba(6,9,11,.45)); }
.pg-hero-inner{ position:relative; z-index:2; padding:52px clamp(20px,5vw,80px); }
.pg-hero-kicker{ display:inline-flex; align-items:center; gap:12px; margin-bottom:18px;
	padding:7px 16px 7px 12px; background:var(--pg-accent); color:#06090b;
	font-size:14px; font-weight:700; letter-spacing:.22em; text-transform:uppercase; line-height:1; }
.pg-hero-kicker::before{ content:""; width:22px; height:2px; background:#06090b; }
.pg-hero-title{ margin:0; color:#fff; font-weight:700; line-height:1.12; letter-spacing:-.01em;
	font-size:clamp(30px,4.4vw,52px); }

/* ---- 麵包屑（mode 1）---- */
body#pages #maincontent > .pg-crumb{ width:100%; }
.pg-crumb{ background:#fafafa; border-bottom:1px solid var(--pg-line); }
.pg-crumb-in{ display:flex; flex-wrap:wrap; align-items:center; gap:10px;
	padding:16px clamp(20px,5vw,80px); font-size:14px; color:var(--pg-mut2); }
.pg-crumb-in a{ color:var(--pg-mut2); text-decoration:none; }
.pg-crumb-in a:hover{ color:var(--pg-ink); }
.pg-crumb-in .sep{ color:#b7bfc2; }
.pg-crumb-in .cur{ color:var(--pg-ink); }

/* ---- 段落區塊共用 ---- */
.pg-section{ padding:clamp(44px,6vw,70px) clamp(20px,4vw,40px) 0; }
.pg-section:first-child{ padding-top:clamp(28px,4vw,48px); }
.pg-eyebrow{ font-size:15px; font-weight:600; letter-spacing:.22em; text-transform:uppercase;
	color:var(--pg-gold); margin-bottom:10px; }
.pg-h2{ margin:0 0 12px; font-size:clamp(24px,2.6vw,36px); line-height:1.25; font-weight:700;
	color:var(--pg-ink); border:0; padding:0; }
.pg-rule{ display:block; width:56px; height:3px; background:var(--pg-accent); margin-bottom:28px; }
.pg-section-body{ display:flex; flex-direction:column; gap:clamp(24px,3vw,36px); }

/* ---- 內文 ---- */
.pg-prose{ font-size:17px; line-height:2; font-weight:300; color:var(--pg-body); }
.pg-prose > :first-child{ margin-top:0; }
.pg-prose > :last-child{ margin-bottom:0; }
.pg-prose p{ margin:0 0 1em; text-wrap:pretty; }
.pg-prose img{ max-width:100%; height:auto; }
.pg-prose h2,.pg-prose h3,.pg-prose h4{ margin:1.4em 0 .5em; font-weight:700; color:var(--pg-ink); line-height:1.4; }
.pg-prose ul,.pg-prose ol{ margin:0 0 1em; padding-left:1.4em; }
.pg-prose li{ margin-bottom:.4em; }
.pg-prose a{ color:var(--pg-gold); }
.pg-prose blockquote{ margin:1.4em 0; padding:clamp(26px,3vw,36px);
	background:var(--pg-dark); color:#fff; border-left:4px solid var(--pg-accent); }
.pg-prose blockquote p{ margin:0 0 .6em; font-size:clamp(18px,1.8vw,24px); line-height:1.7; font-weight:500; }
.pg-prose blockquote > :last-child{ margin-bottom:0; }

/* mode 2 的 unit「內容」欄 → 深色引言（設計稿 About Triple 的 blockquote）*/
.pg-quote{ margin:clamp(20px,3vw,32px) 0 0; padding:clamp(26px,3vw,36px);
	background:var(--pg-dark); color:#fff; border-left:4px solid var(--pg-accent); }
.pg-quote p{ margin:0 0 .6em; font-size:clamp(18px,1.8vw,24px); line-height:1.7; font-weight:500; }
.pg-quote > :last-child{ margin-bottom:0; }

/* ---- 圖說（mode 2：只有標題+圖片時）---- */
.pg-figures{ display:grid; gap:clamp(20px,3vw,32px);
	grid-template-columns:repeat(auto-fill,minmax(clamp(240px,32vw,360px),1fr)); }
.pg-figure{ margin:0; }
.pg-figure-media{ border:1px solid var(--pg-line); background:var(--pg-soft); overflow:hidden; }
.pg-figure-media img{ display:block; width:100%; height:100%; aspect-ratio:4/3; object-fit:cover; }
.pg-figure figcaption{ margin-top:12px; font-size:16px; font-weight:500; color:var(--pg-ink); }

/* ---- 資訊卡片（mode 5）---- */
.pg-cards{ display:grid; gap:clamp(20px,3vw,32px);
	grid-template-columns:repeat(auto-fit,minmax(clamp(260px,40%,420px),1fr)); }
.pg-card{ padding:clamp(24px,3vw,36px); background:var(--pg-soft); border-top:3px solid var(--pg-accent); }
.pg-card.is-dark{ background:var(--pg-dark); color:#fff; }
.pg-card-eyebrow{ font-size:14px; font-weight:600; letter-spacing:.22em; text-transform:uppercase;
	color:var(--pg-gold); margin-bottom:16px; }
.pg-card.is-dark .pg-card-eyebrow{ color:var(--pg-accent); }
.pg-card-title{ margin:0 0 16px; font-size:18px; font-weight:500; color:inherit; line-height:1.5; }
.pg-card.is-dark .pg-card-title{ color:#fff; }
.pg-card-body{ font-size:15px; line-height:1.9; font-weight:300; }
.pg-card:not(.is-dark) .pg-card-body{ color:var(--pg-mut2); }
.pg-card.is-dark .pg-card-body{ color:rgba(255,255,255,.85); }
.pg-card-body p{ margin:0 0 .8em; }
.pg-card-body > :last-child{ margin-bottom:0; }
.pg-card-body strong{ font-weight:500; color:var(--pg-ink); }
.pg-card.is-dark .pg-card-body strong{ color:#fff; }
/* 深色卡的清單自動排成方格（生產設備）*/
.pg-card.is-dark .pg-card-body ul{ list-style:none; margin:.4em 0 0; padding:0;
	display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:12px 20px; }
.pg-card.is-dark .pg-card-body li{ position:relative; padding-left:16px; font-size:15px; }
.pg-card.is-dark .pg-card-body li::before{ content:""; position:absolute; left:0; top:.6em;
	width:6px; height:6px; background:var(--pg-accent); }

/* ---- 地圖（mode 3）---- */
.pg-map-frame{ position:relative; width:100%; aspect-ratio:16/9; border:1px solid var(--pg-line); }
.pg-map-frame iframe{ position:absolute; inset:0; width:100%; height:100%; border:0; }
.pg-map-cta{ display:inline-flex; align-items:center; gap:12px; margin-top:28px;
	padding:15px 30px; border:1px solid rgba(12,16,19,.25); color:var(--pg-ink);
	font-size:15px; letter-spacing:.2em; text-transform:uppercase; white-space:nowrap;
	text-decoration:none; transition:background .3s, border-color .3s, color .3s; }
.pg-map-cta:hover{ background:var(--pg-accent); border-color:var(--pg-accent); color:#06090b; }
.pg-map-cta span{ font-size:17px; letter-spacing:0; }

/* ---- 證書相簿（mode 4）— 設計稿 About Triple 的專利卡（3 欄/手機 2 欄）---- */
.pg-gallery{ display:grid; gap:clamp(16px,2vw,24px); grid-template-columns:repeat(3,1fr); }
.pg-gallery figure{ margin:0; border:1px solid var(--pg-line); background:#fff;
	transition:border-color .25s, box-shadow .25s; }
.pg-gallery figure:hover{ border-color:var(--pg-accent); box-shadow:0 10px 30px rgba(12,16,19,.1); }
.pg-gallery a{ display:block; background:var(--pg-soft); overflow:hidden; }
.pg-gallery img{ display:block; width:100%; aspect-ratio:3/4; object-fit:cover;
	transition:transform .6s cubic-bezier(.2,0,.2,1); }
.pg-gallery a:hover img{ transform:scale(1.03); }
.pg-gallery figcaption{ display:flex; align-items:baseline; justify-content:space-between; gap:10px;
	padding:14px 16px; border-top:1px solid var(--pg-line);
	font-size:15px; font-weight:500; color:var(--pg-ink); }
.pg-gallery figcaption .num{ font-family:"Barlow Condensed","Oswald",sans-serif;
	font-size:14px; font-weight:600; letter-spacing:.14em; color:var(--pg-gold); }
@media (max-width:767.98px){ .pg-gallery{ grid-template-columns:repeat(2,1fr); } }

/* ---- 管理者段落編輯鈕（所有 mode 共用）---- */
.pg-edit{ display:inline-flex; align-items:center; gap:6px; margin-top:10px;
	padding:5px 12px; font-size:12px; letter-spacing:.06em;
	border:1px dashed rgba(12,16,19,.28); color:var(--pg-mut); text-decoration:none; }
.pg-edit:hover{ border-style:solid; border-color:var(--pg-ink); color:var(--pg-ink); }
.pg-off{ opacity:.5; }

@media (max-width:575.98px){
	.pg-hero-inner{ padding:38px 20px; }
	.pg-cards{ grid-template-columns:1fr; }
}
