/* ════════════════════════════════════════════════════════════════
   睿志科技:產品頁積木(2026-10-05)

   產品頁 = 固定外殼 + 一塊塊「積木」。每塊積木對應後台的一組欄位,
   有填才出現、沒填就不出現,所以內容多的產品和內容少的產品用同一張模版。
   這支檔案只管產品頁,名稱一律 pd-(product)開頭,不依賴對標網站的樣式名稱。
   顏色、字型變數(--color-base、--rz-orange、--ff-en…)沿用全站 :root 的定義。

   積木一覽(欄位與上限見各段註解):
     pd-hero      橫幅        必備  一句話、說明、背景圖(選填;沒圖就自動墊所屬分類的圖,並加很深的遮罩)
     pd-side      側欄        自動  「本頁內容」由頁面上的積木產生;「同類產品」每個分類一份
     pd-intro     產品概覽    必備  內文 1–3 段、圖(選填)、重點清單(選填)
     pd-feature   特色圖文列  選配  每列:標題、內文、圖;自動編號、左右交錯
     pd-grid      卡片格      選配  每張:標題 + 一段說明或幾條列點,可加圖示或編號
     pd-spec      規格列表    選配  每列:名稱 + 說明(模組、規格)
     pd-tags      標籤列      選配  每列:分類名 + 一串短詞(材料、輸出結果…)
     pd-video     影片        選配  YouTube,1–4 支;點了才載入
     pd-children  產品系列    選配  家族頁用:子產品卡片(圖、名稱、一句話、連結)
     pd-related   相關案例    選配  沿用首頁最新消息的卡片
     pd-service   睿志的服務  共用  所有產品頁同一份,後台不用填;洽詢列在裡面,自動帶產品名

   卡片一律「淺灰面板、沒有邊框」(2026-10-06 Eric 定):#f8f8fa 的面板、16px 圓角,靠跟 #f0f0f0 底色的一階色差浮出來,不畫灰邊。
   線只用在分隔(列與列、標題底下),深藍 14%;可以按的外框(按鈕、圓箭頭)= 深藍 30%。圓角:面板與圖 16px、膠囊 999px。滑過填滿 = --rz-fill(紫)。
   ════════════════════════════════════════════════════════════════ */

/* 整頁底色:淺灰 #f0f0f0,照對標的技術紹介頁(產品頁的骨架來源)。
   白色的卡片、圖框、側欄在灰底上才浮得出來;灰底面板(#f8f8fa)比底色再淺一階 */
body.page-product { background-color: var(--color-gray-F0); }

/* ───────── 版面:左側欄 240 + 間距 80 + 右主欄 ───────── */
.pd { padding-bottom: 120px; }
.pd-body { display: flex; align-items: flex-start; gap: 80px; margin-top: 30px; }
.pd-main { flex: 1 1 auto; min-width: 0; }
.pd-block + .pd-block { margin-top: 80px; }

/* 兩種積木排法:
   ・左右(pd-split):標題在左欄、內容在右欄——文字多的積木(概覽、規格、標籤)
   ・上下(其餘):標題在上、內容在下——圖文列、卡片、影片
   兩種的標題左緣都咬主欄左緣 */
.pd-split { display: grid; grid-template-columns: 24.99% minmax(0, 1fr); column-gap: 20px; align-items: start; }
.pd-head { margin-bottom: 40px; }
.pd-lead { max-width: 720px; margin-top: 20px; font-size: clamp(.875rem, .8542rem + .0833vw, .9375rem); line-height: 2; }

/* 共用小零件 */
.pd-text { font-size: clamp(.875rem, .8542rem + .0833vw, .9375rem); line-height: 2; }
.pd-text + .pd-text { margin-top: 15px; }
.pd-panel { padding: 50px 40px; border-radius: 16px; background-color: var(--color-gray-F8); }  /* 灰底面板 */
.pd-figure { display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 16px; background-color: var(--color-white); }  /* 截圖多半白底,白框讓它們在灰面板上成一塊 */
.pd-figure img { display: block; width: 100%; height: auto; }
.pd-figure--wide { margin-bottom: 30px; padding: 20px; }
.pd-dots li { position: relative; padding-left: 16px; }
.pd-dots li:before { position: absolute; top: .85em; left: 0; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background-color: var(--rz-orange); content: ""; }

