@charset "utf-8";

/* Basic Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background-color: #f7f9fc; color: #333; line-height: 1.6; }
body.no-transition .kb-sidebar,
body.no-transition .main-content-wrapper { transition: none !important; }
a { text-decoration: none; color: #0c7edf; }
a:hover { text-decoration: underline; }
ul, li { list-style: none; }

/* App Wrapper - New Layout Structure */
body { display: flex; min-height: 100vh; overflow-x: hidden; }

/* Sidebar - Full Height, Fixed Left */
.kb-sidebar {
    width: 260px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050;
    background-color: #f8f9fa;
    border-right: 1px solid #e1e4e8;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 5px rgba(0,0,0,0.03);
}

.kb-sidebar.collapsed {
    transform: translateX(-260px);
}

/* Sidebar Custom Scrollbar */
.kb-sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 15px;
}

/* Main Content Wrapper - Right Side */
.main-content-wrapper {
    flex-grow: 1;
    margin-left: 260px; /* Sidebar width */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: calc(100% - 260px);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #fff;
}

.main-content-wrapper.expanded {
    margin-left: 0;
    width: 100%;
}

/* Header - Inside Main Wrapper */
.site-header { 
    background-color: #ffffff; 
    color: #24292f; 
    border-bottom: 1px solid #d0d7de; 
    height: 60px; 
    position: sticky; /* Sticky relative to main content wrapper */
    top: 0; 
    width: 100%; 
    z-index: 1000; 
    box-shadow: none; 
}
.header-container { width: 100%; max-width: 100%; margin: 0; display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 24px; }

/* Sidebar Toggle Button - Now in sidebar header */
.sidebar-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Logo left, toggle right */
    padding: 0 15px;
    border-bottom: 1px solid #e1e4e8;
    background-color: #fff;
}

