/* 完全保留你原来的所有样式变量和代码，一点不改 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
  }
  :root {
    --main: #ff3c69;
    --dark: #1a1a1a;
    --gray: #f5f5f7;
    --text: #333;
    --light: #999;
    --radius: 16px;
    --shadow: 0 8px 22px rgba(0,0,0,0.06);
    --scroll-speed: 25s;
  }
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--gray);
    color: var(--text);
    padding-bottom: 70px;
  }
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
  }
  
  /* 顶部导航 - 完全保留你的原有代码 */
  .header {
    background: #fff;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: var(--shadow);
    width: 100%;
  }
  .header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
  }
  .logo {
    font-size: 22px;
    font-weight: 800;
    color: var(--main);
    white-space: nowrap;
    cursor: pointer;
  }
  .search {
    flex: 1;
    max-width: 600px;
    background: var(--gray);
    border-radius: 30px;
    padding: 10px 16px;
    display: flex;
  }
  .search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 15px;
  }
  .search button {
    background: none;
    border: none;
    color: var(--light);
    font-size: 16px;
    cursor: pointer;
  }
  .cart-icon {
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
    position: relative;
  }
  .cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: var(--main);
    color: #fff;
    font-size: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
  }
  
  /* 主分类（顶部横向）- 完全保留你的原有结构 */
  .main-nav {
    background: #fff;
    margin-top: 10px;
    border-radius: var(--radius);
    overflow: hidden;
    width: 100%;
  }
  .main-nav ul {
    display: flex;
    overflow-x: auto;
    list-style: none;
    padding: 4px;
    gap: 4px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .main-nav ul::-webkit-scrollbar {
    display: none;
  }
  .main-nav li {
    padding: 12px 18px;
    white-space: nowrap;
    font-size: 15px;
    border-radius: 12px;
    transition: 0.2s;
    cursor: pointer;
  }
  .main-nav li.active {
    background: var(--main);
    color: #fff;
  }
  .main-nav li:not(.active):hover {
    background: var(--gray);
  }
  
  /* 子分类（图标区）- 完全保留你的原有结构 */
  .sub-category {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px 0;
    margin: 12px 0;
    width: 100%;
    display: none;
  }
  .sub-category.active {
    display: block;
  }
  .sub-category-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
  }
  @media (min-width:768px) {
    .sub-category-grid { grid-template-columns: repeat(8, 1fr); }
  }
  .sub-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text);
    cursor: pointer;
    transition: 0.2s;
  }
  .sub-item:hover {
    transform: scale(1.05);
  }
  .sub-item .icon {
    width: 50px;
    height: 50px;
    background: var(--gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--main);
  }
  
  /* 轮播 - 完全保留你的原有代码 */
  .banner {
    height: 170px;
    margin: 12px 0;
    background: linear-gradient(135deg, #ffc3d2, #ff8da3);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    font-weight: 500;
    width: 100%;
    cursor: pointer;
  }
  @media (min-width:768px) {
    .banner { height: 240px; }
  }
  @media (min-width:1024px) {
    .banner { height: 280px; }
  }
  
  /* 商品模块 - 完全保留你的原有代码 */
  .section {
    background: #fff;
    border-radius: var(--radius);
    padding: 20px 0;
    margin-bottom: 12px;
    width: 100%;
  }
  .section-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .section-title span {
    font-size: 14px;
    color: var(--light);
    font-weight: 400;
    cursor: pointer;
  }
  
  /* 无缝滚动 - 完全保留你的原有代码 */
  .goods-scroll-wrap {
    overflow: hidden;
    width: 100%;
    position: relative;
  }
  .goods-scroll {
    display: flex;
    width: fit-content;
    animation: autoScroll var(--scroll-speed) linear infinite;
    gap: 16px;
    padding: 0 20px 8px;
  }
  .goods-scroll-wrap:hover .goods-scroll {
    animation-play-state: paused;
  }
  @keyframes autoScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }
  
  /* 商品卡片 - 完全保留你的原有代码 */
  .goods {
    flex-shrink: 0;
    width: 160px;
    border-radius: var(--radius);
    overflow: hidden;
    transition: 0.25s;
    cursor: pointer;
  }
  @media (min-width:768px) {
    .goods { width: 200px; }
  }
  @media (min-width:1024px) {
    .goods { width: 220px; }
  }
  .goods:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
  }
  .goods-img {
    width: 100%;
    height: 150px;
    background: var(--gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 13px;
  }
  .goods-info {
    padding: 12px;
  }
  .goods-name {
    font-size: 14px;
    line-height: 1.4;
    height: 40px;
    overflow: hidden;
    margin-bottom: 8px;
  }
  .sales-tag, .hot-tag, .new-tag {
    font-size: 12px;
    color: var(--main);
    margin-bottom: 6px;
    display: inline-block;
  }
  .price {
    font-size: 18px;
    font-weight: 700;
    color: var(--main);
    margin-bottom: 10px;
  }
  .btn-buy {
    width: 100%;
    padding: 10px;
    background: var(--main);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
  }
  .btn-buy:hover {
    opacity: 0.9;
  }
  
  /* 底部导航 - 按你的要求删掉了优惠tab */
  .bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 99;
  }
  .bottom-bar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: 0.2s;
  }
  .bottom-bar a.active {
    color: var(--main);
  }
  .bottom-bar a:hover {
    color: var(--main);
  }
  
  /* 弹窗遮罩 - 完全保留你的原有代码 */
  .mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    display: none;
  }
  .modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 24px;
    z-index: 101;
    display: none;
  }
  .modal-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
  }
  .modal-content {
    margin-bottom: 20px;
    text-align: center;
  }
  .modal-btn {
    width: 100%;
    padding: 14px;
    background: var(--main);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
  }
  
  /* ========== 以下是新增页面的补充样式，完全沿用你的风格 ========== */
  /* 购物车页专用 */
  .cart-item {
    background: #fff;
    padding: 16px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    display: flex;
    gap: 14px;
    align-items: center;
    box-shadow: var(--shadow);
  }
  .cart-item-img {
    width: 80px;
    height: 80px;
    background: var(--gray);
    border-radius: 12px;
    flex-shrink: 0;
  }
  .cart-item-info {
    flex: 1;
  }
  .cart-item-name {
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 6px;
  }
  .cart-item-price {
    font-size: 17px;
    font-weight: 700;
    color: var(--main);
  }
  .cart-item-num {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .cart-item-num button {
    width: 28px;
    height: 28px;
    border: 1px solid #e5e5ea;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
  }
  .cart-settle-bar {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  }
  .cart-total {
    font-size: 16px;
  }
  .cart-total span {
    font-size: 20px;
    font-weight: 700;
    color: var(--main);
  }
  .btn-settle {
    padding: 12px 30px;
    background: var(--main);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
  }
  
  /* 个人中心页专用 */
  .user-top {
    background: var(--main);
    color: #fff;
    padding: 40px 20px 30px;
    border-radius: 0 0 30px 30px;
    margin-bottom: 20px;
  }
  .user-avatar {
    width: 80px;
    height: 80px;
    background: #fff;
    border-radius: 50%;
    margin: 0 auto 12px;
  }
  .user-name {
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
  }
  .user-level {
    text-align: center;
    font-size: 13px;
    opacity: 0.9;
  }
  .user-menu {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
  }
  .user-menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray);
    cursor: pointer;
  }
  .user-menu-item:last-child {
    border-bottom: none;
  }
  .user-menu-item span:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
  }
  
  /* 分类页专用 */
  .category-wrap {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    height: calc(100vh - 160px);
  }
  .category-main {
    width: 100px;
    background: #fff;
    border-radius: var(--radius);
    padding: 8px;
    flex-shrink: 0;
    overflow-y: auto;
  }
  .category-main-item {
    padding: 12px 8px;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 4px;
    cursor: pointer;
    font-size: 14px;
  }
  .category-main-item.active {
    background: var(--main);
    color: #fff;
  }
  .category-sub {
    flex: 1;
    background: #fff;
    border-radius: var(--radius);
    padding: 20px;
    overflow-y: auto;
  }
  .category-sub-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 16px;
  }
  .category-sub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    text-align: center;
  }
  .category-sub-item {
    cursor: pointer;
  }
  .category-sub-icon {
    width: 60px;
    height: 60px;
    background: var(--gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--main);
    margin: 0 auto 6px;
  }
  .category-sub-name {
    font-size: 13px;
  }