/* ============================================================
   首页专属主题样式（参考商城风格：白底红标 + 蓝色分类栏 + 卡片化）
   仅作用于首页，其他页面仍使用 i.css
   ============================================================ */

:root {
    --home-red: #e94b4b;
    --home-red-dark: #d63b3b;
    --home-blue: #1f6fd6;
    --home-blue-dark: #175bb4;
    --home-bg: #f4f6f9;
    --home-border: #e8ecf2;
    --home-text: #333;
    --home-text-sub: #7a8599;
}

body.home-body {
    /* 背景跟随后台「基本设置 → PC背景图片」：未配置时回退到浅灰底；
       已配置时由 Header 内联样式覆盖（内联优先级高于此处，故不可加 !important） */
    background: var(--home-bg);
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: var(--home-text);
}

/* ================= 顶部导航栏 ================= */
.shop-nav {
    background: #fff !important;
    box-shadow: 0 2px 10px rgba(30, 60, 110, .08);
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0 !important;
}

.shop-nav .shop-nav-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 12px;
}

.shop-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    margin-right: 8px;
}

.shop-brand img {
    height: 34px;
    border-radius: 8px;
}

.shop-brand b {
    font-size: 18px;
    color: var(--home-text);
    letter-spacing: .5px;
}

.shop-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.shop-link {
    display: inline-block;
    padding: 0 14px;
    line-height: 64px;
    font-size: 15px;
    font-weight: bold;
    color: #444 !important;
    text-decoration: none !important;
    position: relative;
    transition: color .2s;
}

.shop-link:hover {
    color: var(--home-red) !important;
}

.shop-link.active {
    color: var(--home-red) !important;
}

.shop-link.active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 10px;
    height: 3px;
    border-radius: 3px;
    background: var(--home-red);
}

.shop-search {
    display: flex;
    align-items: center;
    margin-left: auto;
    border: 2px solid var(--home-red);
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    height: 36px;
}

.shop-search input {
    border: none;
    outline: none;
    padding: 0 14px;
    width: 200px;
    font-size: 13px;
    background: transparent;
}

.shop-search button {
    border: none;
    background: var(--home-red);
    color: #fff;
    width: 52px;
    height: 100%;
    cursor: pointer;
    transition: background .2s;
}

.shop-search button:hover {
    background: var(--home-red-dark);
}

.shop-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.shop-user-bal {
    color: var(--home-red);
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

.btn-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(90deg, #f26d6d, var(--home-red));
    color: #fff !important;
    border-radius: 18px;
    padding: 7px 18px;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 3px 10px rgba(233, 75, 75, .3);
    transition: transform .2s, box-shadow .2s;
}

.btn-user:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(233, 75, 75, .4);
}

/* ================= 页面主体容器 ================= */
.home-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 12px 40px;
}

/* ================= 商品详情页 ================= */
.detail-wrapper {
    max-width: 1080px;
}

.detail-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 14px;
}

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #444 !important;
    text-decoration: none !important;
    background: #fff;
    border: 1px solid var(--home-border);
    border-radius: 18px;
    padding: 6px 16px;
    transition: all .2s;
}

.detail-back:hover {
    color: var(--home-blue) !important;
    border-color: var(--home-blue);
    background: #eef4fc;
}

.detail-crumb {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--home-text-sub);
}

.detail-crumb .fa {
    font-size: 11px;
}

