/* =========================================================
   HSYWIRE site-v2 扩展样式（在沿用旧站 style.css 基础上追加）
   新组件：类目页 / 产品族页 / 卡片网格 / 规格表 / 占位图 / 事实带
   ========================================================= */

/* ---------- 首页 facts 带 ---------- */
.facts-band {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  padding: 2.5rem 0;
}
.facts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.fact {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 180px;
}
.fact-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-primary);
  letter-spacing: -0.01em;
}
.fact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-light);
}

/* ---------- 通用 section ---------- */
.section { padding: 3.5rem 0; }
.section-title {
  font-size: 1.75rem;
  font-weight: 300;
  color: var(--color-primary);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.section-lead {
  color: var(--color-text-light);
  max-width: 720px;
  line-height: 1.6;
}

/* ---------- 类目页头（沿用旧站 h1 细体 300 规范） ---------- */
.cat-hero {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  padding: 3.5rem 0 2.5rem;
}
.cat-hero h1 {
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--color-primary);
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
.cat-tagline {
  color: var(--color-text-light);
  max-width: 720px;
  line-height: 1.6;
}

/* ---------- 产品卡片网格（放大版：卡片与图片更大更清晰） ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.product-card:hover { border-color: var(--color-secondary); }
.product-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
  overflow: hidden;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  display: block;
}
.product-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem 1.5rem;
}
.product-card-body p { flex: 1; }
.product-card-body h3 {
  font-size: 1.08rem;
  font-weight: 400;
  color: var(--color-primary);
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
}
.product-card-body p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
}
/* 占位块：仅在图片加载失败（.no-img）时显示，正常时隐藏 */
.img-ph {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
  color: var(--color-text-light);
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--color-surface);
  z-index: 0;
}
.product-card-img.no-img .img-ph,
.product-main-img.no-img .img-ph {
  display: flex;
}
.img-ph small {
  font-weight: 400;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #999;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
  font-size: 0.8rem;
  color: var(--color-text-light);
}
.breadcrumb a { color: var(--color-primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- 产品族页 ---------- */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) { .product-layout { grid-template-columns: 1fr; } }
.product-gallery { position: relative; }
.product-main-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.product-main-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-info h1 {
  font-size: 2rem;
  font-weight: 300;
  color: var(--color-primary);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.product-summary { color: var(--color-text-light); line-height: 1.6; margin-bottom: 1.5rem; }

/* 规格摘要已由表格改为列表（.spec-summary-list，样式见 brand.css 第 17 节） */

/* ---------- CTA 带 ---------- */
.cta-band {
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 2.5rem 0;
}
.cta-band h2 {
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

/* ---------- hero 四块微调 ---------- */
.hero-split .hero-half-content h2 { font-size: clamp(1.1rem, 2.2vw, 1.7rem); }
.hero-half-content p { font-size: clamp(0.8rem, 1.1vw, 0.95rem); }

/* ---------- 导航 ---------- */
.nav-menu > li > a { white-space: nowrap; }

/* LOGO 与菜单的间距（用户反馈：太近） */
.header-wrapper .nav-bar {
  margin-left: clamp(2.5rem, 5vw, 5rem);
}
.header-wrapper .nav-bar .nav-cta {
  margin-left: 1.5rem;
}

/* Products 下拉：四列 + 相对 header 居中 + hover 稳定保持（面板留在菜单 DOM 内，鼠标移入面板不消失） */
.nav-has-dropdown,
.nav-bar,
.nav-menu {
  position: static;
}
/* 压过旧站 .nav-menu > li { position: relative !important }（特异性 (0,1,1)） */
.nav-menu > li.nav-has-dropdown {
  position: static;
}
.nav-dropdown,
.nav-dropdown.nav-dropdown-horizontal {
  width: 1080px;
  position: absolute;
  left: 50%;
  top: calc(100% - 12px);
  transform: translateX(-50%) translateY(0);
  /* 关键修复：基础 pointer-events 必须 auto（旧站是 none !important，
     面板几何脱离 li 后 hover 规则失效，链接全部点不了）。
     visibility: hidden 本身已阻止交互，无需再用 pointer-events 拦截。 */
  pointer-events: auto;
  /* visibility 不参与过渡（即时显隐），只有 opacity 渐变 —— 修复悬停响应慢 */
  transition: opacity 0.1s ease;
}
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:hover .nav-dropdown.nav-dropdown-horizontal {
  transform: translateX(-50%) translateY(0);
  transition: opacity 0.1s ease 0s, visibility 0s linear 0s;
}
/* 下拉面板自身 hover 也保持显示（鼠标移入面板时 li:hover 依然成立，此规则双保险） */
.nav-dropdown:hover {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.dropdown-columns-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- 卡片：按钮居中 + 水平对齐（卡片等高 flex，按钮沉底居中） ---------- */
.product-card {
  display: flex;
  flex-direction: column;
}
.product-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-body p { flex: 1; }
.product-card-body .card-view {
  margin-top: auto;
}

/* 卡片引导：View details 按钮（claude-design 规范：描边按钮 + 克制微交互） */
.product-card-body .card-view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card-body .card-view .arrow {
  display: inline-block;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover .card-view {
  background: var(--color-primary);
  color: #fff;
}
.product-card:hover .card-view .arrow {
  transform: translateX(4px);
}

/* ---------- 产品页 CTA 按钮：与菜单栏 Request a Quote 同规格 ---------- */
.product-info .btn-primary,
.cta-band .btn-primary {
  padding: 0.6rem 1.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  border-radius: 2px;
  text-transform: none;
  font-weight: 400;
}

/* ---------- 产品页：主图放大 + 放大镜 + 灯箱 ---------- */
.product-main-img {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  overflow: hidden;
}
.product-main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.zoom-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-primary);
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease, color 0.2s ease;
}
.zoom-btn:hover {
  background: var(--color-primary);
  color: #fff;
}
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.93);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}
.lightbox img {
  max-width: 92vw;
  max-height: 90vh;
  object-fit: contain;
}
.lb-close {
  position: absolute;
  top: 16px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- 产品页：推荐产品横向滚动条（粗滚动条 + 可拖动） ---------- */
.related-section {
  padding: 2.5rem 0 4rem;
  border-top: 1px solid var(--color-border);
}
.related-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
}
.related-card {
  flex: 0 0 240px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  text-decoration: none;
  transition: border-color 0.2s ease;
}
.related-card:hover { border-color: var(--color-secondary); }
.related-card-img {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--color-surface);
  overflow: hidden;
}
.related-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.related-card-name {
  display: block;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--color-primary);
  line-height: 1.4;
}

