/* 电脑硬件销售网站 - 样式文件 */

:root {
    /* 主色调 */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    
    /* 辅助色 */
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    
    /* 中性色 */
    --dark-color: #1f2937;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --light-color: #ffffff;
    
    /* 主题色 */
    --gaming-color: #dc2626;
    --workstation-color: #059669;
    --budget-color: #ea580c;
    --rgb-color: #7c3aed;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* 过渡 */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* 字体 */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    background: #f8fafc;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* 容器 */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

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

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

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

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

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

#startBuildingBtn {
    padding: 1rem 2.25rem;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

#startBuildingBtn:hover {
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-block {
    width: 100%;
}

/* 导航栏 - 固定顶部，确保滚动时始终可见 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    min-height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 0;
    flex-shrink: 0;
}

.nav-logo i {
    font-size: 1.75rem;
    color: var(--primary-color);
    line-height: 1;
    flex-shrink: 0;
}

.nav-logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-left: 0.25rem;
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-fast);
    white-space: nowrap;
    line-height: 1.2;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-right: 0;
}

.cart-count {
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-full);
    margin-left: 0.25rem;
}

/* 主内容区 - 为固定导航栏留出顶部间距 */
.main-content {
    padding-top: calc(70px - 0.8cm);
}

/* 购物车侧边栏 */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: white;
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    transition: right var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.btn-close:hover {
    color: var(--gray-700);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-400);
}

.cart-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.cart-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.total-price {
    color: var(--primary-color);
}

/* 英雄区域 */
.hero-section {
    min-height: calc(100vh - 130px);
    width: 100%;
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: calc(4rem - 0.8cm) 2rem 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-left: 2rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    max-width: 500px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    min-width: 0;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all var(--transition-normal);
    text-align: center;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-item i {
    font-size: 2rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
}

.stat-item h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    white-space: nowrap;
}

.stat-item p {
    color: var(--gray-600);
    font-size: 0.875rem;
    white-space: nowrap;
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pc-showcase {
    position: relative;
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1;
    margin: 0 auto;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 2.5rem 2rem 2rem; overflow: visible;
}

.pc-part {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    position: relative;
    cursor: pointer;
    border: 1px solid var(--gray-100);
}

.pc-part:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(59, 130, 246, 0.2);
}

.pc-part.cpu:hover { box-shadow: var(--shadow-xl), 0 0 20px rgba(59, 130, 246, 0.25); }
.pc-part.gpu:hover { box-shadow: var(--shadow-xl), 0 0 20px rgba(139, 92, 246, 0.25); }
.pc-part.ram:hover { box-shadow: var(--shadow-xl), 0 0 20px rgba(245, 158, 11, 0.25); }
.pc-part.storage:hover { box-shadow: var(--shadow-xl), 0 0 20px rgba(16, 185, 129, 0.25); }

.pc-part i {
    font-size: 2rem;
    color: var(--primary-color);
    padding: 1rem;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-lg);
}

.pc-part::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.pc-part:hover::after {
    opacity: 1;
}

/* 分区标题 */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* 装机配置器 - 标题与内容左右边界协调 */
.builder-section {
    position: relative;
    padding: calc(6rem + 2cm - 0.8cm) 2rem 4rem;
    margin: 0 auto 2rem;
    width: 100%;
    max-width: 1400px;
    box-sizing: border-box;
}

.builder-section .section-header {
    margin-bottom: 3rem;
    padding: 0 1rem;
    max-width: 100%;
}

.builder-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2.5rem 2rem 2rem; overflow: visible;
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.05);
    border: 1px solid var(--gray-200);
    align-items: stretch;
    min-height: min(680px, calc(100vh - 260px));
    box-sizing: border-box;
}

/* 硬件选择器 */
.hardware-selector {
    display: flex;
    flex-direction: column;
    padding: 0 1rem;
    border-right: 1px solid var(--gray-200);
    min-height: 0;
}

.selector-tabs {
    flex-shrink: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
    overflow-x: auto;
}

.tab-btn {
    flex-shrink: 0;
    padding: 0.6rem 1rem;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-md);
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--gray-200);
}

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

.hardware-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 0;
    overflow-y: auto;
}

.hardware-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.hardware-item:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.hardware-item.selected {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.hardware-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-md);
}

