/* ================================
   全域變數
================================ */
:root{
  --bg:#f8fafa;
  --bg-card:#ffffff;
  --brand-900:#2e566c;
  --brand-700:#3b6b87;
  --brand-600:#4e8aa0;
  --brand-500:#5fa8a1;
  --brand-300:#a8dadc;
  --ink:#333;
  --ink-2:#555;
  --line:#e7e7e7;
  --radius:10px;
  --shadow:0 6px 18px rgba(0,0,0,.08);
  --max:1100px;

  /* chips 顏色 */
  --solid-blue:#3f6e86;
  --solid-blue-2:#325d73;
  --outline-txt:#3f6e86;
  --outline-bd:#cfe6ee;
  --outline-bg:#f2f9fb;
  --chip-radius:999px;

  /* 導覽列實際高度（JS 可寫入） */
  --nav-h:64px;
}

/* ================================
   骨架（footer 黏底）
================================ */
html,body{height:100%}
body{
  display:flex;
  flex-direction:column;
  background:var(--bg);
  color:var(--ink);
  margin:0;
}
main{flex:1}

/* Reset */
*{box-sizing:border-box}
a{text-decoration:none;color:inherit}
img{
  display:block;
  max-width:100%;
  height:auto;
  border-radius:12px;
  -webkit-user-drag:none;
  user-drag:none;
}

.container{
  max-width:var(--max);
  margin:auto;
  padding:0 20px;
}

/* 捲動條空間固定，避免左右跳動 */
html{scrollbar-gutter:stable both-edges}
@supports not (scrollbar-gutter:stable){html{overflow-y:scroll}}

/* ================================
   導覽列（含搜尋）
================================ */
.nav{
  position:sticky;
  top:0;
  background:#fff;
  border-bottom:1px solid var(--line);
  z-index:10;
}
.nav-inner{
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  padding:8px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:800;
  color:var(--brand-700);
  min-height:28px;
}
.brand .logo{
  height:28px;
  width:auto;
  display:block;
  border-radius:0;
  object-fit:contain;
}
.brand .brand-text{line-height:1}

.menu-wrap{display:flex;align-items:center;gap:12px}
.menu{display:flex;align-items:center;gap:18px}
.menu a{
  display:inline-flex;
  align-items:center;
  line-height:1;
  padding:10px 12px;
  border-radius:10px;
  color:var(--ink-2);
}
.menu a:hover{
  background:#ecf7f7;
  color:var(--brand-700);
}

/* 導覽列 active */
body[data-page="home"]     .menu a[data-link="home"],
body[data-page="products"] .menu a[data-link="products"],
body[data-page="about"]    .menu a[data-link="about"],
body[data-page="contact"]  .menu a[data-link="contact"]{
  background:#ecf7f7;
  color:var(--brand-700);
}

/* 搜尋 */
.search{display:flex;align-items:center}
.search input{
  height:34px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--ink);
  width:100px;
  transition:width .2s ease, box-shadow .2s ease;
  box-shadow:0 1px 2px rgba(0,0,0,.04) inset;
}
.search input::placeholder{color:#9aa0a6}
.search input:focus{
  outline:none;
  border-color:var(--brand-300);
  box-shadow:0 0 0 3px rgba(168,218,220,.35);
  width:200px;
}

/* 搜尋框放大鏡圖示 */
#siteSearchInput{
  background:url("./image/yhg_magnifier.png") no-repeat 12px center;
  background-size:16px;
  padding-left:36px;
}

/* 導覽列 RWD */
@media (max-width:768px){
  .brand .logo{height:24px}
  .menu{gap:12px}
  .menu a{padding:8px 10px}
}
@media (max-width:560px){
  .nav-inner{row-gap:8px}
  .brand{flex:1 1 auto;min-width:0}
  .menu-wrap{flex:0 0 100%;justify-content:center;gap:8px;margin-top:6px}
  .search{flex:1}
  .search input{width:100%;max-width:200px}
}
@media (max-width:400px){
  .brand .logo{height:22px}
  .menu{gap:8px}
  .menu a{padding:6px 8px;font-size:13px}
}

