/* ==========================================================================
   hsst-card-text-fix-20261011.css
   产品中心 · 产品卡片文字溢出/遮盖统一修正
   --------------------------------------------------------------------------
   1. 修正 .hsst-sc-card .hsst-sc-cap b 硬编码 -webkit-line-clamp:1 导致
      长品名（「麻石（花崗岩）」「人造石（無縫石）」等）被裁掉一半的问题。
   2. 描述 .sc-d / .vsc-d 由 2 行放宽到 3 行，并允许完整显示，
      不再因行数不足而截断、裁切或与图片重叠。
   3. 文字区与图片区彻底分层：图片固定 4:3 且 flex:0 0 auto；
      文字区 flex:1 1 auto、min-height:0、允许自然高度增长。
   4. 行高等排细节：品名 line-height 1.32、行高随行数自适应，
      避免行高被压缩造成「文字只显示一半」。
   5. 仅调整排版/字号/间距/溢出行为，不改任何图片、名称、描述内容。
   ========================================================================== */

/* ---------- 1. 产品中心总览页卡片 .hsst-sc-card ---------- */
.hsst-sc-card .hsst-sc-cap b,
body.premium .hsst-sc-card .hsst-sc-cap b {
  /* 取消硬编码单行裁切，改为最多 2 行完整显示 */
  display: block !important;
  -webkit-line-clamp: none !important;
  -webkit-box-orient: horizontal !important;
  -webkit-box: initial !important;
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  line-height: 1.34 !important;
  min-height: 0 !important;
  margin: 3px 0 0 !important;
}

/* 总览页描述：完整显示，不限行数，卡片高度自适应 */
.hsst-sc-card .hsst-sc-cap .sc-d,
body.premium .hsst-sc-card .hsst-sc-cap .sc-d {
  display: block !important;
  -webkit-line-clamp: none !important;
  -webkit-box-orient: horizontal !important;
  -webkit-box: initial !important;
  overflow: visible !important;
  max-height: none !important;
  height: auto !important;
  line-height: 1.68 !important;
  margin-top: 6px !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

/* 文字容器：允许增长、不被图片压住 */
.hsst-sc-card .hsst-sc-cap,
body.premium .hsst-sc-card .hsst-sc-cap {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  padding: 14px 18px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  z-index: 1 !important;
}

/* 图片区：改為 3:2，與卡片圖原比例一致，object-fit:contain 不再左右裁切，
   避免把圖上設計好的系列名稱文字裁掉一半（原 aspect-ratio:4/3 + cover
   會左右各裁約 12%，正好切掉左側標題字）。 */
.hsst-sc-card .hsst-sc-img,
body.premium .hsst-sc-card .hsst-sc-img {
  flex: 0 0 auto !important;
  aspect-ratio: 3 / 2 !important;
  height: auto !important;
  overflow: hidden !important;
}

.hsst-sc-card .hsst-sc-img img,
body.premium .hsst-sc-card .hsst-sc-img img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  /* 3:2 容器配 3:2 圖 = 完整顯示，不裁切任何文字 */
  object-fit: cover !important;
  object-position: center !important;
}

/* CTA 保持底部对齐但不被裁 */
.hsst-sc-card .hsst-sc-cap em,
body.premium .hsst-sc-card .hsst-sc-cap em {
  margin-top: auto !important;
  padding-top: 9px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  display: inline-block !important;
  white-space: nowrap !important;
}