.detail-crumb .crumb-cur {
    color: var(--home-text);
    font-weight: 600;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- 详情页双栏：左主区 + 右推荐栏 ---- */
.detail-grid {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.detail-main {
    flex: 1;
    min-width: 0;
}

.detail-side {
    width: 300px;
    flex-shrink: 0;
    position: sticky;
    top: 84px;
}

.detail-wrapper .card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(30, 60, 110, .08);
    overflow: hidden;
    margin-bottom: 16px;
}

/* 商品头部 */
.dp-body {
    display: flex;
    gap: 22px;
    padding: 20px;
}

.dp-media {
    width: 340px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f2f5fa;
    align-self: flex-start;
}

.dp-cover {
    display: block;
    width: 100%;
    height: auto;
    min-height: 220px;
    object-fit: cover;
}

.dp-info {
    flex: 1;
    min-width: 0;
}

.dp-info .productName {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.35;
    color: #1f2a37;
    margin: 0 0 12px;
}

.dp-price-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.dp-price .price {
    color: var(--home-red);
    font-size: 28px;
    font-weight: 800;
}

.dp-price-row .cardType {
    background: #e9f9f0;
    color: #16a34a;
    font-size: 12px;
    padding: 3px 10px;
}

.dp-share {
    margin: 4px 0 14px;
}

/* 购买表单 */
.detail-product .commodity .form-group {
    margin-bottom: 12px;
}

.detail-product .commodity label {
    font-size: 14px;
    color: #374151;
    font-weight: 600;
}

.detail-product .commodity .form-control {
    border: 1px solid var(--home-border);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.detail-product .commodity .form-control:focus {
    border-color: var(--home-blue);
    box-shadow: 0 0 0 3px rgba(31, 111, 214, .12);
}

.detail-product .commodity .payAmountView {
    font-size: 15px;
    margin-top: 6px;
}

/* 区块标题 */
.db-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    color: #1f2a37;
    border-bottom: 1px solid var(--home-border);
}

.db-title .fa {
    color: var(--home-blue);
}

/* 正文（富文本） */
.detail-body .description {
    padding: 20px;
    font-size: 15px;
    line-height: 1.9;
    color: #374151;
    word-break: break-word;
}

.detail-body .description img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 8px 0;
}

.detail-body .description p {
    margin: 0 0 12px;
}

/* 付款方式区块 */
.detail-pay .card-block {
    padding: 16px 20px;
}

/* 右侧推荐 */
.side-rec-tabs {
    display: flex;
    gap: 2px;
    padding: 12px 14px 0;
    border-bottom: 1px solid var(--home-border);
}

.side-rec-tabs span {
    padding: 6px 12px;
    font-size: 14px;
    color: var(--home-text-sub);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
    user-select: none;
}

.side-rec-tabs span:hover {
    color: var(--home-red);
}

.side-rec-tabs span.on {
    color: var(--home-red);
    border-bottom-color: var(--home-red);
    font-weight: 700;
}

.rec-list {
    list-style: none;
    margin: 0;
    padding: 8px 14px 14px;
}

.rec-list a {
    display: block;
    padding: 8px 0;
    color: #4b5563 !important;
    text-decoration: none !important;
    font-size: 13.5px;
    border-bottom: 1px dashed #eef1f6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s;
}

.rec-list a:hover {
    color: var(--home-red) !important;
}

.side-other-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    font-weight: 700;
    color: #1f2a37;
    border-bottom: 1px solid var(--home-border);
}

.other-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px;
}

.other-card {
    text-decoration: none !important;
    color: #333 !important;
    display: block;
}

.oc-cover {
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #f2f5fa;
}

.oc-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.oc-name {
    font-size: 13px;
    line-height: 1.4;
    margin-top: 6px;
    height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.oc-price {
    color: var(--home-red);
    font-weight: 700;
    font-size: 14px;
    margin-top: 2px;
}

.rec-empty {
    color: #9aa5b5;
    font-size: 13px;
    padding: 10px 0;
    list-style: none;
}

/* 付款按钮（详情页） */
.detail-wrapper .pay_type .button-click {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--home-border) !important;
    background: #fff !important;
    border-radius: 8px;
    padding: 9px 16px !important;
    margin: 0 8px 8px 0;
    font-size: 14px;
    text-decoration: none !important;
    transition: border-color .15s, color .15s;
}

.detail-wrapper .pay_type .button-click:hover {
    border-color: var(--home-red) !important;
    color: var(--home-red) !important;
}

@media (max-width: 992px) {
    .detail-grid { flex-direction: column; }
    .detail-side { width: 100%; position: static; }
    .dp-body { flex-direction: column; gap: 14px; }
    .dp-media { width: 100%; }
    .dp-info .productName { font-size: 20px; }
    .dp-price .price { font-size: 24px; }
}

/* ================= 顶部三栏：分类栏 / 轮播 / 用户面板 ================= */
.home-hero {
    display: flex;
    gap: 14px;
    align-items: stretch;
}

