:root {
    --primary: #1a5fb4;
    --primary-dark: #154a8c;
    --primary-light: #e8f0fe;
    --accent: #e31837;
    --bg: #f0f2f5;
    --surface: #ffffff;
    --surface-hover: #f8f9fa;
    --border: #d0d7de;
    --border-light: #e4e8ec;
    --text: #1f2328;
    --text-secondary: #57606a;
    --text-muted: #8c959f;
    --success: #1a7f37;
    --shadow-sm: 0 1px 2px rgba(31,35,40,0.04);
    --shadow: 0 1px 3px rgba(31,35,40,0.08), 0 4px 12px rgba(31,35,40,0.05);
    --shadow-lg: 0 4px 24px rgba(31,35,40,0.12);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --sidebar-width: 260px;
    --header-height: 56px;
    --subnav-height: 44px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

/* ===== Top Header ===== */
.top-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-inner {
    max-width: 1600px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 24px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo-mark {
    width: 34px; height: 34px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: -0.5px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text .brand {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.3px;
}

.logo-text .sub {
    font-size: 11px;
    color: var(--text-muted);
}

.header-search {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 0 4px 0 14px;
    transition: all 0.2s;
}

.search-box:focus-within {
    background: var(--surface);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box .search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-box input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 8px 10px;
    font-size: 14px;
    outline: none;
    color: var(--text);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}

.search-dropdown.active { display: block; }

.dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.1s;
}

.dropdown-item:hover { background: var(--surface-hover); }

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

.dropdown-item .di-model {
    font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
    font-weight: 600;
    font-size: 13px;
    color: var(--primary);
    min-width: 140px;
}

.dropdown-item .di-info {
    font-size: 12px;
    color: var(--text-secondary);
}

.dropdown-item .di-page {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.dropdown-item .di-badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    color: white;
    background: var(--primary);
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
    vertical-align: middle;
}

.header-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--border-light);
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.action-btn:hover {
    border-color: var(--border);
    color: var(--text);
    background: var(--surface-hover);
}

.action-btn .count-badge {
    background: var(--accent);
    color: white;
    font-size: 10px;
    min-width: 16px; height: 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    margin-left: 2px;
}

/* ===== Sub Nav ===== */
.sub-nav {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    height: var(--subnav-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    z-index: 999;
}

.sub-nav-inner {
    max-width: 1600px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .sep {
    color: var(--text-muted);
}

.breadcrumb .current {
    color: var(--text);
    font-weight: 500;
}

.result-count {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Layout ===== */
.layout {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    padding: calc(var(--header-height) + var(--subnav-height)) 24px 24px;
    gap: 20px;
    min-height: 100vh;
}

/* ===== Left Panel ===== */
.left-panel {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + var(--subnav-height) + 24px);
    height: calc(100vh - var(--header-height) - var(--subnav-height) - 48px);
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px 0;
}

.panel-section {
    padding: 0 16px 16px;
    border-bottom: 1px solid var(--border-light);
}

.panel-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hidden { display: none !important; }

.panel-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 8px 0 12px;
}

/* Category Accordion */
.cat-group {}

.cat-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
    user-select: none;
}

.cat-group-header:hover {
    background: var(--bg);
}

.cat-group-header::after {
    content: '\203A';
    font-size: 16px;
    color: var(--text-muted);
    transition: transform 0.2s;
    display: inline-block;
}

.cat-group.expanded .cat-group-header::after {
    transform: rotate(90deg);
}

.cat-group-items {
    display: none;
    padding: 2px 0 4px 8px;
}

.cat-group.expanded .cat-group-items {
    display: block;
}

.cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s;
    text-decoration: none;
}

.cat-item:hover {
    background: var(--bg);
    color: var(--primary);
}

.cat-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
}

.cat-item .ci-pages {
    font-size: 11px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 6px;
}

/* Filters */
.filter-group {
    margin-bottom: 14px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
    display: block;
}

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

