/* 分类页样式 */

.category-layout {
    display: flex;
    height: calc(100vh - 60px);
    background-color: #fff;
}

/* 左侧分类导航 */
.category-nav {
    width: 100px;
    background-color: #f5f5f5;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-item {
    padding: 20px 15px;
    text-align: center;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.nav-item.active {
    background-color: #fff;
    color: #1890FF;
    border-left-color: #1890FF;
    font-weight: 600;
}

.nav-item:active {
    background-color: #f0f0f0;
}

/* 右侧内容区 */
.category-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 15px;
}

.content-panel {
    display: none;
}

.content-panel.active {
    display: block;
}

.sub-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.sub-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.sub-category-item img {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    margin-bottom: 8px;
}

.sub-category-name {
    font-size: 14px;
    color: #333;
    text-align: center;
}

/* 气泡提示 */
.category-tip {
    position: fixed;
    bottom: 80px;
    left: 30%; /* 定位到分类菜单位置（第2个菜单项，中心在30%位置：20% + 10%） */
    transform: translateX(-50%); /* 居中对齐到菜单项中心 */
    z-index: 100;
    pointer-events: none;
}

.tip-bubble {
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
}

.tip-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.75);
}

.tip-content {
    line-height: 1.4;
}

