
/* 首页分类菜单样式 */
.category-menu {
    max-width: 20rem; 
    width: 100%;
    background: linear-gradient(135deg, #e7f4ff, #cce0ff); /* 流动渐变背景 */
    border-radius: 1rem;
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.1);
    padding: 1.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
    overflow-y: auto;
    transition: background 0.5s ease;
    scrollbar-width: none;
    /* 隐藏滚动条 - WebKit 浏览器 */
    &::-webkit-scrollbar {
      display: none; /* 隐藏滚动条 */
    }
}

.category-menu ul {
    list-style-type: none;
    padding: 0;
}

.category-menu li {
    padding: 0.625rem;
    font-size: 1.1rem;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s ease, padding 0.3s ease;
    position: relative;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem; /* 增加菜单项之间的间距 */
}

/* 激活状态的菜单项背景色 */
.category-menu li.active {
  background-color: #eef7ff; /* 激活时的背景色 */
  padding-left: 1rem; /* 激活时增加左边距 */
}

.category-menu li:hover {
    background-color: #d1e7ff;
    padding-left: 1rem; /* 鼠标悬停时增加左边距 */
}

/* 添加缩进 */
.category-menu li ul {
    padding-left: 1.5rem; 
    display: none; /* 默认隐藏子菜单 */
    margin-top: 0.5rem;
}

/* 子菜单项样式 */
.category-menu li ul li {
    background-color: #fafafa;
    margin-bottom: 0.3rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    padding: 0.5rem;
    transition: background-color 0.3s ease;
}

.category-menu li ul li:hover {
    background-color: #eef7ff;
}

/* 箭头样式 */
.arrow {
    position: absolute;
    right: 1rem;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.expanded > .arrow {
    transform: rotate(180deg);
}

/* 动画效果：背景流动 */
@keyframes flowBackground {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 200% 200%;
    }
}

.category-menu {
    animation: flowBackground 5s infinite linear;
}


/* 商品加载页分类样式 */
.cid-container {
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    padding: 1rem;
    width: 100%;
    margin: 1rem auto;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  
  
    /* 使容器固定在页面 */
    /* position: fixed; */
    z-index: 10; /* 保证容器位于页面上的其他元素之上 */
    overflow-y: auto; /* 如果内容超过容器高度，启用垂直滚动 */
  }
  
  .cid-row {
    display: flex;
    justify-content: flex-start; /* 子元素从左到右排列 */
    align-items: center;
    width: 100%;
    padding: 10px 0;
    height: 7rem;
    gap: 1rem; /* 设定子元素间距 */
    flex-wrap: wrap; /* 确保子元素不换行 */
    overflow-x: auto; /* 启用水平滚动条 */;
  }
  
  /*目录标题 */
  .cid-row h3 {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
  }
  
  /* 单个分类卡片 */
  .cid-card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 5px;
    text-align: center;
    width: 100px;
    height: 100px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
  }
  
  .cid-card img {
    width: 70%;
    height: 70%;
    margin: 0 auto;
    margin-bottom: 10px;
  }
  
  .cid-card span {
    font-size: 0.75rem;
    color: #333;
    font-weight: bold;
  }
  
  .cid-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  }
  
  .cid-row hr {
    border: none;
    padding: 0 auto;
    height: 3px;
    border-top: 1px solid #ddd;
    width: 100%;
  }


  /* 信息展示容器样式 */
  .msg-container {
    min-width: 320px;
    max-width: 380px;
    height: 380px;
    margin: 0 auto;
    margin-top: 1rem;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  /* 标题栏 */
  .title {
    display: flex;
    width: 100%;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(to right, #87cefa, #00bfff);
    padding: 10px 0;
    margin: 0 auto;
    border-radius: 10px 10px 0 0;
  }

  /* 标题列表 */
  .title ul {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
    justify-content: center;
  }

  /* 单个标题 */
  .title li {
    padding: 10px 20px;
    cursor: pointer;
    transition: color 0.3s, background-color 0.3s;
    margin: 0 10px;
    text-align: center;
    position: relative;
  }

  /* 创建滑动条 */
  .title li::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgb(176, 225, 234), rgb(1, 242, 255));
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.5s ease;
    border-radius: 2px;
  }

  /* 激活状态的标题滑动条 */
  .title li.active::before {
    transform: scaleX(1);
  }

  .title li.active {
    transform: scaleX(1);
  }

  /* 内容区 */
  .content,
  .content-two {
    font-size: 16px;
    padding: 10px;
    height: calc(100% - 100px);
    text-align: left;
    scrollbar-width: none;
    overflow: hidden; 
    overflow-y: auto;
  }

  .content::-webkit-scrollbar,
  .content-two::-webkit-scrollbar {
    display: none; /* 隐藏滚动条 */
  }

  /* 单个公告卡片 */
  .card {
    background-color: #f4f9fd;
    border: 1px solid #d0e2f3;
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: pointer;
    display: flex;  /* 使用flex布局 */
    flex-direction: column;  /* 垂直排列 */
  }

  .card p {
    margin: 0;
    width: 60%;
    font-size: 14px;
    color: #333;
    white-space: nowrap; 
    overflow-x: auto;
    scrollbar-width: none;
    text-overflow: ellipsis; 
  }
  /* 隐藏滚动条 */
  .card p::-webkit-scrollbar {
      display: none;  /* 在 Webkit 浏览器中隐藏滚动条 */
  }

  /* 时间戳样式 */
  .timestamp {
    font-size: 12px;
    color: #999;
    position: absolute;
    bottom: 10px;
    right: 10px;
  }