/* ---------- 产品页：Inquire 按钮效果 ---------- */
.spec-matrix-table .col-inquire a {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}
.spec-matrix-table .col-inquire a:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ---------- 交互式规格矩阵（沿用旧站视觉：筛选栏 + 多列表格） ---------- */
.spec-matrix {
  margin-top: 2.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  padding: 1.25rem 1.5rem 1.5rem;
}
.spec-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}
.spec-filter input,
.spec-filter select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 0;
  font-family: var(--font-base);
  font-size: 0.85rem;
  color: var(--color-text);
  background: var(--color-bg);
}
.spec-filter input { flex: 1; min-width: 200px; }
.spec-filter button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 0;
  background: var(--color-bg);
  font-family: var(--font-base);
  font-size: 0.85rem;
  color: var(--color-text-light);
  cursor: pointer;
}
.spec-filter button:hover { border-color: var(--color-secondary); color: var(--color-primary); }
.spec-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.spec-matrix-table thead th {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
  border-bottom: 1px solid var(--color-primary);
  padding: 0.5rem 0.6rem;
  white-space: nowrap;
}
.spec-matrix-table tbody td {
  border-bottom: 1px solid var(--color-border);
  padding: 0.55rem 0.6rem;
  color: var(--color-text);
}
.spec-matrix-table tbody tr:hover td { background: var(--color-surface); }
.spec-matrix-table .col-inquire a {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}
.spec-matrix-table .col-inquire a:hover { text-decoration: underline; }
.spec-count {
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin-top: 0.8rem;
}


/* ---------- 产品页图片组（缩略图切换） ---------- */
.gallery-thumbs {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.gallery-thumb {
  width: 76px;
  height: 57px;
  padding: 0;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  overflow: hidden;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-thumb.active {
  border-color: var(--color-secondary);
  outline: 1px solid var(--color-secondary);
}

/* ---------- 类目页子组分区 ---------- */
.subgroup-block { margin-bottom: 3rem; }
.subgroup-title {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--color-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--color-primary);
  margin-bottom: 1.5rem;
}

/* ---------- 工厂页小节 ---------- */
.sub-section { margin-bottom: 2.5rem; }
.sub-section .section-title { font-size: 1.4rem; margin-bottom: 0.6rem; }

/* ---------- 下载列表 ---------- */
.download-list { list-style: none; margin: 1rem 0; padding: 0; }
.download-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--color-border);
}
.dl-name { font-weight: 500; color: var(--color-primary); }
.dl-note { color: var(--color-text-light); font-size: 0.85rem; }

/* ---------- RFQ 询盘表单（蓝图表单规范：方形、1px 边框、label 在上） ---------- */
.rfq-form {
  max-width: 640px;
  margin-top: 1.5rem;
}
.rfq-form .form-row { margin-bottom: 1.1rem; }
.rfq-form label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
  margin-bottom: 0.4rem;
}
.rfq-form input,
.rfq-form select,
.rfq-form textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  border-radius: 0;
  background: var(--color-bg);
  font-family: var(--font-base);
  font-size: 0.95rem;
  color: var(--color-text);
  box-sizing: border-box;
}
.rfq-form input:focus,
.rfq-form select:focus,
.rfq-form textarea:focus {
  outline: none;
  border-color: var(--color-secondary);
}
.rfq-form .form-hint {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 0.75rem;
}

