/* 产品详情页共享样式
 * 与 assets/home.css 同一套 Token（品牌色、圆角、阴影、字体、断点），
 * 但页面结构独立，避免详情页改动影响首页。 */

:root {
  --brand: #1677ff;
  --brand-2: #6f5cff;
  --brand-3: #b35cff;
  --ink: #111827;
  --ink-2: #3f4756;
  --ink-3: #727b8d;
  --page: #f8faff;
  --dark: #0b1020;
  --content: 1180px;

  --radius-sm: 12px;
  --radius: 22px;
  --radius-lg: 30px;
  --shadow-card: 0 6px 24px rgba(17, 24, 39, 0.06);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 120;
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 0 0 10px 10px;
}

.skip-link:focus {
  top: 0;
}

/* ---------- 页头：静态，不做悬浮，突出内容 ---------- */

.p-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(17, 24, 39, 0.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.p-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16.5px;
  white-space: nowrap;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2) 55%, var(--brand-3));
  box-shadow: 0 6px 16px rgba(111, 92, 255, 0.4);
}

.p-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.p-nav > a:not(.btn) {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink-2);
}

.p-nav > a:not(.btn):hover {
  background: rgba(22, 119, 255, 0.08);
  color: var(--brand);
}

/* ---------- 按钮：与首页一致 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 15px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 12px 30px rgba(22, 119, 255, 0.3);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(17, 24, 39, 0.14);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

/* ---------- 详情页首屏 ---------- */

.p-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 64px;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(179, 92, 255, 0.16), transparent 60%),
    radial-gradient(760px 400px at 5% 0%, rgba(22, 119, 255, 0.15), transparent 62%),
    var(--page);
}

.p-hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.5;
}

.orb-a {
  width: 300px;
  height: 300px;
  top: -110px;
  right: 6%;
  background: radial-gradient(circle at 30% 30%, rgba(179, 92, 255, 0.85), transparent 70%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(17, 24, 39, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 25%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 25%, transparent 75%);
}

.p-hero .container {
  position: relative;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.p-hero h1 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.p-hero-sub {
  font-size: 17px;
  font-weight: 600;
  color: var(--brand-2);
  margin-bottom: 14px;
}

.p-lead {
  max-width: 44em;
  font-size: 18px;
  color: var(--ink-2);
  margin-bottom: 0;
}

.p-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

/* ---------- 内容区 ---------- */

.section {
  padding: 72px 0;
}

.section-alt {
  background: linear-gradient(180deg, #fff, var(--page));
}

.section h2 {
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 800;
  margin-bottom: 14px;
}

.section-lead {
  font-size: 16.5px;
  color: var(--ink-2);
}

.p-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.p-block + .p-block {
  margin-top: 44px;
}

.p-block p {
  color: var(--ink-2);
  font-size: 16.5px;
}

.feature-list {
  display: grid;
  gap: 12px;
}

.feature-list li {
  position: relative;
  padding: 16px 20px 16px 52px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: var(--shadow-card);
  color: var(--ink-2);
  font-size: 15.5px;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
}

.p-aside {
  padding: 28px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: var(--shadow-card);
}

.p-aside h2 {
  font-size: 19px;
}

.p-aside li {
  position: relative;
  padding: 10px 0 10px 22px;
  color: var(--ink-2);
  font-size: 15.5px;
  border-bottom: 1px dashed rgba(17, 24, 39, 0.1);
}

.p-aside li:last-child {
  border-bottom: 0;
}

.p-aside li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
}

/* ---------- 关联模块 ---------- */

.related {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 26px;
}

.related-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.06);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  border-color: rgba(22, 119, 255, 0.45);
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.1);
}

.related-card b {
  font-size: 16.5px;
}

.related-card span {
  font-size: 14px;
  color: var(--ink-3);
}

.related-card.related-all {
  justify-content: center;
  align-items: flex-start;
  background: linear-gradient(160deg, rgba(22, 119, 255, 0.07), rgba(179, 92, 255, 0.1));
  border-style: dashed;
  border-color: rgba(22, 119, 255, 0.32);
  color: var(--brand);
  font-weight: 600;
}

/* ---------- 底部转化 ---------- */

.p-cta {
  padding: 56px 0 72px;
}

.p-cta-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 38px 40px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(600px 240px at 100% 0%, rgba(179, 92, 255, 0.4), transparent 60%),
    linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}

.p-cta-inner h2 {
  font-size: clamp(24px, 2.6vw, 30px);
  color: #fff;
  margin-bottom: 8px;
}

.p-cta-inner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
}

.p-cta-inner .p-actions {
  margin-top: 0;
}

.p-cta .btn-primary {
  background: #fff;
  color: var(--brand-2);
  box-shadow: 0 12px 30px rgba(11, 16, 32, 0.22);
}

.p-cta .btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

.p-cta .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

/* ---------- 页脚：与首页一致 ---------- */

.p-footer {
  background: var(--dark);
  color: #9aa4bd;
  padding: 48px 0 26px;
  font-size: 14.5px;
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.footer-brand b {
  color: #fff;
  font-size: 16.5px;
}

.footer-tag {
  margin: 6px 0 8px;
  color: #c6cee1;
  font-size: 13.5px;
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px 18px;
}

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 18px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .p-header-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }

  .p-nav {
    flex-wrap: wrap;
    gap: 6px;
  }

  .p-cols {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .p-cta-inner {
    padding: 30px 26px;
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .container {
    width: calc(100% - 32px);
  }

  .section {
    padding: 52px 0;
  }

  .p-hero {
    padding: 48px 0 44px;
  }

  .p-hero h1 {
    font-size: 30px;
  }

  .p-actions {
    flex-direction: column;
  }

  .p-actions .btn {
    width: 100%;
  }

  .related {
    grid-template-columns: minmax(0, 1fr);
  }

  .p-cta-inner {
    padding: 26px 20px;
  }

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 减少动画偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  .btn:hover,
  .related-card:hover {
    transform: none;
  }
}
