.page-products {
  --lineage-blue: var(--gradient-start);
  --lineage-gold: var(--accent-gold);
  --lineage-orange: var(--accent-orange);
  --paper-bg: var(--neutral-light);
  --paper-ink: var(--primary-base);
  --page-section-space: 48px;
}

.page-products .page-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}

.page-products .page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 42%;
  height: 100%;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.16), rgba(255, 108, 44, 0.06));
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
}

.page-products .product-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 28px;
}

.page-products .hero-main {
  margin-top: 16px;
}

.page-products .hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  background: rgba(19, 43, 74, 0.7);
  border: 1px solid rgba(201, 162, 39, 0.25);
  padding: 16px;
}

.page-products .hero-stat-label {
  grid-column: 1 / -1;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--accent-gold);
  text-transform: uppercase;
}

.page-products .hero-stat {
  text-align: center;
  padding: 10px 0;
}

.page-products .hero-stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--neutral-light);
  line-height: 1.1;
}

.page-products .hero-stat em {
  display: block;
  font-style: normal;
  font-size: 0.82rem;
  color: var(--neutral-muted);
  margin-top: 6px;
}

.page-products .hero-link {
  grid-column: 1 / -1;
  color: var(--accent-orange);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  text-decoration: none;
  padding-top: 8px;
  border-top: 1px solid rgba(168, 184, 200, 0.2);
}

.page-products .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.page-products .lineage-section {
  padding: var(--page-section-space) 0;
  background: linear-gradient(180deg, var(--primary-elevated) 0%, var(--primary-base) 100%);
}

.page-products .section-heading {
  text-align: center;
  margin-bottom: 28px;
}

.page-products .section-title {
  margin-top: 8px;
}

.page-products .section-subtitle {
  max-width: 640px;
  margin: 8px auto 0;
  color: var(--neutral-muted);
}

.page-products .version-filter {
  margin: 8px 0 32px;
  text-align: center;
}

.page-products .filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.page-products .filter-item {
  background: transparent;
  border: 1px solid rgba(168, 184, 200, 0.35);
  color: var(--neutral-muted);
  padding: 8px 18px;
  border-radius: 32px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.page-products .filter-item:hover {
  color: var(--neutral-light);
  border-color: var(--accent-gold);
}

.page-products .filter-item.is-active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: var(--primary-base);
  font-weight: 700;
}

.page-products .filterable.is-filtered {
  display: none;
}

.page-products .lineage-chart {
  margin-top: 8px;
}

.page-products .lineage-core {
  text-align: center;
  background: linear-gradient(135deg, rgba(79, 179, 216, 0.14), rgba(123, 92, 173, 0.08));
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 12px;
  padding: 20px 16px;
  position: relative;
}

.page-products .lineage-core::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -17px;
  width: 2px;
  height: 17px;
  background: var(--accent-gold);
  z-index: 2;
  display: none;
}

.page-products .lineage-core span {
  display: block;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--neutral-light);
}

.page-products .lineage-core small {
  display: inline-block;
  margin-top: 8px;
  color: var(--neutral-muted);
  font-size: 0.85rem;
}

.page-products .lineage-branches {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 34px;
  position: relative;
}

.page-products .lineage-branch {
  position: relative;
  background: linear-gradient(160deg, rgba(19, 43, 74, 0.92), rgba(11, 29, 58, 0.92));
  padding: 20px;
  border-left: 3px solid var(--accent-gold);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.page-products .branch-standard {
  border-left-color: var(--lineage-blue);
}

.page-products .branch-pro {
  border-left-color: var(--lineage-gold);
}

.page-products .branch-flagship {
  border-left-color: var(--lineage-orange);
}

.page-products .branch-standard:hover {
  background: linear-gradient(160deg, rgba(19, 43, 74, 0.98), rgba(11, 29, 58, 0.98));
}

.page-products .branch-pro:hover {
  background: linear-gradient(160deg, rgba(19, 43, 74, 0.98), rgba(11, 29, 58, 0.98));
}

.page-products .branch-flagship:hover {
  background: linear-gradient(160deg, rgba(19, 43, 74, 0.98), rgba(11, 29, 58, 0.98));
}

.page-products .branch-icon {
  width: 120px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}

.page-products .lineage-branch h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--neutral-light);
  margin-bottom: 8px;
}

.page-products .branch-desc {
  color: var(--neutral-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.page-products .branch-features {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.page-products .branch-features li {
  position: relative;
  padding-left: 18px;
  color: var(--neutral-light);
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.page-products .branch-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gold);
}

.page-products .branch-level {
  display: inline-block;
  margin-top: 12px;
  padding: 2px 10px;
  border: 1px solid rgba(168, 184, 200, 0.3);
  color: var(--neutral-muted);
  font-size: 0.78rem;
  font-family: var(--font-heading);
  letter-spacing: 0.08em;
}

.page-products .scenario-figure {
  margin: 40px auto 0;
  max-width: 400px;
  text-align: center;
}

.page-products .scenario-figure img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.page-products .scenario-figure figcaption {
  margin-top: 10px;
  color: var(--neutral-muted);
  font-size: 0.88rem;
}

.page-products .compare-section {
  padding: var(--page-section-space) 0;
  background: linear-gradient(165deg, var(--primary-base) 0%, var(--primary-elevated) 55%, var(--primary-base) 100%);
}

.page-products .compare-inner {
  padding: 24px 0;
}

.page-products .compare-deploy-img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0 20px;
  display: block;
}

.page-products .table-scroll-wrap {
  overflow-x: auto;
  margin-top: 12px;
  padding-bottom: 4px;
}

.page-products .version-compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.page-products .version-compare-table th,
.page-products .version-compare-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(168, 184, 200, 0.18);
}