.hardware-icon i,
.hardware-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.hardware-icon i {
    font-size: 1.5rem;
    color: var(--primary-color);
}
.hardware-icon img {
    flex-shrink: 0;
}

.hardware-info {
    flex: 1;
}

.hardware-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.hardware-specs {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.hardware-price {
    font-weight: 700;
    color: var(--primary-color);
}

.hardware-brand-clickable {
    cursor: pointer;
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}
.hardware-brand-clickable:hover {
    color: var(--primary-dark);
}

/* 硬件缩略图预览弹窗 */
.hardware-preview-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}
.hardware-preview-overlay.open {
    opacity: 1;
    visibility: visible;
}
.hardware-preview-modal {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    position: relative;
}
.hardware-preview-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    color: var(--gray-600);
}
.hardware-preview-close:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}
.hardware-preview-thumb {
    width: 100%;
    aspect-ratio: 16/10;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hardware-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.hardware-preview-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}
.hardware-preview-specs {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}
.hardware-preview-brand {
    font-size: 0.85rem;
    color: var(--gray-500);
}
.hardware-preview-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

/* 配置摘要 - 完整显示右侧内容 */
.config-summary {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    padding: 1rem 1.25rem;
    background: transparent;
    border-radius: var(--radius-lg);
    min-height: 0;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    box-sizing: border-box;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    flex-shrink: 0;
    padding: 0.6rem 1rem;
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.summary-header h3 {
    font-size: 1rem;
}

.config-actions,
.config-actions-top {
    display: flex;
    gap: 0.75rem;
}

.config-actions-top {
    flex-direction: row;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.config-actions-top .btn {
    flex: 1;
    min-width: 0;
}

.config-actions .btn {
    width: 100%;
}

.config-details {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.config-item {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) 52px 32px;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
    border: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.config-item .component-header {
    grid-column: 1;
}

.config-item .component-selected {
    grid-column: 2;
}

.config-item .component-price {
    grid-column: 3;
    justify-self: end;
}

.config-item .config-item-cancel {
    grid-column: 4;
    justify-self: end;
}

.config-item .component-header span {
    font-size: 0.8rem;
}

.config-item .component-selected {
    font-size: 0.8rem;
}

.config-item .component-price {
    font-size: 0.8rem;
}

.config-item-cancel {
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    color: var(--gray-400);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.config-item-cancel:hover {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.component-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.component-header span {
    white-space: nowrap;
}

.component-header i,
.component-header .component-icon {
    color: var(--primary-color);
    flex-shrink: 0;
}
.component-header .component-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}
.sub-label .sub-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.component-selected {
    min-width: 0;
    color: var(--gray-700);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.component-price {
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
}

.config-total {
    background: white;
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--gray-200);
    flex-shrink: 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--gray-200);
}

.total-row:last-child {
    border-bottom: none;
}

.total-row .total-amount {
    min-width: 60px;
    text-align: right;
}

.grand-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* 兼容性检查紧凑 */
.config-summary .compatibility-check {
    padding: 0.5rem 0;
    flex-shrink: 0;
}

.config-summary .compatibility-check h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.config-summary .compatibility-check .compat-item {
    padding: 0.25rem 0;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compat-item.compatible i { color: var(--success-color); }
.compat-item.warning i { color: var(--warning-color); }
.compat-item.incompatible i { color: var(--danger-color); }

/* 外设展开区域 */
.config-item-expandable .component-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-item-expandable #selectedPeripheralsSummary {
    grid-column: 2;
}

.config-item-expandable #peripheralsTotalPrice {
    grid-column: 3;
    justify-self: end;
}

.config-item-expandable .peripherals-clear-btn {
    grid-column: 4;
    justify-self: end;
}

.config-item-expandable .peripherals-sub {
    grid-column: 1 / -1;
}

.peripherals-sub {
    width: 100%;
    padding: 0.5rem 0 0 1rem;
    border-left: 2px solid var(--gray-200);
    margin: 0.5rem 0 0 0.5rem;
}

.peripherals-sub.peripherals-collapsed {
    display: none;
}

.config-sub-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.8rem;
}

.config-sub-item .sub-label {
    flex: 0 0 52px;
    color: var(--gray-600);
}

.config-sub-item .sub-label i,
.config-sub-item .sub-label .sub-icon {
    margin-right: 0.25rem;
    color: var(--primary-color);
}

.config-sub-item .component-selected {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.config-sub-item .component-price {
    flex-shrink: 0;
    min-width: 48px;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--primary-color);
    text-align: right;
}

/* 页脚样式 */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 4rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

.footer-section h3 {
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section p {
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section ul li a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section ul li i {
    width: 20px;
    flex-shrink: 0;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gray-800);
    color: white;
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-note {
    font-size: 0.875rem;
    color: var(--gray-500);
    border-top: 1px solid var(--gray-800);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

/* 硬件商城 - 与装机配置器同宽 */
.products-section {
    padding: calc(6rem + 2cm - 0.8cm) 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
}

.products-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    color: var(--gray-700);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

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

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 上三下三，三列布局 */
    gap: 1.5rem;
    padding: 0 1rem;
}

.products-pagination-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 1rem;
    margin-top: 2rem;
    padding: 1rem;
}

.products-pagination-bar .pagination-label {
    color: var(--gray-600);
    font-size: 0.9rem;
}

.products-pagination-bar .pagination-size {
    padding: 0.35rem 0.75rem;
    min-width: 2.5rem;
}

.products-pagination-bar .pagination-pages {
    display: flex;
    gap: 0.35rem;
}

.products-pagination-bar .page-btn {
    padding: 0.35rem 0.65rem;
    min-width: 2rem;
    border-radius: var(--radius-sm);
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-200);
}

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

.product-image {
    height: 160px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem 2rem; overflow: visible;
}

.product-image i {
    font-size: 3rem;
    color: var(--primary-color);
}

.product-content {
    padding: 1.5rem;
}

.product-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.product-specs {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
}

/* 社区区块 - 左右边距与上面一致 */
.community-section {
    padding: calc(6rem + 2cm - 0.8cm) calc(6rem + 2cm - 0.8cm) 4rem;
    max-width: 1400px;
    margin: 0 auto;
}
.community-post { transition: box-shadow 0.2s; }
.community-post:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.08); }

