/* Archive Product Page - 产品归档页面样式 */
.site-main {
    background: #ffffff;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Page header */
.page-header {
    text-align: center;
    padding: 60px 40px;
    background: #ffffff;
    margin-bottom: 30px;
}

.page-title {
    font-size: 36px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 16px;
    line-height: 1.2;
}

.page-description {
    font-size: 16px;
    color: #666666;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto 20px;
}

/* Main content layout */
.main-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Left sidebar */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 20px;
}

.category-section,
.filter-section {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.category-title,
.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    padding: 15px 20px;
    background: #f8f9fa;
    margin: 0;
    border-bottom: 1px solid #e5e5e5;
}

.category-list {
    padding: 10px 0;
}

.category-item {
    margin: 0;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666666;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 20px;
    transition: all 0.2s ease;
}

.category-link:hover {
    background: #f8f9fa;
    color: #333333;
}

.category-name {
    flex: 1;
}

.category-count {
    color: #999999;
    font-size: 12px;
}

/* Category groups */
.category-group {
    margin-bottom: 20px;
}

.category-group-title {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    padding: 8px 20px;
    background: #f0f0f0;
    border-bottom: 1px solid #e5e5e5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sub-category styles */
.sub-category .category-link {
    padding-left: 30px;
    font-size: 15px;
}

.sub-category .category-name {
    color: #555555;
}

.sub-category .category-count {
    color: #888888;
    font-size: 11px;
}

/* Third-level category styles */
.sub-sub-category .category-link {
    padding-left: 50px;
    font-size: 14px;
}

.sub-sub-category .category-name {
    color: #777777;
}

.sub-sub-category .category-count {
    color: #aaaaaa;
    font-size: 10px;
}

/* Parent category styles */
.parent-category {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
}

.parent-category .category-name {
    color: #333333;
    font-weight: 600;
    font-size: 14px;
}

.parent-category .category-count {
    color: #666666;
    font-size: 12px;
}

.no-categories {
    text-align: center;
    color: #999999;
    font-style: italic;
    padding: 20px;
    font-size: 14px;
}

/* Content area */
.content-area {
    flex: 1;
    min-width: 0;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    margin-bottom: 60px;
    border-top: 1px solid #e5e5e5;
    padding-top: 30px;
    max-height: calc(2 * (100vw / 4 * 0.8) + 200px);
}

.product-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* Category badge */
.product-category-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
}

.badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 3px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.badge.category {
    background: #4a90e2;
    color: white;
}

.badge.out-of-stock {
    background: #dc3545;
    color: white;
}

/* Product image */
.product-image-container {
    aspect-ratio: 1 / 1;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
}

.product-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #cccccc;
    height: 100%;
    gap: 8px;
}

.placeholder-text {
    font-size: 12px;
    font-weight: 500;
}

/* Product info */
.product-info {
    padding: 16px;
}

.product-name {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 6px;
    height: 39px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name a {
    color: #333333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.product-name a:hover {
    color: #4a90e2;
}

.product-sku {
    font-size: 12px;
    color: #999999;
    margin-bottom: 8px;
}

/* Product price */
.product-price {
    margin-bottom: 12px;
}

.price-range,
.price-single {
    font-size: 16px;
    font-weight: 600;
    color: #333333;
    display: block;
}

.price-contact {
    font-size: 14px;
    color: #666666;
    font-style: italic;
}

.product-actions {
    display: flex;
    justify-content: center;
}

.product-detail-btn {
    background: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    display: block;
    text-align: center;
    width: 100%;
}

.product-detail-btn:hover {
    background: #357abd;
    color: white;
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.pagination-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-container a,
.pagination-container span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    text-decoration: none;
    color: #666666;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pagination-container a:hover,
.pagination-container .current {
    background: #333333;
    color: white;
    border-color: #333333;
}

/* No products */
.no-products {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.no-products-content {
    text-align: center;
    color: #666666;
}

.no-products-content svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-products-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333333;
}

.no-products-content p {
    margin-bottom: 20px;
    font-size: 16px;
}

.reset-filters-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #4a90e2;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.reset-filters-btn:hover {
    background: #357abd;
}

/* Responsive design */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .category-list {
        display: none;
    }
    
    .category-section {
        cursor: pointer;
    }
    
    .category-section.expanded .category-list {
        display: block;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }
    
    .category-title::after {
        content: '▼';
        float: right;
        transition: transform 0.3s ease;
    }
    
    .category-section.expanded .category-title::after {
        transform: rotate(180deg);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .page-header {
        padding: 40px 20px;
    }
    
    .page-title {
        font-size: 28px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
    }
    
    .sidebar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(1, 1fr);
        gap: 0;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .pagination-container a,
    .pagination-container span {
        min-width: 35px;
        height: 35px;
        font-size: 13px;
    }
}
