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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  color: #333;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* ========== SIDEBAR ========== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 280px;
  height: 100vh;
  background: #1e2a38;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 1000;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 20px 18px 16px;
  background: #151d28;
  border-bottom: 1px solid #2a3a4d;
  flex-shrink: 0;
}

.sidebar-header h1 {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
}

.sidebar-header h1 i {
  color: #4a9eff;
}

.search-box {
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid #2a3a4d;
  border-radius: 6px;
  background: #2a3a4d;
  color: #fff;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.search-box input::placeholder {
  color: #7f8c9a;
}

.search-box input:focus {
  border-color: #4a9eff;
  background: #2d4157;
}

.search-box i {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #7f8c9a;
  font-size: 13px;
  pointer-events: none;
}

.search-mode-bar {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding: 0 2px;
}

.search-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 5px;
  font-size: 12px;
  color: #7f8c9a;
  background: #2a3a4d;
  border: 1px solid #2a3a4d;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.search-mode-btn i {
  font-size: 11px;
}

.search-mode-btn:hover {
  color: #bdc8d6;
  border-color: #3d5068;
}

.search-mode-btn.active {
  color: #4a9eff;
  background: rgba(74, 158, 255, 0.12);
  border-color: rgba(74, 158, 255, 0.3);
}

/* ========== TREE MENU ========== */
.tree-menu {
  padding: 8px 0 20px;
  flex: 1;
}

.tree-node {
  user-select: none;
}

.tree-item {
  display: flex;
  align-items: center;
  padding: 9px 12px 9px 14px;
  color: #bdc8d6;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-size: 13.5px;
  line-height: 1.4;
  border-left: 3px solid transparent;
  gap: 4px;
  text-decoration: none;
}

.tree-item:hover {
  background: rgba(74, 158, 255, 0.08);
  color: #fff;
}

.tree-item.active {
  background: rgba(74, 158, 255, 0.15);
  border-left-color: #4a9eff;
  color: #4a9eff;
}

.tree-node[data-level="1"] .tree-item {
  font-size: 18px;
  font-weight: bold;
}

.tree-node[data-level="1"] .tree-label {
  font-size: 18px;
  font-weight: bold;
}

.tree-node[data-level="2"] .tree-item {
  font-size: 14px;
  font-weight: bold;
}

.tree-node[data-level="2"] .tree-label {
  font-size: 14px;
  font-weight: bold;
}

.tree-node[data-level="3"] .tree-item {
  font-size: 13px;
}

.tree-node[data-level="3"] .tree-label {
  font-size: 13px;
  font-weight: normal;
}

.tree-arrow {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #5a6a7a;
  transition: transform 0.2s;
  font-size: 10px;
}

.tree-arrow.expanded {
  transform: rotate(90deg);
}

.tree-arrow.empty {
  visibility: hidden;
}

.tree-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-right: 6px;
  color: #4a9eff;
  font-size: 13px;
}

.tree-icon.level-2 {
  color: #a78bfa;
}

.tree-icon.level-3 {
  color: #f59e0b;
}

.tree-label {
  flex: 1;
  word-break: break-word;
}

.tree-children {
  display: none;
  overflow: hidden;
}

.tree-children.expanded {
  display: block;
}

.tree-children .tree-item {
  padding-left: 28px;
  font-size: 13px;
}

.tree-children .tree-children .tree-item {
  padding-left: 40px;
  font-size: 12.5px;
}

.tree-children .tree-children .tree-children .tree-item {
  padding-left: 52px;
  font-size: 12.5px;
}

