/* ============================================
   产品中心页面样式 v2.0
   适配升级后的主站设计系统
   ============================================ */

/* 导航激活状态 */
.nav-active {
  color: var(--color-primary) !important;
  font-weight: 600 !important;
  background: rgba(59, 130, 246, 0.08) !important;
}

/* 页面横幅 */
.page-banner {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 40%, #1e3a5f 70%, #0f2952 100%);
  padding: 110px 0 70px;
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 30% 70%, rgba(59, 130, 246, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 30%, rgba(34, 211, 238, 0.1) 0%, transparent 50%);
}

.page-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h60v60H0z' fill='none'/%3E%3Cpath d='M30 0v60M0 30h60' stroke='%23ffffff' stroke-opacity='0.025' stroke-width='1'/%3E%3C/svg%3E");
}

.banner-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.page-banner .badge {
  background: rgba(34, 211, 238, 0.15);
  color: var(--color-accent-light);
  margin-bottom: 16px;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.page-banner h1 {
  color: #fff;
  font-size: clamp(30px, 4.5vw, 44px);
  margin-bottom: 14px;
}

.page-banner p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  margin-bottom: 20px;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb .sep {
  opacity: 0.4;
}

/* 产品内容区布局 */
.products-section {
  padding: 56px 0 80px;
  background: var(--color-background);
}

.products-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 36px;
  align-items: start;
}

/* 侧边导航 */
.side-nav {
  position: sticky;
  top: 80px;
  background: var(--color-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.side-nav-head {
  background: linear-gradient(135deg, var(--color-dark), #1e3a5f);
  padding: 22px 20px;
  color: #fff;
}

.side-nav-head h4 {
  color: #fff;
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}

.side-nav-head small {
  opacity: 0.5;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.side-nav li {
  margin: 0;
}

.side-nav a {
  display: block;
  padding: 11px 20px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
}

.side-nav a:hover {
  color: var(--color-primary);
  background: rgba(59, 130, 246, 0.04);
}

.side-nav a.active {
  color: var(--color-primary);
  background: rgba(59, 130, 246, 0.06);
  border-left-color: var(--color-primary);
  font-weight: 600;
}

/* 产品主内容区 */
.products-main {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* 产品卡片 */
.product-item {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--color-border);
  transition: all var(--transition-slow);
}

.product-item:hover {
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* 产品头部 */
.product-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.product-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(34, 211, 238, 0.08));
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.product-icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--color-primary);
}

.product-header h2 {
  margin: 0 0 4px;
  font-size: 22px;
}

.product-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(34, 211, 238, 0.08));
  color: var(--color-primary);
  letter-spacing: 0.03em;
}

/* 产品视觉区 */
.product-visual {
  margin-bottom: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.visual-img {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: #f8fafc;
}

.visual-img img {
  width: 100%;
  height: auto;
  display: block;
}

/* CSS 样式化产品图（无实际图片时使用） */
.visual-styled {
  border-radius: var(--radius-md);
  padding: 56px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.visual-styled::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 24px,
    currentColor 24px,
    currentColor 25px
  );
}

.visual-robot {
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 50%, #0c2340 100%);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.15);
}

.visual-mold {
  background: linear-gradient(160deg, #1a1a2e 0%, #2d2d44 50%, #16213e 100%);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.15);
}

.visual-styled-icon {
  width: 140px;
  height: 100px;
  position: relative;
  z-index: 1;
}

.visual-styled-icon svg {
  width: 100%;
  height: 100%;
}

.visual-styled-title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  position: relative;
  z-index: 1;
}

.visual-styled-model {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0.2;
  position: relative;
  z-index: 1;
  color: #fff;
}

/* 产品价格 */
.product-price {
  font-size: 1.2em;
  color: var(--color-primary);
  font-weight: 700;
  margin: 8px 0 24px;
  padding: 12px 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(34, 211, 238, 0.04));
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-primary);
  display: inline-block;
}

/* 产品描述 */
.product-desc {
  font-size: 15px;
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: 28px;
}

/* 产品内标题 */
.product-item h3 {
  font-size: 16px;
  margin: 28px 0 14px;
  padding-left: 12px;
  border-left: 3px solid var(--color-primary);
  color: var(--color-dark);
}

/* 规格表格 */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.spec-table thead {
  background: var(--color-dark);
}

.spec-table th {
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
  color: #fff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spec-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  line-height: 1.6;
}

.spec-table tbody tr:last-child td {
  border-bottom: none;
}

.spec-table tbody tr:nth-child(even) td {
  background: rgba(248, 250, 252, 0.6);
}

.spec-table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.03);
}

.spec-table td:first-child {
  font-weight: 600;
  color: var(--color-dark);
  white-space: nowrap;
}

/* 功能列表 */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.feature-list li {
  padding: 11px 16px 11px 38px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 13px;
  line-height: 1.6;
  position: relative;
  transition: all var(--transition-fast);
}

.feature-list li:hover {
  border-color: var(--color-primary);
  background: rgba(59, 130, 246, 0.02);
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 14px;
  top: 11px;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 13px;
}

/* 产品手册下载按钮 */
.product-download {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
}

.product-download .btn {
  font-size: 14px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
}

.product-download .btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* 配套教学资源 */
.teaching-resources {
  margin-top: 28px;
  padding: 28px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.teaching-resources h3 {
  border-left: none;
  padding-left: 0;
  margin: 0 0 8px;
  font-size: 17px;
}

.resources-intro {
  font-size: 14px;
  color: var(--color-muted);
  margin-bottom: 20px;
}

.resources-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.resources-group h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-dark);
  margin: 0 0 12px;
}

.resources-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.resources-group ul li {
  font-size: 13px;
  color: var(--color-text);
  padding: 8px 12px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xs);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }
}

/* 底部CTA */
.products-cta {
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 52px;
  text-align: center;
}

.products-cta h3 {
  font-size: 22px;
  margin-bottom: 12px;
  color: #fff;
}

.products-cta p {
  font-size: 15px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.6);
}

.cta-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-buttons .btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
}

.cta-buttons .btn-outline {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.cta-buttons .btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .products-layout {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .side-nav-head {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .side-nav ul {
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
    gap: 4px;
  }

  .side-nav a {
    border-left: none;
    border-radius: var(--radius-xs);
    padding: 7px 12px;
    font-size: 12px;
  }

  .side-nav a.active {
    border-left: none;
  }

  .product-item {
    padding: 28px;
  }
}

@media (max-width: 640px) {
  .page-banner {
    padding: 80px 0 48px;
  }

  .products-section {
    padding: 36px 0 56px;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .side-nav ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .product-item {
    padding: 20px;
  }

  .product-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .spec-table td:first-child {
    white-space: normal;
  }

  .products-cta {
    padding: 32px 20px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}