/* ================================
   按鈕
================================ */
.btn{
  display:inline-block;
  padding:6px 10px;
  border-radius:12px;
  background:var(--brand-700);
  color:#fff;
  box-shadow:var(--shadow);
  transition:background .2s ease,color .2s ease,border .2s ease;
}
.btn.ghost{
  background:#fff;
  color:var(--brand-700);
  border:1px solid var(--brand-300);
}
.btn.download{
  background:#fff;
  color:var(--brand-700);
  border:1px solid var(--brand-700);
}
.btn.download:hover{
  background:var(--brand-700);
  color:#fff;
}

/* ================================
   首頁 Hero（圖文雙欄）
================================ */
.hero{
  padding:60px 0;
  background:linear-gradient(135deg,#edf6f9,#f8fafa);
}
.hero-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}
.hero-text{flex:1}
.hero-text h1{
  font-size:clamp(28px,4vw,48px);
  margin:0 0 12px;
  color:var(--brand-700);
}
.hero-text .lead{
  color:var(--ink-2);
  margin:0 0 20px;
  max-width:45ch;
}
.hero-image{flex:1}

@media (max-width:768px){
  .hero-inner{
    flex-direction:column;
    text-align:center;
  }
  .hero-text{order:1}
  .hero-image{order:2}
}

/* ================================
   內頁 Header
================================ */
.page-header{
  padding:32px 0 18px;
  border-bottom:1px solid var(--line);
}
.page-header h1{
  margin:0;
  color:var(--brand-700);
  font-size:28px;
  line-height:1.25;
}
.page-header .meta{color:var(--ink-2);max-width:70ch}
body[data-page="products"] .page-header{text-align:center}
body[data-page="products"] .page-header h1{margin-bottom:16px}
body[data-page="products"] .page-header .bar{justify-content:center}

/* ================================
   區塊、卡片
================================ */
section{
  padding:50px 0;
  border-bottom:1px solid var(--line);
}
.section-title{
  font-size:26px;
  color:var(--brand-700);
  margin:0 0 16px;
  text-align:center;
}
.section-desc{
  color:var(--ink-2);
  max-width:70ch;
  margin:0 0 26px;
}

.grid{display:grid;gap:16px}

.cards{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(260px, 260px));
  gap:16px;
  justify-content:start;
}
.card{
  background:var(--bg-card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
  gap:10px;
  cursor:pointer;
  transition:transform .25s ease, box-shadow .25s ease;
}
.card:hover{
  transform:translateY(-4px);
  box-shadow:0 8px 20px rgba(0,0,0,.10);
}
.card h3{
  margin:10px 0;
  color:var(--brand-700);
  font-size:18px;
  text-align:center;
}
.card .meta{
  color:var(--ink-2);
  font-size:14px;
  text-align:center;
  display:-webkit-box;
  -webkit-line-clamp:1;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:calc(1em * 1.4);
}
.thumbbox{
  width:100%;
  aspect-ratio:4/3;
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden;
  background:#fff;
}
.thumbbox img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.card-title{
  margin:6px 0 0;
  font-size:18px;
  color:var(--brand-700);
  text-align:center;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height:calc(1em * 1.3 * 2);
}
.price{font-weight:700;color:var(--brand-600)}

/* ================================
   產品頁 chips
================================ */
.bar{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
#chips{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
#chips .chip{
  display:inline-flex;
  align-items:center;
  gap:.4em;
  padding:8px 12px;
  border-radius:var(--chip-radius);
  font-size:15px;
  line-height:1;
  cursor:pointer;
  transition:.2s ease;
  user-select:none;
  background:var(--solid-blue);
  color:#fff;
  border:1.5px solid var(--solid-blue);
  box-shadow:0 2px 0 rgba(0,0,0,.06) inset;
}
#chips .chip:hover,
#chips .chip.active{
  background:var(--solid-blue-2);
  border-color:var(--solid-blue-2);
}

#chipsSub{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
#chipsSub .chip{
  display:inline-flex;
  align-items:center;
  gap:.4em;
  padding:8px 12px;
  border-radius:var(--chip-radius);
  font-size:15px;
  line-height:1;
  cursor:pointer;
  transition:.2s ease;
  user-select:none;
  background:#fff;
  color:var(--outline-txt);
  border:1.5px solid var(--outline-bd);
}
#chipsSub .chip:hover{
  background:var(--outline-bg);
  border-color:var(--outline-txt);
}
#chipsSub .chip.active{
  background:var(--outline-bg);
  border-color:var(--outline-txt);
  color:var(--outline-txt);
}