/* ========== MAIN CONTENT ========== */
.main-content {
  margin-left: 280px;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

.breadcrumb-nav {
  padding: 12px 28px;
  background: #fff;
  border-bottom: 1px solid #e8eaed;
  font-size: 13px;
  color: #7f8c9a;
  min-height: 42px;
}

.breadcrumb-nav span {
  color: #4a9eff;
}

.breadcrumb-nav i {
  color: #aab4c0;
}

/* ========== CONTENT AREA ========== */
.content-area {
  padding: 24px 28px;
  max-width: 920px;
  margin: 0 auto;
}

.tab-container {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  margin-bottom: 20px;
}

.nav-tabs {
  display: flex;
  background: #f8f9fb;
  border-bottom: 2px solid #e8eaed;
}

.nav-tab {
  flex: 1;
  padding: 14px 20px;
  text-align: center;
  cursor: pointer;
  color: #7f8c9a;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-tab:hover {
  color: #4a9eff;
  background: #fff;
}

.nav-tab.active {
  color: #4a9eff;
  background: #fff;
  border-bottom-color: #4a9eff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ========== WELCOME ========== */
.welcome-panel {
  padding: 60px 40px;
  text-align: center;
}

.welcome-panel .welcome-icon {
  font-size: 56px;
  color: #d0d8e2;
  margin-bottom: 18px;
}

.welcome-panel h2 {
  color: #333;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.welcome-panel p {
  color: #8f9ba8;
  font-size: 14px;
  line-height: 1.7;
}

/* ========== FAQ BODY ========== */
.faq-body {
  padding: 16px;
}

.faq-section-title {
  color: #1e2a38;
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8eaed;
}

/* ========== ACCORDION ========== */
.accordion {
  border-radius: 6px;
}

.accordion-item {
  border: 1px solid #e4e8ed;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.accordion-item:hover {
  border-color: #c8d4e0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.accordion-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s;
  gap: 10px;
  user-select: none;
}

.accordion-header:hover {
  background: #f8fafc;
}

.accordion-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4a9eff;
  transition: transform 0.25s;
  font-size: 12px;
  flex-shrink: 0;
}

.accordion-icon.expanded {
  transform: rotate(180deg);
}

.accordion-title {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: #2c3e50;
  line-height: 1.4;
}

.accordion-body {
  display: none;
  padding: 15px 15px 15px 15px;
  color: #6c6c6c;
  font-size: 13.5px;
  line-height: 1.8;
  background: #fafbfc;
  border-top: 1px solid #f0f2f5;
}

.accordion-body.expanded {
  display: block;
  animation: slideDown 0.2s ease;
}

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

.accordion-body ul,
.accordion-body ol {
  padding-left: 18px;
  margin: 4px 0;
}

.accordion-body li {
  margin-bottom: 5px;
}

.accordion-body p {
  margin-bottom: 8px;
}

.accordion-body p:last-child {
  margin-bottom: 0;
}

.accordion-body strong {
  color: #2c3e50;
}

.accordion-body table {
  width: 100%;
  margin: 8px 0;
  border-collapse: collapse;
  font-size: 13px;
}

.accordion-body table td {
  padding: 7px 10px;
  border: 1px solid #e4e8ed;
}

.accordion-body table tr:nth-child(odd) td {
  background: #f8fafc;
}

/* Nested accordion */
.accordion-nested {
  border: none;
  padding: 0;
  margin: 0;
}

.accordion-nested .accordion-item {
  border: 1px solid #e8ecf0;
  margin-bottom: 6px;
  background: #fff;
}

.accordion-nested .accordion-header {
  padding: 11px 14px;
  background: #fff;
}

.accordion-nested .accordion-header:hover {
  background: #f5f7fa;
}

.accordion-nested .accordion-body {
  padding: 15px 15px 15px 15px;
  font-size: 13px;
}

.accordion-nested .accordion-icon {
  color: #a0aec0;
  font-size: 10px;
}

.accordion-nested .accordion-title {
  font-size: 13.5px;
  font-weight: 500;
}

/* ========== PRODUCT INFO ========== */
#productInfoList {
  padding: 16px;
}

.product-info-section {
  padding: 4px 0;
}

.product-info-section h4 {
  color: #1e2a38;
  font-size: 15px;
  font-weight: 600;
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid #4a9eff;
}

.product-info-section h4:first-child {
  margin-top: 0;
}

.product-info-section ul,
.product-info-section ol {
  padding-left: 20px;
}

.product-info-section li {
  margin-bottom: 5px;
}

/* ========== PRODUCT INTRO ========== */
.product-intro-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #f0f4f8;
  border-radius: 6px;
  font-size: 13px;
  color: #4a9eff;
  cursor: pointer;
  margin-bottom: 18px;
  transition: background 0.2s;
  user-select: none;
}

.product-intro-back:hover {
  background: #e4ecf8;
}

.product-intro-back i {
  font-size: 12px;
}

.product-intro-panel {
  padding: 20px;
}

.product-intro-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e8eaed;
}

.product-intro-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-intro-icon i {
  font-size: 28px;
  color: #fff;
}

.product-intro-info h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1e2a38;
  margin-bottom: 8px;
}

.product-intro-tag {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background: #e8f2ff;
  color: #4a9eff;
  border: 1px solid rgba(74, 158, 255, 0.2);
}

.product-intro-desc {
  font-size: 14px;
  color: #555;
  line-height: 1.9;
  margin-bottom: 24px;
  padding: 16px;
  background: #f8fafc;
  border-radius: 10px;
  border-left: 4px solid #4a9eff;
}

