/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

#app {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

h1 {
    font-size: 24px;
    color: #2c3e50;
}

nav a {
    text-decoration: none;
    color: #34495e;
    margin-left: 20px;
    font-size: 16px;
    transition: color 0.3s;
}

nav a:hover {
    color: #3498db;
}

/* 搜索栏样式 */
.search-bar {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.search-bar button {
    padding: 0 20px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-bar button:hover {
    background-color: #2980b9;
}

/* 筛选栏样式 */
.filter {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.filter span {
    font-weight: 500;
}

.filter button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.filter button:hover {
    border-color: #3498db;
    color: #3498db;
}

.filter button.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* 商品列表样式 */
.goods-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.goods-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.goods-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.goods-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.goods-info {
    padding: 15px;
}

.goods-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #2c3e50;
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.goods-price {
    font-size: 18px;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 8px;
}

.goods-meta {
    font-size: 14px;
    color: #7f8c8d;
    display: flex;
    justify-content: space-between;
}

/* 页脚样式 */
footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #app {
        padding: 10px;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    nav {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }
    
    nav a {
        margin-left: 0;
    }
    
    .goods-list {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}