/* ---------- 2. 分类页品种卡 .eng-var-name（岩板等 12 个分类页）---------- */
/* 品名完整显示，不限行数（中文品名最長 9 字，窄屏亦可完整呈現） */
body.premium .eng-vars-list.is-ready .eng-var-name {
  display: block !important;
  -webkit-line-clamp: none !important;
  -webkit-box-orient: horizontal !important;
  -webkit-box: initial !important;
  overflow: visible !important;
  line-height: 1.36 !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

body.premium .eng-vars-list.is-ready .eng-var-name-en {
  display: block !important;
  -webkit-line-clamp: none !important;
  -webkit-box-orient: horizontal !important;
  -webkit-box: initial !important;
  overflow: visible !important;
  line-height: 1.34 !important;
  min-height: 0 !important;
  max-height: none !important;
  height: auto !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

/* ---------- 3. 系列卡 .v2-series-card / .ev-card 描述 ---------- */
/* 完整显示，不限行数，避免裁切 */
body.premium .v2-series-card .vsc-cap .vsc-d {
  display: block !important;
  -webkit-line-clamp: none !important;
  -webkit-box-orient: horizontal !important;
  -webkit-box: initial !important;
  overflow: visible !important;
  max-height: none !important;
  line-height: 1.62 !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

body.premium a.v2-series-card.ev-card .vsc-cap .vsc-d {
  /* 覆盖原本硬编码的 line-clamp:1 */
  display: block !important;
  -webkit-line-clamp: none !important;
  -webkit-box-orient: horizontal !important;
  -webkit-box: initial !important;
  overflow: visible !important;
  max-height: none !important;
  line-height: 1.55 !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

body.premium .v2-series-card .vsc-cap b {
  display: block !important;
  -webkit-line-clamp: none !important;
  -webkit-box-orient: horizontal !important;
  -webkit-box: initial !important;
  overflow: visible !important;
  max-height: none !important;
  line-height: 1.36 !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

body.premium a.v2-series-card.ev-card .vsc-cap b {
  display: block !important;
  -webkit-line-clamp: none !important;
  -webkit-box-orient: horizontal !important;
  -webkit-box: initial !important;
  overflow: visible !important;
  max-height: none !important;
  line-height: 1.34 !important;
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
}

/* ---------- 4. 通用兜底：任何被 line-clamp:1 截断的产品卡片标题 ---------- */
.hsst-sc-cap b,
.vsc-cap b,
.category-card h3,
.category-card .cat-name {
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  line-height: 1.34 !important;
}

/* ---------- 4b. 少数 1536×986（比例 1.557）卡片圖：留微量 letterbox，
   改用 padding-bottom 百分比鎖定高度，讓圖完整呈現不裁切 ---------- */
.hsst-sc-card .hsst-sc-img {
  aspect-ratio: auto !important;
  height: 0 !important;
  padding-bottom: 66.667% !important; /* 1536 / 1024 */
}

@supports (aspect-ratio: 1 / 1) {
  .hsst-sc-card .hsst-sc-img {
    aspect-ratio: 3 / 2 !important;
    height: auto !important;
    padding-bottom: 0 !important;
  }
}

/* ---------- 5. 移动端适配：文字完整显示，卡片等高对齐 ---------- */
@media (max-width: 900px) {
  /* 描述保持完整显示，仅微调行高与字号，不设行数上限 */
  .hsst-sc-card .hsst-sc-cap .sc-d,
  body.premium .v2-series-card .vsc-cap .vsc-d,
  body.premium a.v2-series-card.ev-card .vsc-cap .vsc-d {
    line-height: 1.7 !important;
  }
  .hsst-sc-card .hsst-sc-cap,
  body.premium .hsst-sc-card .hsst-sc-cap {
    padding: 12px 14px 14px !important;
  }
  /* 栅格行等高，避免卡片高度参差 */
  .hsst-sc-grid {
    align-items: stretch !important;
    grid-auto-rows: 1fr !important;
  }
}

@media (max-width: 560px) {
  .hsst-sc-card .hsst-sc-cap {
    padding: 11px 12px 13px !important;
  }
  .hsst-sc-card .hsst-sc-cap b {
    font-size: 16px !important;
    line-height: 1.36 !important;
  }
  .hsst-sc-card .hsst-sc-cap .sc-d {
    font-size: 12.5px !important;
    line-height: 1.72 !important;
    margin-top: 5px !important;
  }
}

/* ---------- 6. 打印/无障碍：确保文字不被裁 ---------- */
@media print {
  .hsst-sc-card .hsst-sc-cap b,
  .hsst-sc-card .hsst-sc-cap .sc-d {
    -webkit-line-clamp: none !important;
    overflow: visible !important;
    color: #000 !important;
  }
}