* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

/* 固定顶部搜索条 */
.fixed-search-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #eaeaeb;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 15px 20px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.fixed-search-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
}

.fixed-search-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.fixed-logo-image {
  height: 44px; /* 与搜索框高度一致 (12px padding-top + 16px font-size + 12px padding-bottom + 4px border) */
  width: auto;
  max-width: none;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.2));
  object-fit: contain;
}

.fixed-search-input {
  width: 100%;
  padding: 12px 150px 12px 15px; /* 增加右侧padding，为图标和按钮留出空间（按钮现在有文字） */
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  outline: none;
  transition: all 0.3s ease;
  box-sizing: border-box;
  color: white;
  background-color: #333;
  height: 44px; /* 固定高度，确保按钮可以正确对齐 */
}

.fixed-search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.fixed-search-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.fixed-search-icon {
  position: absolute;
  right: 150px; /* 调整位置，为按钮留出空间（按钮宽度约120px + 间距30px） */
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
  color: #999;
  z-index: 1;
}

/* 固定搜索条中的查看所有产品按钮 */
.fixed-list-all-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  font-size: 12px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: white;
  font-weight: 500;
  z-index: 2;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
  height: calc(100% - 16px); /* 输入框高度减去上下间距 */
  max-height: 32px; /* 最大高度限制 */
  box-sizing: border-box;
}

.fixed-list-all-btn .list-all-icon {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.fixed-list-all-btn .list-all-text {
  font-size: 12px;
  font-weight: 500;
  display: inline-block;
  line-height: 1;
}

.fixed-list-all-btn:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transform: translateY(-50%) scale(1.02);
}

.fixed-list-all-btn:hover:not(:active) {
  transform: translateY(-50%) scale(1.02);
}

.fixed-list-all-btn:active {
  transform: translateY(-50%) scale(0.98);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.fixed-search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  position: relative;
  z-index: 1; /* 确保主内容在侧边栏之上 */
}

header {
  text-align: center;
  color: white;
  margin-bottom: 20px;
  padding: 30px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.header-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.logo-image {
  max-width: 220px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  margin-top: 0;
}

.subtitle {
  font-size: 1.1em;
  opacity: 0.9;
}

.search-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  position: relative; /* 为触发按钮提供定位上下文 */
  overflow: visible; /* 允许按钮超出边界 */
}

.search-box-wrapper {
  position: relative;
  margin-bottom: 15px;
}

.search-input {
  width: 100%;
  padding: 18px 180px 18px 20px; /* 增加右侧padding，为图标和按钮留出空间（按钮现在有文字） */
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  outline: none;
  transition: all 0.3s ease;
  color: white;
  background-color: #333;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-icon {
  position: absolute;
  right: 180px; /* 调整位置，为按钮留出空间（按钮宽度约150px + 间距） */
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  pointer-events: none;
}

/* 查看所有产品按钮 */
.list-all-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: white;
  font-weight: 500;
  z-index: 2;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.list-all-btn .list-all-icon {
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.list-all-btn .list-all-text {
  font-size: 14px;
  font-weight: 500;
  display: inline-block;
}

.list-all-btn:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  transform: translateY(-50%) scale(1.02);
}

.list-all-btn:hover:not(:active) {
  transform: translateY(-50%) scale(1.02);
}

