/* 产品详情页共享样式（static pages under public/products/<id>/index.html） */
/* 色板与字体与 src/app/globals.css 保持一致 */

:root {
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-300: #93c5fd;
  --brand-600: #1d63b8;
  --brand-700: #165096;
  --brand-800: #123f75;
  --ink-50: #f8fafc;
  --ink-100: #f1f5f9;
  --ink-200: #e2e8f0;
  --ink-300: #cbd5e1;
  --ink-400: #94a3b8;
  --ink-500: #64748b;
  --ink-600: #475569;
  --ink-700: #334155;
  --ink-800: #1e293b;
  --ink-900: #0f172a;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  overflow: hidden;
}

body {
  background: var(--ink-50);
  color: var(--ink-900);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 布局容器 ---------- */

.container {
  margin: 0 auto;
  width: 100%;
  max-width: 72rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

.container-xl {
  max-width: 80rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.section {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 640px) {
  .section {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }
}

.bg-white {
  background: #fff;
}

.bg-subtle {
  background: var(--ink-50);
}

.divider {
  margin-top: 2.5rem;
  border-top: 1px solid var(--ink-100);
  padding-top: 3.5rem;
}

/* ---------- 面包屑 ---------- */

.breadcrumb {
  border-bottom: 1px solid var(--ink-100);
  background: #fff;
}

.breadcrumb .container {
  padding-top: 1rem;
  padding-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--ink-500);
}

.breadcrumb .current {
  font-weight: 500;
  color: var(--ink-800);
}

/* ---------- 双栏详情（XL-408 版式） ---------- */

.section-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 1024px) {
  .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- Hero（BF200-S1 版式） ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom, var(--brand-50), #fff);
}

.hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(29, 99, 184, 0.1), transparent),
    radial-gradient(ellipse 60% 50% at 20% 80%, rgba(13, 47, 87, 0.08), transparent);
}

.hero .container {
  position: relative;
}

.hero-grid {
  margin-top: 1.5rem;
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- 产品图 ---------- */

.product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--ink-100);
  border-radius: 1rem;
  background: linear-gradient(to bottom right, var(--brand-50), #fff, var(--ink-200));
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-image.transparent {
  border: 0;
  background: transparent;
}

/* ---------- 标题与正文 ---------- */

h1 {
  margin-top: 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: var(--ink-900);
}

@media (min-width: 640px) {
  h1 {
    font-size: 1.875rem;
  }
}

.hero h1 {
  margin-top: 0;
  font-size: 1.875rem;
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 3rem;
  }
}

.lead {
  margin-top: 0.75rem;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--ink-500);
}

.desc {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--ink-600);
}

.tagline {
  margin-top: 0.75rem;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--brand-600);
}

.hero-lead {
  margin-top: 1.25rem;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.625;
  color: var(--ink-600);
}

.actions {
  margin-top: 2rem;
}

.eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--brand-600);
}

h2 {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--ink-900);
}

@media (min-width: 640px) {
  h2 {
    font-size: 1.875rem;
  }
}

.section-lead {
  margin-top: 1rem;
  max-width: 42rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--ink-600);
}

/* ---------- 技术规格（通栏单列） ---------- */

.spec-columns {
  margin-top: 2.5rem;
  width: 100%;
  max-width: 40rem;
  display: grid;
  gap: 1.25rem;
}

/* ---------- 按钮 ---------- */

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink-300);
  border-radius: 0.375rem;
  padding: 0.75rem 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-800);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.btn-outline:hover {
  background: var(--ink-50);
}

/* ---------- 特性 / 场景卡片 ---------- */

.card-grid {
  margin-top: 2rem;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .card-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  border: 1px solid var(--ink-100);
  border-radius: 1rem;
  background: #fff;
  padding: 1.5rem;
  transition: box-shadow 0.15s ease;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.icon-box {
  display: flex;
  height: 3.5rem;
  width: 3.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: var(--brand-50);
  color: var(--brand-700);
}

.icon-box svg {
  height: 2rem;
  width: 2rem;
}

.card h3 {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-900);
}

.scene-card h3 {
  margin-top: 0;
}

.card p {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--ink-500);
}

/* ---------- 亮点速览（图底标题卡片） ---------- */

.head-center {
  text-align: center;
}

.spot-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 230px;
  gap: 1.5rem;
}

.spot-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--ink-900);
}

.spot-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.spot-card:hover img {
  transform: scale(1.04);
}

.spot-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0) 55%);
}

.spot-title {
  position: absolute;
  z-index: 1;
  top: 1.25rem;
  right: 1.5rem;
  left: 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.spot-accent {
  color: var(--brand-300);
}

.spot-card-lg {
  grid-column: span 2;
  grid-row: span 2;
}

.spot-card-lg .spot-title {
  font-size: 1.375rem;
}

.spot-card-wide {
  grid-column: span 2;
}

@media (max-width: 1023px) {
  .spot-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 240px;
  }

  .spot-card-lg {
    grid-column: auto;
    grid-row: span 2;
  }

  .spot-card-wide {
    grid-column: auto;
  }
}

/* ---------- 规格表 ---------- */

.spec-table {
  border: 1px solid var(--ink-100);
  border-radius: 0.75rem;
  overflow: hidden;
}

.spec-head {
  padding: 0.5625rem 1.25rem;
  background: var(--ink-50);
  border-bottom: 1px solid var(--ink-100);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-900);
}

.spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6875rem 1.25rem;
  border-bottom: 1px solid var(--ink-100);
  font-size: 1.125rem;
}

.spec-table > :last-child {
  border-bottom: none;
}

.spec-row dt {
  color: var(--ink-500);
}

.spec-row dd {
  font-weight: 500;
  color: var(--ink-800);
  text-align: right;
}

/* ---------- 相关设备 ---------- */

.related-link {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ink-100);
  border-radius: 1rem;
  text-decoration: none;
  transition: box-shadow 0.15s ease;
}

@media (min-width: 640px) {
  .related-link {
    flex-direction: row;
  }
}

.related-link:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.related-link .product-image {
  border: 0;
  border-radius: 0;
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .related-link .product-image {
    width: 12rem;
    aspect-ratio: 1 / 1;
    align-self: center;
  }
}

.related-body {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
}

.related-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-900);
}

.related-body p {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--ink-500);
}

.related-cta {
  margin-left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--brand-700);
}

.related-link:hover .related-cta {
  color: var(--brand-800);
}

.related-cta svg {
  height: 1rem;
  width: 1rem;
  transition: transform 0.15s ease;
}

.related-link:hover .related-cta svg {
  transform: translateX(0.25rem);
}