.sidebar-toggle-btn {
    background: transparent;
    border: 1px solid #e1e4e8;
    color: #57606a;
    font-size: 14px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
.sidebar-toggle-btn:hover { background-color: #f6f8fa; border-color: #d0d7de; color: #0969da; }

/* Header toggle button (visible when sidebar is closed) */
.header-toggle-btn {
    display: none; /* Hidden by default */
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-right: 16px;
    color: #57606a;
}
.main-content-wrapper.expanded .header-toggle-btn {
    display: block; /* Show only when expanded (sidebar hidden) */
}


/* Layout - Knowledge Base - Updated */
.kb-container { 
    display: block; /* No longer flex container, sidebar matches height independently */
    width: 100%;
    margin: 0; 
    padding: 0; 
    min-height: auto; 
}

/* Sidebar Styling Updates */
/* Remove old sidebar rules that conflict */

.sidebar-title { font-size: 13px; text-transform: uppercase; color: #586069; margin-bottom: 12px; font-weight: 600; padding-left: 10px; margin-top: 10px; }
.cat-list li { margin-bottom: 2px; }
.cat-list a { display: block; padding: 8px 10px; color: #333; font-size: 14px; border-radius: 6px; }
.cat-list a:hover { background-color: #eaecef; text-decoration: none; color: #333; }
.cat-list a.active { background-color: #f1f8ff; color: #0366d6; font-weight: 500; }
.cat-list .sub-cat { margin-left: 10px; border-left: 1px solid #eaecef; padding-left: 10px; margin-top: 2px; }

/* Main Content Styling */
.kb-content { 
    flex-grow: 1; 
    background: #fff; 
    padding: 30px 40px; 
    max-width: 1000px; 
    margin: 0 auto;
    width: 100%;
}







/* Footer Styling - Clean two-column layout */
.site-footer { background-color: #f6f8fa; color: #586069; padding: 28px 0; margin-top: auto; border-top: 1px solid #e1e4e8; }
.footer-bar { max-width: 1400px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 0 32px; }
.footer-left { display: flex; flex-direction: column; gap: 10px; }
.footer-contact-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; flex-wrap: wrap; color: #4a5568; }
.footer-contact-row .footer-icon { font-style: normal; margin-right: 2px; }
.footer-sep { color: #cbd5e0; margin: 0 4px; }
.footer-copyright { font-size: 12.5px; color: #8b95a5; }
.footer-right { display: flex; align-items: center; flex-shrink: 0; }
.footer-qrcode { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-qrcode img { height: 64px; width: 64px; border-radius: 6px; border: 1px solid #e1e4e8; }
.footer-qrcode span { font-size: 11px; color: #8b95a5; white-space: nowrap; }

/* Toggle Button */
.sidebar-toggle-btn { background: none; border: none; color: #57606a; font-size: 20px; cursor: pointer; margin-right: 16px; padding: 4px 8px; line-height: 1; opacity: 1; transition: color 0.2s; }
.sidebar-toggle-btn:hover { color: #0969da; background-color: #f6f8fa; border-radius: 6px; }

.logo a { color: #24292f !important; }


/* Markdown Content Styling */
.markdown-body { font-size: 16px; line-height: 1.7; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin-top: 24px; margin-bottom: 16px; font-weight: 600; line-height: 1.25; }
.markdown-body p { margin-bottom: 16px; }
.markdown-body code { background-color: rgba(27,31,35,.05); border-radius: 3px; font-size: 85%; margin: 0; padding: .2em .4em; font-family: SFMono-Regular,Consolas,Liberation Mono,Menlo,monospace; }
.markdown-body pre { background: #f6f8fa; border-radius: 3px; padding: 16px; overflow: auto; line-height: 1.45; }
.markdown-body pre code { background: transparent; padding: 0; }
.markdown-body table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.markdown-body th, .markdown-body td { border: 1px solid #dfe2e5; padding: 6px 13px; }
.markdown-body tr:nth-child(2n) { background-color: #f6f8fa; }
.markdown-body img { max-width: 100%; box-sizing: content-box; background-color: #fff; }

/* Right Sidebar - TOC */
/* Article Layout with TOC */
.article-layout { display: flex; flex-grow: 1; gap: 0; max-width: 1400px; width: 100%; margin: 0 auto; }
.article-layout .kb-content { flex: 1; min-width: 0; }

.kb-toc { width: 200px; flex-shrink: 0; position: sticky; top: 70px; align-self: flex-start; max-height: calc(100vh - 90px); overflow-y: auto; font-size: 13px; padding: 20px 16px 20px 0; border-left: 1px solid #eaecef; margin-left: 16px; padding-left: 16px; }
.kb-toc:empty, .kb-toc.hidden { display: none; }
.toc-title { font-weight: 600; margin-bottom: 12px; color: #24292e; font-size: 13px; }
.toc-list { padding: 0; margin: 0; }
.toc-list li { margin-bottom: 6px; line-height: 1.4; list-style: none; }
.toc-list a { color: #586069; display: block; border-left: 2px solid transparent; padding: 2px 0 2px 10px; font-size: 13px; transition: all 0.15s; }
.toc-list a:hover, .toc-list a.active-toc { color: #0969da; border-left-color: #0969da; text-decoration: none; }
.toc-list .toc-h3 { padding-left: 22px; font-size: 12px; }
.toc-list .toc-h4 { padding-left: 34px; font-size: 12px; }

@media (max-width: 1024px) {
    .kb-toc { display: none; }
    .article-layout { display: block; }
}

/* List View Specifics */
.search-box { margin-bottom: 20px; display: flex; gap: 10px; }
.search-input { flex-grow: 1; padding: 10px; border: 1px solid #dfe2e5; border-radius: 4px; font-size: 16px; }
.search-btn { padding: 10px 20px; background-color: #0c7edf; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; }
.search-btn:hover { background-color: #0966b5; }

.article-list-item { border-bottom: 1px solid #eaecef; padding: 20px 0; }
.article-list-item:last-child { border-bottom: none; }
.item-title { font-size: 18px; margin-bottom: 5px; font-weight: 600; }
.item-title a { color: #0366d6; }
.item-summary { color: #586069; font-size: 14px; margin-bottom: 5px; }
.item-meta { font-size: 12px; color: #6a737d; }
.item-tag { display: inline-block; background: #f1f8ff; color: #0366d6; padding: 2px 10px; border-radius: 12px; font-size: 12px; margin-right: 8px; }

/* Header Right Navigation */
.header-title { font-size: 16px; font-weight: 600; color: #24292f; white-space: nowrap; }
.header-nav-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.header-link { padding: 6px 16px; font-size: 14px; font-weight: 500; color: #57606a; text-decoration: none; border-radius: 6px; transition: all 0.2s; }
.header-link:hover { background-color: #f6f8fa; color: #0969da; text-decoration: none; }
.header-link.active { color: #0969da; background-color: #ddf4ff; }

/* Sidebar Sections */
.sidebar-section { margin-bottom: 8px; }
.sidebar-section-title { display: block; padding: 8px 10px; font-size: 13px; font-weight: 600; color: #57606a; text-transform: uppercase; letter-spacing: 0.5px; text-decoration: none; border-radius: 6px; transition: all 0.15s; }
.sidebar-section-title:hover { color: #0969da; background-color: #f6f8fa; text-decoration: none; }
.sidebar-section-title.active { color: #0366d6; }
.sidebar-section > .cat-list { margin-top: 2px; }

/* ============ Homepage Styles ============ */
.home-content { max-width: 900px; }

.home-intro { text-align: center; padding: 40px 0 20px; border-bottom: 1px solid #eaecef; margin-bottom: 30px; }
.home-intro h1 { font-size: 28px; color: #24292f; margin-bottom: 8px; font-weight: 700; }
.home-intro p { font-size: 15px; color: #57606a; margin: 0; }

.home-stats { display: flex; justify-content: center; gap: 40px; margin-bottom: 36px; }
.stat-item { text-align: center; }
.stat-num { display: block; font-size: 28px; font-weight: 700; color: #0969da; }
.stat-label { font-size: 13px; color: #57606a; }

.home-section { margin-bottom: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 2px solid #eaecef; padding-bottom: 8px; margin-bottom: 16px; }
.section-head h2 { font-size: 18px; font-weight: 600; color: #24292f; margin: 0; }
.section-more { font-size: 13px; color: #0969da; }
.section-more:hover { text-decoration: underline; }

.home-article-list { }
.home-article-item { padding: 10px 0; border-bottom: 1px solid #f0f0f0; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.home-article-item:last-child { border-bottom: none; }
.home-article-title { font-size: 15px; color: #0366d6; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-article-title:hover { text-decoration: underline; }
.home-article-meta { font-size: 12px; color: #6a737d; display: flex; gap: 10px; flex-shrink: 0; }
.meta-cat { background: #f1f8ff; color: #0366d6; padding: 1px 8px; border-radius: 10px; }
.meta-date { }

.home-product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.home-product-card { display: block; border: 1px solid #e1e4e8; border-radius: 8px; padding: 16px; transition: all 0.2s; text-decoration: none; }
.home-product-card:hover { border-color: #0969da; box-shadow: 0 2px 8px rgba(9,105,218,0.1); text-decoration: none; }
.product-card-name { font-size: 15px; font-weight: 600; color: #24292f; margin-bottom: 6px; }
.product-card-info { font-size: 12px; color: #57606a; display: flex; gap: 8px; }
.product-card-info span { background: #f6f8fa; padding: 1px 6px; border-radius: 4px; }

.home-brand-list { display: flex; flex-wrap: wrap; gap: 12px; }
.home-brand-card { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #fff; border: 1px solid #e1e4e8; border-radius: 6px; text-decoration: none; color: #333; min-width: 180px; transition: box-shadow 0.2s; }
.home-brand-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); text-decoration: none; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; flex-shrink: 0; }
.brand-logo-placeholder { width: 40px; height: 40px; background: #f0f2f5; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #999; flex-shrink: 0; }
.home-brand-item { background: #f6f8fa; border: 1px solid #e1e4e8; border-radius: 6px; padding: 10px 16px; display: flex; flex-direction: column; gap: 2px; }
.brand-name { font-size: 14px; font-weight: 600; color: #24292f; display: block; }
.brand-desc { font-size: 12px; color: #6a737d; }

.empty-hint { color: #8b949e; font-size: 14px; text-align: center; padding: 20px 0; }

/* Product Filter Bar */
.product-filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; align-items: center; padding: 12px 16px; background: #f6f8fa; border: 1px solid #e1e4e8; border-radius: 8px; }
.product-filter-bar label { font-size: 13px; font-weight: 600; color: #57606a; white-space: nowrap; }
.product-filter-bar select { padding: 6px 12px; border: 1px solid #d0d7de; border-radius: 6px; font-size: 13px; background: #fff; color: #24292f; min-width: 120px; }
.product-filter-bar .filter-group { display: flex; align-items: center; gap: 6px; }
.product-filter-bar .filter-btn { padding: 6px 16px; background: #0969da; color: #fff; border: none; border-radius: 6px; font-size: 13px; cursor: pointer; }
.product-filter-bar .filter-btn:hover { background: #0860c4; }
.product-filter-bar .filter-reset { padding: 6px 16px; background: #fff; color: #57606a; border: 1px solid #d0d7de; border-radius: 6px; font-size: 13px; cursor: pointer; text-decoration: none; }
.product-filter-bar .filter-reset:hover { background: #f6f8fa; text-decoration: none; }
.product-filter-bar .filter-keyword { width: 180px; padding: 6px 12px; font-size: 13px; }

/* Product List Item Tags */
.product-params { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.param-tag { display: inline-block; background: #f1f8ff; color: #0366d6; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.param-tag.crystal { background: #dafbe1; color: #116329; }
.param-tag.process { background: #fff8c5; color: #735c0f; }
.param-tag.treatment { background: #fbefff; color: #8250df; }

/* Compare Feature */
.compare-cb { margin-right: 8px; cursor: pointer; vertical-align: middle; }
.compare-bar { position: fixed; bottom: 0; left: 260px; right: 0; background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 100%); color: #1a3353; padding: 16px 28px; min-height: 60px; display: flex; align-items: center; justify-content: space-between; z-index: 1100; transform: translateY(100%); transition: transform 0.3s; border-top: 2px solid #b3d4f0; box-shadow: 0 -3px 12px rgba(0,60,120,0.08); }
.compare-bar.visible { transform: translateY(0); }
.compare-bar .compare-info { font-size: 14px; color: #1a3353; font-weight: 500; }
.compare-bar .compare-btn { padding: 10px 28px; background: linear-gradient(135deg, #1890ff, #0969da); color: #fff; border: none; border-radius: 8px; font-size: 14px; cursor: pointer; font-weight: 600; box-shadow: 0 2px 6px rgba(24,144,255,0.3); }
.compare-bar .compare-btn:hover { background: linear-gradient(135deg, #40a9ff, #1890ff); box-shadow: 0 3px 8px rgba(24,144,255,0.4); }
.compare-bar .compare-clear { padding: 10px 20px; background: #fff; color: #57606a; border: 1px solid #d0d7de; border-radius: 8px; font-size: 13px; cursor: pointer; margin-left: 8px; }
.compare-bar .compare-clear:hover { background: #f6f8fa; }

/* Compare Modal */
.compare-modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: none; align-items: center; justify-content: center; }
.compare-modal-overlay.active { display: flex; }
.compare-modal { background: #fff; border-radius: 12px; max-width: 95vw; max-height: 90vh; overflow: auto; padding: 24px; min-width: 600px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.compare-modal h2 { font-size: 20px; margin-bottom: 16px; color: #24292f; }
.compare-modal .close-btn { float: right; background: none; border: none; font-size: 24px; cursor: pointer; color: #57606a; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare-table th { background: #f6f8fa; padding: 10px 14px; text-align: left; border-bottom: 2px solid #d0d7de; font-weight: 600; color: #24292f; white-space: nowrap; }
.compare-table td { padding: 10px 14px; border-bottom: 1px solid #eaecef; }
.compare-table tr:hover { background: #f6f8fa; }
.compare-table .row-label { font-weight: 600; color: #57606a; background: #f6f8fa; width: 120px; }
.compare-table td.diff { background: #fff8c5; }

/* Product Detail Params Table */
.product-params-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.product-params-table caption { font-size: 16px; font-weight: 600; color: #24292f; margin-bottom: 12px; text-align: left; }
.product-params-table th, .product-params-table td { padding: 10px 16px; border: 1px solid #e1e4e8; font-size: 14px; }
.product-params-table th { background: #f6f8fa; color: #57606a; font-weight: 600; width: 140px; text-align: left; }
.product-params-table td { color: #24292f; }

/* Homepage Product Card Tags */
.product-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.product-card-tags .tag { font-size: 11px; padding: 1px 6px; border-radius: 4px; background: #dafbe1; color: #116329; }

/* Breadcrumb */
.breadcrumb { margin-bottom: 16px; font-size: 14px; color: #586069; }
.breadcrumb-link { color: #1890ff; text-decoration: none; }
.breadcrumb-link:hover { text-decoration: underline; }
.breadcrumb-sep { margin: 0 6px; }
.breadcrumb-current { color: #24292f; }

/* Product Detail Header Layout */
.product-header-layout { display: flex; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.product-image-wrap { flex-shrink: 0; }
.product-main-image { max-width: 300px; max-height: 300px; border-radius: 8px; border: 1px solid #e1e4e8; object-fit: contain; background: #fafafa; padding: 8px; }
.product-info-wrap { flex: 1; min-width: 280px; }
.product-meta { margin-bottom: 16px; color: #586069; font-size: 14px; line-height: 2; }
.product-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.product-action-btn { display: inline-block; padding: 8px 16px; color: #fff; border-radius: 4px; text-decoration: none; font-size: 14px; }
.product-action-btn.primary { background: #1890ff; }
.product-action-btn.success { background: #52c41a; }
.product-action-btn:hover { opacity: 0.85; color: #fff; text-decoration: none; }

/* Product Inquiry Section */
.inquiry-section { margin-top: 40px; padding-top: 32px; border-top: 1px solid #e1e4e8; }
.inquiry-title { font-size: 18px; margin-bottom: 16px; }
.product-inquiry-msg { display: none; padding: 10px; border-radius: 6px; margin-bottom: 12px; }
.inquiry-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.inquiry-input { flex: 1; min-width: 120px; padding: 8px 10px; border: 1px solid #d1d5da; border-radius: 4px; font-size: 14px; }
.inquiry-textarea { width: 100%; height: 80px; padding: 8px 10px; border: 1px solid #d1d5da; border-radius: 4px; font-size: 14px; resize: vertical; box-sizing: border-box; font-family: inherit; margin-bottom: 12px; }
.inquiry-submit-btn { background: #1890ff; color: #fff; border: none; padding: 10px 32px; font-size: 14px; border-radius: 4px; cursor: pointer; }
.inquiry-submit-btn:hover { background: #1079d9; }

/* Product List Item */
.product-list-item { display: flex; gap: 12px; align-items: flex-start; }
.product-list-item-body { flex: 1; }
.product-thumb-link { flex-shrink: 0; }
.product-thumb-img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; border: 1px solid #e1e4e8; background: #fafafa; vertical-align: middle; }
.sn-tag { color: #6a737d; font-size: 13px; }
.filter-hint { color: #999; font-size: 12px; margin-left: 8px; }

/* Pagination */
.pagination { text-align: center; margin: 20px 0; display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; }
.pagination-total { color: #586069; font-size: 13px; margin-right: 8px; }
.pagination-link { padding: 4px 12px; border: 1px solid #d1d5da; border-radius: 4px; text-decoration: none; color: #1890ff; font-size: 13px; }
.pagination-link:hover { background: #f6f8fa; text-decoration: none; }
.pagination-current { padding: 4px 12px; background: #1890ff; color: #fff; border-radius: 4px; font-size: 13px; }
.pagination-ellipsis { padding: 4px 8px; color: #999; }

/* Compare Bar Inner */
.compare-bar-inner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: 1; }
.compare-names { display: flex; gap: 6px; flex-wrap: wrap; }
.compare-bar-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Responsive */
@media (max-width: 768px) {
    /* Sidebar: hide by default on mobile */
    .kb-sidebar { transform: translateX(-260px); }
    .main-content-wrapper { margin-left: 0; width: 100%; }
    .header-toggle-btn { display: block !important; }

    /* When sidebar is open on mobile, add overlay */
    .kb-sidebar:not(.collapsed) { box-shadow: 4px 0 20px rgba(0,0,0,0.15); }

    /* Header: compact */
    .header-container { padding: 0 12px; }
    .header-title { font-size: 14px; }
    .header-nav-right { gap: 0; }
    .header-link { padding: 6px 8px; font-size: 13px; }

    /* Content: reduce padding */
    .kb-content { padding: 16px; }

    /* Home page */
    .home-content { padding: 16px; }
    .home-intro { padding: 24px 0 16px; }
    .home-intro h1 { font-size: 22px; }
    .home-intro p { font-size: 14px; }
    .home-product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .home-product-card { padding: 12px; }
    .product-card-name { font-size: 14px; }
    .home-stats { gap: 20px; }
    .home-brand-list { gap: 8px; }
    .home-brand-card { min-width: calc(50% - 8px); padding: 10px 12px; }
    .section-head h2 { font-size: 16px; }

    /* Article list */
    .article-header .article-title { font-size: 20px; }
    .search-box { flex-direction: column; }
    .search-input { width: 100%; }

    /* Product filter bar */
    .product-filter-bar { padding: 10px 12px; gap: 8px; }
    .product-filter-bar .filter-group { flex: 1; min-width: calc(50% - 8px); }
    .product-filter-bar select { min-width: 0; width: 100%; }
    .product-filter-bar .search-input { width: 100% !important; }

    /* Product list items */
    .article-list-item { padding: 14px 0; }
    .item-title { font-size: 15px; }
    .item-title label { flex-wrap: wrap; }
    .product-params { gap: 4px; }
    .param-tag { font-size: 10px; padding: 1px 6px; }

    /* Product detail */
    .product-params-table { font-size: 13px; }
    .product-params-table colgroup { display: none; }
    .product-params-table th, .product-params-table td { padding: 8px 10px; display: block; width: 100%; }
    .product-params-table tr { display: flex; flex-wrap: wrap; }
    .product-params-table th { width: 40%; }
    .product-params-table td { width: 60%; }

    /* Compare */
    .compare-bar { left: 0; padding: 12px 16px; }
    .compare-bar .compare-info { font-size: 12px; }
    .compare-bar .compare-btn { padding: 8px 16px; font-size: 13px; }
    .compare-bar-inner { gap: 8px; }
    .compare-bar-actions { width: 100%; justify-content: flex-end; }

    /* Product detail: stack image + info */
    .product-header-layout { flex-direction: column; gap: 16px; }
    .product-main-image { max-width: 100%; max-height: 250px; }
    .product-info-wrap { min-width: 0; }

    /* Inquiry form responsive */
    .inquiry-row { flex-direction: column; }
    .inquiry-input { min-width: 0; width: 100%; }

    /* Pagination */
    .pagination { gap: 4px; }
    .pagination-link, .pagination-current { padding: 4px 10px; font-size: 12px; }

    /* Filter hint: hide or wrap */
    .filter-hint { display: block; margin-left: 0; margin-top: 4px; }

    /* Footer */
    .footer-bar { flex-direction: column; align-items: flex-start; gap: 16px; padding: 12px 20px; }
    .footer-contact-row { flex-direction: column; gap: 6px; font-size: 12.5px; }
    .footer-sep { display: none; }
    .footer-right { align-self: flex-start; }
    .footer-qrcode { flex-direction: row; gap: 10px; }
    .footer-qrcode img { height: 48px; width: 48px; }
}

@media (max-width: 480px) {
    /* Header: minimal nav */
    .header-link { padding: 6px 6px; font-size: 12px; }
    .header-title { font-size: 13px; }

    /* Content: minimal padding */
    .kb-content { padding: 12px; }
    .home-content { padding: 12px; }

    /* Home: single column */
    .home-product-grid { grid-template-columns: 1fr; }
    .home-stats { flex-direction: column; gap: 12px; }
    .home-article-item { flex-direction: column; gap: 4px; }
    .home-brand-card { min-width: 100%; }

    /* Product filter: stack vertical */
    .product-filter-bar { flex-direction: column; align-items: stretch; }
    .product-filter-bar .filter-group { min-width: 100%; }

    /* Product detail: stack image+info vertically */
    .product-params-table tr { flex-direction: column; }
    .product-params-table th, .product-params-table td { width: 100%; }
    .product-header-layout { gap: 12px; }
    .product-main-image { max-width: 80%; margin: 0 auto; display: block; }
    .product-actions { justify-content: center; }
    .breadcrumb { font-size: 12px; }

    /* Inquiry */
    .inquiry-section { margin-top: 24px; padding-top: 20px; }
    .inquiry-submit-btn { width: 100%; }

    /* Compare */
    .compare-modal { min-width: auto; width: 95vw; padding: 16px; }
    .compare-modal h2 { font-size: 16px; }
    .compare-table { font-size: 12px; }
    .compare-table th, .compare-table td { padding: 6px 8px; }

    /* Inquiry form */
    .inquiry-form-wrap { padding: 0 12px; }

    /* Footer */
    .footer-copyright { font-size: 11px; }
}

/* ============ VitePress-style Knowledge ============ */

/* Sidebar VitePress Nav */
.vp-sidebar-nav { padding: 0; margin: 4px 0 0 0; }
.vp-sidebar-item { margin-bottom: 2px; }
.vp-sidebar-link { display: block; padding: 6px 12px; color: #3c3c43; font-size: 14px; border-radius: 6px; border-left: 2px solid transparent; transition: color 0.15s, background-color 0.15s, border-left-color 0.15s; text-decoration: none; }
.vp-sidebar-link:hover { color: #3451b2; background-color: #f6f8fa; text-decoration: none; }
.vp-sidebar-link.active { color: #3451b2; font-weight: 600; border-left-color: #3451b2; background-color: #f1f5ff; }

.vp-sidebar-group { }
.vp-sidebar-group-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 12px; border: none; background: transparent; color: #3c3c43; font-size: 14px; font-weight: 600; cursor: pointer; border-radius: 6px; transition: color 0.15s, background-color 0.15s; }
.vp-sidebar-group-btn:hover { color: #3451b2; background-color: #f6f8fa; }
.vp-sidebar-group-btn .vp-caret { transition: transform 0.25s; transform: rotate(90deg); flex-shrink: 0; }
.vp-sidebar-group.collapsed .vp-caret { transform: rotate(0deg); }
.vp-sidebar-children { padding: 0 0 0 8px; margin: 2px 0 4px 0; border-left: 1px solid #e2e2e3; margin-left: 16px; }
.vp-sidebar-children li { margin-bottom: 1px; }
.vp-sidebar-children .vp-sidebar-link { font-weight: 400; font-size: 13px; padding: 4px 10px; }
.vp-sidebar-children { overflow: hidden; max-height: 500px; transition: max-height 0.25s ease; }
.vp-sidebar-group.collapsed .vp-sidebar-children { max-height: 0; overflow: hidden; }

/* Knowledge Card Grid (list page) */
.knowledge-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; }
.knowledge-card { background: #fff; border: 1px solid #e2e2e3; border-radius: 12px; padding: 20px 24px; transition: all 0.25s; }
.knowledge-card:hover { border-color: #3451b2; box-shadow: 0 2px 12px rgba(52,81,178,0.08); }
.knowledge-card.small { padding: 16px 20px; }
.knowledge-card-title { font-size: 16px; font-weight: 600; margin: 0 0 8px 0; }
.knowledge-card-title a { color: #1a1a1a; text-decoration: none; }
.knowledge-card-title a:hover { color: #3451b2; text-decoration: none; }
.knowledge-card-children { padding: 0; margin: 0; }
.knowledge-card-children li { padding: 4px 0; }
.knowledge-card-children li a { color: #3451b2; font-size: 14px; text-decoration: none; }
.knowledge-card-children li a:hover { text-decoration: underline; }
.knowledge-card-children li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #d1d5db; margin-right: 8px; vertical-align: middle; }

/* VitePress-style doc */
.vp-doc { }
.vp-doc-title { font-size: 28px; font-weight: 700; color: #1a1a1a; line-height: 1.3; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid #e2e2e3; }
.vp-children-section { margin-top: 32px; padding-top: 24px; border-top: 1px solid #e2e2e3; }

/* VitePress-style Prev/Next Footer */
.vp-doc-footer { display: flex; justify-content: space-between; align-items: stretch; margin-top: 40px; padding-top: 24px; border-top: 1px solid #e2e2e3; gap: 16px; }
.vp-pager { display: flex; flex-direction: column; border: 1px solid #e2e2e3; border-radius: 8px; padding: 12px 16px; text-decoration: none; transition: border-color 0.25s; min-width: 0; flex: 1; max-width: 48%; }
.vp-pager:hover { border-color: #3451b2; text-decoration: none; }
.vp-pager.prev { align-items: flex-start; }
.vp-pager.next { align-items: flex-end; }
.vp-pager-label { display: block; font-size: 12px; font-weight: 500; color: #3c3c43c7; margin-bottom: 4px; }
.vp-pager-title { font-size: 14px; font-weight: 600; color: #3451b2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 768px) {
    .knowledge-card-grid { grid-template-columns: 1fr; }
    .vp-doc-footer { flex-direction: column; }
    .vp-pager { max-width: 100%; }
}