/* ---- 左侧蓝色分类栏 ---- */
.side-cats {
    width: 226px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #2b7ce0 0%, #1f6fd6 45%, #175bb4 100%);
    border-radius: 12px;
    padding: 10px 0 12px;
    box-shadow: 0 6px 18px rgba(31, 111, 214, .25);
    display: flex;
    flex-direction: column;
    max-height: none;
    overflow-y: auto;
}

.side-cats::-webkit-scrollbar {
    width: 4px;
}

.side-cats::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .35);
    border-radius: 4px;
}

.side-cats .side-title {
    color: #fff;
    font-weight: bold;
    font-size: 15px;
    padding: 6px 16px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.side-cat {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .2px;
    padding: 8px 16px 4px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: background .2s;
    user-select: none;
}

.side-cat img {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
}

.side-cat:hover {
    background: rgba(255, 255, 255, .1);
}

.side-cat.checked {
    background: rgba(255, 255, 255, .14);
    border-left-color: #ffd76e;
}

.side-cat.empty-commodity {
    opacity: .45;
    cursor: not-allowed;
}

/* ---- 顶部栏二级子分类：标题下方平铺行内链接（斜杠分隔，参考图样式） ---- */
.side-sub {
    padding: 2px 14px 10px 33px;
    line-height: 1.9;
    word-break: break-all;
}

.side-sub-item {
    color: rgba(255, 255, 255, .85) !important;
    text-decoration: none !important;
    font-size: 13px;
    cursor: pointer;
    transition: color .2s;
    user-select: none;
}

.side-sub-item:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

.side-sub-item.active {
    color: #ffd76e !important;
    font-weight: bold;
}

.sub-sep {
    color: rgba(255, 255, 255, .4);
    margin: 0 5px;
    font-size: 12px;
}

.side-all-btn {
    margin: 10px 14px 0;
    margin-top: auto;
    text-align: center;
    color: #fff;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 8px;
    padding: 7px 0;
    font-size: 13px;
    cursor: pointer;
    transition: background .2s;
    user-select: none;
}

.side-all-btn:hover {
    background: rgba(255, 255, 255, .3);
}

/* ---- 中间轮播 ---- */
.home-banner {
    flex: 1;
    min-width: 0;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    min-height: 336px;
    box-shadow: 0 6px 18px rgba(20, 40, 80, .18);
}

.banner-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity .8s ease;
    color: #fff;
    text-align: center;
    padding: 20px;
}

.banner-slide.on {
    opacity: 1;
}

/* 后台可上传的轮播图片（铺满整个轮播区） */
.banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.banner-slide .quote {
    font-size: 52px;
    line-height: 1;
    font-family: Georgia, serif;
    opacity: .85;
}

.banner-slide h2 {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 4px;
    margin: 6px 0 10px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, .35);
}

.banner-slide p {
    font-size: 17px;
    letter-spacing: 3px;
    opacity: .92;
    margin: 0;
}

.slide-1 {
    background: radial-gradient(120% 160% at 15% 10%, #4a3ab0 0%, #232a68 45%, #101433 100%);
}

.slide-2 {
    background: radial-gradient(130% 150% at 80% 15%, #d96a2b 0%, #8a2f1d 50%, #2b0f0a 100%);
}

.slide-3 {
    background: radial-gradient(130% 160% at 50% 0%, #12876f 0%, #0b5a54 50%, #062b31 100%);
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .25);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    z-index: 5;
    transition: background .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-arrow:hover {
    background: rgba(255, 255, 255, .45);
}

.banner-arrow.prev { left: 12px; }
.banner-arrow.next { right: 12px; }

.banner-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 5;
}

.banner-dots i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .4);
    cursor: pointer;
    transition: all .3s;
}

.banner-dots i.on {
    background: #fff;
    width: 22px;
    border-radius: 4px;
}

/* ---- 右侧用户面板 ---- */
.user-panel {
    width: 282px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(30, 60, 110, .08);
    padding: 20px 16px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.up-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a62, #e94b4b);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    box-shadow: 0 6px 16px rgba(233, 75, 75, .35);
    overflow: hidden;
    border: 3px solid #ffe3e3;
}

