@charset "utf-8";
/* 基础重置与变量 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --color-primary: #1a4b8c; --color-primary-dark: #0e2f5a; --color-accent: #e67e22;
  --color-text: #222; --color-text-light: #555; --color-text-muted: #888;
  --color-border: #e5e7eb; --color-bg: #f8f9fa; --color-white: #fff;
  --color-success: #27ae60; --color-warning: #f39c12;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06); --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 8px; --radius-lg: 12px; --transition: 0.25s ease;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
body { font-family: var(--font-family); color: var(--color-text); line-height: 1.6; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* 面包屑 */
.breadcrumb-section { background: #f7fafc; border-bottom: 1px solid var(--color-border); padding: 14px 0; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--color-text-muted); gap: 4px; }
.breadcrumb-link { color: var(--color-primary); transition: color var(--transition); }
.breadcrumb-link:hover { color: var(--color-primary-dark); text-decoration: underline; }
.breadcrumb-separator { padding: 0 4px; }
.breadcrumb-current { color: var(--color-text); font-weight: 500; }

/* 主区域 */
.product-main-section { padding: 32px 0 64px; }
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 12px; }
.page-subtitle { font-size: 16px; color: var(--color-text-light); margin-top: 14px; }

/* 两栏布局 */
.product-layout {
  display: flex;
  gap: 32px;
  align-items: flex-start;
}

/* 左侧分类侧栏 */
.category-sidebar {
  flex: 0 0 260px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 20px;
}
.sidebar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--color-primary);
}
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--color-text-light);
  font-size: 15px;
  transition: all var(--transition);
  background-color: #f7fafc;
}
.sidebar-link:hover {
  background: #f0f5ff;
  color: var(--color-primary);
}
.sidebar-link.active {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}
.sidebar-arrow {
  font-size: 18px;
  line-height: 1;
  opacity: 0.6;
}
.sidebar-link.active .sidebar-arrow {
  opacity: 1;
}

/* 右侧产品内容 */
.product-content {
  flex: 1;
  min-width: 0; /* 防止溢出 */
}

/* 产品网格 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

/* 产品卡片 */
.product-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.product-image-link {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--color-bg);
}
.product-image {
  position: relative;
  background: #f0f2f5;
}
.product-image img {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  transition: transform var(--transition);
}
.product-card:hover .product-image img {
  transform: scale(1.03);
}
.product-info {
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-name {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-name a {
  color: var(--color-text);
  transition: color var(--transition);
}
.product-name a:hover {
  color: var(--color-primary);
}
.product-desc {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}
.btn-detail {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
  transition: all var(--transition);
}
.btn-detail:hover {
  color: var(--color-primary-dark);
  transform: translateX(4px);
}

/* 分页 */
.list-pagination {
  margin-top: 48px;
  display: flex;
  justify-content: center;
}
.list-pagination .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: center;
}
.list-pagination a,
.list-pagination .active {
  display: inline-block;
  min-width: 38px;
  height: 38px;
  line-height: 38px;
  text-align: center;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: all .2s;
  background: #fff;
}
.list-pagination a:hover {
  background: #0066cc;
  border-color: #0066cc;
  color: #fff;
}
.list-pagination .active {
  background: #0066cc;
  border-color: #0066cc;
  color: #fff;
  cursor: default;
}

/* 响应式 */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1024px) {
  .product-layout {
    gap: 24px;
  }
  .category-sidebar {
    flex: 0 0 220px;
    padding: 16px;
  }
  .sidebar-link {
    font-size: 14px;
    padding: 8px 10px;
  }
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  .page-subtitle {
    font-size: 14px;
  }
}
@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
  .product-main-section {
    padding: 20px 0 40px;
  }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 20px;
  }
  .page-subtitle {
    margin-top: 0;
  }
  /* 布局变为垂直 */
  .product-layout {
    flex-direction: column;
    gap: 20px;
  }
  /* 侧栏变为横向滚动标签 */
  .category-sidebar {
    position: static;
    flex: none;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius);
  }
  .sidebar-title {
    font-size: 16px;
    padding-bottom: 8px;
    margin-bottom: 12px;
  }
  .sidebar-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }
  .sidebar-link {
    padding: 6px 14px;
    border-radius: 20px;
    background: #f7fafc;
    border: 1px solid #d3e3ed;
    font-size: 13px;
  }
  .sidebar-link.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
  }
  .sidebar-arrow {
    display: none;
  }
  /* 产品网格单列 */
  .product-grid,
  .product-grid.list-view {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .product-card {
    max-width: 100% !important;
  }
  .product-name {
    font-size: 15px;
  }
  .product-desc {
    font-size: 13px;
  }
  .product-meta {
    padding-top: 10px;
  }
  .list-pagination {
    margin-top: 32px;
  }
}
@media (max-width: 480px) {
  .product-info {
    padding: 14px 16px 18px;
  }
  .product-name {
    font-size: 16px;
  }
  .product-desc {
    font-size: 14px;
  }
  .btn-detail {
    font-size: 15px;
  }
  .sidebar-link {
    font-size: 12px;
    padding: 5px 12px;
  }
  .list-pagination a,
  .list-pagination .active {
    min-width: 34px;
    height: 34px;
    line-height: 34px;
    font-size: 13px;
    padding: 0 8px;
  }
}