/* ───────── 橫幅(必備)───────── */
/* 欄位:一句話(≤24 字)、說明(≤80 字)、背景圖(21:9,主體放右邊三分之二,左邊留給文字) */
.pd-hero { display: flex; position: relative; align-items: flex-end; aspect-ratio: 2.14 / 1; margin-top: 20px; padding: 90px 50px; overflow: hidden; border-radius: 16px; background-color: var(--color-base); color: var(--color-white); }
.pd-hero__img { position: absolute; inset: 0; background-position: center; background-size: cover; background-repeat: no-repeat; }
.pd-hero__img:after { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(9, 27, 37, .85) 0%, rgba(9, 27, 37, .45) 45%, rgba(9, 27, 37, 0) 75%); content: ""; }
.pd-hero__inner { position: relative; max-width: 620px; }
.pd-hero__tit { margin-bottom: 30px; font-weight: 500; font-size: clamp(1.25rem, 1.1042rem + .5833vw, 1.6875rem); line-height: 1.6; }
.pd-hero__text { font-size: clamp(.90625rem, .8965rem + .0391vw, .9375rem); line-height: 2.2; }

/* 產品沒有自己的橫幅圖時,墊所屬分類的圖(首頁產品區那五張)。這幾張圖很花,遮罩要壓得很深:
   左邊 95% 深藍往右收到 70%,字清楚、圖只剩隱約的紋理 */
.pd-hero--category .pd-hero__img:after { background: linear-gradient(90deg, rgba(9, 27, 37, .95) 0%, rgba(9, 27, 37, .85) 45%, rgba(9, 27, 37, .7) 100%); }

/* ───────── 側欄(自動)───────── */
/* 黏在畫面上:上方留 134px = 選單列連同上排工具列的高度 + 20px */
.pd-side { position: sticky; top: 134px; flex: 0 0 240px; padding: 30px; border-radius: 16px; background-color: var(--color-gray-F8); }
.pd-side__group + .pd-side__group { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--color-base-14); }
.pd-side__label { margin-bottom: 15px; color: var(--color-gray-9C); font-size: .8125rem; line-height: 1.5; }
.pd-side__list { display: flex; flex-direction: column; gap: 12px; }
.pd-side__link { display: block; position: relative; color: var(--color-gray-9C); font-size: .9375rem; line-height: 1.5; transition: color .3s var(--rz-ease); }
.pd-side__link:hover { color: var(--rz-orange); }
/* 本頁內容:每項前面一顆灰點,讀到哪一塊,那一項變深色 + 橘點 */
.pd-side__list--toc .pd-side__link { padding-left: 14px; }
.pd-side__list--toc .pd-side__link:before { position: absolute; top: 50%; left: 0; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background-color: var(--color-gray-CD); content: ""; transition: background-color .3s var(--rz-ease); }
.pd-side__list--toc .pd-side__link.is-current { color: var(--color-base); }
.pd-side__list--toc .pd-side__link.is-current:before { background-color: var(--rz-orange); }
/* 同類產品:英文產品名用英文字體;這一頁的產品 = 深色 + 橘點 */
.pd-side__list--products .pd-side__link { font-family: var(--ff-en); }
.pd-side__list--products .pd-side__link[aria-current] { padding-left: 14px; color: var(--color-base); }
.pd-side__list--products .pd-side__link[aria-current]:before { position: absolute; top: 50%; left: 0; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background-color: var(--rz-orange); content: ""; }

/* ───────── 產品概覽(必備)───────── */
/* 欄位:內文 1–3 段(每段 ≤150 字)、圖(選填)、重點清單(選填,2–6 條,每條 ≤20 字) */
.pd-points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 30px; margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--color-base-14); font-size: .9375rem; line-height: 1.7; }

/* ───────── 特色圖文列(選配)───────── */
/* 欄位(每列):標題(≤16 字)、內文(≤120 字)、圖(選填,建議 16:10)。建議 2–6 列,更多請改用卡片格。
   編號自動產生、咬主欄左緣;偶數列圖文對調,編號跟著到右緣 */
