.page-products {
  --p-gold-glow: rgba(212, 175, 55, 0.35);
  --p-emerald-glow: rgba(46, 139, 87, 0.22);
  --p-grid-line: rgba(61, 90, 128, 0.28);
  --p-card-clip: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  position: relative;
  overflow-x: hidden;
}

.page-products .breadcrumb {
  padding-top: 24px;
  padding-bottom: 8px;
}

/* ========== Hero ========== */
.page-products .p-download-hero {
  position: relative;
  padding: 16px 0 44px;
}

.page-products .p-download-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 78% 12%, rgba(212, 175, 55, 0.14) 0%, transparent 52%),
    radial-gradient(ellipse at 16% 78%, rgba(46, 139, 87, 0.09) 0%, transparent 45%),
    linear-gradient(160deg, transparent 55%, rgba(79, 195, 247, 0.05) 100%),
    linear-gradient(var(--p-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--p-grid-line) 1px, transparent 1px);
  background-size: auto, auto, auto, 32px 32px, 32px 32px;
  pointer-events: none;
}

.page-products .p-hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
  position: relative;
}

.page-products .p-hero-copy {
  max-width: 600px;
}

.page-products .p-hero-desc {
  margin: 18px 0 24px;
  font-size: 17px;
  line-height: 1.75;
  color: var(--c-muted);
}

.page-products .p-hero-accent {
  color: var(--c-gold);
  font-weight: 500;
}

.page-products .p-cta-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-bottom: 12px;
}

.page-products .p-cta-btn {
  clip-path: var(--p-card-clip);
  box-shadow: 0 0 22px var(--p-gold-glow), 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-products .p-cta-btn:hover,
.page-products .p-cta-btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 0 34px rgba(212, 175, 55, 0.5), 0 6px 20px rgba(0, 0, 0, 0.35);
}

.page-products .p-cta-note {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--c-muted);
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.page-products .p-cta-btn:hover + .p-cta-note {
  opacity: 1;
  color: var(--c-gold-light);
}

.page-products .p-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 14px;
}

.page-products .p-hero-links a {
  font-size: 14px;
  color: var(--c-data);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.page-products .p-hero-links a:hover,
.page-products .p-hero-links a:focus-visible {
  color: var(--c-gold-light);
  border-bottom-color: var(--c-gold);
}

.page-products .p-hero-figure {
  margin: 0;
  position: relative;
}

.page-products .p-hero-figure::after {
  content: "";
  position: absolute;
  inset: 12px -12px -12px 12px;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  z-index: -1;
  opacity: 0.4;
}

.page-products .p-hero-img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ========== Install ========== */
.page-products .p-install-section {
  padding: 48px 0 32px;
  position: relative;
}

.page-products .p-install-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--c-gold) 0%, transparent 70%);
  opacity: 0.4;
}

.page-products .p-install-section .section-index,
.page-products .p-compat-section .section-index,
.page-products .p-update-section .section-index,
.page-products .p-version-section .section-index,
.page-products .p-help-section .section-index {
  margin-bottom: 32px;
}

.page-products .p-install-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.page-products .p-step-card {
  background: linear-gradient(160deg, var(--c-panel) 0%, var(--c-panel-deep) 100%);
  border: 1px solid var(--c-line);
  clip-path: var(--p-card-clip);
  padding: 28px 24px;
  position: relative;
  transition: transform 0.2s ease;
}

.page-products .p-step-card:hover {
  transform: translateY(-3px);
}

.page-products .p-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--c-gold);
  color: var(--c-gold);
  font-family: var(--font-mono);
  font-size: 16px;
  margin-bottom: 16px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.page-products .p-step-card h3 {
  margin: 0 0 10px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--c-gold-light);
}

.page-products .p-step-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-muted);
}

.page-products .p-install-note {
  margin-top: 24px;
  font-size: 13px;
  color: var(--c-muted);
  border-left: 2px solid var(--c-emerald);
  padding-left: 12px;
}

/* ========== Compatibility ========== */
.page-products .p-compat-section {
  padding: 48px 0;
}

.page-products .p-section-desc {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-muted);
  max-width: 720px;
}

.page-products .p-compat-layout {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

.page-products .p-filter-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.page-products .p-device-index h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  color: var(--c-gold-light);
  margin: 0 0 14px;
}

.page-products .p-filter-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.page-products .p-filter-label {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid var(--c-line);
  color: var(--c-muted);
  font-size: 14px;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.page-products .p-filter-label:hover {
  border-color: var(--c-gold);
  color: var(--c-gold-light);
}

.page-products #p-filter-all:checked ~ .p-device-index .p-filter-label[for="p-filter-all"],
.page-products #p-filter-android:checked ~ .p-device-index .p-filter-label[for="p-filter-android"],
.page-products #p-filter-ios:checked ~ .p-device-index .p-filter-label[for="p-filter-ios"] {
  background: var(--c-gold);
  border-color: var(--c-gold);
  color: var(--c-bg);
  font-weight: 500;
}