.list-all-btn:active {
  transform: translateY(-50%) scale(0.98);
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.search-tips {
  font-size: 14px;
  color: #666;
  padding: 12px 16px;
  background: #f5f5f5;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.search-tips:hover {
  background: #e8e8e8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-tips-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-tips-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.search-tips-label {
  font-weight: 500;
  flex-shrink: 0;
  color: #667eea;
}

.search-tips-carousel {
  flex: 1;
  position: relative;
  height: 20px;
  overflow: hidden;
}

.search-tips-item {
  position: absolute;
  width: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-tips-item.active {
  opacity: 1;
  transform: translateY(0);
}

.search-tips-item.exit {
  opacity: 0;
  transform: translateY(-20px);
}

/* 模态框样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 700px;
  width: 90%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  z-index: 10001;
}

.modal.show .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: #333;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.search-tips-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tip-item {
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.tip-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tip-title {
  font-size: 16px;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 8px;
}

.tip-content {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.tip-content code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 13px;
  color: #e83e8c;
}

.tip-content ul {
  margin: 8px 0;
  padding-left: 20px;
}

.tip-content li {
  margin-bottom: 6px;
  line-height: 1.6;
}

/* 左侧导航栏（固定在页面左侧，不影响内容区域布局） */
.sidebar-nav {
  position: fixed;
  /* left位置由JavaScript动态计算，使其位于产品展示模块左边，间距10px */
  top: 200px; /* 与搜索框模块顶部对齐（header约130px + 间距约70px） */
  width: 250px;
  background: white;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  height: calc(100vh - 230px); /* 调整高度，为底部留出更多空间 */
  max-height: calc(100vh - 230px);
  overflow: hidden; /* 保持hidden，但确保header在可见区域内 */
  display: flex;
  flex-direction: column;
  z-index: 5; /* 降低z-index，确保不会遮挡主内容 */
  transition: left 0.3s ease, top 0.3s ease, right 0.3s ease, width 0.3s ease; /* 添加过渡效果 */
  /* fixed定位，不影响文档流，不会影响results-section的宽度 */
}

/* Webkit浏览器（Chrome, Safari, Edge）的自定义滚动条 */
.sidebar-nav::-webkit-scrollbar {
  width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 12px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.5);
}

/* 当固定搜索条显示时，调整侧边栏位置 */
body.has-fixed-search .sidebar-nav {
  top: 180px; /* 固定搜索条显示时，与搜索框模块对齐（固定搜索条80px + 间距约100px） */
  height: calc(100vh - 210px); /* 调整高度，为底部留出更多空间 */
  max-height: calc(100vh - 210px);
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 15px 20px;
  padding-right: 12px; /* 与sidebar-list的padding-right保持一致 */
  border-bottom: 2px solid #e0e0e0;
  flex-shrink: 0; /* 确保header不被压缩 */
  flex-grow: 0; /* 确保header不扩展 */
  border-radius: 12px 12px 0 0;
  background: white;
  min-height: fit-content; /* 确保header内容完整显示 */
  overflow: visible; /* 确保内容不被裁剪 */
  box-sizing: border-box; /* 确保padding正确计算 */
  width: 100%; /* 确保header占满宽度 */
  gap: 8px; /* 添加间距，确保标题和数字之间有空间 */
}

.sidebar-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sidebar-header h3 {
  font-size: 16px;
  color: #333;
  margin: 0;
  flex: 1 1 auto; /* 允许标题收缩和扩展 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0; /* 允许flex子元素收缩到内容宽度以下 */
  margin-right: 8px; /* 与数字之间的间距 */
}

.sidebar-count {
  background: #667eea;
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap; /* 防止数字换行 */
  overflow: visible; /* 确保数字不被裁剪 */
  flex-shrink: 0; /* 防止数字被压缩 */
  min-width: fit-content; /* 确保数字完整显示 */
}

.sidebar-toggle-btn {
  background: transparent;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.sidebar-toggle-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.sidebar-toggle-btn .toggle-icon {
  display: inline-block;
  transition: transform 0.3s ease;
}

/* 侧边栏折叠状态 */
.sidebar-nav.collapsed {
  width: 40px; /* 按钮宽度 */
  min-width: 40px;
  height: 40px !important;
  max-height: 40px !important;
  overflow: visible;
  border-radius: 12px 0 0 12px; /* 左上和左下圆角12px，右上和右下直角（与results-section的左上角圆角形成平滑过渡） */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1); /* 与results-section相同的阴影 */
  padding: 0;
  z-index: 1; /* 与results-section相同的z-index */
  background: white; /* 白色背景，与results-section一致 */
}

.sidebar-nav.collapsed .sidebar-header {
  padding: 0 2px 0 10px; /* 左边距10px（从4px增加到10px），右边距2px */
  margin: 0;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  justify-content: flex-start; /* 左对齐 */
  align-items: center;
  border-bottom: none;
  border-radius: 12px 0 0 12px; /* 左上和左下圆角12px，右上和右下直角（与results-section的左上角圆角形成平滑过渡） */
  background: white !important; /* 白色背景，与results-section一致 */
  border: none; /* 移除边框，与results-section融合 */
  box-sizing: border-box; /* 确保边框包含在高度内 */
  overflow: hidden; /* 防止内容溢出 */
}

.sidebar-nav.collapsed .sidebar-header h3,
.sidebar-nav.collapsed .sidebar-count,
.sidebar-nav.collapsed .sidebar-list {
  display: none;
}

.sidebar-nav.collapsed .sidebar-toggle-btn {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 40px;
  max-height: 40px;
  color: #667eea; /* 紫色文字，更明显 */
  border-radius: 0; /* 移除按钮圆角 */
  background: transparent !important; /* 透明背景，使用header的背景 */
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 左对齐 */
  box-sizing: border-box; /* 确保padding包含在尺寸内 */
  border: none; /* 移除按钮边框 */
  overflow: hidden; /* 防止内容溢出 */
}

.sidebar-nav.collapsed .sidebar-toggle-btn:hover {
  background: #fff !important; /* hover时也保持白色背景，不透明 */
  color: #764ba2; /* 深紫色文字 */
}

.sidebar-nav.collapsed .sidebar-toggle-btn .toggle-icon {
  transform: rotate(180deg);
  font-size: 20px;
  font-weight: bold;
  color: #667eea;
}

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 60px 20px; /* 大幅增加底部padding（60px），确保最后一行内容完整显示，包括页码数字 */
  overflow-y: auto; /* 改回auto，只在需要时显示滚动条 */
  overflow-x: hidden;
  flex: 1 1 0; /* 明确设置flex属性 */
  min-height: 0; /* 关键：允许flex子元素缩小 */
  max-height: 100%; /* 限制最大高度 */
  /* 确保底部圆角可见 */
  border-radius: 0 0 12px 12px;
  /* 自定义滚动条样式 - 让滚动条更明显 */
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 126, 234, 0.6) white;
  /* 确保内容不会被底部遮挡 */
  box-sizing: border-box;
  /* 确保可以滚动到底部看到所有内容 */
  scroll-padding-bottom: 30px;
  /* 确保最后一个item的底部内容可见 */
  padding-bottom: 60px !important;
}