.pd-feature__list { border-bottom: 1px solid var(--color-base-14); counter-reset: pd-feature; }
.pd-feature__item { display: flex; position: relative; align-items: flex-start; padding: 50px 30px 50px 14%; gap: 8.33%; border-top: 1px solid var(--color-base-14); counter-increment: pd-feature; }
.pd-feature__item:before { position: absolute; top: 50px; left: 0; content: counter(pd-feature, decimal-leading-zero); font-weight: 300; font-size: clamp(1.25rem, 1.1458rem + .4167vw, 1.5625rem); line-height: 1.2; font-family: var(--ff-en); letter-spacing: var(--ls-en); }
.pd-feature__text { flex: 0 0 44%; }
.pd-feature__item--text .pd-feature__text { flex: 1 1 auto; }
.pd-feature__tit { margin-bottom: 30px; font-weight: 500; font-size: clamp(1.09375rem, .9792rem + .4583vw, 1.4375rem); line-height: 1.5; }
.pd-feature__img { flex: 1 1 auto; min-width: 0; }
@media screen and (min-width: 1024px) {
  .pd-feature__item:nth-child(even) { flex-direction: row-reverse; padding: 50px 14% 50px 30px; }
  .pd-feature__item:nth-child(even):before { right: 0; left: auto; }
}

/* ───────── 卡片格(選配)───────── */
/* 欄位(每張):標題(≤14 字)+ 說明(≤60 字)或列點(2–5 條);可選圖示(Material Symbols 名稱)或自動編號。
   欄數:3、6、9 張排 3 欄,其餘排 2 欄;資料也可以指定 4 欄 */
.pd-grid__fig { margin-bottom: 15px; }
.pd-grid__list { display: grid; grid-template-columns: repeat(var(--pd-cols, 3), minmax(0, 1fr)); gap: 15px; }
.pd-card { padding: 30px; border-radius: 16px; background-color: var(--color-gray-F8); }
.pd-card__icon { display: block; margin-bottom: 18px; color: var(--rz-orange); font-size: 30px; line-height: 1; }
.pd-card__num { display: block; margin-bottom: 14px; color: var(--rz-orange); font-weight: 300; font-size: 1rem; line-height: 1; font-family: var(--ff-en); letter-spacing: var(--ls-en); }
.pd-card__tit { padding-bottom: 20px; border-bottom: 1px solid var(--color-base-14); font-weight: 500; font-size: clamp(1.0625rem, 1rem + .25vw, 1.25rem); line-height: 1.5; }
.pd-card__text { margin-top: 20px; font-size: .9375rem; line-height: 1.9; }
.pd-card__points { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; font-size: .9375rem; line-height: 1.6; }

/* ───────── 規格列表、標籤列(選配,灰底面板裡一列一列)───────── */
/* 規格列表欄位(每列):名稱(≤20 字)+ 說明(≤100 字)
   標籤列欄位(每列):分類名(≤8 字)+ 短詞(每個 ≤10 字,一列 ≤12 個) */
.pd-rows { padding: 40px 60px 60px; }
.pd-row { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--color-base-14); }
.pd-row__name { flex: 0 0 200px; color: var(--color-gray-6B76); font-size: clamp(.8125rem, .7708rem + .1667vw, .9375rem); line-height: 1.6; }
.pd-row__desc { flex: 1 1 auto; min-width: 0; margin: 0; font-size: clamp(.8125rem, .7708rem + .1667vw, .9375rem); line-height: 1.6; }
.pd-row__name { font-weight: 400; }  /* dt 在主題樣式裡預設粗體,這裡要細 */
.pd-tags .pd-row__name { padding-top: 5px; }  /* 跟右邊第一排標籤的字對齊 */
.pd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-chip { padding: 5px 14px; border: 1px solid var(--color-base-14); border-radius: 999px; background-color: var(--color-white); font-size: .875rem; line-height: 1.5; }

