/* ========== 首页：科技感 + 扁平化 + 突出产品 ========== */

body {
  background-color: var(--color-bg);
  min-height: 100%;
}

/* ---------- Hero 区：扁平、科技感 ---------- */
.home-hero {
  position: relative;
  margin-top: 90px;
  min-height: 42vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home-hero__bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e3a5f 50%, var(--color-secondary) 100%);
  opacity: 0.97;
}

/* 科技感网格线（扁平、低对比） */
.home-hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding: 48px 24px;
  text-align: center;
}

.home-hero__label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  margin: 0 0 12px;
  font-family: var(--font-heading);
}

.home-hero__title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: 0.02em;
  line-height: 1.25;
  font-family: var(--font-heading);
}

.home-hero__sub {
  font-size: 15px;
  color: rgba(255,255,255,0.85);
  margin: 0 0 32px;
  font-weight: 400;
}

.home-hero__cta {
  display: inline-block;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  background: #fff;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
}

.home-hero__cta:hover {
  background: rgba(255,255,255,0.95);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.home-hero__cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.home-hero__cta--secondary {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.8);
}

.home-hero__cta--secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

/* ---------- 核心产品区 ---------- */
.home-products {
  padding: 56px 24px 72px;
  background: var(--color-bg);
}

.home-products__wrap {
  max-width: 1200px;
  margin: 0 auto;
}

.home-products__title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 8px;
  font-family: var(--font-heading);
}

.home-products__desc {
  font-size: 15px;
  color: var(--color-text-muted);
  margin: 0 0 40px;
  max-width: 560px;
}

/* 产品网格：扁平卡片 */
.home-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.home-product-card {
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  color: inherit;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.home-product-card:hover {
  border-color: var(--color-cta);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.home-product-card__main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.home-product-card__main:hover {
  text-decoration: none;
  color: inherit;
}

.home-product-card__main:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
  border-radius: 4px;
}

.home-product-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #f97316, #ea580c);
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.45);
  pointer-events: none;
}

.home-product-card__img {
  width: 100%;
  aspect-ratio: 5 / 2;
  padding: 0;
  box-sizing: border-box;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 0;
}

.home-product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.home-product-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.home-product-card__title {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-primary);
  margin: 0 0 10px;
  font-family: var(--font-heading);
  line-height: 1.3;
}

.home-product-card__text {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin: 0 0 12px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-product-card__link {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-cta);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 200ms ease;
}

.home-product-card__main:hover .home-product-card__link {
  gap: 8px;
}

.home-product-card__link::after {
  content: "→";
}

/* 立即购买：外链新开页，与「了解详情」分区避免嵌套 <a> */
.home-product-card__buy {
  display: block;
  margin: 0;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #ff6a00, #ff4400);
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: filter 200ms ease, transform 200ms ease;
  font-family: var(--font-body, inherit);
}

.home-product-card__buy:hover {
  filter: brightness(1.05);
  transform: none;
  color: #fff;
  text-decoration: none;
}

.home-product-card__buy:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: -2px;
  position: relative;
  z-index: 1;
}

/* 售罄 / 备货：非链接，弱化样式 */
.home-product-card__buy--soldout {
  cursor: default;
  color: var(--color-text-muted);
  background: var(--color-border-light);
  border-top-color: var(--color-border);
  filter: none;
}

.home-product-card__buy--soldout:hover {
  filter: none;
  transform: none;
  color: var(--color-text-muted);
}

/* 底部「查看全部」 */
.home-products__footer {
  margin-top: 40px;
  text-align: center;
}

.home-products__more {
  display: inline-block;
  padding: 12px 32px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--color-cta);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 200ms ease, transform 200ms ease;
}

.home-products__more:hover {
  background: var(--color-cta-hover);
  transform: translateY(-1px);
}

.home-products__more:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .home-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .home-download-bar__wrap {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }
  .home-download-bar__text {
    min-width: 0;
  }
  .home-hero {
    min-height: 36vh;
  }
  .home-hero__inner {
    padding: 36px 20px;
  }
  .home-hero__sub {
    font-size: 14px;
  }
  .home-products {
    padding: 40px 16px 56px;
  }
  .home-products__title {
    font-size: 24px;
  }
  .home-product-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .home-product-card__img {
    aspect-ratio: 16 / 9;
  }
}