/* ================================
   頁尾
================================ */
footer{
  padding:20px 0;
  text-align:center;
  color:var(--ink-2);
  font-size:14px;
  line-height:1.6;
  border-top:1px solid var(--line);
}
footer a{color:var(--brand-700)}
footer a:hover{text-decoration:underline}

/* ================================
   產品詳頁（新版）
================================ */
#detail{position:relative}
.product-detail{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:28px;
  column-gap:16px;
  align-items:start;
}
.product-figure{
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
  padding:12px;
  box-shadow:var(--shadow);
  margin:0;
}
.product-figure img{
  width:100%;
  height:auto;
  border-radius:8px;
  display:block;
  margin:auto;
}
.thumb-bar{display:flex;gap:10px;margin-top:10px;flex-wrap:wrap}
.thumb{
  width:68px;
  height:68px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition:border-color .15s ease, outline-color .15s ease;
}
.thumb:hover{border-color:#d9d9d9}
.thumb img{max-width:90%;max-height:90%}
.thumb.active{outline:2px solid var(--brand-600)}

.right-col{display:flex;flex-direction:column;gap:16px}
.right-col .desc-card{color:#2e566c;font-size:15px;line-height:1.6;}
.header-meta{display:flex;align-items:baseline;gap:12px}
.product-title{margin:0;font-size:2rem;font-weight:800;color:var(--brand-700);line-height:1}
.meta{display:flex;align-items:baseline;gap:12px;font-size:1rem;line-height:1.2;color:#5fa8a1;font-family:"Noto Sans TC","微軟正黑體",sans-serif}
.meta .bar{opacity:.45;margin:0 .25rem}

/* 規格卡片 */
.spec-wrap{display:grid;gap:16px;}
.spec-card{
  background:#fff;
  border-radius:16px;
  box-shadow:0 2px 10px rgba(0,0,0,.06);
  overflow:hidden;
}
.spec-grid{
  display:grid;
  grid-template-columns:140px 1fr;
}
.spec-grid .label-cell,
.spec-grid .val-cell{
  padding:12px 14px;
  border-bottom:1px solid #f0f0f0;
}
.spec-grid .label-cell{
  background:#f7fafb;
  color:var(--ink-2);
  border-right:1px solid #f0f0f0;
  font-weight:600;
  text-align:center !important;
  display:flex;
  justify-content:center;
  align-items:center;
}
.spec-grid .val-cell{
  background:#fff;
  color:var(--ink);
  white-space:pre-wrap;
  line-height:1.6;
  position:relative;
  padding-right:70px;
  min-height:56px;
  display:flex;
  align-items:center;
}
.spec-grid .label-cell:last-of-type,
.spec-grid .val-cell:last-of-type{border-bottom:none}

.spec-card .spec-icon{
  position:absolute;
  right:18px;
  top:50%;
  transform:translateY(-50%);
  width:52px;
  height:auto;
  object-fit:contain;
  opacity:.98;
  pointer-events:none;
}

/* icon RWD */
@media (max-width:1024px){
  .spec-card .spec-icon{width:40px;right:16px}
}
@media (max-width:768px){
  .spec-card .spec-icon{width:36px;right:14px}
}
@media (max-width:560px){
  .spec-card .spec-icon{width:32px;right:12px}
  .spec-grid .val-cell{padding-right:60px}
}

/* 規格文字 */
.spec-card .spec-text{
  display:inline-block;
  line-height:1.5;
  white-space:pre-line;
}

@media (min-width: 769px) {
  .spec-grid .val-cell .spec-text,
  .spec-grid .val-cell .size-line {
    font-size: 15px; 
  }
}


/* 價格高亮 */
.spec-card .price{
  color:#4e8aa0;
  font-weight:600;
  font-size:1rem;
}

.action-bar{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
.action-bar .btn{padding:8px 12px;border-radius:10px}

/* 產品詳頁 RWD */
@media (max-width:900px){
  .product-detail{grid-template-columns:1fr}
  .header-meta{flex-direction:column;align-items:flex-start;gap:6px}
  .spec-grid{grid-template-columns:110px 1fr}
}

/* 產品詳頁左右箭頭 */
.detail-nav-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:36px;
  height:36px;
  background:none;
  box-shadow:none;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  border:none;
  transition:opacity .25s ease, transform .25s ease;
  opacity:.5;
  z-index:20;
}
.detail-nav-arrow svg{
  width:22px;
  height:22px;
  stroke:var(--brand-700);
  stroke-width:2.5;
  fill:none;
}
.detail-nav-arrow:hover{
  opacity:1;
  transform:translateY(-50%) scale(1.1);
}
.detail-nav-arrow.left{left:-48px}
.detail-nav-arrow.right{right:-48px}
@media (max-width:1000px){
  .detail-nav-arrow{width:30px;height:30px}
  .detail-nav-arrow svg{width:14px;height:14px}
  .detail-nav-arrow.left{left:8px}
  .detail-nav-arrow.right{right:8px}
}

/* ================================
   狀態列與分頁
================================ */
.pager-bar{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:flex-end;
  margin:8px 0;
}
.pager{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:center;
  margin:16px 0 32px;
}
.pager button,
.pager a{
  border:1px solid #ddd;
  background:#fff;
  padding:6px 12px;
  border-radius:8px;
  cursor:pointer;
}
.pager .active{
  pointer-events:none;
  border-color:var(--brand-700);
  color:var(--brand-700);
  font-weight:700;
}
.pager .disabled{
  opacity:.5;
  pointer-events:none;
}

#status{
  display:block;
  text-align:right;
  color:#5fa8a1;
  font-size:.9rem;
  margin:8px 0;
}
.container .status{text-align:left}
.container .status.right{text-align:right}

/* ================================
   行動版導覽列固定
================================ */
@media (max-width:768px){
  .nav{
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:1000;
    background:#fff;
    border-bottom:1px solid var(--line);
  }
  .nav-inner{min-height:64px;padding:8px 0}
  main{padding-top:calc(var(--nav-h,64px) + env(safe-area-inset-top,0px))}
  body[data-page="search"] main{padding-top:calc(var(--nav-h,64px) + env(safe-area-inset-top,0px) + 28px)}
  body[data-page="product"] .product-main{padding-top:calc(var(--nav-h,64px) + env(safe-area-inset-top,0px) + 28px)}
}

/* 手機導覽列：品牌置中、menu 下一排 */
@media (max-width:560px){
  .nav-inner{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;row-gap:8px}
  .brand{flex:0 0 100%;display:flex;justify-content:center;text-align:center}
  .menu-wrap{flex:0 0 100%;display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px;margin:0}
  .menu{display:flex;align-items:center;gap:12px;flex:0 0 auto}
  .menu a{padding:6px 10px;line-height:1.2}
  .search{display:flex;align-items:center;flex:0 1 auto}
  .search form{width:min(60vw,280px)}
  .search input{width:100%;height:34px;font-size:13px}
  .search .icon,.search button{height:34px}
}

/* 行動版分頁列置中 */
@media (max-width:560px){
  .pager-bar{
    justify-content:center !important;
    width:100%;
  }
  #status{text-align:center !important;}
}

/* ================================
   搜尋頁：桌機／行動
================================ */
/* 桌機固定四欄 */
@media (min-width:1024px){
  body[data-page="search"] #list.cards{
    display:grid !important;
    grid-template-columns:repeat(4, 1fr) !important;
    gap:20px !important;
    max-width:var(--max);
    margin:0 auto;
    justify-content:center;
  }
  body[data-page="search"] #list.cards > .card{
    width:auto !important;
    max-width:none !important;
    margin:0 !important;
  }
  body[data-page="search"] #list.cards .thumbbox{
    border:none !important;
    background:#fff !important;
    border-radius:10px;
    overflow:hidden;
  }
  body[data-page="search"] #list.cards .thumbbox img{
    width:100%;
    height:100%;
    object-fit:contain !important;
    display:block;
  }
}

