.page-products {
  --p-card-bg: #ffffff;
  --p-card-border: #e0d8cc;
  --p-hero-bg: linear-gradient(135deg, #0a1f3d 0%, #152d4e 100%);
  --p-accent-stripe: #f46d2d;
  --p-tag-bg: #f5f0e8;
  --p-timeline-line: #d4a843;
  --p-cta-overlay: rgba(10, 31, 61, 0.72);
  --p-card-radius: 4px;
  --p-gap: 32px;
  background-color: var(--color-cream);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.6;
}

/* ===== 首屏 Hero ===== */
.page-products__hero {
  background: var(--p-hero-bg);
  padding: 48px 0 56px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 32px), calc(100% - 48px) 100%, 0 100%);
  margin-bottom: 8px;
}

.page-products .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 20px;
  font-family: var(--font-mono);
}

.page-products .breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.page-products .breadcrumb a:hover,
.page-products .breadcrumb a:focus-visible {
  color: var(--color-accent);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.page-products .breadcrumb__sep {
  opacity: 0.5;
}

.page-products__title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.page-products__subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 680px;
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}

/* ===== 功能卡片区 ===== */
.page-products__cards {
  padding: 24px 0 16px;
}

.page-products__cards .container {
  display: flex;
  flex-direction: column;
  gap: var(--p-gap);
}

/* 卡片通用 */
.solution-card {
  background: var(--p-card-bg);
  border: 1px solid var(--p-card-border);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.25s ease;
  position: relative;
}

.solution-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: var(--p-accent-stripe);
  clip-path: polygon(0 0, 6px 0, 6px 100%, 0 calc(100% - 20px));
  z-index: 1;
}

.solution-card:hover,
.solution-card:focus-within {
  box-shadow: 0 8px 28px rgba(10, 31, 61, 0.12);
  transform: translateY(-4px);
}

.solution-card__visual {
  width: 100%;
  background: #ebe5db;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 220px;
}

.solution-card__img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 400px;
  object-fit: cover;
  aspect-ratio: 4 / 3;
}

.solution-card__content {
  padding: 24px 20px 28px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.solution-card__heading {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 12px;
  line-height: 1.2;
  position: relative;
  display: inline-block;
}

.solution-card__heading::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  background: var(--color-accent);
  margin-top: 8px;
  clip-path: polygon(0 0, 100% 0, 95% 100%, 0 100%);
}

.solution-card__desc {
  font-size: 15px;
  color: var(--color-charcoal);
  margin: 0 0 16px;
  line-height: 1.6;
}

.solution-card__btn {
  align-self: flex-start;
  margin-top: auto;
}

/* ===== 迷你柱状图 ===== */
.chart-mini {
  margin: 8px 0 16px;
  width: 100%;
  max-width: 360px;
}

.chart-mini__svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-mini__note {
  font-size: 11px;
  color: var(--color-ash);
  font-family: var(--font-mono);
  display: block;
  margin-top: 4px;
}

/* ===== 标签云 ===== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 8px 0 18px;
  padding: 12px 0;
  border-top: 1px dashed var(--color-terracotta);
  border-bottom: 1px dashed var(--color-terracotta);
  background: var(--p-tag-bg);
  padding: 16px 14px;
  border-radius: 2px;
}

.tag-cloud__item {
  display: inline-block;
  padding: 4px 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: default;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  line-height: 1.3;
  user-select: none;
}

.tag-cloud__item:hover,
.tag-cloud__item:focus-visible {
  transform: scale(1.06);
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.tag-cloud__item--xl {
  font-size: 20px;
  background: var(--color-primary);
  color: #fff;
  padding: 6px 18px;
}

.tag-cloud__item--xl:hover {
  background: #0f2a50;
}

.tag-cloud__item--lg {
  font-size: 17px;
  background: var(--color-terracotta);
  color: #fff;
  padding: 5px 16px;
}

.tag-cloud__item--lg:hover {
  background: #b06a4a;
}

.tag-cloud__item--md {
  font-size: 15px;
  background: var(--color-gold);
  color: #1a1a1a;
  padding: 4px 14px;
}

.tag-cloud__item--md:hover {
  background: #c89d38;
}

.tag-cloud__item--sm {
  font-size: 13px;
  background: var(--color-cream);
  color: var(--color-charcoal);
  border: 1px solid var(--color-ash);
  padding: 3px 10px;
}

.tag-cloud__item--sm:hover {
  background: #e8e0d4;
}

/* ===== 指南列表 ===== */
.guide-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-list__item {
  font-size: 14px;
  color: var(--color-charcoal);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}

.guide-list__item::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* ===== 版本历史 ===== */
.page-products__history {
  padding: 32px 0 40px;
  background: var(--color-primary);
  clip-path: polygon(48px 0, 100% 0, 100% 100%, 0 calc(100% - 20px));
  margin: 8px 0 0;
}

.version-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.version-head__icon {
  display: block;
  width: 80px;
  height: auto;
  max-width: 200px;
  object-fit: contain;
  border-radius: 2px;
  flex-shrink: 0;
}