.page-products .version-compare-table thead th {
  background: var(--primary-elevated);
  color: var(--accent-gold);
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--accent-gold);
}

.page-products .version-compare-table tbody th {
  color: var(--neutral-light);
  font-family: var(--font-heading);
  font-weight: 600;
  white-space: nowrap;
}

.page-products .version-compare-table tbody tr:hover {
  background: rgba(79, 179, 216, 0.1);
}

.page-products .td-note {
  display: block;
  color: var(--neutral-muted);
  font-size: 0.78rem;
  margin-top: 4px;
}

.page-products .download-guide-section {
  padding: var(--page-section-space) 0;
  background: linear-gradient(180deg, var(--primary-base), rgba(19, 43, 74, 0.6));
}

.page-products .download-guide-inner {
  padding: 8px 0;
}

.page-products .guide-layout {
  display: grid;
  gap: 28px;
  align-items: center;
}

.page-products .guide-notes {
  background: var(--paper-bg);
  color: var(--paper-ink);
  border-radius: 8px;
  padding: 6px 22px 12px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

.page-products .guide-item {
  border-bottom: 1px dashed rgba(11, 29, 58, 0.25);
}

.page-products .guide-item:last-child {
  border-bottom: 0;
}

.page-products .guide-item summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 18px 0 6px;
  color: var(--primary-base);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-products .guide-item summary::-webkit-details-marker {
  display: none;
}

.page-products .guide-item summary::after {
  content: '+';
  font-size: 1.3rem;
  line-height: 1;
  color: var(--accent-orange);
  margin-left: 12px;
}

.page-products .guide-item[open] summary::after {
  content: '−';
}

.page-products .guide-item p {
  margin: 0;
  padding: 0 0 16px;
  color: var(--primary-elevated);
  font-size: 0.92rem;
  line-height: 1.7;
}

.page-products .guide-visual {
  margin: 0;
}

.page-products .guide-visual img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(79, 179, 216, 0.12), rgba(201, 162, 39, 0.1));
}

.page-products .guide-visual figcaption {
  margin-top: 8px;
  color: var(--neutral-muted);
  font-size: 0.88rem;
}

.page-products .guide-contact-note {
  margin-top: 24px;
  padding: 16px 20px;
  background: rgba(11, 29, 58, 0.6);
  border: 1px solid rgba(201, 162, 39, 0.25);
  color: var(--neutral-light);
  font-size: 0.95rem;
}

.page-products .guide-contact-note a {
  color: var(--accent-gold);
  text-decoration: none;
}

.page-products .guide-contact-note a:hover {
  color: var(--accent-orange);
}

.page-products .changelog-section {
  padding: var(--page-section-space) 0;
  background: linear-gradient(180deg, rgba(19, 43, 74, 0.7), var(--primary-base));
}

.page-products .changelog-list {
  display: grid;
  gap: 0;
}

.page-products .changelog-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(168, 184, 200, 0.16);
}

.page-products .changelog-version {
  font-family: var(--font-heading);
  font-weight: 800;
  color: var(--accent-gold);
  font-size: 1rem;
  line-height: 1.2;
}

.page-products .changelog-body h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--neutral-light);
  margin: 0 0 6px;
}

.page-products .changelog-body p {
  margin: 0;
  color: var(--neutral-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.page-products .changelog-visual {
  margin: 28px 0 0;
}

.page-products .changelog-visual img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.page-products .changelog-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 28px;
}

@media (min-width: 900px) {
  .page-products .product-hero-inner {
    grid-template-columns: 1fr 300px;
    align-items: center;
  }

  .page-products .lineage-branches {
    flex-direction: row;
    gap: 16px;
  }

  .page-products .lineage-branches::before {
    content: '';
    position: absolute;
    top: -17px;
    left: 16.66%;
    right: 16.66%;
    height: 2px;
    background: var(--accent-gold);
  }

  .page-products .lineage-branch::before {
    content: '';
    position: absolute;
    top: -17px;
    left: 50%;
    width: 2px;
    height: 17px;
    background: var(--accent-gold);
  }

  .page-products .lineage-core::after {
    display: block;
  }

  .page-products .lineage-branch {
    flex: 1;
  }

  .page-products .guide-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

  .page-products .changelog-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
  }

  .page-products .changelog-visual {
    margin-top: 0;
  }
}