/* 其它桌機寬度 */
@media (min-width:769px) and (max-width:1023px){
  body[data-page="search"] #list.cards{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(260px, 260px));
    gap:16px;
    justify-content:start;
  }
  body[data-page="search"] #list.cards > .card{width:auto;max-width:none;margin:0}
  body[data-page="search"] #list.cards .thumbbox{border:none;background:#fff}
  body[data-page="search"] #list.cards .thumbbox img{object-fit:contain}
}

/* 手機：產品／搜尋兩欄 */
@media (max-width:560px){
  body[data-page="products"] #list.cards,
  body[data-page="search"]   #list.cards{
    display:grid;
    grid-template-columns:repeat(2,1fr) !important;
    gap:14px;
    padding:0 14px;
    box-sizing:border-box;
  }
  body[data-page="products"] #list.cards .card,
  body[data-page="search"]   #list.cards .card{
    padding:10px;
    border-radius:10px;
    box-shadow:0 2px 8px rgba(0,0,0,0.05);
  }
  body[data-page="products"] #list.cards .thumbbox,
  body[data-page="search"]   #list.cards .thumbbox{
    aspect-ratio:4/3;
    border:none;
  }
  body[data-page="products"] #list.cards .card-title,
  body[data-page="search"]   #list.cards .card-title{
    font-size:15px;
    margin-top:4px;
  }
}

