/* 商品列表页面布局 */
.product-list-container {
    max-width: var(--max-width);
    margin: 100px auto 2rem; /* 增加顶部边距，避免被导航栏遮挡 */
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* 商品网格布局 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
}

.product-item:hover {
    transform: translateY(-4px);
}

.product-image {
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-toolbar{
    display: none;
}
.product-info {
    padding: 1rem;
    padding-bottom: 3rem; /* 调整底部空间 */
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制标题最多显示两行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-models {
    display: flex;
    padding: 0 0 5px 5px;
    gap: 0.5rem;
    flex-wrap: wrap;
    pointer-events: none; /* 防止标签影响卡片点击 */
}

.model-badge {
    padding: 0.3rem 0.8rem;
    background: var(--primary-color);
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

.category-badge {
    padding: 0.3rem 0.8rem;
    background: #333;
    color: #fff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.9;
}

.product-number {
    color: #888;
    font-size: 0.8rem;
}

.product-price {
    color: #e60012;
    font-weight: bold;
}

/* 分页样式 */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

.page-btn.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 左侧筛选栏样式 */
.filter-sidebar {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.filter-select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    outline: none;
}

.filter-select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/* 响应式调整 */
@media screen and (max-width: 1024px) {
    .product-list-container {
        grid-template-columns: 1fr;
    }

    .filter-sidebar {
        position: static;
        display: flex;
    }
}

/* 错误消息样式 */
.error-message {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: #e60012;
}

/* 无结果提示样式 */
.no-results {
    text-align: center;
    padding: 3rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.no-results p {
    color: #666;
    margin: 0.5rem 0;
}

.no-results .sub-text {
    font-size: 0.9rem;
    color: #999;
}

.product-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-item .product-info {
    padding: 1rem;
}

.product-item .product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #666;
} 
@media screen and (max-width: 768px) {
    .product-list-container{
        padding: 0 5px;
    }

   .product-grid{
    grid-template-columns: 1fr 1fr;
   }
   .filter-sidebar{
    border: 0;
    box-shadow: 0 0 0;
    padding: 0;
   }
   .filter-group h3{
    opacity: 0;
    position: absolute;
   }
   .filter-group{
    margin-bottom: 0;
   }
   .filter-select{
    font-size: 14px;
   }
   .product-item h3{
    font-size: 14px;
   }
   .product-item .product-info{
    padding: 5px
   }
   .product-grid{
    gap:1rem;
   }
   .product-item{
    border: 0;
    
   }.product-image{
    height: 150px;
   }
   
}