/* ==========================================================================
   莹虹商贸 · 首页样式（仅首页加载 / 2026-11-06）
   命名统一 .yhsm-hp- 前缀，复用父主题变量，不覆盖站点其他页面样式
   ========================================================================== */

/* 首页取消父主题 .site-main 的上下内边距（24px 0 60px），让 Hero 与底部 CTA 通栏贴边 */
body.home .site-main,
.home .site-main {
  padding-top: 0;
  padding-bottom: 0;
}

.yhsm-hp {
  --hp-radius: 12px;
  --hp-line: var(--h-border);
  --hp-ink: var(--h-dark);
  --hp-muted: #5a6b7c;
}

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

/* ---------- 通用标题行 ---------- */
.yhsm-hp-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.yhsm-hp-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.yhsm-hp-h2 {
  font-size: 24px;
  line-height: 1.35;
  font-weight: 800;
  color: var(--hp-ink);
  margin: 0;
  letter-spacing: .5px;
}
.yhsm-hp-head-desc {
  font-size: 13.5px;
  color: var(--hp-muted);
  margin: 6px 0 0;
}
.yhsm-hp-more {
  font-size: 13.5px;
  color: var(--h-blue);
  white-space: nowrap;
}
.yhsm-hp-more::after {
  content: "›";
  margin-left: 6px;
  font-weight: 700;
}
.yhsm-hp-more:hover { color: var(--h-red); }
.yhsm-hp-empty {
  font-size: 14px;
  color: var(--hp-muted);
  margin: 0;
}

/* ---------- 按钮 ---------- */
.yhsm-hp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 24px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: var(--h-transition);
}
.yhsm-hp-btn-primary {
  background: var(--h-red);
  color: #fff;
  box-shadow: 0 6px 16px rgba(230, 57, 70, .28);
}
.yhsm-hp-btn-primary:hover {
  background: #c92f3c;
  color: #fff;
  transform: translateY(-1px);
}
.yhsm-hp-btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
}
.yhsm-hp-btn-ghost:hover {
  background: rgba(255, 255, 255, .14);
  border-color: #fff;
  color: #fff;
}

/* ==========================================================================
   ① Hero
   ========================================================================== */
.yhsm-hp-hero {
  position: relative;
  padding: 52px 0 46px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(880px 340px at 12% -18%, rgba(230, 57, 70, .26), transparent 62%),
    radial-gradient(700px 320px at 92% 8%, rgba(119, 141, 169, .26), transparent 60%),
    linear-gradient(135deg, #0d1b2a 0%, #1b4f72 100%);
}
.yhsm-hp-eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 1.2px;
  color: rgba(255, 255, 255, .86);
}
.yhsm-hp-title {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}
.yhsm-hp-sub {
  max-width: 760px;
  margin: 0;
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.75;
  color: rgba(255, 255, 255, .82);
}

/* 搜索框：首页 Hero 已移除该表单（站内搜索由顶部 Header 承担），以下样式保留仅作兼容，无对应元素时不产生任何高度 */
.yhsm-hp-search {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 720px;
  padding: 6px;
  border-radius: var(--hp-radius);
  background: #fff;
  box-shadow: 0 12px 30px rgba(4, 12, 20, .28);
}
.yhsm-hp-search-field {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--hp-ink);
}
.yhsm-hp-search-field::placeholder { color: #94a3b2; }
.yhsm-hp-search-btn {
  flex: 0 0 auto;
  height: 44px;
  padding: 0 26px;
  border: 0;
  border-radius: 8px;
  background: var(--h-red);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--h-transition);
}
.yhsm-hp-search-btn:hover { background: #c92f3c; }

.yhsm-hp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 26px 0 0;
}

/* 信任点 */
.yhsm-hp-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.yhsm-hp-trust li {
  position: relative;
  padding-left: 18px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .88);
}
.yhsm-hp-trust li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 2px;
  background: var(--h-red);
}

/* ==========================================================================
   ② 品牌分类导航
   ========================================================================== */
