/* ============================================
   智汇优品 - 主样式文件
   ============================================ */

/* ---- 全局 ---- */
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background: #f5f5f5;
}
a { color: #555; text-decoration: none; }
a:hover { color: var(--theme-primary); text-decoration: none; }
.color-text { color: var(--theme-primary) !important; }
img { max-width: 100%; }

/* ---- 顶部栏 ---- */
#topbar {
    background: var(--theme-topbar-bg);
    color: var(--theme-topbar-text);
    font-size: 12px;
    line-height: 35px;
    height: 35px;
}
#topbar .left-name { color: var(--theme-topbar-text); }
#topbar .links { list-style: none; padding: 0; margin: 0; }
#topbar .links li { display: inline-block; margin-left: 15px; }
#topbar .links li a { color: var(--theme-topbar-link); }
#topbar .links li a:hover { color: var(--theme-primary); }
#topbar .links li a.user-static { color: var(--theme-primary); }

/* ---- 头部 ---- */
#header { background: #fff; padding-bottom: 0; border-bottom: 1px solid #eee; }
.pt-md { padding-top: 15px; }
.mb-lg { margin-bottom: 0; }

/* 使用 flexbox 对齐 logo、搜索框、发布按钮 */
.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    gap: 30px;
}

.logo { flex-shrink: 0; }
.logo img { height: 50px; max-width: 200px; }

.search { flex: 1; max-width: 480px; }
.search .search-input-wrap {
    display: flex;
    width: 100%;
    height: 42px;
    border: 2px solid var(--theme-primary);
    border-radius: 22px;
    overflow: hidden;
}
.search .search-input-wrap input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 18px;
    font-size: 14px;
    color: #333;
    background: #fff;
    border-radius: 22px 0 0 22px;
}
.search .search-input-wrap input::placeholder { color: #bbb; }
.search .search-input-wrap button {
    border: none;
    background: var(--theme-primary);
    color: #fff;
    padding: 0 28px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    border-radius: 0 22px 22px 0;
}
.search .search-input-wrap button:hover { background: var(--theme-primary-dark); }
.search .search-input-wrap button i { margin-right: 4px; }

.action { flex-shrink: 0; }
.action .add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark));
    color: #fff;
    padding: 10px 26px;
    border-radius: 22px;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s;
}
.action .add:hover { background: linear-gradient(135deg, var(--theme-primary-dark), var(--theme-primary-darker)); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb),0.3); }

/* ---- 导航 ---- */
.navbar-group { background: var(--theme-nav-bg); margin-top: 15px; }
#navbar { padding: 0; }
#navbar a {
    display: inline-block;
    color: #fff;
    padding: 12px 22px;
    font-size: 15px;
    transition: all 0.2s;
}
#navbar a:hover, #navbar a.active { background: var(--theme-nav-hover); color: #fff; }
.mt-md { margin-top: 0; }

/* ---- 主体内容 ---- */
#main { padding-top: 20px; }