/* Webkit浏览器（Chrome, Safari, Edge）的自定义滚动条 */
.sidebar-list::-webkit-scrollbar {
  width: 12px; /* 增加宽度，让滚动条更明显 */
}

.sidebar-list::-webkit-scrollbar-track {
  background: white; /* 滚动条背景色为白色 */
  margin: 8px 0 25px 0; /* 上下留出空间，底部增加更多空间避免遮挡内容 */
  border-radius: 6px;
}

.sidebar-list::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.6); /* 提高不透明度，让滚动条更明显 */
  border-radius: 6px;
  transition: background 0.2s ease;
  border: 2px solid rgba(0, 0, 0, 0.05); /* 使用轻微边框让滚动条更明显 */
  background-clip: padding-box;
  min-height: 30px; /* 确保滚动条thumb有最小高度 */
}

.sidebar-list::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.8); /* hover时更明显 */
  background-clip: padding-box;
}

.sidebar-item {
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.sidebar-item:hover {
  background: #f5f5f5;
  border-color: #e0e0e0;
}

.sidebar-item.active {
  background: #e8edff;
  border-color: #667eea;
}

.sidebar-item-name {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  margin-bottom: 4px;
  line-height: 1.4;
}

.sidebar-item.active .sidebar-item-name {
  color: #667eea;
  font-weight: 600;
}

.sidebar-item-meta {
  font-size: 12px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 产品类型标签样式 */
.sidebar-item-type {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  width: 80px;
  text-align: center;
  display: inline-block;
  box-sizing: border-box;
}

/* 侧边栏页码标签样式 */
.sidebar-item-page {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  background-color: #f5f5f5;
  color: #666;
  border: 1px solid #e0e0e0;
  width: 80px;
  text-align: left;
  display: inline-block;
  box-sizing: border-box;
}

/* XLPE 电线 - 蓝色 */
.product-type-xlpe {
  background-color: #e3f2fd;
  color: #1976d2;
  border: 1px solid #90caf9;
}

/* 氟塑料电线 - 绿色 */
.product-type-fluorine {
  background-color: #e8f5e9;
  color: #388e3c;
  border: 1px solid #81c784;
}

/* PVC 电线 - 橙色 */
.product-type-pvc {
  background-color: #fff3e0;
  color: #f57c00;
  border: 1px solid #ffb74d;
}

/* 硅胶电线 - 紫色 */
.product-type-silicone {
  background-color: #f3e5f5;
  color: #7b1fa2;
  border: 1px solid #ba68c8;
}

/* 语言设置触发按钮 - 1/4圆样式 */
.settings-trigger {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 0 12px 0 36px; /* 右上角圆角12px，左下角大圆角36px形成1/4圆效果 */
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 10;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  /* 调整图标位置，使其稍微偏向左下，形成更好的视觉效果 */
  padding-bottom: 2px;
  padding-left: 2px;
}

.settings-trigger:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.settings-trigger:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* 右侧浮动模块（用于筛选和设置） */
.right-panel {
  position: fixed;
  /* left和top位置由JavaScript动态计算，使其在设置按钮右边，固定位置不随滚动 */
  width: 200px;
  background: white;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: left 0.3s ease, top 0.3s ease, opacity 0.3s ease;
}

.right-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 15px 20px;
  border-bottom: 2px solid #e0e0e0;
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
  background: white;
}

.close-panel-btn {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border-radius: 4px;
}

.close-panel-btn:hover {
  background: #f5f5f5;
  color: #333;
}

.right-panel-header h3 {
  font-size: 16px;
  color: #333;
  margin: 0;
}

.right-panel-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.setting-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.language-toggle {
  display: flex;
  gap: 8px;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 4px;
}

.lang-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.lang-btn:hover {
  background: rgba(102, 126, 234, 0.1);
  color: #667eea;
}

.lang-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.results-section {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  min-height: 200px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
  z-index: 1; /* 确保内容在侧边栏之上 */
  /* 确保宽度和search-section一致 */
}

/* 返回主目录按钮样式 */
.back-to-index {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
  display: none; /* 默认隐藏，只有在显示搜索结果或产品详情时才显示 */
  flex-direction: row !important;
  align-items: center;
  gap: 15px;
  flex-wrap: nowrap !important;
  width: 100%;
  overflow: hidden;
}

/* 当需要显示返回按钮时 */
.back-to-index.show {
  display: flex !important;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  flex-shrink: 0;
  white-space: nowrap;
  height: 44px;
  box-sizing: border-box;
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.back-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.back-icon {
  font-size: 18px;
  font-weight: bold;
}

.back-text {
  font-size: 14px;
}

/* 产品导航按钮容器 */
.product-nav-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

/* 导航按钮样式 - 商务风格浅色 */
.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
  color: #424242;
  border: 1px solid #b0bec5;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  height: 44px;
  min-width: 100px;
  box-sizing: border-box;
  position: relative;
  z-index: 10;
  user-select: none;
  -webkit-user-select: none;
}

.nav-button:hover:not(.disabled):not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, #c5cae9 0%, #9fa8da 100%);
  border-color: #90a4ae;
  color: #212121;
}