.yhsm-hp-cats {
  padding: 46px 0 40px;
  background: #fff;
}
.yhsm-hp-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 12px;
}
.yhsm-hp-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 18px 10px;
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius);
  background: #fbfcfd;
  text-align: center;
  transition: var(--h-transition);
}
.yhsm-hp-cat:hover {
  border-color: var(--h-blue);
  background: #fff;
  box-shadow: var(--h-shadow);
  transform: translateY(-2px);
}
.yhsm-hp-cat-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--hp-ink);
  line-height: 1.4;
}
.yhsm-hp-cat:hover .yhsm-hp-cat-name { color: var(--h-blue); }
.yhsm-hp-cat-count {
  font-size: 12px;
  color: var(--hp-muted);
}

/* ==========================================================================
   ③ 四格服务卖点条
   ========================================================================== */
.yhsm-hp-services {
  padding: 34px 0;
  background: var(--h-bg);
  border-top: 1px solid var(--hp-line);
  border-bottom: 1px solid var(--hp-line);
}
.yhsm-hp-service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.yhsm-hp-service {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-radius: var(--hp-radius);
  background: #fff;
  box-shadow: 0 1px 3px rgba(13, 27, 42, .05);
}
.yhsm-hp-service h3 {
  margin: 0 0 5px;
  font-size: 15px;
  font-weight: 700;
  color: var(--hp-ink);
}
.yhsm-hp-service p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--hp-muted);
}
.yhsm-hp-service-txt { min-width: 0; }

/* 纯 CSS 图标 */
.yhsm-hp-ico {
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(27, 79, 114, .1);
}
.yhsm-hp-ico::before,
.yhsm-hp-ico::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
}
/* 盾牌 + 对号 */
.yhsm-hp-ico--shield::before {
  width: 20px;
  height: 22px;
  left: 13px;
  top: 12px;
  border: 2px solid var(--h-blue);
  border-radius: 3px 3px 50% 50% / 3px 3px 64% 64%;
}
.yhsm-hp-ico--shield::after {
  width: 9px;
  height: 5px;
  left: 18px;
  top: 20px;
  border-left: 2px solid var(--h-red);
  border-bottom: 2px solid var(--h-red);
  transform: rotate(-45deg);
}
/* 货架线条 */
.yhsm-hp-ico--stock::before {
  width: 22px;
  height: 15px;
  left: 12px;
  top: 15px;
  border-left: 2px solid var(--h-blue);
  border-right: 2px solid var(--h-blue);
  background: repeating-linear-gradient(to bottom, var(--h-blue) 0 2px, transparent 2px 7px);
}
.yhsm-hp-ico--stock::after {
  width: 26px;
  height: 2px;
  left: 10px;
  top: 34px;
  background: var(--h-red);
}
/* 票据 */
.yhsm-hp-ico--invoice::before {
  width: 15px;
  height: 21px;
  left: 15px;
  top: 12px;
  border: 2px solid var(--h-blue);
  border-radius: 2px;
}
.yhsm-hp-ico--invoice::after {
  width: 8px;
  height: 7px;
  left: 19px;
  top: 18px;
  border-top: 2px solid var(--h-red);
  border-bottom: 2px solid var(--h-red);
}
/* 运输车 */
.yhsm-hp-ico--truck::before {
  width: 20px;
  height: 13px;
  left: 11px;
  top: 14px;
  border: 2px solid var(--h-blue);
  border-radius: 3px;
}
.yhsm-hp-ico--truck::after {
  width: 20px;
  height: 6px;
  left: 11px;
  top: 29px;
  background:
    radial-gradient(circle 3px at 4px 50%, var(--h-red) 3px, transparent 3.4px),
    radial-gradient(circle 3px at 16px 50%, var(--h-red) 3px, transparent 3.4px);
}

/* ==========================================================================
   ④ 商品区
   ========================================================================== */