/* ───────── 影片(選配)───────── */
/* 欄位(每支):YouTube 影片代碼、標題、補充說明(選填);縮圖用 YouTube 提供的。1 支滿版,2 支以上排 2 欄 */
.pd-video__list { display: grid; grid-template-columns: repeat(var(--pd-cols, 2), minmax(0, 1fr)); gap: 30px 15px; }
.pd-video__frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background-color: var(--color-base); }
.pd-video__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--rz-ease); }
.pd-video__play { display: flex; position: absolute; align-items: center; justify-content: center; inset: 0; width: 100%; border: 0; background: linear-gradient(180deg, rgba(9, 27, 37, .05) 30%, rgba(9, 27, 37, .55) 100%); cursor: pointer; }
.pd-video__btn { display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; background-color: var(--color-white); color: var(--color-base); transition: background-color .4s var(--rz-ease), color .4s var(--rz-ease); }
.pd-video__btn .material-symbols-outlined { font-size: 34px; font-variation-settings: "FILL" 1; }
.pd-video__play:hover .pd-video__btn, .pd-video__play:focus-visible .pd-video__btn { background-color: var(--rz-fill); color: var(--color-white); }
.pd-video__frame:hover .pd-video__thumb { transform: scale(1.04); }
.pd-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pd-video__cap { margin-top: 15px; font-size: .9375rem; line-height: 1.6; }
.pd-video__cap small { display: block; margin-top: 4px; color: var(--color-gray-6B76); font-size: .8125rem; }

/* ───────── 產品系列(選配,家族頁用)───────── */
/* 欄位(每張):圖(16:9)、名稱(≤18 字)、一句話(≤40 字,選填)、連結。排 3 欄 */
.pd-children__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 15px; }
.pd-child { display: block; color: var(--color-base); }
.pd-child:hover, .pd-child:focus { color: var(--color-base); }
.pd-child__img { aspect-ratio: 16 / 9; overflow: hidden; border-radius: 16px; background-color: var(--color-gray-F8); }
.pd-child__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--rz-ease); }
.pd-child:hover .pd-child__img img { transform: scale(1.04); }
.pd-child__body { position: relative; padding: 20px 56px 0 0; }
.pd-child__tit { font-weight: 500; font-size: clamp(1.0625rem, 1rem + .25vw, 1.25rem); line-height: 1.5; }
.pd-child__text { margin-top: 8px; color: var(--color-gray-6B76); font-size: .875rem; line-height: 1.7; }
/* 右側圓形箭頭:跟消息卡片同一套(外框 30%,滑過填紫、箭頭轉白並滑過去) */
.pd-child__icon { position: absolute; top: 20px; right: 0; width: 36px; height: 36px; overflow: hidden; border: 1px solid var(--color-base-30); border-radius: 50%; transition: background-color .4s var(--rz-ease), border-color .4s var(--rz-ease); }
.pd-child__icon:before, .pd-child__icon:after { position: absolute; inset: 0; background-color: var(--color-base); content: ""; -webkit-mask: url(../images/main/icon-arrow-r.svg) center / 40% no-repeat; mask: url(../images/main/icon-arrow-r.svg) center / 40% no-repeat; transition: transform .4s var(--rz-ease), background-color .4s var(--rz-ease); }
.pd-child__icon:after { transform: translateX(-100%); }
.pd-child:hover .pd-child__icon { border-color: var(--rz-fill); background-color: var(--rz-fill); }
.pd-child:hover .pd-child__icon:before, .pd-child:hover .pd-child__icon:after { background-color: var(--color-white); }
.pd-child:hover .pd-child__icon:before { transform: translateX(100%); }
.pd-child:hover .pd-child__icon:after { transform: translateX(0); }

