/* ===== 卡乐售 PC 商品分类页 ===== */

/* 空提示 */
.fenlei-empty {
    padding: 80px 0;
    text-align: center;
    color: #8a93a6;
    font-size: 15px;
}

/* 主体容器：左栏 + 右栏 */
.fenlei-wrap {
    display: flex;
    align-items: stretch;
    margin-top: 12px;
    margin-bottom: 30px;
    min-height: 500px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgb(0 0 0 / 10%);
    overflow: hidden;
}

/* ---- 左栏：一级分类 ---- */
.fenlei-left {
    width: 200px;
    flex: none;
    background: #f5f6f8;
    overflow-y: auto;
}

.fenlei-left .fl-item {
    position: relative;
    display: block;
    padding: 16px 18px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    border-bottom: 1px solid #ebeef2;
    transition: background .2s, color .2s;
}

.fenlei-left .fl-item:hover {
    background: #fff;
    color: var(--ay-blue);
}

/* 选中态：白底 + 左侧蓝色竖条 + 蓝字 */
.fenlei-left .fl-item.on {
    background: #fff;
    color: var(--ay-blue);
    font-weight: 600;
}

.fenlei-left .fl-item.on::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 24px;
    margin-top: -12px;
    background: var(--ay-blue);
    border-radius: 0 3px 3px 0;
}

/* ---- 右栏：二级分类网格 ---- */
.fenlei-right {
    flex: 1;
    min-width: 0;
    overflow-y: auto;
    padding: 24px;
}

.fenlei-grid {
    display: none;
    flex-wrap: wrap;
}

.fenlei-grid.show {
    display: flex;
}

/* 每个分类卡片 */
.fenlei-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 20%;
    padding: 12px 8px;
    transition: transform .15s;
}

.fenlei-card:hover {
    transform: translateY(-2px);
}

.fenlei-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    background: #f5f6f8;
}

.fenlei-card p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
    text-align: center;
    word-break: break-all;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ============ 分类页骨架屏（结构对齐 .fenlei-wrap，替换时无跳动） ============ */
.fenlei-skeleton { pointer-events: none; }
.fenlei-skeleton .fl-sk-item,
.fenlei-skeleton .fl-sk-ico,
.fenlei-skeleton .fl-sk-txt {
    display: block;
    background: linear-gradient(90deg, #eef1f5 25%, #e3e8ef 50%, #eef1f5 75%);
    background-size: 200% 100%;
    animation: fl-sk-shimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
}
.fenlei-skeleton .fenlei-left { padding: 0; }
.fenlei-skeleton .fl-sk-item { width: 100%; height: 50px; border-bottom: 1px solid #f2f4f7; border-radius: 0; }
.fenlei-skeleton .fenlei-grid { display: flex; }
.fenlei-skeleton .fl-sk-card { width: 20%; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; }
.fenlei-skeleton .fl-sk-ico { width: 80px; height: 80px; border-radius: 10px; }
.fenlei-skeleton .fl-sk-txt { width: 60%; height: 14px; margin-top: 10px; }
@keyframes fl-sk-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
