/* 商品列表页样式 */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    gap: 15px;
}

.page-header h1 {
    font-size: 18px;
}

.search-form {
    display: flex;
    gap: 8px;
    flex: 1;
    max-width: 100%;
}

.search-form input {
    flex: 1;
    min-width: 0;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 13px;
}

.search-form button {
    padding: 8px 16px;
    background: #ff6b9d;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
}

.content-wrapper {
    display: flex;
    gap: 20px;
}

.sidebar {
    width: 160px;
    flex-shrink: 0;
}

.sidebar h3 {
    font-size: 14px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff6b9d;
}

.category-menu {
    list-style: none;
}

.category-menu li a {
    display: block;
    padding: 8px 0;
    color: #666;
    font-size: 13px;
    transition: color 0.3s;
}

.category-menu li a:hover,
.category-menu li a.active {
    color: #ff6b9d;
}

.product-area {
    flex: 1;
    min-width: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.product-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #fafafa;
}

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

.product-info {
    padding: 10px;
}

.product-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-desc {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    color: #ff6b9d;
    font-size: 14px;
    font-weight: bold;
}

.product-sales {
    font-size: 11px;
    color: #999;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.pagination a {
    padding: 6px 12px;
    background: #fff;
    border-radius: 6px;
    color: #666;
    font-size: 13px;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #fff0f5;
    color: #ff6b9d;
}

.pagination a.active {
    background: #ff6b9d;
    color: #fff;
}

.pagination .prev, .pagination .next {
    padding: 6px 14px;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: stretch;
        padding: 15px 0;
    }
    
    .page-header h1 {
        font-size: 16px;
    }
    
    .search-form {
        max-width: 100%;
    }
    
    .content-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        display: none;
    }
    
    .sidebar.show {
        display: block;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-image {
        height: 130px;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .product-name {
        font-size: 12px;
    }
    
    .product-desc {
        display: none;
    }
    
    .pagination a {
        padding: 5px 10px;
        font-size: 12px;
    }
}

@media screen and (max-width: 375px) {
    .product-grid {
        gap: 8px;
    }
    
    .product-image {
        height: 110px;
    }
}