.page-products #p-filter-android:checked ~ .p-compat-table-wrap tbody tr[data-device-type="ios"],
.page-products #p-filter-ios:checked ~ .p-compat-table-wrap tbody tr[data-device-type="android"] {
  display: none;
}

.page-products .p-compat-figure {
  margin: 24px 0 0;
}

.page-products .p-compat-figure img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 0 20px var(--p-emerald-glow);
}

.page-products .p-compat-table-wrap {
  width: 100%;
  overflow-x: auto;
  align-self: start;
}

.page-products .p-compat-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  background: var(--c-panel);
  font-size: 14px;
}

.page-products .p-compat-table caption {
  text-align: left;
  padding: 12px 16px;
  background: var(--c-panel-deep);
  color: var(--c-gold-light);
  font-family: var(--font-heading);
  font-weight: 600;
  border: 1px solid var(--c-line);
  border-bottom: none;
}

.page-products .p-compat-table th,
.page-products .p-compat-table td {
  padding: 14px 16px;
  text-align: left;
  border: 1px solid var(--c-line);
}

.page-products .p-compat-table th {
  background: var(--c-panel-deep);
  color: var(--c-gold);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.03em;
}

.page-products .p-compat-table td {
  color: var(--c-text);
}

.page-products .p-compat-table tbody tr {
  transition: background 0.15s ease;
}

.page-products .p-compat-table tbody tr:hover {
  background: rgba(61, 90, 128, 0.2);
}

.page-products .p-table-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--c-muted);
}

/* ========== Update ========== */
.page-products .p-update-section {
  padding: 48px 0;
  position: relative;
}

.page-products .p-update-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-line), transparent);
}

.page-products .p-update-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

.page-products .p-update-card {
  background: linear-gradient(150deg, rgba(30, 58, 95, 0.9), rgba(18, 42, 74, 0.9));
  border: 1px solid var(--c-line);
  clip-path: var(--p-card-clip);
  padding: 22px;
}

.page-products .p-update-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--c-gold);
}

.page-products .p-update-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--c-muted);
}

.page-products .p-update-bottom {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: center;
}

.page-products .p-update-figure {
  margin: 0;
}

.page-products .p-update-figure img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}

.page-products .p-update-link {
  font-size: 14px;
  color: var(--c-muted);
  margin: 0;
}

.page-products .p-update-link a {
  color: var(--c-data);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.page-products .p-update-link a:hover {
  border-bottom-color: var(--c-data);
}

/* ========== Version ========== */
.page-products .p-version-section {
  padding: 48px 0;
}

.page-products .p-version-figure {
  margin: 0 0 28px;
}

.page-products .p-version-figure img {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.page-products .p-version-list {
  max-width: 680px;
}

.page-products .p-version-card {
  background: linear-gradient(160deg, var(--c-panel), var(--c-panel-deep));
  border: 1px solid var(--c-line);
  clip-path: var(--p-card-clip);
  margin-bottom: 16px;
  transition: border-color 0.2s ease;
}

.page-products .p-version-card[open] {
  border-color: var(--c-gold);
}

.page-products .p-version-card summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--c-gold-light);
}

.page-products .p-version-card summary::-webkit-details-marker {
  display: none;
}

.page-products .p-version-card summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--c-gold);
  transition: transform 0.2s ease;
}

.page-products .p-version-card[open] summary {
  border-bottom: 1px solid var(--c-line);
}

.page-products .p-version-card[open] summary::after {
  content: "–";
}

.page-products .p-version-tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--c-emerald);
  border: 1px solid var(--c-emerald);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--p-emerald-glow);
}

.page-products .p-version-detail {
  padding: 18px 24px 22px;
}

.page-products .p-version-detail ul {
  margin: 0;
  padding-left: 18px;
}

.page-products .p-version-detail li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--c-muted);
  margin-bottom: 6px;
}

.page-products .p-version-link {
  font-size: 14px;
  color: var(--c-muted);
  margin-top: 24px;
}

.page-products .p-version-link a {
  color: var(--c-data);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.page-products .p-version-link a:hover {
  border-bottom-color: var(--c-data);
}

/* ========== Help ========== */
.page-products .p-help-section {
  padding: 48px 0 64px;
  position: relative;
}

.page-products .p-help-section::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
}

.page-products .p-help-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.page-products .p-help-text h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--c-gold-light);
  margin: 0 0 12px;
}

.page-products .p-help-text p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--c-muted);
  margin: 0 0 20px;
  max-width: 460px;
}

.page-products .p-help-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-products .p-help-figure {
  margin: 0;
}

.page-products .p-help-figure img {
  width: 100%;
  height: auto;
  max-width: 220px;
  object-fit: contain;
}

/* ========== Responsive ========== */
@media (min-width: 768px) {
  .page-products .p-hero-inner {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .page-products .p-install-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-products .p-update-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-products .p-help-content {
    grid-template-columns: 1fr auto;
  }
}

@media (min-width: 1024px) {
  .page-products .p-compat-layout {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 40px;
  }

  .page-products .p-update-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-products .p-update-bottom {
    grid-template-columns: 0.8fr 1.2fr;
  }
}