.up-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.up-welcome {
    margin-top: 10px;
    color: var(--home-text-sub);
    font-size: 14px;
}

.up-welcome b {
    color: var(--home-text);
}

.up-btns {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    width: 100%;
}

.up-btns a {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 18px;
    font-size: 13px;
    text-decoration: none !important;
    transition: transform .2s, opacity .2s;
}

.up-btns a:hover {
    transform: translateY(-1px);
    opacity: .92;
}

.up-btn-ghost {
    border: 1px solid var(--home-border);
    color: var(--home-text) !important;
    background: #fff;
}

.up-btn-red {
    background: linear-gradient(90deg, #f26d6d, var(--home-red));
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(233, 75, 75, .3);
}

.up-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 16px;
    width: 100%;
}

.up-grid a {
    background: #f5f7fa;
    border-radius: 8px;
    text-align: center;
    font-size: 12.5px;
    color: #555 !important;
    text-decoration: none !important;
    padding: 10px 2px;
    transition: all .2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.up-grid a i {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--home-blue);
}

.up-grid a:hover {
    background: #eef3fb;
    color: var(--home-blue) !important;
    transform: translateY(-1px);
}

/* ================= 公告条 ================= */
.notice-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 10px;
    margin-top: 14px;
    padding: 10px 16px;
    box-shadow: 0 2px 10px rgba(30, 60, 110, .06);
    overflow: hidden;
}

.notice-tag {
    flex-shrink: 0;
    background: linear-gradient(90deg, #f26d6d, var(--home-red));
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    border-radius: 6px;
    padding: 3px 12px;
}

.notice-body {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
    height: 22px;
}

.notice-scroll {
    position: absolute;
    white-space: nowrap;
    line-height: 22px;
    font-size: 14px;
    color: #555;
    animation: noticeMove 18s linear infinite;
    padding-left: 100%;
}

.notice-bar:hover .notice-scroll {
    animation-play-state: paused;
}

@keyframes noticeMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ================= 商品区 ================= */
.goods-section {
    margin-top: 16px;
}

.goods-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, .82);
    border-radius: 10px;
}

.goods-head h3 {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.goods-head h3::before {
    content: "";
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(180deg, #2b7ce0, var(--home-blue-dark));
}

.goods-head .goods-tip {
    font-size: 13px;
    color: var(--home-text-sub);
}

.goods-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

/* ---- 商品分页条（每页 50 件）---- */
.goods-pager {
    margin: 22px 0 6px;
    text-align: center;
}

.pager-inner {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, .88);
    padding: 8px 18px;
    border-radius: 30px;
    box-shadow: 0 2px 10px rgba(30, 60, 110, .08);
}

.pager-btn {
    border: none;
    background: linear-gradient(135deg, #3a7afe, #5b9bff);
    color: #fff;
    padding: 7px 18px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: opacity .2s, transform .15s;
}

.pager-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.pager-btn:disabled {
    background: #c3cdda;
    cursor: not-allowed;
    opacity: .7;
}

.pager-info {
    font-size: 13px;
    color: #5a6b80;
    white-space: nowrap;
}

/* 顶部分类面板标题可点击（展示全部商品） */
.side-title-click {
    cursor: pointer;
    user-select: none;
}

.side-title-click:hover {
    color: #ffd76e;
}

.p-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(30, 60, 110, .07);
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
    user-select: none;
}

.p-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(30, 60, 110, .16);
}

.p-card .p-cover {
    height: 150px;
    background: #f0f3f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.p-card .p-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.p-card .p-info {
    padding: 10px 12px 12px;
}

.p-card .p-name {
    font-size: 14px;
    font-weight: bold;
    color: var(--home-text);
    line-height: 1.45;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.p-card .p-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
}

.p-card .p-price {
    color: var(--home-red);
    font-size: 17px;
    font-weight: 800;
}

.p-card .p-price small {
    font-size: 12px;
}

.p-card .p-stock {
    font-size: 11px;
    color: #18a058;
    background: #e8f7ef;
    border-radius: 4px;
    padding: 2px 7px;
}

