/* ===========================================================================
   首頁 · 形象版（home--editorial）

   業主提供的設計圖：淺藍底、白卡、深藍標題、金色主按鈕。

   這裡**不寫死藍色**。淺藍一律從 --navy-rgb 調出來，金色用 --gold，
   文字用 --ink/--body —— 這樣業主在「版面風格」那一頁換主色，
   這個版型會跟著換。寫死 #E8F1FA 的話，換成別的主色就會有一塊
   藍色孤島留在首頁上。

   區塊樣式（.trustbar / .xpg / .memberband / .ab）不綁在
   .home--editorial 底下：那些區塊可以單獨開在經典版上。
   只有「換皮」的部分（首屏翻成淺色）才掛在 .home--editorial。
   =========================================================================== */

:root{
  --ed-wash:   rgba(var(--navy-rgb),.045);
  --ed-wash-2: rgba(var(--navy-rgb),.085);
  --ed-line:   rgba(var(--navy-rgb),.12);
  --ed-card:   var(--paper,#fff);
}

/* --------------------------------------------------------------- 四欄信任條 */
.trustbar{
  background:var(--ed-wash);
  border-block:1px solid var(--ed-line);
  padding:clamp(20px,2.6vw,30px) 0;
}
.trustbar__row{
  display:grid;grid-template-columns:repeat(4,1fr);
  align-items:center;
}
.trustbar__item{
  display:flex;align-items:center;justify-content:center;
  gap:clamp(10px,1.2vw,16px);
  padding:clamp(4px,1vw,10px) clamp(8px,1.6vw,22px);
}
/* 分隔線用相鄰選擇器，不是每一格都畫右框 —— 最後一格不該有線 */
.trustbar__item + .trustbar__item{border-left:1px solid var(--ed-line)}

.trustbar__icon{
  flex:none;width:clamp(26px,2.4vw,32px);height:clamp(26px,2.4vw,32px);
  color:var(--navy);
}
.trustbar__icon svg{width:100%;height:100%;display:block}
.trustbar__text{display:flex;flex-direction:column;line-height:1.25}
.trustbar__text b{
  font-weight:600;color:var(--ink);
  font-size:clamp(.92rem,1.1vw,1.02rem);letter-spacing:.02em;
}
.trustbar__text i{
  font-style:normal;color:var(--muted);
  font-size:clamp(.68rem,.78vw,.76rem);letter-spacing:.16em;margin-top:2px;
}

@media (max-width:860px){
  .trustbar__row{grid-template-columns:repeat(2,1fr);row-gap:16px}
  /* 兩欄時只保留直向分隔線在第 2、4 格左邊，橫向那條會變成多餘的框 */
  .trustbar__item + .trustbar__item{border-left:none}
  .trustbar__item:nth-child(even){border-left:1px solid var(--ed-line)}
  .trustbar__item{justify-content:flex-start}
}
@media (max-width:420px){
  .trustbar__row{grid-template-columns:1fr}
  .trustbar__item:nth-child(even){border-left:none}
}

/* ----------------------------------------------------------- 淺色底的區塊 */
.section--soft{background:var(--ed-wash)}

/* ------------------------------------------------------- 三大核心領域 */
.xpg{
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:clamp(16px,2vw,26px);
}
.xp{
  display:flex;flex-direction:column;
  background:var(--ed-card);border:1px solid var(--ed-line);
  border-radius:var(--r-lg,14px);overflow:hidden;
  text-decoration:none;color:inherit;
  transition:border-color .22s ease, transform .22s ease;
}
.xp:hover,.xp:focus-visible{border-color:rgba(var(--gold-rgb),.55);transform:translateY(-2px)}
.xp__img{display:block;overflow:hidden}
.xp__img img{
  display:block;width:100%;height:auto;aspect-ratio:19/14;object-fit:cover;
}
.xp__body{
  display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:clamp(16px,1.7vw,22px) clamp(18px,1.9vw,24px);
}
.xp__txt{display:flex;flex-direction:column;min-width:0}
.xp__txt b{
  font-family:var(--serif);font-weight:600;color:var(--ink);
  font-size:clamp(1.05rem,1.35vw,1.26rem);line-height:1.3;
}
.xp__txt i{
  font-style:normal;color:var(--body);margin-top:6px;
  font-size:clamp(.82rem,.92vw,.9rem);line-height:1.5;
}
.xp__go{
  flex:none;display:grid;place-items:center;
  width:38px;height:38px;border-radius:50%;
  border:1px solid var(--ed-line);color:var(--navy);
  transition:background .22s ease,color .22s ease,border-color .22s ease;
}
.xp__go svg{width:17px;height:17px}
.xp:hover .xp__go,.xp:focus-visible .xp__go{
  background:var(--navy);border-color:var(--navy);color:var(--on-primary,#fff);
}

@media (max-width:900px){ .xpg{grid-template-columns:1fr} }

/* ------------------------------------------------------------ 會員權益帶 */
.memberband{padding:clamp(34px,4.4vw,58px) 0}
.mb{
  position:relative;overflow:hidden;
  border-radius:var(--r-lg,14px);
  background:var(--navy);color:var(--on-primary,#fff);
  padding:clamp(26px,3.4vw,44px) clamp(22px,3.4vw,48px);
  display:grid;gap:clamp(20px,3vw,40px);align-items:center;
}
.mb--haspic{grid-template-columns:minmax(0,.86fr) minmax(0,1.14fr)}
.mb::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(640px 420px at 88% 8%,rgba(var(--gold-rgb),.20),transparent 64%);
}
.mb > *{position:relative;z-index:1}
.mb__pic{margin:0;border-radius:var(--r-md,10px);overflow:hidden}
.mb__pic img{display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover}
.mb__body h2{
  color:var(--on-primary,#fff);margin:0;
  font-size:clamp(1.4rem,2.3vw,1.95rem);
}
.mb__lead{
  color:var(--on-primary-soft,rgba(255,255,255,.78));
  margin:10px 0 0;font-size:clamp(.92rem,1.05vw,1.02rem);line-height:1.65;
}
.mb__perks{
  list-style:none;margin:clamp(16px,2vw,24px) 0 0;padding:0;
  display:grid;grid-template-columns:repeat(4,minmax(0,max-content));
  gap:clamp(18px,3vw,44px);justify-content:start;
}
/* 沒有配圖的時候，整塊只有一欄。權益若還攤到滿版，四個字會被
   拉到相隔半個螢幕，看起來像四個不相干的東西 —— 收成一排。 */
.mb__perks li{
  display:flex;flex-direction:column;align-items:center;gap:9px;text-align:center;
  font-size:clamp(.8rem,.92vw,.9rem);line-height:1.4;
  color:var(--on-primary-soft,rgba(255,255,255,.78));
}
.mb__ico{
  width:30px;height:30px;color:var(--accent-on-primary,var(--gold-lt,#E4CB93));
}
.mb__ico svg{width:100%;height:100%;display:block}
.mb .btn-row{margin-top:clamp(18px,2.2vw,26px)}

@media (max-width:900px){
  .mb--haspic{grid-template-columns:1fr}
}
@media (max-width:620px){
  .mb__perks{grid-template-columns:repeat(2,1fr);gap:18px}
  .mb__perks li{align-items:flex-start;text-align:left}
}

/* ---------------------------------------------------------------- ABOUT US */
.ab{
  display:grid;align-items:center;
  grid-template-columns:minmax(0,.92fr) minmax(0,1.18fr) minmax(0,.62fr);
  gap:clamp(20px,3.2vw,46px);
}
.ab__pic{margin:0;border-radius:var(--r-lg,14px);overflow:hidden}
.ab__pic img{display:block;width:100%;height:auto;aspect-ratio:9/7;object-fit:cover}
.ab__body .eyebrow{display:block}
.ab__body h2{margin:6px 0 0;font-size:clamp(1.4rem,2.3vw,2rem)}
.ab__lead{color:var(--body);margin:14px 0 0;line-height:1.8;max-width:46em}
.ab__points{
  list-style:none;margin:0;padding:0;
  display:flex;flex-direction:column;gap:clamp(12px,1.6vw,20px);
}
.ab__points li{
  display:flex;align-items:center;gap:12px;
  color:var(--ink);font-size:clamp(.86rem,.98vw,.95rem);
}
.ab__ico{flex:none;width:24px;height:24px;color:var(--navy)}
.ab__ico svg{width:100%;height:100%;display:block}

@media (max-width:1080px){
  .ab{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr)}
  .ab__points{
    grid-column:1 / -1;flex-direction:row;flex-wrap:wrap;
    gap:14px clamp(18px,3vw,34px);
  }
}
@media (max-width:760px){
  .ab{grid-template-columns:1fr}
}

/* ------------------------------------------------------- 商品卡的「已售」 */
.prod-sold{
  display:block;margin-top:8px;
  font-size:.78rem;color:var(--muted);letter-spacing:.04em;
}

/* ===========================================================================
   .home--editorial：把首屏從深海軍藍翻成設計圖上的淺色
   =========================================================================== */
.home--editorial .hero{
  background:linear-gradient(168deg,
            rgba(var(--navy-rgb),.10) 0%,
            rgba(var(--navy-rgb),.045) 44%,
            var(--paper,#fff) 100%);
  color:var(--ink);
}
/* 深色版那兩層光暈在淺底上會變成髒汙，關掉；浮水印留著但壓更淡 */
.home--editorial .hero::before{background:none}
.home--editorial .hero::after{opacity:.05}

.home--editorial .hero h1{color:var(--ink)}
.home--editorial .hero-en{color:var(--navy)}
.home--editorial .hero-lead{color:var(--body)}
.home--editorial .hero-note{color:var(--body)}

/* 這裡原本有一條：
       .home--editorial.has-trustbar .hero-stats{display:none}
   設計上的理由是對的（首屏底下接四欄信任條，兩條疊在一起等於同一個
   位置講兩次），但它是第二條「隱藏數據列」的途徑，而且完全看不見：

   後台把四格填好、存檔、前台什麼都沒有，沒有任何提示說明為什麼。
   業主回報的「形象版不渲染數據條」就是這個 —— 不是沒渲染，是被藏了。
   （也因為 HTML 有輸出，只數標籤的測試會全部「通過」。）

   隱藏數據列只留一個辦法：把那四格清空（後台說明文字有寫）。
   想要只留信任條就清空四格；想兩條都要也行，那是業主的版面決定，
   不該由一條沒人看得到的樣式替他決定。 */

.home--editorial .hero-stats{
  border-top:1px solid var(--ed-line);padding-top:clamp(20px,2.4vw,30px);
}
.home--editorial .hero-stats .n{color:var(--navy)}
.home--editorial .hero-stats .l{color:var(--muted)}

/* 設計圖上的首屏比現在高，圖也更大。放大的是圖那一欄的比重與
   最小高度，不是整段 padding —— 只加 padding 會把文字推到中間
   留一大塊空白，圖還是一樣小。 */
.home--editorial .hero{padding-block:clamp(56px,7vw,92px) clamp(46px,6vw,78px)}
.home--editorial .hero-grid{grid-template-columns:.92fr 1.08fr;gap:clamp(26px,4vw,54px)}
.home--editorial .hero-media img{aspect-ratio:4/3}
.home--editorial .hero h1{font-size:clamp(1.9rem,4.2vw,3.1rem);line-height:1.22}

@media (max-width:860px){
  .home--editorial .hero-grid{grid-template-columns:1fr}
  .home--editorial .hero-media img{aspect-ratio:16/10}
}

/* 淺底上的次要按鈕：深色版的 ghost 是白框白字，照搬會變成看不見 */
.home--editorial .hero .btn--ghost{
  color:var(--navy);border-color:rgba(var(--navy-rgb),.34);background:transparent;
}
.home--editorial .hero .btn--ghost:hover,
.home--editorial .hero .btn--ghost:focus-visible{
  color:var(--on-primary,#fff);background:var(--navy);border-color:var(--navy);
}
.home--editorial .hero strong{color:var(--ink)}

/* 首屏圖在淺底上不需要那層壓暗的遮罩 */
.home--editorial .hero-media::after{display:none}

@media (prefers-reduced-motion:reduce){
  .xp,.xp__go{transition:none}
  .xp:hover,.xp:focus-visible{transform:none}
}