.yhsm-hp-products {
  padding: 46px 0 40px;
  background: #fff;
}
.yhsm-hp-products--new {
  padding-top: 0;
  border-top: 0;
}
.yhsm-hp-products-body ul.products {
  margin-bottom: 0 !important;
}
.yhsm-hp-products-body ul.products li.product {
  max-width: none;
}

/* ==========================================================================
   ⑤ 采购流程
   ========================================================================== */
.yhsm-hp-flow {
  padding: 46px 0 46px;
  background: var(--h-bg);
  border-top: 1px solid var(--hp-line);
}
.yhsm-hp-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.yhsm-hp-step {
  position: relative;
  padding: 22px 18px;
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius);
  background: #fff;
}
.yhsm-hp-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 38px;
  right: -16px;
  width: 16px;
  height: 2px;
  background: var(--hp-line);
}
.yhsm-hp-step-num {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--h-red);
}
.yhsm-hp-step h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--hp-ink);
}
.yhsm-hp-step p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--hp-muted);
}
.yhsm-hp-flow-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}
.yhsm-hp-flow-tel {
  font-size: 13.5px;
  color: var(--hp-muted);
}
.yhsm-hp-flow-tel a {
  font-weight: 700;
  color: var(--h-blue);
}

/* ==========================================================================
   ⑥ 专题落地页入口
   ========================================================================== */
.yhsm-hp-lp {
  padding: 46px 0;
  background: #fff;
}
.yhsm-hp-lp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.yhsm-hp-lp-card {
  position: relative;
  display: block;
  padding: 22px 22px 22px 26px;
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius);
  background: #fbfcfd;
  transition: var(--h-transition);
}
.yhsm-hp-lp-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 22px;
  bottom: 22px;
  width: 3px;
  border-radius: 3px;
  background: var(--h-red);
}
.yhsm-hp-lp-card:hover {
  border-color: var(--h-blue);
  background: #fff;
  box-shadow: var(--h-shadow);
  transform: translateY(-2px);
}
.yhsm-hp-lp-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(27, 79, 114, .1);
  font-size: 11.5px;
  letter-spacing: .5px;
  color: var(--h-blue);
}
.yhsm-hp-lp-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--hp-ink);
}
.yhsm-hp-lp-card p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--hp-muted);
}
.yhsm-hp-lp-more {
  font-size: 13px;
  font-weight: 600;
  color: var(--h-blue);
}
.yhsm-hp-lp-more::after {
  content: "›";
  margin-left: 5px;
  font-weight: 700;
}

/* ==========================================================================
   ⑦ 最新博客
   ========================================================================== */
.yhsm-hp-blog {
  padding: 46px 0;
  background: var(--h-bg);
  border-top: 1px solid var(--hp-line);
}
.yhsm-hp-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.yhsm-hp-blog-card {
  overflow: hidden;
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius);
  background: #fff;
  transition: var(--h-transition);
}
.yhsm-hp-blog-card:hover {
  box-shadow: var(--h-shadow);
  transform: translateY(-2px);
}
.yhsm-hp-blog-link {
  display: block;
  color: inherit;
}
.yhsm-hp-blog-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef1f4;
}
.yhsm-hp-blog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.yhsm-hp-blog-body {
  display: block;
  padding: 16px 18px 20px;
}
.yhsm-hp-blog-date {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--hp-muted);
}
.yhsm-hp-blog-title {
  display: block;
  margin-bottom: 8px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--hp-ink);
}
.yhsm-hp-blog-card:hover .yhsm-hp-blog-title { color: var(--h-blue); }
.yhsm-hp-blog-excerpt {
  display: block;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--hp-muted);
}

/* ==========================================================================
   ⑧ FAQ
   ========================================================================== */
