.catalog-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.28fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 18px;
    align-items: stretch;
}
.catalog-layout > .catalog-categories,
.catalog-layout > .catalog-products {
    min-width: 0;
    margin: 0;
}
.catalog-categories .panel-body {
    padding: 10px;
    max-height: 640px;
    overflow-y: auto;
}
.catalog-categories .chip-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
}
.catalog-categories .chip {
    width: 100%;
    justify-content: flex-start;
    min-height: 42px;
    border-radius: 12px;
    text-align: left;
}
.catalog-categories .category-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.catalog-categories .category-count {
    margin-left: auto;
    color: var(--uc-ink-dis);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.catalog-categories .chip.is-primary .category-count {
    color: inherit;
    opacity: .82;
}
.catalog-products .panel-body {
    min-width: 0;
}
.catalog-products .item-list {
    min-height: 240px;
}
@media (max-width: 767.98px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    .catalog-categories .panel-body {
        max-height: 230px;
    }
    .catalog-categories .chip-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .catalog-categories .chip {
        min-width: 0;
    }
}
.catalog-products .item-product-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content max-content minmax(4rem, max-content);
    padding: 12px 14px !important;
    background: var(--glass-bg-soft);
}
.catalog-products .item-product-row > :nth-child(n+2) {
    text-align: right;
}
@media (max-width: 575.98px) {
    .catalog-products .item-product-row {
        grid-template-columns: 1fr 1fr auto;
    }
    .catalog-products .item-product-name {
        grid-column: 1 / -1;
    }
    .catalog-products .item-product-row > :nth-child(2) {
        text-align: left;
    }
}