/* ---- 信息板块 ---- */
.info-section {
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.info-section-header {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.info-section-header .title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}
.info-section-header .title i { color: var(--theme-primary); margin-right: 6px; }
.info-section-header .more a { color: #999; font-size: 13px; }
.info-section-header .more a:hover { color: var(--theme-primary); }

.info-grid { padding: 15px 15px 5px; }
.info-card {
    display: block;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    transition: all 0.3s;
    background: #fff;
    color: #333;
}
.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    color: #333;
}
.info-card .card-img { height: 170px; overflow: hidden; }
.info-card .card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.info-card:hover .card-img img { transform: scale(1.05); }
.info-card .card-body { padding: 10px 12px; }
.info-card .card-title {
    font-size: 14px;
    height: 40px;
    overflow: hidden;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #333;
}
.info-card .card-meta { font-size: 12px; color: #999; }
.info-card .card-meta span { margin-right: 10px; }
.info-card .card-price { font-size: 18px; color: var(--theme-primary); font-weight: bold; margin-top: 5px; }

/* ---- 分类列表页 ---- */
.page-header-bar {
    background: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.page-header-bar .page-icon { font-size: 28px; color: var(--theme-primary); margin-right: 10px; vertical-align: middle; }
.page-header-bar .page-title { font-size: 20px; font-weight: bold; display: inline; vertical-align: middle; }
.page-header-bar .page-count { color: #999; font-size: 13px; margin-left: 10px; }

.filter-bar {
    background: #fff;
    border-radius: 8px;
    padding: 10px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.filter-bar .filter-tag {
    display: inline-block;
    padding: 4px 14px;
    margin: 3px 5px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    background: #f5f5f5;
    color: #666;
    transition: all 0.2s;
}
.filter-bar .filter-tag:hover, .filter-bar .filter-tag.active {
    background: var(--theme-primary);
    color: #fff;
}

.list-item {
    background: #fff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: all 0.2s;
    cursor: pointer;
    color: #333;
}
.list-item:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.1); color: #333; text-decoration: none; }
.list-item .list-img { width: 140px; height: 100px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.list-item .list-img img { width: 100%; height: 100%; object-fit: cover; }
.list-item .list-info { flex: 1; min-width: 0; }
.list-item .list-title { font-size: 16px; font-weight: bold; margin-bottom: 6px; }
.list-item .list-desc { font-size: 13px; color: #888; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .list-meta { font-size: 12px; color: #aaa; }
.list-item .list-meta span { margin-right: 12px; }
.list-item .list-price { font-size: 18px; color: var(--theme-primary); font-weight: bold; text-align: right; white-space: nowrap; }

/* ---- 详情页 ---- */
.detail-container { background: #fff; border-radius: 8px; padding: 25px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.detail-title { font-size: 22px; font-weight: bold; margin-bottom: 12px; color: #333; }
.detail-meta { color: #999; font-size: 13px; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 12px; }
.detail-meta span { margin-right: 18px; }
.detail-img { margin-bottom: 20px; border-radius: 8px; overflow: hidden; }
.detail-img img { width: 100%; max-height: 400px; object-fit: cover; border-radius: 8px; }
.detail-content { font-size: 15px; line-height: 1.8; color: #555; }
.detail-price-box {
    background: linear-gradient(135deg, var(--theme-primary-light), #fff);
    border: 1px solid #fdd;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.detail-price-box .price-big { font-size: 28px; color: var(--theme-primary); font-weight: bold; }
.detail-btn {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark));
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
}
.detail-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(var(--theme-primary-rgb),0.4); }
.detail-btn-outline {
    background: #fff;
    color: var(--theme-primary);
    border: 2px solid var(--theme-primary);
    padding: 8px 28px;
    border-radius: 25px;
    font-size: 15px;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s;
}
.detail-btn-outline:hover { background: var(--theme-primary-light); }
.detail-back { margin-bottom: 15px; }
.detail-back a { color: #666; font-size: 14px; }
.detail-back a:hover { color: var(--theme-primary); }

/* ============ 商城页（优化版） ============ */

/* ---- Banner ---- */
.mall-banner {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-dark) 100%);
    color: #fff;
    border-radius: 14px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    padding: 48px 40px 42px;
}
.mall-banner-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}
.mall-banner-text h2 {
    margin: 0 0 10px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 1px;
}
.mall-banner-text p {
    margin: 0;
    opacity: 0.88;
    font-size: 15px;
}
.mall-banner-search {
    display: flex;
    background: rgba(255,255,255,0.95);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    width: 320px;
    max-width: 100%;
}
.mall-banner-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 12px 20px;
    font-size: 14px;
    background: transparent;
    color: #333;
}
.mall-banner-search input::placeholder { color: #bbb; }
.mall-banner-search button {
    background: var(--theme-primary);
    color: #fff;
    border: none;
    padding: 0 22px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}
.mall-banner-search button:hover { background: var(--theme-primary-dark); }
.mall-banner-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    z-index: 1;
}
.mall-banner-circle.c1 { width: 260px; height: 260px; top: -80px; right: -60px; }
.mall-banner-circle.c2 { width: 160px; height: 160px; bottom: -50px; left: 10%; }

/* ---- 工具栏（筛选 + 排序） ---- */
.mall-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0 4px;
}
.mall-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.mall-toolbar-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
    flex-shrink: 0;
}
.mall-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: #555;
    background: #fff;
    border: 1px solid #e8e8e8;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.mall-filter-tag:hover { border-color: var(--theme-primary); color: var(--theme-primary); }
.mall-filter-tag.active {
    background: var(--theme-primary);
    color: #fff;
    border-color: var(--theme-primary);
}
.cat-count {
    font-size: 11px;
    background: rgba(0,0,0,0.06);
    padding: 1px 7px;
    border-radius: 10px;
    color: #999;
}
.mall-filter-tag.active .cat-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}
.mall-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #888;
}
.mall-toolbar-right select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    color: #555;
    background: #fff;
    outline: none;
    cursor: pointer;
}
.mall-toolbar-right select:focus { border-color: var(--theme-primary); }
.mall-result-count { color: #aaa; font-size: 13px; }

/* ---- 商品网格：自适应列数 ---- */
.mall-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 36px;
}
@media (max-width: 991px) {
    .mall-product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
}
@media (max-width: 575px) {
    .mall-product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ---- 商品卡片（优化层次） ---- */
.mall-product-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}
.mall-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.10);
}
/* 标签组 */
.mall-card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    display: flex;
    gap: 6px;
}
.mall-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    color: #fff;
    letter-spacing: 0.5px;
}
.mall-badge.hot      { background: linear-gradient(135deg, #ff4d4f, #ff7a45); }
.mall-badge.new      { background: linear-gradient(135deg, #1677ff, #69b1ff); }
.mall-badge.discount { background: linear-gradient(135deg, #fa541c, #ff7a45); }

/* 图片区 */
.mall-card-img {
    display: block;
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
    background: #f8f8f8;
}
.mall-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.mall-product-card:hover .mall-card-img img { transform: scale(1.06); }

/* 信息区 */
.mall-card-body {
    padding: 16px 16px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.mall-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.mall-card-title:hover { color: var(--theme-primary); }

/* 评分 + 销量 */
.mall-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #999;
}
.mall-card-stars { color: #faaf00; font-size: 13px; letter-spacing: 1px; }
.mall-card-rating { color: #faaf00; font-weight: 600; }
.mall-card-sales { color: #bbb; }
.star-empty { color: #e8e8e8; }

/* 价格行 */
.mall-card-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.mall-card-price {
    font-size: 22px;
    font-weight: 800;
    color: #ff4d4f;
    letter-spacing: -0.5px;
}
.mall-card-old-price {
    font-size: 13px;
    color: #bbb;
    text-decoration: line-through;
}

/* 底部：分类 + 购物车 */
.mall-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f5f5f5;
}
.mall-card-cat {
    font-size: 12px;
    color: #bbb;
    background: #f8f8f8;
    padding: 2px 8px;
    border-radius: 4px;
}
.mall-card-cart-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--theme-primary);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.mall-card-cart-btn:hover {
    background: var(--theme-primary-dark);
    transform: scale(1.12);
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}

/* ---- 空状态 ---- */
.mall-empty {
    text-align: center;
    padding: 80px 20px;
    color: #bbb;
    grid-column: 1 / -1;
}
.mall-empty .fa { font-size: 64px; display: block; margin-bottom: 16px; color: #e8e8e8; }
.mall-empty p { font-size: 16px; margin-bottom: 20px; }
.mall-empty-btn {
    display: inline-block;
    padding: 10px 28px;
    background: var(--theme-primary);
    color: #fff;
    border-radius: 22px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}
.mall-empty-btn:hover { background: var(--theme-primary-dark); }

/* ---- 热销推荐 ---- */
.mall-recommend {
    margin-bottom: 40px;
}
.mall-rec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--theme-primary);
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}
.mall-rec-header a {
    font-size: 13px;
    color: #999;
    font-weight: 400;
    text-decoration: none;
}
.mall-rec-header a:hover { color: var(--theme-primary); }
.mall-rec-header .fa { color: #ff4d4f; margin-right: 6px; }
.mall-rec-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 991px) { .mall-rec-grid { grid-template-columns: repeat(2, 1fr); } }
.mall-rec-item {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.3s;
    padding-bottom: 12px;
}
.mall-rec-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.09);
}
.mall-rec-item img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}
.mall-rec-title {
    display: block;
    padding: 10px 12px 4px;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mall-rec-price {
    display: block;
    padding: 0 12px;
    font-size: 16px;
    font-weight: 700;
    color: #ff4d4f;
}

/* ---- 兼容旧卡片（商品详情页"猜你喜欢"仍在用） ---- */
.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.product-card .prod-img { height: 200px; overflow: hidden; position: relative; }
.product-card .prod-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.product-card:hover .prod-img img { transform: scale(1.08); }
.product-card .prod-tag {
    position: absolute; top: 10px; left: 10px;
    background: var(--theme-primary); color: #fff;
    padding: 2px 10px; border-radius: 3px; font-size: 12px;
}
.product-card .prod-body { padding: 14px; }
.product-card .prod-title { font-size: 14px; height: 40px; overflow: hidden; margin-bottom: 8px; }
.product-card .prod-price { color: var(--theme-primary); font-size: 20px; font-weight: bold; }
.product-card .prod-price .old { color: #bbb; text-decoration: line-through; font-size: 13px; font-weight: normal; margin-left: 6px; }
.product-card .prod-stock { color: #999; font-size: 12px; margin-top: 4px; }
.product-card .prod-action { margin-top: 10px; }
.product-card .btn-cart {
    background: var(--theme-primary); color: #fff; border: none;
    padding: 6px 18px; border-radius: 20px; font-size: 13px;
    cursor: pointer; transition: all 0.2s; float: right;
}
.product-card .btn-cart:hover { background: var(--theme-primary-dark); }

/* ---- 商品详情页 ---- */
.product-detail { background: #fff; border-radius: 10px; padding: 25px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.product-gallery { border-radius: 8px; overflow: hidden; margin-bottom: 20px; }
.product-gallery img { width: 100%; max-height: 400px; object-fit: cover; border-radius: 8px; }
.product-info .prod-name { font-size: 22px; font-weight: bold; margin-bottom: 10px; }
.product-info .prod-desc { color: #888; margin-bottom: 15px; font-size: 14px; line-height: 1.6; }
.product-info .prod-price-area { background: var(--theme-primary-light); border-radius: 8px; padding: 15px 20px; margin-bottom: 15px; }
.product-info .prod-price-area .now { font-size: 28px; color: var(--theme-primary); font-weight: bold; }
.product-info .prod-price-area .old { color: #bbb; text-decoration: line-through; font-size: 15px; margin-left: 8px; }
.product-info .prod-stock-info { color: #888; font-size: 13px; margin-bottom: 15px; }
.product-info .qty-control { display: flex; align-items: center; margin-bottom: 20px; }
.product-info .qty-control button {
    width: 36px; height: 36px; border: 1px solid #ddd; background: #fff; font-size: 18px;
    cursor: pointer; border-radius: 4px; transition: all 0.2s;
}
.product-info .qty-control button:hover { border-color: var(--theme-primary); color: var(--theme-primary); }
.product-info .qty-control input {
    width: 50px; height: 36px; text-align: center; border: 1px solid #ddd; margin: 0 5px;
    border-radius: 4px; font-size: 14px;
}

/* ---- 结算页 ---- */
.checkout-page { background: #f5f5f5; min-height: 100vh; }
.checkout-header { background: #fff; padding: 15px 0; border-bottom: 2px solid var(--theme-primary); margin-bottom: 20px; }
.checkout-header h3 { margin: 0; color: var(--theme-primary); }
.checkout-box { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 15px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.checkout-box h5 { border-left: 4px solid var(--theme-primary); padding-left: 10px; margin-bottom: 15px; font-weight: bold; }
.addr-card {
    border: 2px solid #eee; border-radius: 8px; padding: 14px; margin-bottom: 10px;
    cursor: pointer; transition: all 0.2s;
}
.addr-card:hover, .addr-card.active { border-color: var(--theme-primary); background: #fff8f8; }
.pay-card {
    border: 2px solid #eee; border-radius: 8px; padding: 14px; text-align: center;
    cursor: pointer; transition: all 0.2s; margin-bottom: 10px;
}
.pay-card:hover, .pay-card.active { border-color: var(--theme-primary); }
.checkout-bottom {
    background: #fff; padding: 15px 0; border-top: 2px solid #eee;
    position: sticky; bottom: 0; z-index: 100;
}

/* ---- 辅助页面 ---- */
.page-container {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    min-height: 400px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.page-container h2 { margin-top: 0; color: #333; padding-bottom: 10px; border-bottom: 2px solid var(--theme-primary); }
.page-container h3 { font-size: 16px; color: var(--theme-primary); margin-top: 20px; }
.page-container h4 { font-size: 15px; margin-top: 16px; }
.page-container p { line-height: 1.8; color: #555; }

/* ---- 登录/注册 ---- */
.auth-page { background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-dark) 100%); min-height: 100vh; padding-top: 60px; }
.auth-box {
    background: #fff;
    border-radius: 12px;
    padding: 40px 30px;
    width: 420px;
    margin: 0 auto;
    box-shadow: 0 8px 40px rgba(0,0,0,0.15);
}
.auth-box h3 { margin: 0 0 25px; text-align: center; color: #333; }
.auth-box .form-control { height: 44px; border-radius: 6px; margin-bottom: 15px; }
.auth-box .btn-auth {
    width: 100%;
    height: 44px;
    background: var(--theme-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}
.auth-box .btn-auth:hover { background: var(--theme-primary-dark); }
.auth-box .auth-links { text-align: center; margin-top: 15px; color: #888; }
.auth-box .auth-links a { color: var(--theme-primary); }

/* ---- 发布页 ---- */
.publish-form .form-group label { font-weight: bold; }
.publish-form .form-control { border-radius: 6px; }
.publish-form textarea.form-control { min-height: 120px; }

/* ---- 弹窗遮罩 ---- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
}
.modal-dialog {
    background: #fff; border-radius: 12px; padding: 30px;
    width: 400px; max-width: 90%; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

/* ---- 工具栏 ---- */
#toolbar {
    position: fixed;
    right: 20px;
    bottom: 30%;
    z-index: 900;
}
#toolbar a {
    display: block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 50%;
    margin-bottom: 8px;
    color: #888;
    font-size: 18px;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
#toolbar a:hover { color: var(--theme-primary); border-color: var(--theme-primary); transform: scale(1.1); }

/* ---- 底部 ---- */
#footer {
    background: var(--theme-footer-bg);
    color: var(--theme-topbar-link);
    padding: 25px 0;
    margin-top: 40px;
}
#footer .nav { margin-bottom: 8px; }
#footer .nav a { color: var(--theme-topbar-link); margin: 0 3px; font-size: 13px; }
#footer .nav a:hover { color: var(--theme-primary); }
#footer .copyright { font-size: 12px; color: #777; margin: 0; }
#footer .copyright a { color: #888; }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
    .header-flex { flex-wrap: wrap; gap: 10px; padding: 8px 0; }
    .logo { width: 100%; text-align: center; }
    .logo img { height: 36px; }
    .search { width: 100%; max-width: 100%; order: 2; }
    .search .search-input-wrap { height: 38px; }
    .action { width: 100%; text-align: center; order: 3; }
    .action .add { display: inline-block; }
    #navbar a { padding: 10px 12px; font-size: 13px; }
    .info-card .card-img { height: 130px; }
    .list-item .list-img { width: 100px; height: 75px; }
    .list-item .list-title { font-size: 14px; }
    .list-item .list-price { font-size: 15px; }
    .auth-box { width: 90%; padding: 30px 20px; }
}

/* ---- 返回顶部 ---- */
.back-top {
    position: fixed; right: 20px; bottom: 40px; width: 44px; height: 44px;
    background: var(--theme-primary); color: #fff; border-radius: 50%; text-align: center;
    line-height: 44px; cursor: pointer; z-index: 999; display: none;
    box-shadow: 0 4px 12px rgba(var(--theme-primary-rgb),0.3);
}
.back-top.show { display: block; }

/* ============================================
   首页布局样式
   ============================================ */

/* ---- Hero Banner ---- */
.hero-banner {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-primary-dark) 100%);
    border-radius: 10px;
    padding: 45px 40px;
    margin-bottom: 20px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero-decoration-1 {
    position: absolute; top: -30px; right: -30px;
    width: 180px; height: 180px;
    background: rgba(255,255,255,0.08); border-radius: 50%;
}
.hero-decoration-2 {
    position: absolute; bottom: -40px; left: -20px;
    width: 150px; height: 150px;
    background: rgba(255,255,255,0.05); border-radius: 50%;
}
.hero-content { position: relative; z-index: 1; }
.hero-content h1 {
    font-size: 30px; font-weight: bold; margin: 0 0 10px;
}
.hero-content p {
    font-size: 15px; opacity: 0.9; margin: 0 0 22px;
}
.hero-buttons { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.hero-btn-primary {
    background: #fff; color: var(--theme-primary);
    padding: 10px 30px; border-radius: 25px;
    font-size: 15px; font-weight: bold;
    transition: all 0.2s;
}
.hero-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.15); color: var(--theme-primary-dark); }
.hero-btn-secondary {
    background: rgba(255,255,255,0.2); color: #fff;
    padding: 10px 30px; border-radius: 25px;
    font-size: 15px; font-weight: bold;
    border: 2px solid rgba(255,255,255,0.5);
    transition: all 0.2s;
}
.hero-btn-secondary:hover { background: rgba(255,255,255,0.3); color: #fff; }

/* ---- 分类快捷入口 ---- */
.quick-entry-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}
.quick-entry-card {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 10px;
    padding: 18px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: all 0.3s;
    color: #333;
}
.quick-entry-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    color: #333;
    text-decoration: none;
}
.qe-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 22px;
    flex-shrink: 0;
}
.qe-name { font-size: 15px; font-weight: bold; color: #333; margin-bottom: 2px; }
.qe-count { font-size: 12px; color: #999; }

/* ---- 分类信息列表区 ---- */
.info-list-row {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}
.info-list-block {
    flex: 1;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.ilb-header {
    padding: 14px 18px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafafa;
}
.ilb-title {
    font-size: 16px; font-weight: bold; color: #333;
}
.ilb-title i { color: var(--theme-primary); margin-right: 6px; }
.ilb-more { color: #999; font-size: 13px; }
.ilb-more:hover { color: var(--theme-primary); text-decoration: none; }
.ilb-list {
    list-style: none; padding: 8px 18px; margin: 0;
}
.ilb-list li {
    border-bottom: 1px dashed #f0f0f0;
}
.ilb-list li:last-child { border-bottom: none; }
.ilb-list li a {
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: #555;
    transition: color 0.2s;
    gap: 8px;
}
.ilb-list li a:hover { color: var(--theme-primary); text-decoration: none; }
.ilb-rank {
    width: 20px; height: 20px;
    border-radius: 4px;
    background: #eee;
    color: #999;
    font-size: 12px;
    text-align: center;
    line-height: 20px;
    flex-shrink: 0;
    font-weight: bold;
}
.ilb-rank.top { background: var(--theme-primary); color: #fff; }
.ilb-item-title {
    flex: 1;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #555;
}
.ilb-list li a:hover .ilb-item-title { color: var(--theme-primary); }
.ilb-item-price {
    font-size: 13px;
    color: var(--theme-primary);
    font-weight: bold;
    flex-shrink: 0;
}

/* ---- 商城区域 ---- */
.mall-section {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}
.mall-section-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(90deg, var(--theme-primary-light), #fff);
}
.msh-title {
    font-size: 18px; font-weight: bold; color: #333;
    display: flex; align-items: center; gap: 8px;
}
.msh-title i { color: var(--theme-primary); font-size: 22px; }
.msh-desc { flex: 1; font-size: 13px; color: #999; }
.msh-more {
    color: var(--theme-primary); font-size: 14px; font-weight: bold;
    padding: 6px 16px; border: 1px solid var(--theme-primary); border-radius: 20px;
    transition: all 0.2s;
}
.msh-more:hover { background: var(--theme-primary); color: #fff; text-decoration: none; }
.mall-product-grid { padding: 15px; }
.prod-cat-badge {
    display: inline-block;
    background: #f0f0f0;
    color: #888;
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 3px;
    margin-bottom: 6px;
}

/* ---- 响应式 - 首页 ---- */
@media (max-width: 768px) {
    .quick-entry-row { flex-wrap: wrap; }
    .quick-entry-card { width: 48%; flex: none; }
    .info-list-row { flex-direction: column; }
    .hero-content h1 { font-size: 22px; }
    .hero-content p { font-size: 13px; }
    .mall-section-header { flex-wrap: wrap; gap: 8px; }
    .msh-desc { width: 100%; order: 3; }
}

/* ---- 首页轮播图 ---- */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-slide.active {
    opacity: 1;
    z-index: 1;
}
.hero-slide-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.35);
}
.hero-slide .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}
.hero-slide .hero-content h1 {
    font-size: 36px;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.hero-slide .hero-content p {
    font-size: 18px;
    margin-bottom: 28px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; }
.hero-btn-primary {
    display: inline-block;
    padding: 12px 36px;
    background: var(--theme-primary);
    color: #fff;
    border-radius: 30px;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s;
}
.hero-btn-primary:hover { background: var(--theme-primary-dark); transform: translateY(-2px); }
.hero-btn-secondary {
    display: inline-block;
    padding: 12px 36px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 30px;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.2s;
}
.hero-btn-secondary:hover { background: rgba(255,255,255,0.35); }
/* 轮播图指示点 */
.hero-dots {
    position: absolute;
    bottom: 24px;
    left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 10;
}
.hero-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    padding: 0;
}
.hero-dot.active { background: var(--theme-primary); transform: scale(1.2); }
/* 左右箭头 */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-arrow:hover { background: rgba(0,0,0,0.6); }
.hero-prev { left: 16px; }
.hero-next { right: 16px; }

/* ---- 响应式 - 轮播图 ---- */
@media (max-width: 768px) {
    .hero-carousel { height: 280px; }
    .hero-slide .hero-content h1 { font-size: 22px; }
    .hero-slide .hero-content p { font-size: 13px; }
    .hero-btn-primary, .hero-btn-secondary { padding: 8px 20px; font-size: 13px; }
}

/* ============================================================
   响应式布局升级（阶段 2）—— 移动优先断点
   断点：1200 大屏 / 992 平板 / 768 手机 / 575 小手机
   ============================================================ */

/* 导航汉堡按钮：桌面默认隐藏 */
.navbar-toggle { display: none; }

/* ---- 平板及以下：导航栏折叠为汉堡菜单 ---- */
@media (max-width: 992px) {
    .navbar-group { margin-top: 10px; }
    .navbar-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        background: transparent;
        color: #fff;
        border: none;
        padding: 12px 4px;
        font-size: 15px;
        cursor: pointer;
        outline: none;
    }
    .navbar-toggle:hover, .navbar-toggle:focus { color: #fff; }
    #navbar {
        display: none;
        flex-direction: column;
        padding: 0;
    }
    #navbar.open { display: flex; }
    #navbar a {
        display: block;
        width: 100%;
        padding: 13px 16px;
        font-size: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    #navbar a.active { background: var(--theme-nav-hover); }
    #navbar a:hover { background: var(--theme-nav-hover); }
}

/* ---- 手机：顶栏 + 列表微调 ---- */
@media (max-width: 768px) {
    #topbar { height: auto; line-height: 1.9; padding: 6px 0; }
    #topbar .left-name { display: none; }
    #topbar .links { text-align: center; }
    #topbar .links li { margin: 0 5px; font-size: 11px; }

    .list-item { gap: 10px; padding: 12px; }
    .list-item .list-img { width: 96px; height: 72px; }
    .list-item .list-title { font-size: 14px; }
    .list-item .list-price { font-size: 15px; }

    .quick-entry-row { gap: 10px; }
    .quick-entry-card { width: calc(50% - 5px); flex: none; padding: 14px 12px; }
}

/* ---- 小手机：列表项纵向堆叠 ---- */
@media (max-width: 575px) {
    .list-item { flex-direction: column; align-items: stretch; }
    .list-item .list-img { width: 100%; height: 150px; }
    .list-item .list-price { text-align: left; }
}

/* ---- 首页网格响应式类 ---- */
.hp-grid-stats  { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hp-grid-cats   { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.hp-grid-recent { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hp-grid-rank   { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.hp-mall-cats   { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-bottom: 24px; }

@media (max-width: 992px) {
    .hp-grid-stats  { grid-template-columns: repeat(2, 1fr); }
    .hp-grid-cats   { grid-template-columns: repeat(3, 1fr); }
    .hp-grid-recent { grid-template-columns: repeat(2, 1fr); }
    .hp-grid-rank   { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .hp-grid-stats  { grid-template-columns: repeat(2, 1fr); }
    .hp-grid-cats   { grid-template-columns: repeat(2, 1fr); }
    .hp-grid-recent { grid-template-columns: repeat(1, 1fr); }
    .hp-grid-rank   { grid-template-columns: repeat(1, 1fr); }
}

/* ============================================================
   可访问性（WCAG 2.1 AA）
   ============================================================ */

/* 跳到主内容链接：默认隐藏，键盘聚焦时显现 */
.skip-link {
    position: absolute;
    top: -60px;
    left: 0;
    z-index: 10001;
    padding: 10px 20px;
    background: var(--theme-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 0 0 6px 0;
    transition: top 0.2s;
}
.skip-link:focus {
    top: 0;
}

/* 键盘焦点指示器：:focus-visible 仅在键盘导航时显示 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--theme-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* 购物车弹窗关闭按钮聚焦时可见 */
#cart-modal button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* 尊重用户动画偏好：减少动画/过渡 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .hero-slide { transition: none !important; }
    .gallery-main img { transition: none !important; }
}

/* ================================================
 * 主题切换面板
 * ================================================ */
#theme-panel {
    position: fixed;
    right: 70px;
    bottom: 20px;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
    z-index: 9999;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    animation: themePanelIn 0.2s ease-out;
}
@keyframes themePanelIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.theme-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
}
.theme-panel-header button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.theme-panel-header button:hover { opacity: 1; }

.theme-panel-section {
    padding: 16px 18px;
    border-bottom: 1px solid #f0f0f0;
}
.theme-panel-section:last-child { border-bottom: none; }
.theme-panel-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 主题色卡网格 */
.theme-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.theme-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    background: #fff;
    transition: all 0.15s;
    text-align: center;
}
.theme-card:hover {
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.theme-card.active {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(var(--theme-primary-rgb), 0.15);
}
.theme-card-swatch {
    width: 100%;
    height: 32px;
    border-radius: 6px;
    display: block;
    position: relative;
}
.theme-card-swatch-mini {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: block;
    position: absolute;
    margin-top: -26px;
    margin-left: auto;
    margin-right: 6px;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.theme-card-name {
    font-size: 12px;
    color: #555;
    font-weight: 500;
}
.theme-card.active .theme-card-name {
    color: var(--theme-primary);
    font-weight: 600;
}

/* 密度切换 */
.density-toggle {
    display: flex;
    gap: 8px;
}
.density-btn {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.density-btn:hover {
    border-color: #ccc;
}
.density-btn.active {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
    background: var(--theme-primary-light);
    font-weight: 600;
}

/* ================================================
 * 紧凑布局模式 (body.layout-compact)
 * ================================================ */
body.layout-compact .info-card { padding: 10px 12px; }
body.layout-compact .info-card .card-title { font-size: 14px; margin-bottom: 4px; }
body.layout-compact .info-card .card-meta { font-size: 12px; margin-bottom: 4px; }
body.layout-compact .info-card .card-price { font-size: 16px; margin-top: 3px; }
body.layout-compact .info-section-header { margin-bottom: 12px; padding-bottom: 8px; }
body.layout-compact .info-section-header .title { font-size: 16px; }
body.layout-compact .info-list-block { margin-bottom: 16px; }
body.layout-compact .ilb-list li { padding: 6px 0; }
body.layout-compact .ilb-item-title { font-size: 13px; }
body.layout-compact .ilb-item-meta { font-size: 12px; }

body.layout-compact .list-item { padding: 10px; }
body.layout-compact .list-item .list-img { width: 100px; height: 75px; }
body.layout-compact .list-item .list-title { font-size: 14px; margin-bottom: 4px; }
body.layout-compact .list-item .list-meta { font-size: 12px; }
body.layout-compact .list-item .list-price { font-size: 16px; }

body.layout-compact .product-card { padding: 8px; }
body.layout-compact .product-card .prod-title { font-size: 13px; margin-top: 6px; }
body.layout-compact .product-card .prod-price { font-size: 17px; }

body.layout-compact .mall-card { padding: 8px; }
body.layout-compact .mall-card-title { font-size: 13px; margin-top: 6px; }
body.layout-compact .mall-card-price { font-size: 17px; }

body.layout-compact .quick-entry-card { padding: 10px 6px; }
body.layout-compact .quick-entry-card .entry-name { font-size: 12px; }

body.layout-compact .hp-grid-stats,
body.layout-compact .hp-grid-cats,
body.layout-compact .hp-grid-recent,
body.layout-compact .hp-grid-rank { gap: 10px; }

body.layout-compact .hp-mall-cats { gap: 8px; }

/* 移动端面板适配 */
@media (max-width: 575px) {
    #theme-panel {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 70px;
    }
    .theme-card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}