.nav-button:active:not(.disabled):not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-button.disabled,
.nav-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: linear-gradient(135deg, #cccccc 0%, #999999 100%);
  box-shadow: none;
  pointer-events: none;
}

.nav-button.disabled:hover,
.nav-button:disabled:hover {
  transform: none;
  box-shadow: none;
}

.nav-icon {
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
}

.nav-text {
  font-size: 14px;
  line-height: 1;
}

/* 产品索引样式 */
.product-index {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* 分类切换按钮样式 */
.category-switch-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  padding: 20px 0;
  border-bottom: 2px solid #e0e0e0;
}

.category-switch-btn {
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 500;
  color: #666;
  background: #f5f5f5;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  outline: none;
}

.category-switch-btn:hover {
  background: #e8e8e8;
  border-color: #667eea;
  color: #333;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.category-switch-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-color: #667eea;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.category-switch-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}

.product-index-category {
  margin-bottom: 30px;
}

.product-index-category-title {
  font-size: 1.5em;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid;
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.category-icon svg {
  width: 100%;
  height: 100%;
  color: #667eea;
  filter: drop-shadow(0 1px 2px rgba(102, 126, 234, 0.3));
}

.product-index-category-title.category-xlpe {
  color: #1976d2;
  border-bottom-color: #1976d2;
}

.product-index-category-title.category-fluorine {
  color: #388e3c;
  border-bottom-color: #388e3c;
}

.product-index-category-title.category-pvc {
  color: #f57c00;
  border-bottom-color: #f57c00;
}

.product-index-category-title.category-silicone {
  color: #7b1fa2;
  border-bottom-color: #7b1fa2;
}

/* 认证类型分类样式 */
.product-index-category-title.category-ul {
  color: #e53935;
  border-bottom-color: #e53935;
}

.product-index-category-title.category-vde {
  color: #1976d2;
  border-bottom-color: #1976d2;
}

.product-index-category-title.category-ccc {
  color: #388e3c;
  border-bottom-color: #388e3c;
}

.product-index-category-title.category-cqc {
  color: #f57c00;
  border-bottom-color: #f57c00;
}

.product-index-category-title.category-other {
  color: #757575;
  border-bottom-color: #757575;
}

/* 新增分类样式 */
.product-index-category-title.category-voltage {
  color: #667eea;
  border-bottom-color: #667eea;
}

.product-index-category-title.category-temperature {
  color: #e53935;
  border-bottom-color: #e53935;
}

.product-index-category-title.category-conductor {
  color: #1976d2;
  border-bottom-color: #1976d2;
}

.product-index-category-title.category-marking {
  color: #388e3c;
  border-bottom-color: #388e3c;
}

.product-count {
  font-size: 0.8em;
  font-weight: normal;
  color: #666;
}

.product-index-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

/* 紧凑布局：内容少的分类使用2列或3列 */
.product-index-list-compact {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

@media (min-width: 1200px) {
  .product-index-list-compact {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1199px) and (min-width: 768px) {
  .product-index-list-compact {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 范围值分类组：将多个小的范围值分类并排显示 */
.product-index-range-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 1199px) {
  .product-index-range-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .product-index-range-group {
    grid-template-columns: 1fr;
  }
}

/* 紧凑分类：范围值分类组中的分类 */
.product-index-category-compact {
  margin-bottom: 0;
}

.product-index-category-compact .product-index-category-title {
  font-size: 1.2em;
  margin-bottom: 12px;
  padding-bottom: 8px;
}

.product-index-category-compact .product-index-list {
  grid-template-columns: 1fr;
}

.product-index-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.product-index-item:hover {
  background: #f0f0f0;
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-index-item-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.product-index-name {
  font-size: 14px;
  color: #333;
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-index-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* 产品索引中的类型标签样式（与搜索结果中的标签样式一致） */
.product-index-type-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  width: 80px;
  text-align: center;
  display: inline-block;
  box-sizing: border-box;
}

/* 产品类型标签颜色样式（与搜索结果中的标签颜色一致） */
.product-index-type-tag.product-type-xlpe {
  background-color: #e3f2fd;
  color: #1976d2;
  border: 1px solid #90caf9;
}

.product-index-type-tag.product-type-fluorine {
  background-color: #e8f5e9;
  color: #388e3c;
  border: 1px solid #81c784;
}

.product-index-type-tag.product-type-pvc {
  background-color: #fff3e0;
  color: #f57c00;
  border: 1px solid #ffb74d;
}

.product-index-type-tag.product-type-silicone {
  background-color: #f3e5f5;
  color: #7b1fa2;
  border: 1px solid #ba68c8;
}

.product-index-page {
  font-size: 12px;
  color: #999;
  flex-shrink: 0;
}

.error-message {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 16px;
}

/* 侧边栏使用fixed定位，不影响results-section的宽度 */
/* results-section的宽度始终和search-section保持一致 */

.results-info {
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-size: 14px;
  color: white;
  display: none;
  box-shadow: none;
  flex: 1 1 0% !important;
  min-width: 0 !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  align-items: center;
  height: 44px;
  box-sizing: border-box;
  flex-shrink: 1;
}

.results-info.show {
  display: flex !important;
  flex-direction: row !important;
}

.results-info .results-status {
  width: 100%;
  height: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.results-status {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.status-icon {
  font-size: 18px;
  font-weight: bold;
  color: #4ade80;
  background: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.status-text {
  font-size: 14px;
  flex: 0 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.status-text strong {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.status-query {
  font-size: 14px;
  opacity: 0.9;
  margin-left: auto;
  flex-shrink: 0;
  white-space: nowrap;
}

.status-query strong {
  color: #fff;
  font-weight: 600;
}

.results-container {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 40px !important;
}

.product-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  margin-bottom: 0 !important;
}

/* 截图按钮 - 样式和 settings-trigger 一样 */
.screenshot-btn {
  position: absolute;
  top: 0;
  right: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 0 8px 0 36px; /* 右上角圆角8px，左下角大圆角36px形成1/4圆效果 */
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 10;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  /* 调整图标位置，使其稍微偏右下，形成更好的视觉效果 */
  padding-bottom: 2px;
  padding-left: 2px;
}

.screenshot-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.screenshot-btn:active {
  transform: scale(0.95);
}

/* 截图按钮 Tooltip 样式 */
.screenshot-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10001;
  max-width: 280px;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.screenshot-btn::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10001;
}

.screenshot-btn:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.screenshot-btn:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Toast 通知样式 */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 10002; /* 确保高于 fixed-search-bar (1000) 和 modal (10000) */
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s ease;
  max-width: 400px;
}

/* 当固定搜索栏显示时，调整 Toast 位置 */
.fixed-search-bar[style*="display: block"] ~ * .toast,
body:has(.fixed-search-bar[style*="display: block"]) .toast {
  top: 90px; /* 固定搜索栏高度约 70px + 20px 间距 */
}

/* 使用 JavaScript 动态调整，这里提供备用方案 */
.toast.below-fixed-bar {
  top: 90px;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toast-icon {
  font-size: 20px;
  font-weight: bold;
  background: white;
  color: #10b981;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-message {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}

.product-card:not(:last-child) {
  margin-bottom: 0;
}

.product-card:not(:last-child)::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 5%;
  right: 5%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    #e0e0e0 20%,
    #e0e0e0 80%,
    transparent
  );
}

.product-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.product-header {
  border-bottom: 2px solid #667eea;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.product-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.product-title {
  font-size: 2em;
  color: #dc3545;
  font-weight: 700;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.2;
}

.product-title-logo {
  height: 1.2em;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  vertical-align: middle;
}

.product-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  font-size: 14px;
  color: #666;
  align-items: center;
  white-space: nowrap;
}

.meta-item {
  display: inline-block;
  color: #666;
}

.meta-item strong {
  color: #333;
}

/* 页码标签样式 */
.page-number-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
  background-color: #f5f5f5;
  color: #666;
  border: 1px solid #e0e0e0;
  margin-left: 8px;
}

/* 产品内容包装器 - 左右分栏布局 */
.product-content-wrapper {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  align-items: flex-start;
}

/* 左侧文本内容区域 */
.product-content-left {
  flex: 1;
  min-width: 0; /* 允许flex收缩 */
}

/* 右侧图片区域 - 平均分配 */
.product-content-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 0; /* 允许flex收缩 */
}

/* 内容区块 */
.content-section {
  margin-bottom: 25px;
}

/* 印字部分样式（单独一行，全宽显示） */
.marking-section {
  width: 100%;
  margin-top: 25px;
  margin-bottom: 25px;
}

.marking-content {
  line-height: 1.8;
  color: #444;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.marking-content blockquote {
  margin: 15px 0;
  padding: 12px 20px;
  border-left: 4px solid #667eea;
  background-color: #f5f5f5;
  color: #555;
  font-style: normal;
  border-radius: 4px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal; /* 允许换行，但如果内容不长可以一行显示 */
}

.marking-content blockquote p {
  margin: 0;
  white-space: normal;
}

/* 二级标题样式 */
.section-title {
  font-size: 1.3em;
  color: #667eea;
  margin: 0 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #667eea;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 二级标题统一图标 - 使用与侧边栏相同的SVG图标 */
.section-title::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 12H20' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpath d='M4 8H20' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round'/%3E%3Cpath d='M4 16H20' stroke='%23667eea' stroke-width='2.5' stroke-linecap='round'/%3E%3Ccircle cx='8' cy='8' r='1.5' fill='%23667eea'/%3E%3Ccircle cx='8' cy='12' r='1.5' fill='%23667eea'/%3E%3Ccircle cx='8' cy='16' r='1.5' fill='%23667eea'/%3E%3Ccircle cx='16' cy='8' r='1.5' fill='%23667eea'/%3E%3Ccircle cx='16' cy='12' r='1.5' fill='%23667eea'/%3E%3Ccircle cx='16' cy='16' r='1.5' fill='%23667eea'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  vertical-align: middle;
}

/* 规格表标题包装器 */
.section-title-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 15px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #667eea;
}

.section-title-wrapper .section-title {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
  flex: 1;
}

/* 复制表格按钮 */
.copy-table-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  margin-left: 15px;
}

.copy-table-btn:hover {
  background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.copy-table-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.copy-table-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 内容区域 */
.section-content {
  line-height: 1.8;
  color: #444;
  word-wrap: break-word; /* 允许长单词换行 */
  word-break: break-word; /* 在必要时断开单词 */
  overflow-wrap: break-word; /* 现代浏览器支持 */
  white-space: normal; /* 允许换行 */
}

.section-content ul {
  margin: 10px 0 10px 20px;
}

.section-content li {
  margin: 5px 0;
}

.section-content p {
  margin: 8px 0;
  word-wrap: break-word; /* 确保段落中的长单词也能换行 */
  word-break: break-word;
  overflow-wrap: break-word;
}

/* 块引用样式 */
.section-content blockquote {
  margin: 15px 0;
  padding: 12px 20px;
  border-left: 4px solid #667eea;
  background-color: #f5f5f5;
  color: #555;
  font-style: normal; /* 不使用斜体 */
  border-radius: 4px;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

.section-content blockquote p {
  margin: 0;
}

/* 产品图片包装器（右上角） */
.product-image-wrapper {
  position: sticky;
  top: 0;
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center; /* 水平居中 */
  align-items: center; /* 垂直居中 */
  margin-bottom: 20px;
  z-index: 10;
}

.product-image {
  background: white;
  border-radius: 8px;
  padding: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  justify-content: center; /* 水平居中 */
  align-items: center; /* 垂直居中 */
}

.product-image img {
  height: 450px; /* 固定高度 */
  width: auto; /* 宽度自适应 */
  max-width: 100%; /* 确保不超过容器宽度 */
  border-radius: 4px;
  display: block;
  object-fit: contain;
  margin: 0 auto; /* 水平居中 */
}

/* 规格表区域 */
.product-table-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 2px solid #e0e0e0;
}

.table-wrapper {
  overflow-x: auto;
  overflow-y: visible;
  margin-top: 15px;
}

.product-content table,
.table-wrapper table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 14px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.product-content table td:first-child,
.product-content table th:first-child,
.table-wrapper table td:first-child,
.table-wrapper table th:first-child {
  white-space: nowrap;
  min-width: fit-content;
  max-width: 200px;
}

.product-content table td,
.product-content table th,
.table-wrapper table td,
.table-wrapper table th {
  padding: 8px 6px;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
  font-weight: normal;
  word-break: break-word;
  max-width: 150px;
  display: table-cell; /* 确保单元格正确显示 */
}

/* 确保 rowspan 单元格正确渲染 */
.product-content table td[rowspan],
.product-content table th[rowspan],
.table-wrapper table td[rowspan],
.table-wrapper table th[rowspan] {
  vertical-align: middle;
  height: auto;
  display: table-cell;
}

.product-content table th,
.product-content table td.header,
.table-wrapper table th,
.table-wrapper table td.header {
  background-color: #f5f5f5;
  font-weight: bold !important;
}

.product-content table td:not(.header),
.table-wrapper table td:not(.header) {
  font-weight: normal !important;
}

.product-content table tr:nth-child(even),
.table-wrapper table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.product-content img,
.section-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 15px 0;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.no-results p {
  font-size: 1.2em;
  margin-bottom: 10px;
}

.hint {
  font-size: 0.9em;
  color: #bbb;
}

.highlight,
mark.highlight {
  background-color: #ffeb3b;
  padding: 2px 4px;
  border-radius: 3px;
  color: #333;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  /* 不设置font-weight，保持父元素的字体粗细 */
  font-weight: inherit;
}

/* 产品标题中的高亮保持加粗 */
.product-title .highlight,
.product-title mark.highlight {
  font-weight: bold;
}

/* 表格中的高亮 */
.product-content table mark.highlight,
.table-wrapper table mark.highlight {
  background-color: #ffeb3b;
  padding: 1px 3px;
  border-radius: 2px;
  font-weight: inherit;
}

/* 表格整行高亮 */
.table-wrapper table tr.highlight-row {
  background-color: #fff9c4 !important;
  box-shadow: 0 2px 4px rgba(255, 235, 59, 0.3);
}

.table-wrapper table tr.highlight-row td {
  background-color: transparent !important;
}

.table-wrapper table tr.highlight-row:hover {
  background-color: #fff59d !important;
}

/* 表格单元格点击高亮行和列 */
.table-wrapper table tr.cell-highlight-row {
  background-color: #e3f2fd !important;
}

.table-wrapper table td.cell-highlight-col,
.table-wrapper table th.cell-highlight-col {
  background-color: #e3f2fd !important;
}

.table-wrapper table td.cell-highlight-col.cell-highlight-row,
.table-wrapper table th.cell-highlight-col.cell-highlight-row {
  background-color: #bbdefb !important;
  font-weight: bold;
}

.table-wrapper table td,
.table-wrapper table th {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }

  header h1 {
    font-size: 2em;
  }

  .search-section,
  .results-section {
    padding: 20px;
  }

  .product-card {
    padding: 15px;
  }

  .sidebar-nav {
    position: fixed;
    left: 10px;
    top: 70px;
    width: calc(100% - 20px);
    max-width: 300px;
    max-height: calc(100vh - 90px);
    z-index: 200;
  }

  .results-section.has-sidebar {
    margin-left: 0; /* 移动端不添加左边距 */
    max-width: 100%; /* 移动端恢复全宽 */
    padding-top: 320px; /* 为侧边栏留出空间 */
  }

  .results-status {
    gap: 8px;
    font-size: 13px;
  }

  .status-text {
    font-size: 13px;
  }

  .status-query {
    font-size: 12px;
  }

  .fixed-search-input {
    font-size: 14px;
    padding: 10px 110px 10px 12px; /* 增加右侧padding，为图标和按钮留出空间 */
  }

  /* 移动端调整图标位置 */
  .fixed-search-icon {
    right: 110px; /* 移动端调整位置（按钮宽度约100px + 间距10px） */
  }

  .fixed-list-all-btn {
    right: 8px;
    font-size: 11px;
    padding: 5px 8px;
    max-height: 28px;
  }

  .fixed-list-all-btn .list-all-icon {
    font-size: 12px;
  }

  .fixed-list-all-btn .list-all-text {
    font-size: 11px;
  }

  .search-input {
    padding: 18px 140px 18px 20px; /* 移动端也调整padding（按钮有文字） */
  }

  .search-icon {
    right: 130px; /* 移动端调整位置（按钮宽度约120px + 间距） */
  }

  .list-all-btn {
    right: 12px; /* 移动端调整位置 */
    font-size: 14px;
    padding: 6px 10px;
  }

  .list-all-btn .list-all-text {
    font-size: 12px;
  }

  /* 移动端改为单列布局 */
  .product-content-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  .product-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-meta {
    margin-top: 10px;
    width: 100%;
    justify-content: flex-start;
  }

  .product-content-right {
    flex: 1;
    max-width: 100%;
    width: 100%;
    align-items: center;
  }

  .product-image-wrapper {
    position: relative;
    top: 0;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    width: 100%;
  }

  .product-image {
    max-width: 100%;
    min-width: auto;
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
  }

  .product-image img {
    height: 450px; /* 固定高度 */
    width: auto; /* 宽度自适应 */
    max-width: 100%; /* 确保不超过容器宽度 */
  }

  .product-content-left,
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .product-content table,
  .table-wrapper table {
    font-size: 12px;
    min-width: 600px; /* 确保表格在小屏幕上可以横向滚动 */
  }

  .product-content table td,
  .product-content table th,
  .table-wrapper table td,
  .table-wrapper table th {
    padding: 6px 4px;
    font-size: 11px;
  }

  .product-content table td:first-child,
  .product-content table th:first-child,
  .table-wrapper table td:first-child,
  .table-wrapper table th:first-child {
    max-width: 120px;
  }
}

/* 右侧筛选浮窗：样式与左侧侧边栏一致 */
.filter-nav {
  position: fixed;
  /* left位置由JavaScript动态计算，使其位于产品展示模块的右边，间距10px（镜像左侧侧边栏） */
  top: 200px;
  width: 250px;
  background: white;
  border-radius: 12px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  height: calc(100vh - 230px);
  max-height: calc(100vh - 230px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 5;
  transition: left 0.3s ease, top 0.3s ease, right 0.3s ease, width 0.3s ease;
}

.filter-nav::-webkit-scrollbar {
  width: 8px;
}

.filter-nav::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 12px;
}

.filter-nav::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.3);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.filter-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.5);
}

