body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f5;
}
a {
    text-decoration: none;
    color: inherit;
}

a:hover, a:visited, a:active, a:link {
    text-decoration: none;
    color: inherit;
}
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 50px 0;
    box-sizing: border-box;
    width: 100%;
    position: relative;
}

/* 顶部导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #fff;
    display: flex;
    align-items: center;
    padding: 0 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    z-index: 1000;
    max-width: 640px;
    margin: 0 auto;
}

.header-left {
    width: 40px;
}

.header-center {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.header-right {
    width: 40px;
    display: flex;
    justify-content: flex-end;
}

/* 热销标题图标 */
.hot-title-banner {
    width: 100%;
    height: 120px;
    margin: 0 0 15px;
    background: url('../images/hot-banner.jpg') no-repeat center;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* 商品列表 */
.product-list {
    background: #fff;
    margin: 0 12px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.product-item {
    display: flex;
    padding: 15px;
    border-bottom: 1px solid #f5f5f5;
    position: relative;
    background: #fff;
    transition: all 0.3s ease;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.product-image {
    width: 150px;
    height: 150px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-tag {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 20px;
    color: #fff;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
}

.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #A9A9A9);
}

.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #8B4513);
}

.rank-other {
    background: linear-gradient(135deg, #808080, #696969);
}

.product-info {
    flex: 1;
    margin-left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 150px;
}

.product-name {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
    line-height: 1.4;
}

.product-tag {
    display: inline-block;
    padding: 2px 6px;
    background: #fff1f0;
    color: #ff4d4f;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 8px;
}

.price-info {
    margin-bottom: 8px;
}

.current-price {
    color: #ff0000;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(255,0,0,0.1);
}

.original-price {
    color: #999;
    font-size: 14px;
    text-decoration: line-through;
    margin-left: 8px;
}

.sales-count {
    color: #999;
    font-size: 12px;
    margin-left: 8px;
    display: inline-block;
}

.buy-button {
    width: 100%;
    padding: 10px 0;
    background: linear-gradient(135deg, #ff4d4f, #ff7875);
    color: #fff;
    border-radius: 22px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    box-shadow: 0 2px 8px rgba(255,77,79,0.4);
    transition: all 0.3s ease;
    margin-top: 5px;
    text-align: center;
}

.buy-button:active {
    transform: scale(0.95);
    box-shadow: 0 1px 3px rgba(255,77,79,0.2);
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    z-index: 100;
    max-width: 640px;
    margin: 0 auto;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 20%;
}

.bottom-nav .nav-item .nav-icon {
    font-size: 20px;
    color: #666;
    margin-bottom: 4px;
    display: block;
    text-align: center;
    width: 100%;
    max-width: 20px;
    max-height: 20px;
    margin: 0 auto 4px;
}

/* 确保所有SVG图标在非激活状态下颜色一致 */
.bottom-nav .nav-item svg path {
    fill: #666;
}

/* 为img类型的SVG图标设置颜色 */
.bottom-nav .nav-item .nav-icon {
    color: #666;
    filter: invert(42%) sepia(0%) saturate(0%) hue-rotate(143deg) brightness(95%) contrast(92%);
}

.bottom-nav .nav-item span {
    font-size: 12px;
    color: #666;
    text-align: center;
}

.bottom-nav .nav-item.active .nav-icon,
.bottom-nav .nav-item.active span {
    color: #ff4d4f;
}

.bottom-nav .nav-item.active .nav-icon {
    color: #ff4d4f;
    filter: invert(39%) sepia(79%) saturate(2449%) hue-rotate(328deg) brightness(100%) contrast(98%);
}

.bottom-nav .nav-item.active svg path {
    fill: #ff4d4f;
    /* 确保激活状态下SVG图标颜色覆盖默认颜色 */
    transition: fill 0.2s ease;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 70px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: #666;
    font-size: 20px;
    cursor: pointer;
    display: none;
}