/* 列表页面专用样式 */

/* 主要内容区域 */
.main-content {
    padding: 40px 0 80px;
    background: #f8fafc;
    min-height: calc(100vh - 200px);
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
}

.page-title h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.page-title p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

/* 筛选控件 */
.filter-controls {
    display: flex;
    gap: 16px;
    align-items: center;
}

.filter-select,
.sort-select {
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.filter-select:hover,
.sort-select:hover {
    border-color: #6366f1;
}

.filter-select:focus,
.sort-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 60px;
}

/* 产品卡片 */
.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

/* 产品图片 */
.product-image {
    height: 220px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 产品标签 */
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.product-badge:nth-of-type(2) {
    background: linear-gradient(135deg, #10b981, #059669);
}

.product-badge:nth-of-type(3) {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.product-badge:nth-of-type(4) {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

/* 产品信息 */
.product-info {
    padding: 24px;
}

.product-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.product-desc {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

/* 产品元信息 */
.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: #6366f1;
}

.rating {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating i {
    color: #fbbf24;
    font-size: 14px;
}

.rating span {
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    margin-left: 4px;
}

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


/* 响应式设计 */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .filter-controls {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .main-content {
        padding: 20px 0 60px;
    }
    
    .page-title h1 {
        font-size: 24px;
    }
    
    .filter-controls {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    
    .filter-select,
    .sort-select {
        width: 100%;
    }
    
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: 20px;
    }
    
    .pagination {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .pagination-btn {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .page-header {
        margin-bottom: 24px;
    }
    
    .page-title h1 {
        font-size: 20px;
    }
    
    .page-title p {
        font-size: 14px;
    }
    
    .product-info h3 {
        font-size: 18px;
    }
    
    .product-desc {
        font-size: 13px;
    }
    
    .price {
        font-size: 16px;
    }
    
    .pagination-dots {
        display: none;
    }
}

/* 加载动画 */
.products-grid.loading {
    opacity: 0.6;
    pointer-events: none;
}

.products-grid.loading .product-card {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #6b7280;
}

.empty-state i {
    font-size: 64px;
    color: #d1d5db;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 24px;
    color: #374151;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 32px;
}