body.has-fixed-search .filter-nav {
  top: 180px;
  height: calc(100vh - 210px);
  max-height: calc(100vh - 210px);
}

.filter-nav.collapsed {
  width: 40px;
  min-width: 40px;
  height: 40px !important;
  max-height: 40px !important;
  overflow: visible;
  border-radius: 0 12px 12px 0; /* 右上和右下圆角12px，左上和左下直角 */
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 0;
  z-index: 1;
  background: white;
}

/* filter-nav 的 header 样式调整 - 保持与搜索结果header一致 */
.filter-nav .sidebar-header {
  padding: 20px 20px 15px 20px;
  padding-right: 12px;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 0;
  flex-shrink: 0;
  background: white;
}

.filter-nav.collapsed .sidebar-header {
  padding: 0 10px 0 2px; /* 右边距10px，左边距2px */
  margin: 0;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  justify-content: flex-end; /* 右对齐 */
  align-items: center;
  border-bottom: none;
  border-radius: 0 12px 12px 0;
  background: white !important;
  border: none;
  box-sizing: border-box;
  overflow: hidden;
}

.filter-nav.collapsed .sidebar-header h3,
.filter-nav.collapsed .filter-list {
  display: none;
}

.filter-nav.collapsed .sidebar-toggle-btn {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 40px;
  max-height: 40px;
  color: #667eea;
  border-radius: 0;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: flex-end; /* 右对齐 */
  box-sizing: border-box;
  border: none;
  overflow: hidden;
}

