/* 产品页面专用样式 */

/* 面包屑导航 */
.breadcrumb {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #6c757d;
}

/* 页面标题 */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 42px;
    margin-bottom: 20px;
    font-weight: bold;
}

.page-header p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* 产品中心布局 */
.product-center-section {
    padding: 40px 0 80px 0;
    background: white;
}

.product-center-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* 左侧分类导航 */
.product-sidebar {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    position: sticky;
    top: 20px;
}

.sidebar-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    text-align: center;
    position: relative;
    cursor: default; /* Not clickable on desktop */
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.toggle-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: transform 0.3s ease;
    display: none; /* Hidden by default on desktop */
}

.sidebar-header.collapsed .toggle-icon {
    transform: translateY(-50%) rotate(-90deg);
}

.category-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-nav li {
    border-bottom: 1px solid #e9ecef;
}

.category-nav li:last-child {
    border-bottom: none;
}

.category-nav a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.category-nav a:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    transform: translateX(5px);
}

.category-nav .active {
    background-color: var(--background-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

/* 右侧产品展示 */
.product-main {
    flex: 1;
}

/* 产品统计信息 */
.product-count {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.product-grid-display {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.product-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-image {
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px 10px;
    text-align: center;
}

.product-info h3 {
    margin: 0 0 5px 0;
    font-size: 15px;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.3;
}

.product-model {
    margin: 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

.product-item:hover .product-info h3 {
    color: var(--secondary-color);
}

/* 空状态样式 */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    color: #999;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 14px;
    color: #aaa;
}

/* 产品淡入动画 */
.product-item.fade-in {
    animation: fadeInProduct 0.4s ease forwards;
}

@keyframes fadeInProduct {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 分页导航 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    padding: 10px 15px;
    background: white;
    color: #333;
    text-decoration: none;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.page-btn:hover:not(.disabled):not(.current) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

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

.page-btn.disabled {
    color: #999;
    cursor: not-allowed;
    background: #f8f9fa;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

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

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


/* 产品筛选动画 */
.product-item.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-item {
    transition: all 0.3s ease;
}

/* 空状态样式 */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: #333;
    margin: 0 0 10px 0;
}

.empty-state p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* 产品数量显示 */
.product-count {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    padding: 0 5px;
}

/* 搜索框样式（如果需要） */
.product-search {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 20px;
}

.product-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

/* 分类导航active状态优化 */
.category-nav .active {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-left-color: var(--secondary-color) !important;
    transform: translateX(5px);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .product-center-layout {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }
    
    .product-grid-display {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 32px;
    }
    
    .page-header p {
        font-size: 16px;
    }
    
    .product-center-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-sidebar {
        position: static;
        order: -1;
    }
    
    /* 移动端折叠功能 */
    .sidebar-header {
        cursor: pointer; /* Clickable on mobile */
    }
    
    .toggle-icon {
        display: block;
    }
    
    .category-nav {
        max-height: 400px;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    
    .category-nav.collapsed {
        max-height: 0;
    }
    
    .sidebar-header h3 {
        font-size: 16px;
    }
    
    .category-nav a {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    /* 保持手机端产品一行两个 */
    .product-grid-display {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 10px 8px;
    }
    
    .product-info h3 {
        font-size: 13px;
        line-height: 1.2;
    }
    
    .product-model {
        font-size: 11px;
    }
    
    /* 移动端统计信息 */
    .product-count {
        font-size: 14px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .product-center-section,
    .product-features {
        padding: 30px 0 50px 0;
    }
    
    .page-header {
        padding: 40px 0;
    }
    
    .page-header h1 {
        font-size: 28px;
    }
    
    .product-features h2 {
        font-size: 28px;
    }
    
    /* 小屏幕仍保持一行两个产品 */
    .product-grid-display {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-image {
        height: 160px;
    }
    
    .product-info {
        padding: 8px 6px;
    }
    
    .product-info h3 {
        font-size: 12px;
        line-height: 1.3;
    }
    
    .product-model {
        font-size: 10px;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .category-nav a {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    /* 小屏幕统计信息进一步优化 */
    .product-count {
        font-size: 13px;
        margin-bottom: 15px;
    }
}