.filter-chip {
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--surface);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== Content Area ===== */
.content-area {
    flex: 1;
    min-width: 0;
}

.view.hidden { display: none; }

/* ===== Hero Banner ===== */
.hero-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    color: white;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.hero-content { position: relative; z-index: 1; }

.hero-content h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero-content p {
    font-size: 15px;
    opacity: 0.85;
    margin-bottom: 24px;
}

.hero-stats {
    display: flex;
    gap: 40px;
}

.h-stat {
    display: flex;
    flex-direction: column;
}

.h-stat strong {
    font-size: 28px;
    font-weight: 700;
}

.h-stat span {
    font-size: 12px;
    opacity: 0.75;
    margin-top: 2px;
}

/* ===== Section Header ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

/* ===== Category Grid ===== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.cat-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 18px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.cat-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.cat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
}

.cat-card:hover::before { opacity: 1; }

.cat-card .cc-icon {
    width: 40px; height: 40px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.cat-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cat-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== Hot Tags ===== */
.hot-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hot-tag {
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.hot-tag:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* ===== Toolbar ===== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
}

.view-toggle {
    display: flex;
    gap: 2px;
}

.vt-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.vt-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.vt-btn.active {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.sort-control select {
    padding: 5px 10px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--surface);
    cursor: pointer;
    outline: none;
}

/* ===== Product Grid ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.product-grid.list-view {
    grid-template-columns: 1fr;
}

.product-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.product-card .pc-image-wrap {
    width: 100%;
    height: 220px;
    background: #fafbfc;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border-light);
}

.product-card .pc-image-wrap img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .pc-image-wrap img {
    transform: scale(1.05);
}

.product-card .pc-body {
    padding: 12px 14px;
}

.product-card .pc-model {
    font-family: "SF Mono", Monaco, "Cascadia Code", monospace;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.product-card .pc-series {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.product-card .pc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.product-card .pc-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--text-secondary);
}

.product-card .pc-tag.material { background: #e8f5e9; color: var(--success); }
.product-card .pc-tag.color { background: #fff3e0; color: #e65100; }
.product-card .pc-tag.code { background: #e3f2fd; color: var(--primary); font-family: monospace; font-size: 10px; }

.product-card .pc-key-params {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 8px 0 4px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-light);
}

.product-card .pc-kp-item {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.product-card .pc-kp-item em {
    font-style: normal;
    color: var(--text-muted);
    margin-right: 3px;
}

.product-card .pc-page {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Has figure highlight */
.product-card.has-figure {
    border-color: var(--primary);
}

.product-card.has-figure .pc-image-wrap::after {
    content: '图纸';
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    z-index: 3;
    opacity: 0.9;
}

/* List view product card */
.product-grid.list-view .product-card {
    display: flex;
    align-items: stretch;
}

.product-grid.list-view .pc-image-wrap {
    width: 220px;
    height: auto;
    min-height: 160px;
    border-bottom: none;
    border-right: 1px solid var(--border-light);
}

.product-grid.list-view .pc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== Page Grid ===== */
.page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.page-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
}

.page-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.page-card img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    background: var(--bg);
}

.page-card .page-info {
    padding: 10px 12px;
}

.page-card .page-num {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
}

.page-card .page-name {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ===== Modal ===== */
.modal { position: fixed; inset: 0; z-index: 2000; }

.modal.hidden { display: none; }

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(31, 35, 40, 0.6);
    backdrop-filter: blur(2px);
}

