.page-products {
  --_content-max: 1200px;
  --_index-width: 280px;
  --_gap: 2rem;
  --_card-radius: 12px;
  --_card-bg: #F1FAEE;
  --_card-shadow: 0 4px 20px rgba(0,0,0,0.06);
  --_transition-expand: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: block;
  padding: 2rem 1rem;
  background: #FFFFFF;
  color: #2B2D42;
  font-family: 'Inter', sans-serif;
}

.page-products__container {
  display: grid;
  grid-template-columns: minmax(0, var(--_index-width)) 1fr;
  gap: var(--_gap);
  max-width: var(--_content-max);
  margin: 0 auto;
}

/* 左侧索引 */
.page-products__index {
  position: sticky;
  top: calc(var(--header-h, 56px) + 1rem);
  align-self: start;
  background: #F1FAEE;
  border-radius: 16px;
  padding: 1.5rem 1rem;
  box-shadow: var(--_card-shadow);
}

.page-products__index-heading {
  font-size: 1.25rem;
  font-weight: 700;
  font-style: italic;
  color: #1D3557;
  margin: 0 0 1rem 0;
  letter-spacing: 0.02em;
}

.page-products__index-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: section-counter;
}

.page-products__index-item {
  counter-increment: section-counter;
  margin-bottom: 0.5rem;
}

.page-products__index-link {
  display: block;
  padding: 0.4rem 0.6rem;
  color: #2B2D42;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  font-size: 0.95rem;
  font-weight: 500;
}

.page-products__index-link:hover,
.page-products__index-link:focus {
  background: rgba(230, 57, 70, 0.1);
  color: #E63946;
}

.page-products__index-visual {
  margin-top: 2rem;
  text-align: center;
}

.page-products__device-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* 右侧内容 */
.page-products__content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  min-width: 0;
}

.page-products__section {
  scroll-margin-top: calc(var(--header-h, 56px) + 1rem);
}

.page-products__section .section-number {
  font-family: var(--font-number, 'JetBrains Mono', monospace);
  font-size: 2.5rem;
  font-weight: 600;
  color: #E63946;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.page-products__section-title {
  font-size: 1.75rem;
  font-weight: 700;
  font-style: italic;
  color: #1D3557;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.page-products__section-desc {
  font-size: 1rem;
  color: #2B2D42;
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}

/* 卡片 */
.page-products__card {
  background: var(--_card-bg);
  border-radius: var(--_card-radius);
  box-shadow: var(--_card-shadow);
  overflow: hidden;
  transition: box-shadow 0.3s;
  margin-bottom: 1.25rem;
}

.page-products__card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}

.page-products__card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  user-select: none;
  background: linear-gradient(135deg, #F1FAEE 0%, #E8F0E6 100%);
}

.page-products__card-icon {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
  background: #DDE7E0;
}

.page-products__card-icon--large {
  width: 100%;
  height: auto;
  max-height: 300px;
  object-fit: contain;
}

.page-products__card-icon--wide {
  width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
}

.page-products__card-title {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 600;
  color: #1D3557;
}

.page-products__card-toggle {
  background: none;
  border: 2px solid #E63946;
  color: #E63946;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  font-size: 0.85rem;
}

.page-products__card-toggle:hover,
.page-products__card-toggle:focus {
  background: #E63946;
  color: #FFFFFF;
}

.page-products__card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-expand), padding var(--transition-expand);
  padding: 0 1.25rem;
  background: #FFFFFF;
  border-top: 0 solid transparent;
}

.page-products__card[data-expandable] .page-products__card-body[data-expand-content] {
  padding: 1.25rem;
}

/* 当卡片展开时，通过JS动态设置max-height，这里只做基础样式 */
.page-products__card[data-expandable] .page-products__card-body {
  max-height: 0;
  padding: 0 1.25rem;
}

.page-products__card[data-expandable][data-open="true"] .page-products__card-body {
  max-height: 800px; /* 足够大，实际内容自适应 */
  padding: 1.25rem;
}

.page-products__inline-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  object-fit: cover;
}

/* 面包屑 */
.page-products__breadcrumb {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #6B7A8D;
}

.page-products__breadcrumb a {
  color: #1D3557;
  text-decoration: none;
  transition: color 0.2s;
}

.page-products__breadcrumb a:hover {
  color: #E63946;
  text-decoration: underline;
}

.page-products__breadcrumb-sep {
  margin: 0 0.4rem;
  color: #B0BEC5;
}

/* 移动端优先：窄屏布局 */
@media (max-width: 800px) {
  .page-products {
    padding: 1rem 0.75rem;
  }

  .page-products__container {
    grid-template-columns: 1fr;
  }

  .page-products__index {
    position: static;
    margin-bottom: 1.5rem;
    padding: 1rem;
    box-shadow: none;
    border: 1px solid rgba(0,0,0,0.06);
  }

  .page-products__index-heading {
    font-size: 1rem;
  }

  .page-products__index-visual {
    display: none;
  }

  .page-products__section-title {
    font-size: 1.3rem;
  }

  .page-products__card-header {
    padding: 0.75rem 1rem;
  }

  .page-products__card-icon {
    width: 40px;
    height: 40px;
  }

  .page-products__card-icon--large,
  .page-products__card-icon--wide {
    width: 100%;
    height: auto;
  }

  .page-products__card-toggle {
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
  }
}

/* 桌面微调 */
@media (min-width: 801px) {
  .page-products__content {
    gap: 3rem;
  }
}

.page-products {
  --transition-expand: var(--_transition-expand);
}
