/* ===================帝王云 ==================== */
/* ============= www.diwangyun.com ================ */
/* ============= www.diwangyun.cn ================= */
/* ============== 代码有价，版权无价 ================= */
/* =======帝王云模板为帝王云自行开发，已办理源码著作权 ========== */
/* =======未经允许 仿站或扒站 发现必究，请尊重开发者心血 ========== */
/* ==========="愿你走完山水万城 仍与理想重逢" ============ */
/* ============模板作者：江遇:QQ 1481234828=========== */

/* 产品中心页面样式 */
.products-page {
  min-height: 100vh;
  background: #f8fafc;
  padding-top: 80px;
}

/* 页面标题 */
.page-header {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 50%, #ffffff 100%);
  padding: 40px 0;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(37, 99, 235, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

.page-header-content {
  text-align: center;
  position: relative;
  z-index: 1;
}

.page-title {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #1e40af 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  font-size: 18px;
  color: #6b7280;
  font-weight: 400;
}

/* 产品主要区域 */
.products-main {
  padding: 40px 0 80px;
}

.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}

/* 左侧分类导航 */
.category-sidebar {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  height: fit-content;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 100px;
}

.category-list {
  padding: 0;
}

.category-item {
  border-bottom: 1px solid #f3f4f6;
}

.category-item:last-child {
  border-bottom: none;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  font-size: 15px;
  color: #374151;
  position: relative;
  overflow: hidden;
}

.category-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #2563eb 0%, #3b82f6 100%);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.category-header:hover {
  background: #f8fafc;
  color: #2563eb;
}

.category-header:hover::before {
  transform: scaleY(1);
}

.category-header.active {
  background: #eff6ff;
  color: #2563eb;
  font-weight: 600;
}

.category-header.active::before {
  transform: scaleY(1);
}

.category-icon {
  font-size: 18px;
  color: #2563eb;
  flex-shrink: 0;
}

.category-name {
  flex: 1;
  font-weight: 500;
}

.category-arrow {
  font-size: 18px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: #9ca3af;
}

.category-header.active .category-arrow {
  transform: rotate(180deg);
  color: #2563eb;
}

/* 二级菜单 */
.category-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  background: #fafbfc;
}

.category-header.active + .category-submenu {
  max-height: 1000px;
  padding: 10px 0;
}

.submenu-item {
  display: block;
  padding: 12px 20px 12px 50px;
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  border-left: 2px solid transparent;
  position: relative;
}

.submenu-item::before {
  content: '';
  position: absolute;
  left: 46px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background: #d1d5db;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.submenu-item:hover {
  color: #2563eb;
  background: #f8fafc;
  padding-left: 55px;
}

.submenu-item:hover::before {
  background: #2563eb;
  width: 6px;
  height: 6px;
  left: 48px;
}

.submenu-item.active {
  color: #2563eb;
  background: #eff6ff;
  border-left-color: #2563eb;
  font-weight: 600;
}

/* 右侧产品展示区 */
.products-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 30px;
  min-height: 600px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.content-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.content-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}

.content-title i {
  color: #2563eb;
  font-size: 24px;
}

.content-desc {
  color: #6b7280;
  font-size: 16px;
}

/* 占位提示 */
.products-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  min-height: 400px;
}

.placeholder-icon {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  border: 2px solid #bfdbfe;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
}

.placeholder-icon i {
  font-size: 60px;
  color: #2563eb;
}

.products-placeholder h3 {
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 15px;
}

.products-placeholder p {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 40px;
}

.placeholder-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  max-width: 600px;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 20px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.info-item:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.info-item i {
  font-size: 20px;
  color: #2563eb;
}

.info-item span {
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

/* 商品网格 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 280px));
  gap: 20px;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  justify-content: start;
}

/* 商品卡片 */
.product-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
  border-color: #bfdbfe;
}

.product-card-header {
  padding: 20px;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-name {
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  flex: 1;
}

.product-badge {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(234, 179, 8, 0.2);
}

.product-specs {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #4b5563;
}

.spec-item i {
  color: #2563eb;
  font-size: 16px;
  flex-shrink: 0;
}

.product-card-footer {
  padding: 20px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  justify-content: center;
}

.price-currency {
  font-size: 20px;
  font-weight: 600;
  color: #f59e0b;
  flex-shrink: 0;
}

.price-amount {
  font-size: 32px;
  font-weight: 800;
  color: #f59e0b;
  line-height: 1;
  flex-shrink: 0;
  white-space: nowrap;
}

.price-unit {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
  flex-shrink: 0;
}

.btn-buy {
  padding: 12px 24px;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #2563eb 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  width: 100%;
}

.btn-buy:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-buy:active {
  transform: translateY(0);
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-primary i {
  font-size: 18px;
}

/* 商品网格 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 280px));
  gap: 20px;
  margin-top: 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  justify-content: start;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .products-layout {
    grid-template-columns: 250px 1fr;
  }

  .page-title {
    font-size: 40px;
  }

  .category-sidebar {
    position: static;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 240px));
    gap: 16px;
    justify-content: start;
  }
}

@media (max-width: 768px) {
  .products-page {
    padding-top: 70px;
  }

  .page-header {
    padding: 30px 0;
  }

  .page-title {
    font-size: 32px;
  }

  .page-subtitle {
    font-size: 16px;
  }

  .products-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .category-sidebar {
    position: static;
  }

  .products-content {
    padding: 20px;
  }

  .placeholder-info {
    grid-template-columns: 1fr;
  }

  .content-title {
    font-size: 24px;
  }

  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-card-footer {
    flex-direction: column;
    align-items: center;
  }

  .product-price {
    justify-content: center;
  }

  .btn-buy {
    width: 100%;
  }
}

/* 移动端优化 */
@media (max-width: 480px) {
  .page-title {
    font-size: 28px;
  }

  .page-subtitle {
    font-size: 14px;
  }

  .breadcrumb {
    font-size: 13px;
  }

  .products-placeholder {
    padding: 60px 20px;
  }

  .placeholder-icon {
    width: 100px;
    height: 100px;
  }

  .placeholder-icon i {
    font-size: 50px;
  }

  .products-placeholder h3 {
    font-size: 24px;
  }

  .products-placeholder p {
    font-size: 14px;
  }
}

/* 滚动条美化 */
.category-sidebar::-webkit-scrollbar {
  width: 6px;
}

.category-sidebar::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.category-sidebar::-webkit-scrollbar-thumb {
  background: #bfdbfe;
  border-radius: 3px;
}

.category-sidebar::-webkit-scrollbar-thumb:hover {
  background: #93c5fd;
}