.filter-nav.collapsed .sidebar-toggle-btn:hover {
  background: #fff !important;
  color: #764ba2;
}

.filter-nav.collapsed .sidebar-toggle-btn .toggle-icon {
  transform: rotate(0deg); /* 右侧折叠时，箭头方向相反 */
  font-size: 20px;
  font-weight: bold;
  color: #667eea;
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px 20px 20px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 0;
  min-height: 0;
  max-height: 100%;
  border-radius: 0 0 12px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 126, 234, 0.6) rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  scroll-padding-bottom: 30px;
  padding-bottom: 60px !important;
}

/* 已筛选框在 filter-list 内部时的样式调整 */
.filter-list > .filter-selected-summary {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0 -20px 16px -20px;
  padding: 12px 20px;
  background: #ffffff !important;
  border-bottom: 2px solid #e0e0e0;
  border-radius: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  width: calc(100% + 40px);
  order: -1; /* 确保它在最前面 */
  flex-shrink: 0; /* 防止被压缩 */
  /* 确保背景完全不透明，覆盖下方内容 */
  opacity: 1;
}

/* 当有已筛选框时，移除filter-list的顶部padding，让已筛选框紧贴header */
.filter-list.has-selected-summary {
  padding-top: 0;
}

/* 优化滚动条样式 */
.filter-list::-webkit-scrollbar {
  width: 8px;
}

