/* 官网 product/ 详情页：顶栏占位 + right-content 内容区背景 */

body.product-detail-public {
  padding-top: 72px;
  background-color: #f1f5f9;
  overflow-x: hidden;
}

@media (min-width: 1024px) {
  body.product-detail-public {
    padding-top: 80px;
  }
}

/* ---------- right-content 资料展示区 ---------- */
body.product-detail-public .right-content {
  --pd-canvas-top: #f8fafc;
  --pd-canvas-mid: #f1f5f9;
  --pd-canvas-bottom: #e9eff6;

  position: relative;
  isolation: isolate;
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: min(100%, 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-sizing: border-box;

  padding: clamp(1rem, 2.2vw, 2.25rem) clamp(0.875rem, 2.2vw, 2rem)
    clamp(1.75rem, 3.5vw, 3rem);

  background-color: var(--pd-canvas-mid);
  background-image:
    radial-gradient(ellipse 100% 55% at 50% -8%, rgba(59, 130, 246, 0.09) 0%, transparent 58%),
    radial-gradient(circle at 100% 85%, rgba(37, 99, 235, 0.05) 0%, transparent 45%),
    linear-gradient(
      180deg,
      var(--pd-canvas-top) 0%,
      var(--pd-canvas-mid) 45%,
      var(--pd-canvas-bottom) 100%
    );
}

/* 顶部分隔线，与全站 primary 色呼应 */
body.product-detail-public .right-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(59, 130, 246, 0.25) 20%,
    rgba(37, 99, 235, 0.45) 50%,
    rgba(59, 130, 246, 0.25) 80%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* ---------- 返回产品列表 ---------- */
body.product-detail-public .product-detail-back-nav {
  --pd-back-radius: 10px;

  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto clamp(0.85rem, 1.8vw, 1.15rem);
  flex-shrink: 0;
  animation: pd-back-nav-in 0.45s ease both;
}

@keyframes pd-back-nav-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.product-detail-public .product-detail-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5625rem;
  flex-shrink: 0;
  min-height: 2.5rem;
  padding: 0.375rem 1rem 0.375rem 0.375rem;
  text-decoration: none;
  color: var(--secondary-800);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: var(--pd-back-radius);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.85) inset,
    0 1px 2px rgba(15, 23, 42, 0.05);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease,
    background 0.2s ease;
}

body.product-detail-public .product-detail-back-link__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 6px;
  color: var(--primary-600);
  background: rgba(239, 246, 255, 0.95);
  border: 1px solid rgba(191, 219, 254, 0.55);
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

body.product-detail-public .product-detail-back-link__icon svg {
  width: 1rem;
  height: 1rem;
}

body.product-detail-public .product-detail-back-link__label {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

body.product-detail-public .product-detail-back-link__muted {
  font-weight: 500;
  color: var(--secondary-500);
}

body.product-detail-public .product-detail-back-nav__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
  padding-left: 0.5rem;
  text-align: right;
}

body.product-detail-public .product-detail-back-nav__eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--secondary-400);
  line-height: 1.2;
}

body.product-detail-public .product-detail-back-nav__title {
  max-width: 100%;
  font-size: clamp(0.8125rem, 1.6vw, 0.9375rem);
  font-weight: 600;
  line-height: 1.3;
  color: var(--secondary-800);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767px) {
  body.product-detail-public .product-detail-back-nav {
    flex-direction: column;
    align-items: stretch;
  }

  body.product-detail-public .product-detail-back-nav__meta {
    flex: none;
    width: 100%;
    align-items: flex-start;
    padding: 0.35rem 0 0;
    text-align: left;
  }

  body.product-detail-public .product-detail-back-nav__title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

body.product-detail-public .product-detail-back-link:hover {
  background: #fff;
  border-color: rgba(147, 197, 253, 0.95);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.95) inset,
    0 4px 14px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

body.product-detail-public .product-detail-back-link:hover .product-detail-back-link__icon {
  color: #fff;
  background: linear-gradient(145deg, var(--primary-500), var(--primary-600));
  border-color: transparent;
  transform: translateX(-2px);
}

body.product-detail-public .product-detail-back-link:hover .product-detail-back-link__muted {
  color: var(--secondary-600);
}

body.product-detail-public .product-detail-back-link:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

body.product-detail-public .product-detail-back-link:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  body.product-detail-public .product-detail-back-nav {
    animation: none;
  }

  body.product-detail-public .product-detail-back-link,
  body.product-detail-public .product-detail-back-link__icon {
    transition: none;
  }

  body.product-detail-public .product-detail-back-link:hover {
    transform: none;
  }
}

body.product-detail-public .right-content .page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  gap: clamp(1.25rem, 2.5vw, 1.75rem);
  background: transparent;
}

/* A4 页：白底卡片，浮于画布之上 */
body.product-detail-public .right-content .document-page {
  background: #fff;
  border: 1px solid rgba(203, 213, 225, 0.85);
  border-radius: 10px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6) inset,
    0 1px 2px rgba(15, 23, 42, 0.05),
    0 8px 24px rgba(15, 23, 42, 0.07),
    0 20px 48px rgba(15, 23, 42, 0.06);
  overflow: hidden;
}

body.product-detail-public > footer.site-page-footer {
  flex-shrink: 0;
}

/* ---------- 移动端：内容区与导航 ---------- */
@media (max-width: 767px) {
  body.product-detail-public .right-content {
    padding: 0.75rem 0.625rem 1.5rem;
    align-items: stretch;
  }

  body.product-detail-public .right-content .page-wrapper {
    max-width: 100%;
    gap: 0.875rem;
  }

  body.product-detail-public .right-content .document-page {
    border-radius: 8px;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.65) inset,
      0 1px 3px rgba(15, 23, 42, 0.06),
      0 6px 16px rgba(15, 23, 42, 0.06);
  }

  body.product-detail-public .product-detail-back-nav {
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.65rem;
  }

  body.product-detail-public .product-detail-back-link {
    min-height: 2.25rem;
    padding: 0.25rem 0.625rem 0.25rem 0.25rem;
  }

  body.product-detail-public .product-detail-back-link__label {
    font-size: 0.8125rem;
  }

  body.product-detail-public .product-detail-back-link__icon {
    width: 1.75rem;
    height: 1.75rem;
  }
}

@media print {
  body.product-detail-public {
    padding-top: 0 !important;
    background: #fff !important;
  }

  body.product-detail-public > header.header {
    display: none !important;
  }

  body.product-detail-public .right-content {
    padding: 0 !important;
    background: #fff !important;
    background-image: none !important;
  }

  body.product-detail-public .right-content::before {
    display: none;
  }

  body.product-detail-public .right-content .document-page {
    border: none;
    border-radius: 0;
    box-shadow: none !important;
  }

  body.product-detail-public .product-detail-back-nav {
    display: none !important;
  }

  body.product-detail-public > footer.site-page-footer,
  body.product-detail-public #related-products-section,
  body.product-detail-public .floating-actions,
  body.product-detail-public .inquiry-modal {
    display: none !important;
  }
}