.modal-body {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 1100px;
    max-height: 90vh;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-small {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 400px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 24px;
}

.modal-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 32px; height: 32px;
    border: none;
    background: rgba(0,0,0,0.06);
    border-radius: 50%;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.modal-close:hover {
    background: rgba(0,0,0,0.1);
    color: var(--text);
}

.modal-small h3 {
    font-size: 16px;
    margin-bottom: 12px;
}

.modal-tip {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.modal-small input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    outline: none;
    margin-bottom: 16px;
}

.modal-small input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-primary, .btn-secondary {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover { background: var(--border-light); }

.quick-links {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    font-size: 12px;
}

.quick-links span {
    color: var(--text-muted);
}

.quick-links a {
    display: inline-block;
    padding: 3px 10px;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin: 0 3px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}

.quick-links a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Detail Layout */
.detail-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 左侧：PDF整页截图 */
.detail-page-view {
    flex: 1;
    min-width: 0;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
    position: relative;
}

.dpv-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-align: center;
}

.dpv-label span {
    color: var(--primary);
    font-weight: 600;
}

.detail-page-view img {
    max-width: 100%;
    max-height: calc(90vh - 120px);
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: zoom-in;
    transition: transform 0.2s;
}

.detail-page-view img:hover {
    transform: scale(1.02);
}

.dpv-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    opacity: 0.7;
}

/* 右侧：产品信息 */
.detail-info {
    width: 360px;
    padding: 24px;
    border-left: 1px solid var(--border-light);
    overflow-y: auto;
}

.detail-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.detail-category {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
}

.detail-header h2 {
    font-family: "SF Mono", Monaco, monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.detail-series {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 产品图纸 */
.detail-figure {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius);
    text-align: center;
}

.detail-figure img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.2s;
}

.detail-figure img:hover {
    transform: scale(1.05);
}

.detail-specs h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.detail-specs table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.detail-specs tr:nth-child(even) {
    background: var(--bg);
}

.detail-specs td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
}

.detail-specs tr:first-child td {
    border-top: 1px solid var(--border-light);
}

.detail-specs td:first-child,
.detail-specs td.spec-key {
    color: var(--text-muted);
    width: 42%;
    font-size: 12px;
}

.detail-specs td:last-child,
.detail-specs td.spec-val {
    color: var(--text);
    font-weight: 500;
    text-align: right;
}

.detail-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.btn-fav {
    flex: 1;
    padding: 10px 20px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-fav:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-fav.active {
    border-color: var(--accent);
    color: var(--accent);
    background: #fff5f5;
}

.fav-icon {
    font-size: 16px;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c1c7cd; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a5adb4; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .layout { padding-left: 16px; padding-right: 16px; }
    .left-panel { width: 220px; }
    .detail-layout { flex-direction: column; }
    .detail-page-view { max-height: 50vh; }
    .detail-info { width: 100%; border-left: none; border-top: 1px solid var(--border-light); }
}

/* ===== Zoom Modal ===== */
.zoom-body {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3000;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-body img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.zoom-body .modal-close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 3001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-body .modal-close:hover {
    background: rgba(0,0,0,0.7);
}

@media (max-width: 768px) {
    .header-inner { padding: 0 12px; gap: 12px; }
    .logo-text .sub { display: none; }
    .header-search { max-width: none; }
    .search-btn { display: none; }
    .action-btn span { display: none; }
    .action-btn { padding: 6px; }

    .layout {
        flex-direction: column;
        padding-top: calc(var(--header-height) + var(--subnav-height));
        padding-left: 12px;
        padding-right: 12px;
    }

    .left-panel {
        position: static;
        width: 100%;
        height: auto;
        max-height: 300px;
        margin-bottom: 16px;
    }

    .hero-banner { padding: 24px 20px; }
    .hero-content h1 { font-size: 20px; }
    .hero-stats { gap: 24px; }
    .h-stat strong { font-size: 22px; }

    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .page-grid { grid-template-columns: repeat(3, 1fr); }

    .modal-body { width: 95vw; }
    .detail-layout { flex-direction: column; }
    .detail-page-view { padding: 12px; max-height: 50vh; }
    .detail-info { width: 100%; border-left: none; border-top: 1px solid var(--border-light); }
}

@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .category-grid { grid-template-columns: 1fr; }
    .page-grid { grid-template-columns: repeat(2, 1fr); }
}