/* 手機搜尋頁縮圖不裁切 */
@media (max-width:560px){
  body[data-page="search"] #list.cards .thumbbox{
    display:flex;
    align-items:center;
    justify-content:center;
    background:#fff;
  }
  body[data-page="search"] #list.cards .thumbbox img{
    width:auto !important;
    height:auto !important;
    max-width:100% !important;
    max-height:100% !important;
    object-fit:contain !important;
    display:block;
    margin:auto;
  }
}
@media (min-width:561px) and (max-width:768px){
  body[data-page="search"] #list.cards .thumbbox{
    display:flex;
    align-items:center;
    justify-content:center;
  }
  body[data-page="search"] #list.cards .thumbbox img{
    width:100%;
    height:auto;
    object-fit:contain !important;
  }
}

/* 搜尋頁關鍵字膠囊 */
body[data-page="search"] .section-desc{
  text-align:center !important;
  margin:0 auto 26px !important;
  display:block;
}
body[data-page="search"] .kw-badge{
  display:inline-block;
  color:#333;
  background:#f4b183;
  padding:4px 12px;
  border-radius:999px;
  font-size:.85rem;
  font-weight:300;
  box-shadow:0 3px 8px rgba(0,0,0,0.12);
}

/* ================================
   規格表 & 表格置中
================================ */
/* 整張表格設定 */
.product-info-table {
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;  /* 讓格子平均、固定列高更穩定 */
}

/* 整列固定高度 */
.product-info-table tr {
  height:60px;   /* 你可改 50/60/70，看自己喜歡 */
}

/* 左欄（th） */
.product-info-table th {
  width:30%;            /* 你原本的設定 */
  text-align:center;    /* 水平置中 */
  vertical-align:middle;/* 垂直置中 */
  padding:12px 8px;
  white-space:nowrap;   /* 避免換行亂高度 */
}

/* 右欄（td） */
.product-info-table td {
  vertical-align:top;   /* 垂直靠上，不跟著置中 */
  padding:12px 16px;
  line-height:1.4;
}

/* 尺寸文字：避免 margin 撐高整列 */
.product-detail .spec-grid .val-cell .size-line {
  margin:0;  
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}



/* 只有手機版要縮小字體 */
@media (max-width: 768px) {
  .spec-grid .val-cell .spec-text.is-overflow,
  .spec-grid .val-cell .size-line.is-overflow {
    font-size: 1rem;
    line-height: 1.4;
    word-break: break-all;
  }
  }

  /* 規格表右欄第一列：文字與小圖同列，圖靠右 */
.spec-grid .val-cell .spec-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* 小圖群組 */
.spec-grid .val-cell .spec-icons {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 小圖尺寸 */
.spec-grid .val-cell .spec-icon {
  width: 48px;
  height: auto;
  display: inline-block;
}

/* 若是文字徽章（非圖片） */
.spec-grid .val-cell .spec-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
  border: 1px solid #e5e7eb;
  white-space: nowrap;
}





/* ================================
   🟦 首頁 hero 幻燈片（整理後）
   放在最下面，確保能蓋過前面
================================ */
.hero-image{
  position:relative;
  flex:1;
}

/* 幻燈片外框 */
.hero-image .slider{
  position:relative;
  width:100%;
  aspect-ratio:1 / 1; /* 桌機比例，可改 16/11 */
  overflow:hidden;
  border-radius:16px;
  box-shadow:var(--shadow);
  background:#fff;
}

/* 每一張 slide */
.hero-image .slider .slide{
  position:absolute;
  inset:0;
  display:block;
  opacity:0;
  transition:opacity .6s ease;
  cursor:pointer;
}
.hero-image .slider .slide.active{
  opacity:1;
  z-index:2;
}
.hero-image .slider .slide img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:inherit;
}

