/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #ff6b6b;
    margin: 0;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #ff6b6b;
}

/* 搜索框样式 */
.search-section {
    background-color: #fff;
    padding: 20px 0;
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 4px 0 0 4px;
    outline: none;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #ff6b6b;
}

.search-btn {
    padding: 12px 25px;
    font-size: 16px;
    background-color: #ff6b6b;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #ff5252;
}

/* 轮播图样式 */
.banner-section {
    background-color: #ff6b6b;
    color: #fff;
    padding: 60px 0;
    margin-bottom: 30px;
}

.banner {
    text-align: center;
}

.banner h2 {
    font-size: 36px;
    margin-bottom: 15px;
}

.banner p {
    font-size: 18px;
    opacity: 0.9;
}

/* 分类样式 */
.category-section {
    margin-bottom: 40px;
}

.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.category-item {
    background-color: #fff;
    padding: 30px 20px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.category-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.category-item p {
    font-size: 14px;
    color: #666;
}

/* 商品列表样式 */
.recommend-section {
    margin-bottom: 40px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    height: 48px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.price-current {
    font-size: 20px;
    font-weight: bold;
    color: #ff6b6b;
    margin-right: 10px;
}

.price-original {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.product-reviews {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.review-stars {
    color: #ffc107;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-info h3 {
    font-size: 20px;
    margin-bottom: 15px;
}

.footer-info p {
    line-height: 1.8;
    opacity: 0.8;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-contact p {
    margin-bottom: 10px;
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.6;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .nav-link {
        font-size: 14px;
    }
    
    .banner h2 {
        font-size: 28px;
    }
    
    .banner p {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .search-box {
        flex-direction: column;
    }
    
    .search-input,
    .search-btn {
        border-radius: 4px;
    }
    
    .search-btn {
        margin-top: 10px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
}