/* ==============================
   首页专属布局
   结构：顶部轮播（固定高度）+ 下方 [左侧分类栏 | 右侧商品区]
   右侧商品区自身滚动，支持下拉刷新与上拉加载更多
   ============================== */

.home-page {
    position: fixed; inset: 0;
    display: flex; flex-direction: column;
    background: var(--bg);
}

.home-banner {
    flex-shrink: 0;
    height: 32vw;
    max-height: 190px;
    min-height: 130px;
    background: #E9EBEF;
}
.home-banner .swiper, .home-banner .swiper-slide { height: 100%; }
.home-banner .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.home-banner .empty-banner {
    height: 100%; display: flex; align-items: center; justify-content: center;
    color: #A8ADB4; font-size: 13px; background: linear-gradient(135deg, #FF7A5C, #FF4E3A);
    color: #fff; font-weight: 500; letter-spacing: 2px;
}

.home-main { flex: 1; display: flex; min-height: 0; }

/* 左侧分类栏 */
.side-cat {
    width: 88px; flex-shrink: 0;
    background: #F5F6F8;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}
.side-cat::-webkit-scrollbar { display: none; }
.side-cat .cat-item {
    position: relative;
    padding: 14px 8px;
    text-align: center;
    font-size: 13px;
    color: var(--text-2);
    line-height: 1.35;
    transition: background .15s;
}
.side-cat .cat-item.active {
    background: #fff;
    color: var(--text);
    font-weight: 600;
}
.side-cat .cat-item.active::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 16px; border-radius: 0 2px 2px 0; background: var(--primary);
}
.side-cat .cat-item .cnt { display: block; font-size: 10px; color: var(--text-3); font-weight: 400; }

/* 右侧商品区 */
.goods-area {
    flex: 1; min-width: 0; background: #fff;
    display: flex; flex-direction: column;
}
.pull-indicator { flex-shrink: 0; }
.goods-scroll {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 12px 10px calc(70px + var(--safe-bottom));
}
.goods-scroll::-webkit-scrollbar { display: none; }

/* 分组标题 */
.group-title {
    font-size: 13px; font-weight: 600; color: var(--text);
    padding: 4px 2px 10px; display: flex; align-items: center; gap: 6px;
}
.group-title::before { content: ''; width: 3px; height: 13px; background: var(--primary); border-radius: 2px; }

/* 列表模式（单列大卡，视觉更饱满） */
.goods-row {
    display: flex; gap: 10px; background: #fff; border-radius: var(--radius);
    padding: 10px; box-shadow: var(--shadow);
}
.goods-row .thumb { width: 96px; height: 96px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #F5F6F8; }
.goods-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.goods-row .info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.goods-row .name { font-size: 14px; line-height: 1.4; }
.goods-row .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.goods-row .bottom { display: flex; align-items: flex-end; justify-content: space-between; margin-top: 6px; }

/* 售罄遮罩 */
.goods-row.sold-out .thumb { position: relative; }
.goods-row.sold-out .thumb::after {
    content: '已售罄'; position: absolute; inset: 0;
    background: rgba(0, 0, 0, .45); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 13px;
}

/* TabBar */
.tabbar .tab svg { width: 23px; height: 23px; }