/* 左右箭頭：透明背景 ✅ */
.hero-image .slider .slider-btn{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  border:none;
  background:transparent;  /* 你要的透明 */
  color:#fff;
  border-radius:999px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  line-height:1;
  z-index:5;
}
.hero-image .slider .slider-btn.prev{left:10px;}
.hero-image .slider .slider-btn.next{right:10px;}
.hero-image .slider .slider-btn:hover{
  background:rgba(255,255,255,0.15);
}

/* 下方圓點 */
.hero-image .slider .slider-dots{
  position:absolute;
  left:50%;
  bottom:10px;
  transform:translateX(-50%);
  display:flex;
  gap:6px;
  z-index:6;
}
.hero-image .slider .slider-dots button{
  width:10px;
  height:10px;
  border-radius:999px;
  border:none;
  background:rgba(255,255,255,.5);
  cursor:pointer;
  transition:.2s;
}
.hero-image .slider .slider-dots button.active{
  width:22px;
  background:#fff;
}

/* 手機版：保險高度 + 微調箭頭 */
@media (max-width:768px){
  .hero-image{padding-inline:4px;}
  .hero-image .slider{
    /* 有些手機不吃 aspect-ratio，用這個撐高 ✅ */
    min-height:300px;
    border-radius:12px;
  }
  .hero-image .slider .slider-btn{
    width:30px;
    height:30px;
    font-size:18px;
    top:48%;
    /* 不要再加黑底，保持透明 */
  }
  .hero-image .slider .slider-dots{
    bottom:6px;
    gap:4px;
  }
  .hero-image .slider .slider-dots button{
    width:8px;
    height:8px;
  }
  .hero-image .slider .slider-dots button.active{
    width:18px;
  }
}

/* ================================
   產品詳頁：右下角小標籤（AI 示意圖）
================================ */
.image-wrapper {
  position: relative;
  display: inline-block;
}

.image-wrapper .img-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 14px 5px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(3px);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.4;
  color: #333;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
  pointer-events: none;
  opacity: 1;
  transition: opacity .25s ease;
}

/* hover 顯示：預設隱藏 */
.image-wrapper .img-badge {
  opacity: 0;
}
.image-wrapper:hover .img-badge {
  opacity: 1;
}

/* 手機：常駐顯示 */
@media (max-width: 768px) {
  .image-wrapper .img-badge {
    opacity: 1;
  }
}

/* 產品詳頁：圖內左右箭頭 */
.image-wrapper {
  position: relative;
}

.image-wrapper .detail-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border: none;
  background: rgba(255,255,255,0.35); /* 很淡的白，貼圖上 */
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: background .2s ease, transform .2s ease;
}

.image-wrapper .detail-nav-arrow.left { left: 8px; }
.image-wrapper .detail-nav-arrow.right { right: 8px; }

.image-wrapper .detail-nav-arrow svg {
  width: 16px;
  height: 16px;
  stroke: #333;
  stroke-width: 2.4;
  fill: none;
}

.image-wrapper .detail-nav-arrow:hover {
  background: rgba(255,255,255,0.85);
  transform: translateY(-50%) scale(1.05);
}

/* 手機一樣貼邊、不跑出去 */
@media (max-width: 768px) {
  .image-wrapper .detail-nav-arrow {
    width: 26px;
    height: 26px;
    background: rgba(255,255,255,0.55);
  }
}

/* 產品詳頁：規格內容太長才縮一下 */
body[data-page="product"] .spec-grid .val-cell .spec-text.is-overflow {
  font-size: 12.5px;
  line-height: 1.35;
  word-break: break-word;
  text-align: left;
}



.spec-grid .val-cell .size-line .size-val {
  font-weight: 600;           /* 尺寸數值更清楚 */
  letter-spacing: .2px;
}

.spec-grid .val-cell .size-line .size-model {
  margin-left: .25em;
  color: #557;                /* 次要色 */
  font-size: .92em;
  letter-spacing: .2px;
  white-space: normal;        /* 允許換行 */
  word-break: keep-all;
}