.filter-list::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}

.filter-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 4px;
  transition: all 0.2s ease;
  border: none;
  min-height: 30px;
}

.filter-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  box-shadow: 0 0 4px rgba(102, 126, 234, 0.4);
}

/* Firefox 滚动条样式 */
.filter-list {
  scrollbar-width: thin;
  scrollbar-color: #667eea transparent;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group-title {
  font-size: 14px;
  font-weight: 600;
  color: #667eea;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1) 0%,
    rgba(118, 75, 162, 0.1) 100%
  );
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #667eea;
  transition: all 0.2s ease;
  user-select: none;
}

.filter-group-title:hover {
  background-color: #f5f5f5;
}

.filter-group-toggle {
  font-size: 12px;
  color: #999;
  transition: transform 0.3s ease;
}

.filter-group.expanded .filter-group-toggle {
  transform: rotate(180deg);
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 12px;
}

.filter-options.collapsed {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.filter-group.expanded .filter-options {
  max-height: 300px;
  padding-top: 8px;
  padding-bottom: 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

/* 筛选选项滚动条样式 */
.filter-group.expanded .filter-options::-webkit-scrollbar {
  width: 6px;
}

.filter-group.expanded .filter-options::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 3px;
}

.filter-group.expanded .filter-options::-webkit-scrollbar-thumb {
  background: rgba(102, 126, 234, 0.4);
  border-radius: 3px;
}

.filter-group.expanded .filter-options::-webkit-scrollbar-thumb:hover {
  background: rgba(102, 126, 234, 0.6);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  background: #f9f9f9;
}

.filter-option:hover {
  background: #f0f0f0;
  border-color: #e0e0e0;
}

.filter-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #667eea;
}

.filter-option label {
  font-size: 13px;
  color: #666;
  cursor: pointer;
  flex: 1;
  user-select: none;
}

.filter-option.checked {
  background: #e8edff;
  border-color: #667eea;
}

.filter-option.checked label {
  color: #667eea;
  font-weight: 500;
}

/* 已筛选选项显示区域 */
.filter-selected-summary {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 20px;
  background: #ffffff !important;
  border-bottom: 2px solid #e0e0e0;
  margin: 0;
  border-radius: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  width: 100%;
  box-sizing: border-box;
}

.filter-selected-title {
  font-size: 13px;
  font-weight: 600;
  color: #667eea;
  margin-bottom: 8px;
}

.filter-selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-selected-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f5f5f5;
  color: #424242;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.filter-selected-tag-remove {
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
  color: #757575;
  transition: color 0.2s ease;
}

.filter-selected-tag-remove:hover {
  color: #424242;
  opacity: 1;
}