/* 平台筛选：分段控件（参考 shadcn/ui Tabs 的选中态），横向一行，超出可左右滑动 */
.platform-filter {
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    margin: 0 0 12px;
    padding: 4px;
    border-radius: 12px;
    background: #f3effc;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.platform-filter::-webkit-scrollbar { display: none; }
.pf-btn {
    flex: 0 0 auto;
    padding: 7px 13px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #6b6382;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.pf-btn:hover { color: #241e38; background: rgba(255,255,255,.6); }
.pf-btn.is-active {
    background: #fff;
    color: #7c5cff;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(46,32,84,.12), 0 1px 2px rgba(46,32,84,.06);
}
.chip[hidden] { display: none !important; }

/* 平台 → 分类 两层树：平台可折叠，下面是具体分类 */
.cat-tree { display: flex; flex-direction: column; gap: 4px; }
.cat-group { border-radius: 12px; }
.cat-group__head {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 10px;
    background: #f5f1ff;
    color: #3d3357;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.cat-group__head:hover { background: #ece5ff; }
.cat-group__name { flex: 1; }
.cat-group__count {
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(124,92,255,.12);
    color: #7c5cff;
    font-size: 11px;
    font-weight: 700;
}
.cat-group__chev { color: #9a8fc0; font-size: 12px; transition: transform .18s ease; }
.cat-group[data-open="1"] .cat-group__chev { transform: rotate(180deg); }
.cat-group .cat-group__body { display: none !important; margin-top: 6px; }
.cat-group[data-open="1"] .cat-group__body { display: flex !important; flex-direction: column; gap: 6px; }

/* 商品详情页：左「宝贝详情」、右「购买表单」两栏 */
.item-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 18px;
    align-items: start;
}
.item-layout .item-detail,
.item-layout .item-panel { margin-top: 12px; }
.item-layout .item-detail .panel-body { max-height: 70vh; overflow-y: auto; }
.item-layout--single { grid-template-columns: minmax(0, 620px); justify-content: center; }
@media (max-width: 1200px) {
    .item-layout { grid-template-columns: minmax(0, 1fr) 440px; }
}
@media (max-width: 992px) {
    .item-layout { grid-template-columns: minmax(0, 1fr); }
    .item-layout .item-detail .panel-body { max-height: none; }
}

/* 商品页（图一风格）：单栏，标题 → 分享 → 详情正文 → 价格 → 状态 → 表单 */
.item-layout--single { grid-template-columns: minmax(0, 900px); justify-content: center; }
.item-title { font-size: 26px; line-height: 1.35; font-weight: 700; margin-bottom: 14px; }
.item-share-row { display: flex; justify-content: center; margin-bottom: 18px; }
.item-share-row .shared-button { cursor: pointer; }
.item-desc-plain {
    font-size: 14px;
    line-height: 1.75;
    color: #4a4160;
    margin: 0 0 18px;
    padding-bottom: 16px;
    border-bottom: 1px dashed rgba(124,92,255,.16);
    overflow-wrap: anywhere;
}
.item-desc-plain > :first-child { margin-top: 0; }
.item-desc-plain > :last-child { margin-bottom: 0; }
.item-layout--single .abacus .price { font-size: 30px; font-weight: 700; }

/* 会员价提示 */
.item-member-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 2px 0 10px;
    font-size: 14px;
    color: #7c5cff;
}
.item-member-price b { font-size: 18px; font-weight: 700; }
.item-member-tip { font-size: 12px; color: #8b8b9e; }

/* 会员价：紧跟在价格后面，图二的紧凑写法 */
.abacus { flex-wrap: wrap; }
.item-member-inline {
    font-size: 15px;
    font-weight: 600;
    color: #7c5cff;
    white-space: nowrap;
}
.item-member-inline a {
    color: #7c5cff;
    text-decoration: underline;
    font-weight: 700;
}
.item-member-inline a:hover { opacity: .8; }

/* 会员价金额加粗；登录链接换色（品牌粉） */
.item-member-amount {
    font-weight: 800;
    font-size: 17px;
    color: #7c5cff;
    letter-spacing: .3px;
}
.item-member-inline .item-login-link {
    color: #f07bb4 !important;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.item-member-inline .item-login-link:hover { color: #e0629f !important; }

/* 分享按钮：放在库存旁，橙色渐变更亮眼 */
.uc-share-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #ff9a3c, #ff6b6b);
    box-shadow: 0 2px 8px rgba(255,120,80,.28);
    transition: transform .12s ease, box-shadow .12s ease;
    white-space: nowrap;
}
.uc-share-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,120,80,.4);
}
.uc-share-badge i { font-size: 13px; }

/* 侧边栏跟随视口高度，尽量把分类显示完整；滚动条细一点不抢眼 */
@media (min-width: 993px) {
    .catalog-categories { position: sticky; top: 12px; }
    .catalog-categories .panel-body {
        max-height: calc(100vh - 150px);
        scrollbar-width: thin;
    }
    .catalog-categories .panel-body::-webkit-scrollbar { width: 6px; }
    .catalog-categories .panel-body::-webkit-scrollbar-thumb {
        background: rgba(124,92,255,.28);
        border-radius: 999px;
    }
}

/* 侧边栏底部不再留大片空白 */
.catalog-categories .panel-body { padding-bottom: 6px; }
.catalog-categories .cat-tree { padding-bottom: 0; }

/* 搜索框：更大更明显 */
.shop-search { flex: 1 1 auto; max-width: 680px; margin: 0 20px; }
.shop-search__box {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: #fff;
    border: 1.5px solid rgba(124,92,255,.28);
    box-shadow: 0 4px 16px rgba(124,92,255,.12);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.shop-search__box:focus-within {
    border-color: #8f6cff;
    box-shadow: 0 6px 20px rgba(124,92,255,.24);
}
.shop-search__box i { font-size: 16px; color: #8f6cff; }
.shop-search__box .item-search-input {
    flex: 1 1 auto;
    height: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15px;
    color: #3d3357;
}
.shop-search__box .item-search-input::placeholder { color: #9a93ad; }
@media (max-width: 768px) {
    .shop-search { margin: 0 8px; max-width: none; }
    .shop-search__box { height: 40px; padding: 0 14px; }
}

/* 顶栏：整条等高，搜索框撑满中间空白 */
.shop-header, .shop-header__inner, .shop-toolbar {
    min-height: 68px;
    display: flex;
    align-items: center;
}
.shop-search__box { height: 44px; }
.shop-btn, .shop-lang, .shop-icon-btn { height: 44px; display: inline-flex; align-items: center; }
@media (min-width: 1200px) {
    .shop-search { flex: 1 1 auto; }
}

/* 搜索框撑满顶栏中间剩余空间（覆盖主题自带的 680px 上限） */
.shop-search {
    max-width: none !important;
    flex: 1 1 auto !important;
    min-width: 260px;
}
.shop-search__box { width: 100%; }

/* 登录按钮文字居中；搜索框真正撑满 */
.shop-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center;
    gap: 6px;
    line-height: 1 !important;
    height: 44px;
    padding: 0 20px !important;
}
.shop-btn i { line-height: 1; display: inline-block; }
.shop-search__box {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}
.shop-search__box .item-search-input { width: 100%; }
/* 侧边栏：分类少时贴合内容，分类多时在栏内滚动，不把整页撑长 */
/* 左右两栏：定高 + 各自内部滚动 */
@media (min-width: 993px) {
    .catalog-layout { align-items: start; }
    .catalog-categories, .catalog-products {
        position: sticky;
        top: 12px;
        align-self: start;
        max-height: calc(100vh - 130px);
        display: flex;
        flex-direction: column;
    }
    .catalog-categories .panel-body,
    .catalog-products .panel-body {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        overflow-x: hidden;
        padding-bottom: 8px;
        scrollbar-width: thin;
    }
    .catalog-categories .panel-body::-webkit-scrollbar,
    .catalog-products .panel-body::-webkit-scrollbar { width: 6px; }
    .catalog-categories .panel-body::-webkit-scrollbar-thumb,
    .catalog-products .panel-body::-webkit-scrollbar-thumb {
        background: rgba(124,92,255,.32);
        border-radius: 999px;
    }
}
@media (max-width: 992px) {
    .catalog-categories, .catalog-products {
        max-height: none;
        position: static;
    }
    .catalog-categories .panel-body,
    .catalog-products .panel-body {
        max-height: 60vh;
        overflow-y: auto;
    }
}
/* 商品「购买」按钮：渐变胶囊 + 购物车图标 */
.uc-buy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none;
    background: linear-gradient(45deg, #ffa751 0%, #ff8b6b 48%, #ff6fa5 100%);
    box-shadow: 0 3px 12px rgba(255,140,110,.35);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
    white-space: nowrap;
}
.uc-buy-btn:hover {
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(255,140,110,.48);
    filter: brightness(1.05);
}
.uc-buy-btn:active { transform: translateY(0); }
.uc-buy-btn i { font-size: 13px; }
@media (max-width: 576px) {
    .uc-buy-btn { padding: 6px 14px; font-size: 13px; }
}
.uc-buy-btn .uc-buy-ico { flex: 0 0 auto; }

/* 顶栏导航：默认素色，只有当前所在页面才用紫粉渐变 */
.shop-nav__list .shop-nav__item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: #5b5273 !important;
    text-decoration: none;
    background: transparent;
    box-shadow: none;
    transition: color .12s ease, background .15s ease, box-shadow .15s ease;
}
.shop-nav__list .shop-nav__item:hover {
    color: #8f6cff !important;
    background: rgba(143,108,255,.1);
}
.shop-nav__list .shop-nav__item.is-active,
.shop-nav__list .shop-nav__item.active {
    color: #6f4fd6 !important;
    background: linear-gradient(135deg, #efe7ff 0%, #e6e2ff 50%, #ffe4f0 100%);
    box-shadow: 0 2px 8px rgba(143,108,255,.14);
}
.shop-nav__list .shop-nav__item.is-active:hover,
.shop-nav__list .shop-nav__item.active:hover {
    color: #5f3fcc !important;
    background: linear-gradient(135deg, #e6dbff 0%, #dcd6ff 50%, #ffd9ea 100%);
}

/* 顶栏左右两侧胶囊化 */
.shop-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px 0 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(124,92,255,.14);
    box-shadow: 0 2px 10px rgba(124,92,255,.08);
    transition: box-shadow .15s ease, transform .15s ease;
}
.shop-brand:hover { box-shadow: 0 4px 14px rgba(124,92,255,.16); transform: translateY(-1px); }
.shop-brand .shop-logo,
.shop-brand img,
.shop-brand svg { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.shop-brand__name { font-size: 15px; font-weight: 700; color: #3d3357; }

.shop-user__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 8px 0 16px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(124,92,255,.14);
    box-shadow: 0 2px 10px rgba(124,92,255,.08);
    transition: box-shadow .15s ease, transform .15s ease;
}
.shop-user__btn:hover { box-shadow: 0 4px 14px rgba(124,92,255,.16); transform: translateY(-1px); }
.shop-user__btn img,
.shop-user__btn .shop-avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.shop-nav__right { gap: 10px; }

@media (max-width: 768px) {
    .shop-brand { height: 40px; padding: 0 14px 0 6px; }
    .shop-brand__name { font-size: 14px; }
    .shop-user__btn { height: 40px; }
}

/* 顶栏只保留一层胶囊：外层整体圆角，内部元素透明，避免出现白方块 */
.uc-topbar__inner {
    border-radius: 999px !important;
    background: rgba(255,255,255,.92) !important;
    border: 1px solid rgba(124,92,255,.14) !important;
    box-shadow: 0 6px 24px rgba(70,45,120,.10) !important;
    padding: 6px 10px !important;
}
.shop-nav {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}
.shop-brand {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 999px !important;
    height: 40px !important;
    padding: 0 14px 0 6px !important;
}
.shop-brand:hover { background: rgba(143,108,255,.08) !important; box-shadow: none !important; transform: none !important; }
.shop-user__btn {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    height: 40px !important;
    padding: 0 6px 0 12px !important;
    border-radius: 999px !important;
}
.shop-user__btn:hover { background: rgba(143,108,255,.08) !important; box-shadow: none !important; transform: none !important; }

/* 头像强制圆形，消除方角 */
.shop-brand img {
    border-radius: 50% !important;
    overflow: hidden;
    object-fit: cover;
    clip-path: circle(50%);
}
.shop-user__avatar,
.shop-user__btn img {
    border-radius: 50% !important;
    overflow: hidden;
    object-fit: cover;
    clip-path: circle(50%);
}

/* 顶栏彻底清理：不再有任何阴影/独立底色，避免视觉上凸出一块 */
.uc-topbar__inner {
    box-shadow: 0 2px 10px rgba(70,45,120,.06) !important;
    overflow: hidden;
}
.shop-brand,
.shop-brand:hover,
.shop-brand:focus {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    outline: 0 !important;
}
.shop-nav__item,
.shop-nav__item.active,
.shop-nav__item.is-active {
    box-shadow: none !important;
    border: 0 !important;
}
.shop-nav__item.active,
.shop-nav__item.is-active {
    background: linear-gradient(135deg, #efe7ff 0%, #e6e2ff 50%, #ffe4f0 100%) !important;
}
.shop-user__btn,
.shop-user__btn:hover {
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
}