/* ───────── 相關案例(選配)───────── */
/* 欄位(每則):日期、標題(≤40 字)、連結。卡片沿用首頁最新消息;標題在這裡允許換兩行 */
.pd-related__list { display: grid; grid-template-columns: repeat(var(--pd-cols, 2), minmax(0, 1fr)); gap: 15px; }
.pd-related .c-card__news { border: 0; background-color: var(--color-gray-F8); }  /* 首頁的消息卡有灰邊;在產品頁照這裡的卡片規則:面板、不畫邊 */
.pd-related .c-card__news__tit { display: -webkit-box; overflow: hidden; line-height: 1.7; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.rz-cat--case { color: var(--color-base); }

/* ───────── 睿志的服務 + 洽詢(共用,後台不用填)───────── */
.pd-service { padding: 50px; border-radius: 16px; background-color: var(--color-gray-F8); }
/* 四欄等寬、欄距 60;分隔線畫在欄距正中間(每欄文字一樣寬,線到兩邊文字的距離也一樣) */
.pd-service__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 60px; }
.pd-service__item { position: relative; }
.pd-service__item + .pd-service__item:before { position: absolute; top: 0; bottom: 0; left: -30px; width: 1px; background-color: var(--color-base-14); content: ""; }
.pd-service__icon { display: block; color: var(--rz-orange); font-size: 30px; line-height: 1; }
.pd-service__tit { margin-top: 20px; font-weight: 500; font-size: 1.125rem; line-height: 1.5; }
.pd-service__text { margin-top: 10px; font-size: .875rem; line-height: 1.8; }
/* 洽詢列跟上面四欄共用同一組欄線(邊緣掃描抓到:按鈕左緣離第四欄文字差 7px):文字佔前三欄、按鈕放第四欄並對齊該欄文字 */
.pd-cta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 60px; align-items: center; margin-top: 50px; padding-top: 40px; border-top: 1px solid var(--color-base-14); }
.pd-cta__text { grid-column: 1 / 4; font-size: 1rem; line-height: 1.9; }
.pd-cta .c-button__wrap { grid-column: 4; margin-top: 0; }
/* 按鈕撐滿第四欄:左緣對齊第四欄文字、右緣對齊面板內緣,兩邊都在線上 */
.pd-cta .c-button__arrow { justify-content: space-between; width: 100%; white-space: nowrap; }

/* ════════════════════════ 平板與手機 ════════════════════════ */
@media screen and (max-width: 1279.98px) {
  .pd-body { gap: 60px; }
  .pd-hero { padding: 40px 30px; }
  .pd-feature__item { padding-left: 10%; }
  /* 1280 以下主欄變窄:四欄改兩欄,洽詢列改上下排(按鈕回到原本寬度) */
  .pd-service__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; row-gap: 30px; }
  .pd-service__item + .pd-service__item:before { left: -20px; }
  .pd-service__item:nth-child(odd):before { content: none; }
  .pd-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
  .pd-cta .c-button__arrow { width: auto; }
}
@media screen and (min-width: 1024px) and (max-width: 1279.98px) {
  .pd-feature__item:nth-child(even) { padding-right: 10%; }
}
@media screen and (max-width: 1023.98px) {
  .pd-body { display: block; }
  .pd-side { display: none; }
  .pd-block + .pd-block { margin-top: 60px; }
  .pd-split { display: block; }
  .pd-split > .lower-title__primary { margin-bottom: 30px; }
  .pd-head { margin-bottom: 30px; }
  .pd-hero { aspect-ratio: 1.8 / 1; }
  .pd-panel { padding: 35px 30px; }
  .pd-rows { padding: 25px 30px 35px; }
  .pd-feature__item { display: block; padding: 30px 0 40px; }
  .pd-feature__item:before { top: 30px; }
  .pd-feature__tit { margin-bottom: 20px; padding-left: 44px; }
  .pd-feature__text { margin-bottom: 25px; }
  .pd-grid__list { --pd-cols: 2 !important; }
  .pd-children__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-service { padding: 35px 30px; }
}
@media screen and (max-width: 767.98px) {
  .pd { padding-bottom: 80px; }
  .pd-block + .pd-block { margin-top: 50px; }
  /* 橫幅:圖在上、文字在下(深色字),不再壓字在圖上 */
  .pd-hero { display: block; aspect-ratio: auto; padding: 0; border-radius: 0; background: none; color: var(--color-base); }
  .pd-hero__img { position: relative; aspect-ratio: 1.8 / 1; margin-bottom: 20px; border-radius: 16px; }
  .pd-hero__img:after { content: none; }
  .pd-hero__tit { margin-bottom: 12px; }
  .pd-panel { padding: 25px 20px; }
  .pd-rows { padding: 10px 20px 25px; }
  .pd-row { flex-direction: column; gap: 8px; }
  .pd-row__name { flex: 0 0 auto; }
  .pd-points { grid-template-columns: minmax(0, 1fr); }
  .pd-grid__list, .pd-children__list, .pd-video__list, .pd-related__list { --pd-cols: 1 !important; grid-template-columns: minmax(0, 1fr); }
  .pd-card { padding: 25px 20px; }
  .pd-service { padding: 25px 20px; }
  .pd-service__list { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .pd-service__item:before { content: none !important; }
  .pd-service__item + .pd-service__item { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--color-base-14); }
  .pd-cta { margin-top: 30px; padding-top: 30px; }
}