/* ===== 桌機：規格表字級與可讀性加強 ===== */
@media (min-width: 769px){
  /* 右側內容字大一點、行距更鬆 */
  .spec-grid .val-cell .spec-text,
  .spec-grid .val-cell .size-line{
    font-size: 16px;     /* 原 15px → 16px */
    line-height: 1.7;    /* 原 1.6 → 1.7 更好讀 */
  }
  /* 左側標籤也跟著放大一點 */
  .spec-grid .label-cell{
    font-size: 15px;
  }
  /* 尺寸的數值再更醒目一些 */
  .spec-grid .val-cell .size-line .size-val{
    font-weight: 700;    /* 原 600 → 700 */
  }
  /* 表格右欄空間再多一點，減少換行擁擠 */
  .spec-grid{
    grid-template-columns: 160px 1fr;  /* 原 140px → 160px */
  }
}

/* 超寬桌機再微調一下（可選） */
@media (min-width: 1280px){
  .spec-grid .val-cell .spec-text,
  .spec-grid .val-cell .size-line{
    font-size: 17px;     /* 超寬螢幕再加 1px */
  }
}
/* 桌機：產品詳頁「返回列表」與上方留白 */
@media (min-width: 769px){
  body[data-page="product"] #backLink{
    display: inline-flex;   /* 保持漂亮的內距與圓角 */
    margin-top: 14px;       /* ← 想再多一點就改 16~20px */
  }
}

.desc-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
  padding: 16px 20px;
  margin-top: 16px;
  color: #444;
  line-height: 1.7;
}
.desc-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--brand-700);
}

/* ✅ 規格卡片內的描述樣式（覆寫外層 .desc-card 的卡片外觀） */
.spec-card .desc-card{
  padding:12px 14px;
  border-top:1px solid #f0f0f0;
  background:#fff;
  color:#2e566c;      /* 與右欄語系色一致 */
  line-height:1.6;
  /* 取消外層卡片風格，避免卡中有卡 */
  margin:0;
  box-shadow:none;
  border-radius:0;
}

@media (max-width:560px){
  .spec-card .desc-card{padding:10px 12px}
}
/* 變體切換列（有 variants 時出現） */
.variant-bar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:6px 0 8px;
}
.variant-bar .chip{
  display:inline-flex;
  align-items:center;
  gap:.4em;
  padding:8px 12px;
  border-radius:var(--chip-radius);
  line-height:1;
  cursor:pointer;
  user-select:none;
  transition:background .2s ease, border-color .2s ease, color .2s ease, transform .1s ease;
  background:var(--outline-bg);
  color:var(--outline-txt);
  border:1.5px solid var(--outline-bd);
}
.variant-bar .chip:hover{ background:#f7fbfd; border-color:var(--outline-txt); }
.variant-bar .chip:active{ transform:scale(.98); }
.variant-bar .chip.active{
  background:var(--solid-blue);
  border-color:var(--solid-blue);
  color:#fff;
}
/* ✅ 規格表每列固定等高（桌機） */
.spec-grid{
  grid-auto-rows:60px;           /* 每一列固定 60px */
}

/* 左欄：水平置中 + 垂直置中 */
.spec-grid .label-cell{
  display:flex;
  align-items:center;
  justify-content:center;
  height:100%;                   /* 吃滿該列高度 */
  padding:0 14px;                /* 只留左右內距 */
}

/* 右欄：內容靠左且「垂直靠上」 */
.spec-grid .val-cell{
  display:flex;
  align-items:center;        /* ⬅ 垂直靠上 */
  justify-content:flex-start;
  gap:0;
  height:100%;
  padding:12px 70px 12px 14px;   /* 保留你原本右側留給 icon 的空間 */
  line-height:1.5;
}

/* 尺寸那行：單行省略號，不要額外的外距 */
.spec-grid .val-cell .size-line,
.spec-grid .val-cell .spec-text{
  display:block;                 /* 避免 inline 行盒造成視覺基線落差 */
  margin:0;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  font-size:15px;
}

/* 手機：列高改為「至少」48px，超過就自動長高，避免斷詞過多 */
@media (max-width:768px){
  .spec-grid{ grid-auto-rows:minmax(48px,auto); }
  .spec-grid .label-cell,
  .spec-grid .val-cell{
    height:auto;                 /* 讓內容可多行 */
    min-height:48px;
  }
  .spec-grid .val-cell .size-line,
  .spec-grid .val-cell .spec-text{
    white-space:normal;          /* 手機允許換行較易讀 */
    text-overflow:clip;
  }
}