.p-card .p-stock.low { color: #d98b00; background: #fdf4e3; }
.p-card .p-stock.out { color: #999; background: #f0f0f0; }

.p-card.p-disabled {
    opacity: .55;
    cursor: not-allowed;
}

.p-card.checked {
    outline: 2px solid var(--home-red);
    outline-offset: -2px;
}

.goods-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--home-text-sub);
    padding: 50px 0;
    font-size: 14px;
}

/* ---- 商品区双栏布局：左分类侧栏 + 右商品网格 ---- */
.goods-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.goods-main {
    flex: 1;
    min-width: 0;
}

/* ---- 左侧「所有分类」侧边栏 ---- */
.cat-sidebar {
    width: 226px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(30, 60, 110, .08);
    overflow: hidden;
    position: sticky;
    top: 80px;
}

.cat-sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: bold;
    font-size: 15px;
    padding: 13px 16px;
    background: linear-gradient(180deg, #2b7ce0 0%, #1f6fd6 60%, #175bb4 100%);
}

.cat-sidebar-list {
    padding: 6px;
    max-height: 640px;
    overflow-y: auto;
}

.cat-sidebar-list::-webkit-scrollbar { width: 4px; }
.cat-sidebar-list::-webkit-scrollbar-thumb { background: #cdd8e8; border-radius: 4px; }

.cs-item {
    border-bottom: 1px solid var(--home-border);
}
.cs-item:last-child { border-bottom: none; }

.cs-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 10px;
    cursor: pointer;
    border-radius: 8px;
    transition: background .18s, color .18s;
    user-select: none;
}

.cs-row:hover {
    background: #f2f7fd;
}

.cs-item.active .cs-row {
    background: #eaf2fd;
    color: var(--home-blue);
    font-weight: bold;
}

.cs-row img {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.cs-row > .fa {
    width: 20px;
    text-align: center;
    color: var(--home-blue);
    flex-shrink: 0;
}

.cs-name {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-count {
    font-size: 12px;
    color: var(--home-text-sub);
    background: #f0f3f8;
    border-radius: 10px;
    padding: 1px 8px;
    flex-shrink: 0;
}

.cs-item.active .cs-count {
    color: var(--home-blue);
    background: #d9e7fb;
}

.cs-chevron {
    font-size: 12px !important;
    color: #b6c1d0 !important;
    padding: 4px;
    border-radius: 4px;
    transition: transform .25s, color .18s, background .18s;
    flex-shrink: 0;
}

.cs-chevron:hover {
    color: var(--home-blue) !important;
    background: #e6eefa;
}

.cs-chevron.open {
    transform: rotate(180deg);
    color: var(--home-blue) !important;
}

/* 展开后的真实商品子项 */
.cs-sub {
    display: none;
    padding: 2px 8px 8px 34px;
}

.cs-sub-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 7px;
    cursor: pointer;
    color: #555 !important;
    text-decoration: none !important;
    font-size: 13px;
    transition: background .15s, color .15s;
}

.cs-sub-item:hover {
    background: #f2f7fd;
    color: var(--home-blue) !important;
}

.cs-sub-item img {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
}

.cs-sub-item > .fa {
    width: 22px;
    text-align: center;
    color: #a9b6c8;
    flex-shrink: 0;
}

.cs-sub-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-sub-price {
    color: var(--home-red);
    font-size: 12.5px;
    flex-shrink: 0;
}

.cs-empty {
    color: var(--home-text-sub);
    font-size: 12.5px;
    padding: 8px 4px;
}

/* 侧边栏二级子分类项 */
.cs-cat-item {
    padding-left: 12px;
    border-left: 2px solid #e3ecf7;
    margin-left: 10px;
}

.cs-cat-item .cs-sub-price {
    color: var(--home-text-sub);
    font-weight: normal;
}

.cs-cat-item:hover {
    border-left-color: var(--home-blue);
}

.cs-cat-item.active {
    background: #eef4ff;
    color: var(--home-blue) !important;
    border-left-color: var(--home-blue);
    font-weight: 600;
}

/* ================= 购买流程卡片（保留原有结构，重塑视觉） ================= */
.home-purchase .card {
    background: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 14px rgba(30, 60, 110, .08) !important;
    margin-top: 16px;
}

.home-purchase .card .card-header {
    border-bottom: 1px solid var(--home-border) !important;
    background: transparent !important;
}

.home-purchase .card .card-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--home-text);
}