.yhsm-hp-faq {
  padding: 46px 0;
  background: #fff;
}
.yhsm-hp-faq-list {
  display: grid;
  gap: 12px;
  max-width: 900px;
  margin: 0 auto;
}
.yhsm-hp-faq-item {
  border: 1px solid var(--hp-line);
  border-radius: var(--hp-radius);
  background: #fbfcfd;
  transition: var(--h-transition);
}
.yhsm-hp-faq-item[open] {
  background: #fff;
  border-color: rgba(27, 79, 114, .35);
  box-shadow: 0 2px 10px rgba(13, 27, 42, .06);
}
.yhsm-hp-faq-item summary {
  position: relative;
  padding: 16px 46px 16px 18px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--hp-ink);
  cursor: pointer;
  list-style: none;
}
.yhsm-hp-faq-item summary::-webkit-details-marker { display: none; }
.yhsm-hp-faq-item summary::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid var(--h-steel);
  border-bottom: 2px solid var(--h-steel);
  transform: rotate(45deg);
  transition: var(--h-transition);
}
.yhsm-hp-faq-item[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
}
.yhsm-hp-faq-body {
  padding: 0 18px 18px;
}
.yhsm-hp-faq-body p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--hp-muted);
}

/* ==========================================================================
   ⑨ 底部 CTA
   ========================================================================== */
.yhsm-hp-cta {
  padding: 42px 0;
  color: #fff;
  background:
    radial-gradient(700px 260px at 88% -20%, rgba(230, 57, 70, .3), transparent 62%),
    linear-gradient(135deg, #0d1b2a 0%, #1b4f72 100%);
}
.yhsm-hp-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.yhsm-hp-cta-txt h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.yhsm-hp-cta-txt p {
  margin: 0;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .8);
}
.yhsm-hp-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1024px) {
  .yhsm-hp-hero { padding: 44px 0 38px; }
  .yhsm-hp-h2 { font-size: 21px; }
  .yhsm-hp-service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yhsm-hp-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .yhsm-hp-step:nth-child(2n)::after { display: none; }
  .yhsm-hp-blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .yhsm-hp-hero { padding: 32px 0 30px; }
  .yhsm-hp-eyebrow { font-size: 11.5px; letter-spacing: .6px; }
  .yhsm-hp-title { letter-spacing: .5px; }
  .yhsm-hp-sub { margin-bottom: 0; }

  /* 搜索框：Hero 已移除该表单，以下规则保留仅作兼容，无元素时不产生留白 */
  .yhsm-hp-search {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
  }
  .yhsm-hp-search-field {
    flex: 1 1 100%;
    height: 42px;
    background: #f2f5f8;
    border-radius: 8px;
  }
  .yhsm-hp-search-btn {
    flex: 1 1 100%;
    height: 42px;
  }

  .yhsm-hp-actions { gap: 10px; }
  .yhsm-hp-actions .yhsm-hp-btn { flex: 1 1 100%; }

  .yhsm-hp-trust { gap: 8px 16px; }
  .yhsm-hp-trust li { font-size: 12.5px; }

  .yhsm-hp-cats,
  .yhsm-hp-products,
  .yhsm-hp-flow,
  .yhsm-hp-lp,
  .yhsm-hp-blog,
  .yhsm-hp-faq { padding: 34px 0; }

  .yhsm-hp-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .yhsm-hp-cat { padding: 14px 8px; }
  .yhsm-hp-cat-name { font-size: 13.5px; }

  .yhsm-hp-service-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .yhsm-hp-service { padding: 14px; }

  .yhsm-hp-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .yhsm-hp-step::after { display: none !important; }
  .yhsm-hp-flow-cta { gap: 12px; }
  .yhsm-hp-flow-cta .yhsm-hp-btn { width: 100%; }

  .yhsm-hp-lp-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .yhsm-hp-blog-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }

  .yhsm-hp-cta-inner { flex-direction: column; align-items: stretch; }
  .yhsm-hp-cta-txt h2 { font-size: 19px; }
  .yhsm-hp-cta-actions { flex-direction: column; }
  .yhsm-hp-cta-actions .yhsm-hp-btn { width: 100%; }

  .yhsm-hp-head { align-items: flex-start; }
  .yhsm-hp-head--center { align-items: center; }
}
