/* 通用样式 */
.container {
    width: 1190px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

/* 顶部导航样式 */
.top-bar {
    background-color: #f5f5f5;
    border-bottom: 1px solid #e5e5e5;
    height: 35px;
    line-height: 35px;
    font-size: 12px;
    color: #666;
}

.top-bar .container {
    display: flex;
    justify-content: right;
    /* justify-content: space-between; */
}
 
 

.top-links {
    display: flex;
    gap: 15px;
}

.top-link-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
    padding: 0 5px;
    position: relative;
}

.top-link-item:hover {
    color: #ff6700;
}

.top-link-item i {
    font-size: 14px;
}

/* 分隔线 */
.top-link-item:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 1px;
    height: 12px;
    background-color: #ddd;
    margin-left: 15px;
    vertical-align: middle;
}

/* 购物车数量提示 */
.top-link-item.cart-link {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.cart-count {
    position: absolute;
    top: 2px;
    left: 12px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background-color: #ff6700;
    color: #fff;
    border-radius: 8px;
    padding: 0 4px;
    font-size: 12px;
    font-weight: bold;
    transform: scale(0.8);
}

.cart-link i {
    margin-right: 5px;
}

/* 头部搜索区域 */
.header {
    height: 80px;
    background: #fff;
}

/* 40px */
.logo {
    margin-left: 20px;
    width: 190px;
    height: auto;
    flex-shrink: 0; /* 防止 logo 被压缩 */
}

.logo img {
    display: block;
    width: 118px; /* 图片宽度占满父容器 */
    height: 44px; /* 保持图片比例 */
}

.header .container {
    display: flex;
    align-items: center;
    /* justify-content: space-between; 让 logo 和 search 分别靠左和居中 */
    height: 100%;
    padding: 20px 0;
}
.search {
    flex-grow: 1; /* 占据剩余空间 */
    /* margin-left: auto; 搜索框靠右对齐 */
    display: flex;
    /* justify-content: center; 在剩余空间内居中 */
    align-items: center;
}

.search input {
    flex-grow: 1; /* 占据剩余空间 */
    height: 36px;
    padding: 0 10px;
    border: 2px solid #e1251b;
    font-size: 14px;
    outline: none; /* 去掉默认的焦点样式 */
    margin-right: 10px;
}

.search-btn {
    flex-shrink: 0; /* 防止按钮被压缩 */
    width: 200px;
    height: 36px;
    background: #e1251b;
    color: #fff;
    border: none;
    cursor: pointer;
} 


/* 添加以下样式 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;  /* 确保最小高度为视窗高度 */
}

.main-content {
    flex: 1;  /* 主内容区域自动填充剩余空间 */
}



/* 主内容区样式 */
.content-wrapper {
    display: flex;
    /* margin-top: 10px; */
    gap: 10px;
}

/* 左侧分类菜单 */
.category-wrapper {
    width: 190px;
    background: #fff;
}

.category-title   {
    background: #e1251b !important;
}
 
/* 轮播图样式 */
.main-banner {
    background-color: #fff;
    padding: 10px 0;
}

.main-banner .container {
    display: flex;
    gap: 10px;
}

/* 轮播图相关样式 */
.banner {
    width: 690px;
    height: 420px;
    position: relative;
}

.banner-slider {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.slider-wrapper {
    display: flex;
    width: 400%;
    height: 100%;
    transition: transform 0.5s ease;
}

.slider-item {
    display: flex;
    width: 25%;
    height: 100%;
    justify-content: center;  
    align-items: center;
}

.slider-item img {    
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* 右侧用户信息容器 */
.user-info-container {
    width: 290px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 用户信息区域 */
.user-profile {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.avatar {
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.welcome {
    color: #666;
    margin-bottom: 10px;
}

.login-btns {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.login-btns a {
    padding: 5px 15px;
    border-radius: 15px;
    text-decoration: none;
}

.btn-login {
    background: #e1251b;
    color: #fff;
}

.btn-register {
    background: #fff;
    color: #e1251b;
    border: 1px solid #e1251b;
}

/* 收藏关注区域 */
.user-collect {
    display: flex;
    padding: 15px 0;
    text-align: center;
}

.collect-item {
    flex: 1;
    border-right: 1px solid #eee;
}

.collect-item:last-child {
    border-right: none;
}

.collect-item .num {
    display: block;
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.collect-item .text {
    font-size: 12px;
    color: #999;
}

/* 商品区域样式 */
.product-section {
    /* margin-top: 5px; */
    padding: 20px 0;
    background: #fff;
}

.section-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e8e8;
}

.section-title h2 {
    font-size: 20px;
    color: #333;
    font-weight: bold;
}

/* 商品列表样式 */
.product-list {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;  /* 抵消商品项的外边距 */
}

/* 商品项样式 */
.product-item {
    width: calc(20% - 20px);  /* 每行5个商品 */
    min-width: 200px;
    margin: 10px;
    padding: 15px;
    background: #fff;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    cursor: pointer;  /* 添加鼠标手型 */
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 商品图片容器 */
.product-img {
    position: relative;
    padding-bottom: 100%;  /* 1:1 比例 */
    overflow: hidden;
}

.product-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 商品信息样式 */
.product-info {
    padding-top: 10px;
}

.product-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    height: 40px;
    line-height: 20px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    color: #e1251b;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.product-price .symbol {
    font-size: 14px;
}




/* 右侧用户信息区域 */
.user-info {
    width: 250px;
    background: #fff;
    padding: 15px;
    border-radius: 4px;
}



/* 用户信息区域样式 */
.user-header {
    text-align: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 15px;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 10px;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-welcome {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.user-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-login,
.btn-register {
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
}

.btn-login {
    background: #e1251b;
    color: #fff;
    border: none;
}

.btn-register {
    background: #fff;
    color: #e1251b;
    border: 1px solid #e1251b;
}

/* 公告区域 */
.notice {
    padding: 15px 0;
}

.notice-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.notice-list {
    font-size: 12px;
    color: #666;
}

.notice-item {
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notice-item a {
    color: #666;
    text-decoration: none;
}

.notice-item a:hover {
    color: #e1251b;
}

 

 