.category-panel {
    width: 80%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

/* 让 a 标签作为 flex 子项，自动分配宽度 */
.row a {
    flex: 1 1 0;
    text-decoration: none;
    color: inherit;
    /* 可选：为 a 添加 min-width 限制，防止过小 */
    min-width: 150px;
    display: flex;
    /* 让 a 内部内容 flex 布局 */
    flex-direction: column;
    /* 垂直排列 */
}

/* category-item 撑满 a */
.category-item {
    width: 100%;
    height: 250px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.category-item:hover {
    transform: translateY(-4px);
}

.category-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.category-item .title {
    padding: 10px;
    font-size: 16px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 取消之前根据 data-count 设置宽度的规则，因为 a 已自动分配宽度 */
/* 如果需要，也可以保留 gap 控制间距 */