.product-specs {
  margin-bottom: 24px;
}

.product-specs h3,
.product-features h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1e2a38;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-specs h3 i,
.product-features h3 i {
  color: #4a9eff;
  font-size: 14px;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.spec-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #e4e8ed;
  border-radius: 8px;
  transition: box-shadow 0.2s;
}

.spec-item:hover {
  box-shadow: 0 2px 8px rgba(74, 158, 255, 0.1);
}

.spec-label {
  flex-shrink: 0;
  font-size: 12px;
  color: #8f9ba8;
  font-weight: 500;
  margin-right: 12px;
  min-width: 60px;
}

.spec-value {
  font-size: 13px;
  color: #2c3e50;
  font-weight: 500;
}

.product-features {
  margin-bottom: 24px;
}

.product-features ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.product-features li {
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e4e8ed;
  border-radius: 8px;
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  transition: box-shadow 0.2s;
}

.product-features li:hover {
  box-shadow: 0 2px 8px rgba(74, 158, 255, 0.08);
  border-color: #c8d4e0;
}

.product-features li strong {
  color: #1e2a38;
  font-weight: 600;
}

.product-intro-faq {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 2px solid #e8eaed;
}

/* ========== SEARCH ========== */
.search-highlight {
  background: #fef3c7;
  color: #92400e;
  padding: 1px 3px;
  border-radius: 3px;
  font-weight: 600;
}

.search-no-result {
  padding: 48px 24px;
  text-align: center;
  color: #9ca3af;
}

.search-no-result i {
  font-size: 44px;
  color: #d1d5db;
  margin-bottom: 14px;
  display: block;
}

.search-no-result p {
  font-size: 14px;
}

/* ========== LOADING ========== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s;
}

.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 3px solid #e8eaed;
  border-top-color: #4a9eff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 14px;
  color: #7f8c9a;
  font-size: 13px;
}

/* ========== MOBILE ========== */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1001;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #1e2a38;
  color: #fff;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-toggle {
    display: flex;
  }

  .main-content {
    margin-left: 0;
  }

  .content-area {
    padding: 15px 12px;
  }

  .nav-tab {
    padding: 12px 15px;
    font-size: 13px;
  }

  .breadcrumb-nav {
    padding: 10px 14px;
  }

  .welcome-panel {
    padding: 40px 20px;
  }

  .welcome-panel h2 {
    font-size: 19px;
  }
}

@media (max-width: 480px) {
  .sidebar {
    width: 260px;
  }

  .accordion-body {
    padding-left: 16px;
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }

  .product-features ul {
    grid-template-columns: 1fr;
  }
}

/* ========== PRODUCT INFO TAB ========== */
#productInfoList {
  padding: 20px;
}

.product-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.product-card {
  background: #fff;
  border: 1px solid #e4e8ed;
  border-radius: 12px;
  padding: 20px;
  transition: box-shadow 0.2s, border-color 0.2s;
  cursor: pointer;
}

.product-card:hover {
  border-color: #4a9eff;
  box-shadow: 0 4px 16px rgba(74, 158, 255, 0.12);
}

.product-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.product-card-icon i {
  font-size: 22px;
  color: #fff;
}

.product-card h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1e2a38;
  margin-bottom: 6px;
}

.product-card p {
  font-size: 13px;
  color: #8f9ba8;
  line-height: 1.5;
}

/* ========== SEARCH RESULTS ========== */
.search-group {
  margin-bottom: 20px;
}

.search-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #f0f4f8;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #4a5568;
  margin-bottom: 10px;
  border-left: 3px solid #4a9eff;
}

.search-group-title i {
  color: #4a9eff;
}

.search-group-count {
  margin-left: auto;
  background: #e8f2ff;
  color: #4a9eff;
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 10px;
}

.search-match-preview {
  font-size: 12.5px;
  color: #718096;
  padding: 6px 12px;
  line-height: 1.6;
  border-left: 2px solid #e2e8f0;
  margin-left: 4px;
}

.search-match-preview mark {
  background: #fef3c7;
  color: #92400e;
  border-radius: 2px;
  padding: 0 2px;
}

.search-context {
  font-size: 12px;
  color: #718096;
  padding: 0 14px 8px 52px;
  line-height: 1.6;
}

.search-context mark {
  background: #fef3c7;
  color: #92400e;
  border-radius: 2px;
  padding: 0 2px;
  font-weight: 600;
}
