/* 重置默认样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    color: #333;
    line-height: 1.6;
}

/* 页头样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo h1 {
    font-size: 24px;
    color: #ff6700;
}

.logo p {
    font-size: 14px;
    color: #666;
}

/* 导航栏样式 */
nav {
    background-color: #333;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
}

/* 面包屑导航 */
.breadcrumb {
    background: #f5f5f5;
    padding: 10px 0;
    margin-bottom: 20px;
}

.breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.breadcrumb a {
    color: #666;
}

.breadcrumb span {
    color: #ff6700;
}

/* 内容区样式 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 分类页头部 */
.category-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 40px 0;
    background: #f5f5f5;
    border-radius: 4px;
}

.category-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.category-header p {
    color: #666;
    font-size: 16px;
}

/* 分类筛选 */
.filter-section {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.filter-group {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-label {
    width: 80px;
    color: #999;
    flex-shrink: 0;
}

.filter-options {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-options a {
    padding: 5px 15px;
    color: #666;
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.filter-options a:hover,
.filter-options a.active {
    color: #fff;
    background: #ff6700;
}

/* 排序工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.sort-options {
    display: flex;
    gap: 20px;
}

.sort-options a {
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sort-options a:hover,
.sort-options a.active {
    color: #ff6700;
}

.arrow-down {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 2px;
}

.view-options {
    display: flex;
    align-items: center;
    gap: 15px;
}

.total {
    color: #999;
    font-size: 14px;
}

.icon-grid,
.icon-list {
    width: 20px;
    height: 20px;
    display: inline-block;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.icon-grid.active,
.icon-list.active,
.icon-grid:hover,
.icon-list:hover {
    opacity: 1;
}

/* 分类导航样式 */
.category-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.category-item {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.category-image {
    position: relative;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.category-item:hover .category-image img {
    transform: scale(1.05);
}

.category-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
}

.tag {
    padding: 4px 8px;
    border-radius: 2px;
    font-size: 12px;
    color: #fff;
}

.tag.hot {
    background: #ff4d4f;
}

.tag.new {
    background: #52c41a;
}

.tag.discount {
    background: #faad14;
}

.tag.promotion {
    background: #722ed1;
}

.tag.gift {
    background: #13c2c2;
}

.category-content {
    padding: 20px;
}

.category-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6700;
}

.category-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.stat {
    font-size: 12px;
    color: #999;
}

.category-content ul {
    list-style: none;
}

.category-content ul li {
    margin-bottom: 10px;
}

.category-content ul li a {
    display: block;
    padding: 8px 15px;
    background: #f5f5f5;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.category-content ul li a:hover {
    background: #ff6700;
    color: #fff;
}

/* 热门商品推荐 */
.hot-products {
    margin-top: 40px;
}

.hot-products h3 {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff6700;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-item {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-info h4 {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-rating {
    margin-bottom: 10px;
}

.stars {
    color: #faad14;
}

.rating-count {
    font-size: 12px;
    color: #999;
    margin-left: 5px;
}

.product-price {
    margin-bottom: 10px;
}

.price {
    font-size: 20px;
    color: #ff6700;
    font-weight: bold;
}

.original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-left: 5px;
}

.product-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.btn {
    display: block;
    width: 100%;
    padding: 10px 0;
    background: #ff6700;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #f25807;
}

/* 加载更多 */
.load-more {
    text-align: center;
    margin-top: 30px;
}

.btn-load-more {
    padding: 12px 30px;
    background: #fff;
    border: 1px solid #ff6700;
    color: #ff6700;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: #ff6700;
    color: #fff;
}

/* 页脚样式 */
footer {
    background-color: #f5f5f5;
    padding: 40px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-nav {
    margin-bottom: 20px;
}

.copyright {
    color: #666;
    font-size: 14px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    .user-menu {
        margin-top: 10px;
    }

    nav ul {
        flex-direction: column;
    }

    nav li {
        width: 100%;
        text-align: center;
    }

    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-label {
        margin-bottom: 10px;
    }

    .toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .sort-options {
        width: 100%;
        justify-content: space-between;
    }

    .view-options {
        width: 100%;
        justify-content: space-between;
    }

    .category-nav,
    .product-list {
        grid-template-columns: 1fr;
    }

    .category-header {
        padding: 20px 0;
    }

    .product-stats {
        flex-direction: column;
        gap: 5px;
    }
} 