.version-head__title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.15;
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--p-timeline-line);
  clip-path: polygon(0 0, 100% 0, 80% 100%, 0 100%);
  border-radius: 1px;
}

.timeline__item {
  position: relative;
  padding: 0 0 32px 20px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__badge {
  position: absolute;
  left: -32px;
  top: 0;
  width: 56px;
  height: 28px;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(0 0, 100% 0, 93% 100%, 0 100%);
  letter-spacing: 0.03em;
}

.timeline__badge--ghost {
  background: transparent;
  color: var(--color-gold);
  border: 2px solid var(--color-gold);
  font-size: 11px;
  width: 68px;
  height: 26px;
  clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
}

.timeline__content {
  background: rgba(255, 255, 255, 0.06);
  padding: 16px 18px;
  border-left: 3px solid var(--color-gold);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.timeline__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline__list li {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  padding: 4px 0 4px 16px;
  position: relative;
  line-height: 1.5;
}

.timeline__list li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.timeline__note {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 12px;
}

.timeline__content .btn--outline {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.timeline__content .btn--outline:hover,
.timeline__content .btn--outline:focus-visible {
  background: var(--color-gold);
  color: var(--color-primary);
}

/* ===== CTA 区块 ===== */
.page-products__cta {
  padding: 32px 0 48px;
}

.cta-inner {
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 24px), calc(100% - 32px) 100%, 0 100%);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-inner__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
}

.cta-inner__overlay {
  position: relative;
  z-index: 1;
  background: var(--p-cta-overlay);
  padding: 40px 28px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.cta-inner__title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.cta-inner__desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
  margin: 0;
  line-height: 1.5;
}

.cta-inner__btn {
  border-color: var(--color-accent);
  color: #ffffff;
  border-width: 2px;
  font-size: 16px;
  padding: 12px 32px;
  margin-top: 4px;
  background: transparent;
}

.cta-inner__btn:hover,
.cta-inner__btn:focus-visible {
  background: var(--color-accent);
  color: #ffffff;
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* ===== 响应式 ===== */
@media (min-width: 768px) {
  .page-products__hero {
    padding: 56px 0 64px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), calc(100% - 80px) 100%, 0 100%);
  }

  .page-products__title {
    font-size: 48px;
  }

  .page-products__subtitle {
    font-size: 18px;
  }

  .solution-card {
    flex-direction: row;
  }

  .solution-card__visual {
    width: 40%;
    min-width: 280px;
    min-height: auto;
  }

  .solution-card__img {
    max-width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }

  .solution-card__content {
    padding: 32px 28px 32px 32px;
    width: 60%;
  }

  .solution-card__heading {
    font-size: 26px;
  }

  .solution-card__desc {
    font-size: 16px;
  }

  .tag-cloud {
    padding: 18px 20px;
    gap: 12px 18px;
  }

  .version-head__icon {
    width: 120px;
  }

  .version-head__title {
    font-size: 32px;
  }

  .timeline {
    padding-left: 48px;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline__badge {
    left: -48px;
    width: 64px;
    height: 32px;
    font-size: 14px;
  }

  .timeline__badge--ghost {
    width: 80px;
    height: 30px;
  }

  .timeline__content {
    padding: 20px 24px;
  }

  .timeline__list li {
    font-size: 15px;
  }

  .cta-inner__overlay {
    padding: 56px 40px;
  }

  .cta-inner__title {
    font-size: 32px;
  }

  .cta-inner__desc {
    font-size: 17px;
  }
}

@media (min-width: 1024px) {
  .page-products__cards .container {
    gap: 40px;
  }

  .solution-card__visual {
    width: 38%;
    min-width: 320px;
  }

  .solution-card__content {
    padding: 40px 36px 40px 40px;
  }

  .page-products__history {
    padding: 40px 0 56px;
    clip-path: polygon(80px 0, 100% 0, 100% 100%, 0 calc(100% - 28px));
  }

  .page-products__cta {
    padding: 40px 0 56px;
  }
}

/* ===== 按钮共享样式覆盖（作用域限定） ===== */
.page-products .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  border: 2px solid transparent;
}

.page-products .btn--primary {
  background: var(--color-accent);
  color: #ffffff;
  border-color: var(--color-accent);
  clip-path: polygon(0 0, 100% 0, 98% 100%, 0 100%);
}

.page-products .btn--primary:hover,
.page-products .btn--primary:focus-visible {
  background: #e05d1c;
  border-color: #e05d1c;
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.page-products .btn--outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
  clip-path: polygon(0 0, 100% 0, 98% 100%, 0 100%);
}

.page-products .btn--outline:hover,
.page-products .btn--outline:focus-visible {
  background: var(--color-accent);
  color: #ffffff;
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

/* ===== 图片响应式约束 ===== */
.page-products img {
  max-width: 100%;
  height: auto;
}

/* ===== reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  .solution-card,
  .solution-card::before,
  .tag-cloud__item,
  .cta-inner__overlay,
  .timeline__content {
    transition: none !important;
    transform: none !important;
  }
}