.home-purchase .card-block {
    padding: 14px 18px !important;
}

/* 分类/商品 选择按钮（兼容旧 JS 输出的 .button-click） */
.home-purchase .button-click {
    background: #f5f7fa;
    border-radius: 8px !important;
    padding: 7px 14px !important;
    box-shadow: none !important;
    font-weight: normal !important;
    color: #444;
}

.home-purchase .button-click:hover {
    border: 1px solid var(--home-blue) !important;
    color: var(--home-blue);
    background: #eef4fc;
}

.home-purchase .button-click.checked {
    border: 1px solid var(--home-red) !important;
    color: var(--home-red);
    background: #fdf0f0;
    font-weight: bold !important;
}

.home-purchase .empty-commodity {
    opacity: .5;
    cursor: not-allowed;
}

/* 支付方式按钮 */
.pay_type .button-click {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--home-border) !important;
    background: #fff !important;
    padding: 9px 16px !important;
    font-size: 14px;
}

.pay_type .button-click:hover {
    border-color: var(--home-red) !important;
    color: var(--home-red) !important;
}

/* 自选卡密表格 */
.anticipation table {
    width: 100%;
}

.anticipation thead th {
    padding-bottom: 8px;
}

.anticipation button {
    border: 1px solid var(--home-border);
    background: #fff;
    border-radius: 6px;
    padding: 4px 14px;
    margin: 0 6px;
    cursor: pointer;
    font-size: 13px;
}

.anticipation button:hover:not(:disabled) {
    border-color: var(--home-blue);
    color: var(--home-blue);
}

.anticipation button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.anticipation tbody {
    display: block;
    max-height: 260px;
    overflow-y: auto;
}

.anticipation tbody tr {
    display: block;
    padding: 8px 10px;
    border: 1px dashed var(--home-border) !important;
    border-radius: 8px !important;
    margin: 0 0 8px;
    font-size: 13px;
}

.lot_string {
    background: #fdf4e3;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 13px;
    color: #8a6116;
    margin-bottom: 6px;
}

/* 联系客服侧滑条 */
.sliderbar-container .title {
    color: var(--home-blue);
}

/* 订单金额强调 */
.payAmountView {
    font-size: 15px;
}

/* ================= 页脚 ================= */
.home-footer {
    text-align: center;
    padding: 14px 20px;
    margin: 0 auto 20px;
    max-width: 720px;
    background: rgba(255, 255, 255, .75);
    border-radius: 10px;
    color: #9aa5b5;
    font-size: 13px;
}

.content-icp {
    text-align: center;
    color: #b0b8c4;
    font-size: 12px;
    padding-bottom: 16px;
}

/* ================= 响应式 ================= */
@media (max-width: 1100px) {
    .goods-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 992px) {
    .home-hero { flex-wrap: wrap; }
    .goods-layout { flex-direction: column; }
    .cat-sidebar { width: 100%; position: static; }
    .cat-sidebar-list { max-height: none; }
    .side-cats {
        width: 100%;
        max-height: none;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 8px;
    }
    .side-cats .side-title { width: 100%; border-bottom: none; }
    .side-cat {
        border-left: none;
        border-radius: 8px;
        padding: 7px 12px;
    }
    .side-cat.checked { border-left: none; background: rgba(255, 255, 255, .2); }
    .side-sub { padding: 0 12px 8px 33px; }
    .side-all-btn { display: none; }
    .home-banner { width: 100%; flex: none; height: 220px; }
    .user-panel { width: 100%; }
    .shop-search input { width: 120px; }
    .shop-links { order: 5; width: 100%; }
    .shop-link { line-height: 42px; }
    .shop-link.active::after { bottom: 4px; }
}

@media (max-width: 768px) {
    .goods-grid { grid-template-columns: repeat(2, 1fr); }
    .banner-slide h2 { font-size: 24px; letter-spacing: 2px; }
    .banner-slide p { font-size: 14px; letter-spacing: 1px; }
    .banner-slide .quote { font-size: 34px; }
    .shop-search { order: 6; width: 100%; margin-left: 0; }
    .shop-search input { width: 100%; flex: 1; }
}
