﻿:root {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --text-color: #2d3436;
    --light-gray: #f8f9fa;
}

*{margin: 0; padding: 0; box-sizing: border-box;}
.text-center::after{content: ' '; display: inline-block; width: 0; height: 100%; vertical-align: middle;}
body{font-size: 15px; background-color: #fafafa; font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; color: var(--text-color); padding-bottom: 70px;}
.clearfix::after{ content:""; display:block; clear:both;}
.service{width: 100%; max-width: 640px; height: 100%; position: fixed; left: 0; right: 0; margin:auto; display: flex; flex-direction: column; background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.1);}
.pc-service{width: 372px; height: 100%; display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column;}
.msg-head{height: 56px; background: linear-gradient(to right, #1e3c72, #2a5298); border: none; color: #fff; font-size: 18px; text-align: center; position: relative; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 4px rgba(0,0,0,0.1);}
.msg-head a{width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; position: absolute; left: 8px; text-decoration: none; color: #fff; transition: transform 0.2s;}
.msg-head a:hover{transform: scale(1.1);}
.msg-head a i{font-size: 24px;}
.msg-head .tha{height: 20px; line-height:22px;}
.msg-head .thb{height:20px; line-height:20px; font-size:16px;}
.msg-box{flex: 1; background-color: #fff; padding: 16px; line-height: 1.5; overflow-y: auto; scroll-behavior: smooth;} 
.msg{margin-bottom: 16px; display: flex; align-items: flex-start;}
.msg:last-of-type{margin-bottom: 16px}
.msg .img1{width: 40px; height: 40px; border-radius: 50%; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.1);}
.msg .img2{width: 40px; height: 40px; border-radius: 50%; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.1); display: none;}
.msg .content{max-width: 70%; margin: 0 12px; padding: 12px 16px; border-radius: 18px; background-color: #f5f5f5; position: relative; box-shadow: 0 1px 2px rgba(0,0,0,0.05);}
.content .indicate{width: 0; height: 0; border: 12px solid; border-color: transparent; position: absolute; top: 5px;}
.msg .content .left-indicate{border-right-color: #fff;  left: -20px;}
.msg .content .right-indicate{display: none;}
.msg.on{flex-direction: row-reverse;}
.msg.on .img1{display: none;}
.msg.on .img2{display: block;}
.msg.on .content{background: linear-gradient(to right, #1e3c72, #2a5298); color: #fff;}
.msg.on .content .left-indicate{display: none;}
.msg.on .content .right-indicate{border-left-color: #2a5298; right: -20px; display: block;}
.msg-box p{margin-top: -6px}
input, textarea{border: none;} 
input:focus, textarea:focus{outline: none; outline-offset: 0;}
.msg-post{height: 64px; background-color: #fff; border-top: 1px solid rgba(0,0,0,0.05); padding: 12px; display: flex; align-items: center; gap: 12px;}
.msg-post textarea{resize: none; font-size: 15px; line-height: 1.5; padding: 8px 16px; flex: 1; border: 1px solid #eee; border-radius: 24px; background-color: #f8f8f8; transition: all 0.3s ease;}
.msg-post textarea:focus{background-color: #fff; border-color: #1e3c72; box-shadow: 0 0 0 3px rgba(30,60,114,0.1);}
.msg-post label{display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: all 0.3s ease;}
.msg-post label:hover{background-color: rgba(30,60,114,0.1);}
.msg-post label .iconfont{font-size: 24px;}
.msg-post input[type="file"]{display: none;}
.msg-post input[type="button"]{padding: 8px 24px; font-size: 15px; background: linear-gradient(to right, #1e3c72, #2a5298); border: none; border-radius: 24px; color: #fff; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 2px 4px rgba(30,60,114,0.2);}
.msg-post input[type="button"]:hover{transform: translateY(-1px); box-shadow: 0 4px 8px rgba(30,60,114,0.3);}
.msg-post .back{width: 50px; line-height: 38px; text-align: center; background-color: #35ace0; border-radius: 3px;}
.msg-post .back a{text-decoration:none; color:inherit;}

.service-box{flex: 1; font-size: 14px; background-color: #fff; overflow-y: auto;}
.user-box{padding: 16px;}
.user-box a{text-decoration:none; color:inherit;}
.user-list{height: auto; background-color: #fff; padding: 12px; display: flex; align-items: center; margin-bottom: 12px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); transition: all 0.3s ease;}
.user-list:hover{transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08);}
.user-list img{width: 48px; height: 48px; border-radius: 50%; object-fit: cover;}
.user-list .user{margin-left: 12px; flex: 1;}
.user-list .user .name{font-size: 16px; color: #333; font-weight: 500;}
.user-list .user .name .ison{margin-left: 8px; font-size: 13px; color: #1e3c72;}
.user-list .user .last-msg{color: #666; margin-top: 4px;}
.user-list .data{text-align: right;}
.user-list .data .time{color: #999; font-size: 13px;}
.user-list .data .num{min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: linear-gradient(to right, #1e3c72, #2a5298); color: #fff; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; margin-top: 4px;}

.foot{height: 56px; background-color: #fff; padding: 8px; display: flex; gap: 8px; border-top: 1px solid rgba(0,0,0,0.05);}
.foot > div{flex: 1;}
.foot a{display: flex; align-items: center; justify-content: center; height: 100%; text-decoration: none; color: #666; font-weight: 500; background: #f8f9fa; border-radius: 8px; transition: all 0.3s ease;}
.foot a:hover{background: #f1f3f5; color: #1e3c72;}
.foot a.active{background: #f1f3f5; color: #1e3c72; font-weight: 600;}

.pc-main{width: 1200px; height: 100%; position: fixed; left: 0; right: 0; margin: auto; display: flex; gap: 24px; padding: 24px;}
.pc-left{width: 380px; height: 100%; background: #fff; border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); overflow: hidden;}
.pc-right{flex: 1; height: 100%; background: #fff; border-radius: 16px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); overflow: hidden;}

/* 顶部区域整体样式 */
.header-section {
    width: 100%;
    background-color: #ffe6e6;
    padding-top: 5px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 搜索框容器 */
.search-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    margin: 5px auto;
    width: 94%; /* 与分类导航和轮播图宽度一致 */
    max-width: 94%;
}

/* 搜索框左侧logo */
.search-logo {
    width: 90px;
    height: 32px;
    flex-shrink: 0;
    background-image: url('/static/images/wuren.gif');
    background-size: contain;
    background-position: left center;
    background-repeat: no-repeat;
    margin-left: -5px; /* 减少向左偏移量，使logo往右移 */
}

/* 搜索框样式 */
.search-bar {
    width: calc(100% - 80px); /* 增加搜索框宽度，减少与logo的间距 */
    max-width: none;
}

.search-bar .input-group {
    border-radius: 30px;
    overflow: hidden;
    box-shadow: none;
    border: none;
}

.search-bar .form-control {
    border-radius: 30px 0 0 30px;
    box-shadow: none !important;
    height: 40px;
    border: none;
}

.search-bar .form-control:focus {
    border-color: transparent;
    outline: none;
    border: none;
}

/* 搜索框占位符颜色设置为灰色 */
.search-bar .form-control::placeholder {
    color: transparent; /* 初始状态下不显示占位符 */
    transition: color 0.3s;
    font-size: 14px; /* 设置搜索提示词字体大小为14px */
}

/* 搜索框获得焦点时显示占位符 */
.search-bar .form-control:focus::placeholder {
    color: grey; /* 聚焦时显示灰色占位符 */
    font-size: 14px; /* 确保焦点状态下也是14px */
}

.search-bar .input-group-text {
    color: rgb(192, 196, 204);
    background-color: #fff;
    border: none;
}

/* 纯文本分类导航 */
.categories-text-nav {
    display: flex !important;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 0; /* 完全移除内边距 */
    background-color: transparent;
    border-top: none;
    border-bottom: none;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 40px;
    z-index: 100;
    position: relative;
    width: 94%; /* 统一宽度 */
    max-width: 94%;
}

.categories-text-nav .category-text-item {
    flex: 1;
    text-align: center; /* 所有分类项居中显示 */
    padding: 5px 0; /* 移除左右padding */
    margin: 3px 0; /* 移除左右margin */
    font-size: 14px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
    white-space: nowrap;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 移除第一个分类项的特殊对齐，使其与其他分类保持一致 */
.categories-text-nav .category-text-item:first-child {
    text-align: center;
    padding-left: 0;
    margin-left: 0;
}

/* 调整最后一个分类项，保持居中 */
.categories-text-nav .category-text-item:last-child {
    text-align: center;
    padding-right: 0;
    margin-right: 0;
}

/* 确保分类导航两端无额外间距 */
.categories-text-nav:before,
.categories-text-nav:after {
    display: none;
    content: none;
}

.categories-text-nav .category-text-item.active {
    color: var(--primary-color);
    font-weight: bold;
}

.categories-text-nav .category-text-item:hover {
    color: var(--primary-color);
}

/* 移除下方底部边框 */
.categories-text-nav .category-text-item.active:after {
    display: none;
}

.category-text-loading {
    color: #666;
    font-size: 14px;
    padding: 5px;
    text-align: center;
}

.no-categories {
    color: #666;
    font-size: 14px;
    padding: 5px;
    text-align: center;
    width: 100%;
}

/* 轮播图区域 */
.banner-slider {
    margin: 5px auto;
    max-width: 94%; /* 统一宽度 */
    width: 94%;
}

.carousel {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
    height: 180px; /* 固定高度 */
}

.carousel-item {
    transition: transform 0.6s ease-in-out;
    position: relative;
    overflow: hidden;
    height: 180px; /* 固定高度 */
}

.carousel-item img {
    width: 100%;
    height: 100%; /* 设置为100%高度 */
    object-fit: cover; /* 确保图片覆盖整个区域 */
    object-position: center; /* 居中显示图片 */
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 12px;
    bottom: 15px;
    max-width: 90%;
    margin: 0 auto;
    left: 5%;
    right: 5%;
}

/* 轮播图控制按钮调整 */
.carousel-control-prev, .carousel-control-next {
    width: 8%; /* 缩小控制按钮宽度 */
}

/* 所有尺寸下保持固定高度 */
@media (max-width: 768px), (min-width: 769px), (min-width: 992px) {
    .carousel-item, .carousel {
        height: 180px !important;
    }
}

/* 汉堡菜单按钮 */
.hamburger-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: #666;
    transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* 主内容区域调整 */
.main-container {
    padding-top: 0;
    width: 100%;
}

/* 左侧汉堡菜单样式 */
.category-nav {
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    width: 250px;
    background: white;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transform: translateX(-250px);
    transition: transform 0.3s ease;
    z-index: 998;
    overflow-y: auto;
    border-radius: 12px;
}

.category-nav.active {
    transform: translateX(0);
}

.nav-scroll {
    display: flex;
    flex-direction: column;
    padding: 15px 0;
}

.nav-item {
    border: none;
    background: none;
    padding: 12px 20px;
    text-align: left;
    color: #666;
    border-radius: 8px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    width: 100%;
}

.nav-item:hover {
    background: #f8f9fa;
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

.nav-item.active {
    background: #f8f9fa;
    border-left-color: var(--primary-color);
    color: var(--primary-color);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .search-bar {
        max-width: 100%;
    }
    
    .categories-text-nav {
        justify-content: space-around;
    }
    
    .categories-text-nav .category-text-item {
        padding: 5px 3px;
        margin: 2px 1px;
        font-size: 13px;
        flex-basis: 0;
    }
    
    .carousel-item {
        height: 200px;
    }
}

@media (min-width: 992px) {
    .carousel-item {
        height: 320px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 480px) {
    .categories-text-nav .category-text-item {
        font-size: 12px;
    }
}

/* 商品列表样式 */
.product-list {
    padding: 0;
    margin-top: -60px;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 5px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid #eee;
    transform: translateY(20px);
    opacity: 0;
}

.product-card.fade-in {
    transform: translateY(0);
    opacity: 1;
}

.product-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%;
    overflow: hidden;
    background: #f8f8f8;
    margin-bottom: 0;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-image:hover {
    transform: scale(1.05);
}

.product-info {
    padding: 4px 6px;
    background: white;
}

.product-title {
    font-size: 12px;
    color: #333;
    margin-bottom: 2px;
    line-height: 1.1;
    height: 26px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    color: var(--primary-color);
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 0;
    line-height: 1;
}

/* 底部导航栏样式 */
footer {
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
}

footer i {
    font-size: 20px;
    color: #666;
}

footer .active i,
footer .active div {
    color: var(--primary-color);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 220px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.back-to-top.visible {
    display: flex;
}

/* 加载提示样式 */
.loading-tip {
    color: #999;
    font-size: 14px;
}

/* 响应式布局 */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

/* 动画效果 */
.nav-item, .product-card {
    transition: all 0.3s ease;
}

.nav-item:hover {
    transform: translateY(-2px);
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

/* 购物车按钮样式 */
.cart-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary-color, #ff6b6b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.cart-button:hover {
    transform: scale(1.1);
}

.cart-button .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #fff;
    color: var(--primary-color, #ff6b6b);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 购物车弹窗遮罩 */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    display: none;
}

.cart-overlay.active {
    display: block;
}

/* 购物车弹窗样式 */
.cart-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
}

.cart-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.cart-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.close-cart {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-cart:hover {
    background: #f5f5f5;
}

.close-cart i {
    font-size: 20px;
    color: #666;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: white;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: #f8f9fa;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-price {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #eee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: 16px;
    color: #666;
}

.quantity-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.quantity-btn.minus {
    font-size: 20px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: white;
}

.total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

.total span {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: bold;
}

.checkout-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.2);
}

.checkout-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(255, 107, 107, 0.3);
}

/* 提示框基础样式 */
.toast-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    z-index: 2000;
    animation: fadeInOut 1.5s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 80%;
    text-align: center;
    white-space: pre-wrap;
    word-break: break-word;
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

/* 不同类型的提示框样式 */
.toast-info {
    background: rgba(0, 0, 0, 0.8);
    color: white;
}

.toast-success {
    background: rgba(0, 0, 0, 0.8);
    color: #2ecc71;
}

.toast-error {
    background: rgba(0, 0, 0, 0.8);
    color: #e74c3c;
}

.toast-warning {
    background: rgba(0, 0, 0, 0.8);
    color: #f1c40f;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
}

/* 空购物车提示 */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #999;
}

.cart-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #ddd;
}

.cart-empty p {
    font-size: 14px;
    margin: 0;
}

/* 购物车动画 */
@keyframes cartItemIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cart-item {
    animation: cartItemIn 0.3s ease;
}

/* 购物车数量变化动画 */
@keyframes quantityChange {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
        color: var(--primary-color);
    }
    100% {
        transform: scale(1);
    }
}

.cart-item-quantity span {
    display: inline-block;
    min-width: 24px;
    text-align: center;
}

.cart-item-quantity span.changing {
    animation: quantityChange 0.3s ease;
}

/* 添加到购物车飞入动画 */
@keyframes flyToCart {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    25% {
        transform: scale(0.8) translateY(-20px);
        opacity: 0.8;
    }
    50% {
        transform: scale(0.6) translateY(-40px);
        opacity: 0.6;
    }
    75% {
        transform: scale(0.4) translateY(-60px);
        opacity: 0.4;
    }
    100% {
        transform: scale(0.2) translateY(-80px);
        opacity: 0;
    }
}

.fly-item {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    animation: flyToCart 0.8s cubic-bezier(0.5, 0, 0.5, 1) forwards;
}

/* 购物车图标动画 */
@keyframes cartBounce {
    0% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.2);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.cart-button.bounce {
    animation: bounce 0.5s ease;
}

/* 商品分类下拉菜单 */
.category-select {
    position: relative;
    display: inline-block;
}

.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 8px 0;
    display: none;
    z-index: 1000;
    min-width: 150px;
}

.category-select.active .category-dropdown {
    display: block;
}

.category-option {
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.category-option:hover {
    background: #f8f9fa;
}

.category-option.active {
    background: var(--primary-color);
    color: white;
}

/* 加入购物车按钮样式 */
.add-to-cart {
    width: 100%;
    padding: 10px 0;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.2);
}

.add-to-cart i {
    margin-right: 6px;
    font-size: 16px;
}

.add-to-cart:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
}

.add-to-cart:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.2);
}

/* 商品网格布局 */
.product-list .container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 6px;
    padding: 10px;
}

@media (max-width: 576px) {
    .product-list .container {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
        padding: 6px;
    }
}

/* 删除按钮样式 */
.delete-item-btn {
    background: none;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-left: 10px;
    color: #999;
}

.delete-item-btn:hover {
    background: #ffebeb;
    color: var(--primary-color);
    transform: scale(1.1);
}

.delete-item-btn i {
    font-size: 16px;
}

/* 删除动画 */
@keyframes removeItem {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(100px);
    }
}

.cart-item.removing {
    animation: removeItem 0.3s ease forwards;
}

/* 加载动画优化 */
.loader {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 为新结构添加样式 */
/* 主容器 */
.main-container {
    padding-top: 05px; /* 为固定的顶部导航栏腾出空间 */
    width: 100%;
}

/* 主内容区域 */
.main-content {
    margin-bottom: 15px;
    width: 100%;
}

/* 分割线 */
.divider {
    margin: 5px 0 15px;
    border-top: 1px solid #eee;
}

/* 顶部分类区域 */
.top-categories {
    padding: 15px 0;
    background-color: #fff;
    margin: 15px 0;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: block !important; /* 强制显示 */
    width: 100%;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}

.category-header {
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
    padding-left: 10px;
    border-left: none; /* 移除蓝色左侧边框 */
    font-weight: bold;
    display: block;
}

/* 分类滚动区域 */
.categories-scroll {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 5px 0;
    min-height: 100px; /* 确保即使为空也有高度 */
}

/* 分类项目样式 */
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    margin: 0 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: white;
    padding: 8px 5px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

/* 分类激活状态 */
.category-item.active {
    background-color: #f0f7ff;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,123,255,0.15);
    border-color: #d0e6ff;
}

/* 分类图标 */
.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #f0f8ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: #007bff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.category-item.active .category-icon {
    background-color: #e6f0ff;
    color: #007bff;
    box-shadow: 0 3px 8px rgba(0,123,255,0.2);
    transform: scale(1.05);
}

#categoriesLoadingIndicator {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 80px;
    color: #999;
}

/* 响应式调整 */
@media (max-width: 768px) {    
    .main-content {
        padding-top: 0;
    }
    
    .category-item {
        min-width: 70px;
        margin: 0 5px;
    }
    
    .category-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* 商品列表调整 */
.product-list {
    margin-top: 0 !important; /* 移除额外的顶部边距 */
}

/* 轮播图区域 */
.banner-slider {
    margin: 5px auto;
    max-width: 94%; /* 统一宽度 */
    width: 94%;
}

.carousel {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
}

.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-item img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: cover;
    display: block;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    padding: 12px;
    bottom: 15px;
    max-width: 90%;
    margin: 0 auto;
    left: 5%;
    right: 5%;
}

.carousel-caption h3 {
    font-size: 20px;
    margin-bottom: 5px;
    font-weight: bold;
}

.carousel-caption p {
    font-size: 16px;
    margin-bottom: 0;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
}

.carousel-control-prev, .carousel-control-next {
    width: 10%;
    opacity: 0.8;
}

@media (min-width: 769px) {
    .carousel-item img {
        max-height: none;
        object-fit: cover;
    }
    
    .carousel-caption h3 {
        font-size: 24px;
    }
    
    .carousel-caption p {
        font-size: 18px;
    }
}

/* 分类文本 */
.category-item span {
    font-size: 12px;
    color: #333;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-top: 3px;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

/* 广播通知栏 */
.notice-bar {
    display: flex;
    align-items: center;
    background-color: #fff8f8;
    border-radius: 0;
    margin: 5px auto;
    width: 100%; /* 统一宽度 */
    max-width: 100%;
    height: 40px;
    overflow: hidden;
    box-shadow: none;
    border: none;
    padding-bottom: 10px;
}

.notice-icon {
    padding: 0 15px 0 10px;
    margin-left: -5px;
    color: var(--primary-color);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    height: 100%;
    min-width: 50px;
}

.notice-content {
    flex: 1;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.notice-wrapper {
    animation: noticeScroll 20s linear infinite;
    white-space: nowrap;
    position: absolute;
    display: flex;
    align-items: center;
    height: 100%;
}

.notice-wrapper span {
    display: inline-block;
    padding: 0 30px;
    color: #666;
    font-size: 14px;
}

@keyframes noticeScroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 悬停时暂停滚动 */
.notice-content:hover .notice-wrapper {
    animation-play-state: paused;
}

/* 客服按钮样式 */
.customer-service-button {
    position: fixed;
    bottom: 150px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--primary-color, #ff6b6b); /* 与购物车按钮颜色一致 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.customer-service-button:hover {
    transform: scale(1.1);
    color: white;
}

.customer-service-button i {
    font-size: 24px;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-decoration: none;
    padding: 10px 0;
    transition: all 0.3s ease;
    border-left: none !important; /* 确保底部导航没有左侧边框 */
    background: transparent;
    border-radius: 0;
}

.bottom-nav .nav-item:hover,
.bottom-nav .nav-item.active {
    background: transparent !important; /* 悬停时不改变背景 */
    border-left-color: transparent !important; /* 悬停时不显示左侧边框 */
    color: var(--primary-color, #ff6b6b); /* 悬停时只改变颜色 */
    transform: none; /* 禁止向上移动效果 */
}

.bottom-nav .nav-item i {
    font-size: 20px;
    margin-bottom: 5px;
}

.bottom-nav .nav-item span {
    font-size: 12px;
}

.bottom-nav .nav-item.active {
    color: var(--primary-color, #ff6b6b);
}

.bottom-nav .cart-badge {
    position: absolute;
    top: 0;
    margin-left: 18px;
    margin-top: 0;
    background-color: var(--primary-color, #ff6b6b);
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}