/* PC端样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.logo {
    font-size: 32px;
    font-weight: bold;
    color: #e4393c;
    text-decoration: none;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #e4393c;
}

/* 搜索栏 */
.search {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.search-input {
    width: 500px;
    height: 40px;
    padding: 0 15px;
    border: 2px solid #e4393c;
    outline: none;
    font-size: 14px;
}

.search-button {
    width: 80px;
    height: 40px;
    background-color: #e4393c;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.search-button:hover {
    background-color: #c81623;
}

/* 轮播图 */
.slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 30px;
}

/* 商品分类 */
.categories {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.category-item {
    width: 180px;
    text-align: center;
    padding: 1px 0;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-item img {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
}

/* 商品列表 */
.product-section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e4393c;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 80px;
    height: 2px;
    background-color: #e4393c;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.product-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-image {
    width: 210px;
    height: 210px;
    object-fit: contain;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 16px;
    margin-bottom: 8px;
    height: 48px;
    overflow: hidden;
}

.product-seller {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.product-price {
    font-size: 18px;
    color: #e4393c;
    font-weight: bold;
}

.product-stock {
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

/* 广告位热卖推荐徽章 */
.product-item {
    position: relative;
}

.ad-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #e4393c;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

/* 商品名称链接样式 */
.product-name a {
    color: #333;
    text-decoration: none;
}

.product-name a:hover {
    color: #e4393c;
    text-decoration: none;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
}

.footer-column {
    width: 25%;
}

.footer-column h3 {
    font-size: 18px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #555;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-column a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #555;
    font-size: 14px;
    color: #999;
}

/* 个人中心左侧菜单样式 */
.user-menu {
    width: 200px;
    background-color: #fff;
    border-radius: 8px;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.user-menu-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e4393c;
    color: #333;
}

/* 菜单分类样式 */
.menu-category {
    margin-bottom: 15px;
}

.category-title {
    font-size: 15px;
    font-weight: bold;
    color: #333;
    padding: 8px 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
}

.category-title:hover {
    color: #e4393c;
}

.category-indicator {
    font-size: 12px;
    transition: transform 0.3s;
}

/* 折叠功能 */
.menu-category.collapsed .category-indicator {
    transform: rotate(-90deg);
}

.menu-category.collapsed .user-menu-list {
    display: none;
}

.user-menu-list {
    list-style: none;
    padding-left: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.user-menu-item {
    width: calc(50% - 4px);
    margin-bottom: 0;
}

.user-menu-link {
    display: block;
    padding: 8px 10px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s;
}

.user-menu-link:hover {
    background-color: #f5f5f5;
    color: #e4393c;
}

.user-menu-link.active {
    background-color: #f0f9ff;
    color: #e4393c;
    font-weight: bold;
}

.user-menu-link.active:hover {
    background-color: #e6f7ff;
}

/* 个人中心容器样式 */
.user-center-container {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

/* 右侧内容区域样式 */
.user-content {
    flex: 1;
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 0; /* 防止flex子元素溢出 */
}

/* 菜单分类样式 */
.menu-category {
    margin-bottom: 15px;
}

.category-title {
    font-size: 14px;
    font-weight: bold;
    color: #999;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
    cursor: pointer;
    user-select: none;
}

.category-title:hover {
    background-color: #f5f5f5;
    border-radius: 4px;
}

.category-indicator {
    float: right;
    transition: transform 0.3s;
}

.menu-category.collapsed .user-menu-list {
    display: none;
}

.menu-category.collapsed .category-indicator {
    transform: rotate(-90deg);
}