/* 装机指南 - 独占一屏，左右与热门硬件同宽 */
.guides-section {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: calc(6rem + 2cm - 0.8cm) 2rem 4rem;
    background: var(--gray-50);
    margin: 0 auto;
    max-width: 1400px;
    box-sizing: border-box;
}

.guides-section .section-header {
    flex-shrink: 0;
}

.guides-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0 1rem;
    align-content: center;
    min-height: 0;
}

.guide-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem 2rem; overflow: visible;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-200);
    text-align: center;
}

.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.guide-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.guide-icon i {
    font-size: 1.5rem;
    color: white;
}

.guide-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.guide-card p {
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.guide-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.guide-link:hover {
    gap: 0.75rem;
    color: var(--primary-dark);
}

/* 热门预设配置 - 与热门硬件同宽 */
.presets-section {
    padding: calc(6rem + 2cm - 0.8cm) 2rem 4rem;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.presets-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 0 1rem;
}

.preset-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem 2rem; overflow: visible;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--gray-200);
    position: relative;
    text-align: center;
}

.preset-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.preset-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.preset-badge.budget {
    background: var(--budget-color);
}

.preset-badge.gaming {
    background: var(--gaming-color);
}

.preset-badge.workstation {
    background: var(--workstation-color);
}

.preset-badge.flagship {
    background: linear-gradient(135deg, #7c3aed, #8b5cf6);
}

.preset-badge.rgb {
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
}

.preset-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--gray-900);
}

.preset-specs {
    margin-bottom: 1.5rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    justify-content: center;
}

.spec-item i {
    color: var(--primary-color);
    width: 20px;
}

.preset-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .builder-container {
        grid-template-columns: 1fr;
    }
    
    .hardware-selector {
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer {
        padding: 3rem 1rem 1.5rem;
    }
    
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid,
    .guides-container,
    .presets-container {
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    .products-section,
    .guides-section,
    .presets-section,
    .builder-section {
        padding: 2rem 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
    }
    
    .products-filter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-btn {
        width: 100%;
    }
}

/* 首页四宫格图片样式 */
.pc-part img {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    border-radius: 8px;
}
