/* 卡乐售 - weibo 模板（PC）主样式
   经典微博 PC 首页调性：橙顶栏 + 灰白底 + 左栏卡片 + 信息流动态
   色板：微博橙 #ff8200（强调 / 顶栏 / 按钮）、话题蓝 #1f7cf7、
         价格红 #ff3a3a、页面灰底 #f2f2f2、卡片白 #fff、正文 #292729、次要 #808080、描边 #e6ecf1
*/

:root {
    --wb-orange: #ff8200;
    --wb-orange-hover: #ff9f2f;
    --wb-orange-soft: #fff2e0;
    /* 弹窗公告配色：跟随本模板微博橙（覆盖公共 site-notice.css 里 --sn-a/--sn-b 的默认蓝） */
    --sn-a: var(--wb-orange);
    --sn-b: var(--wb-orange-hover);
    --wb-blue: #1f7cf7;
    --wb-blue-soft: #eaf2ff;
    --wb-red: #ff3a3a;
    --wb-bg: #f2f2f2;
    --wb-card: #ffffff;
    --wb-text: #292729;
    --wb-sub: #5c5c5c;
    --wb-muted: #808080;
    --wb-line: #e6ecf1;
    --wb-hover-bg: #f7f9fb;
    --wb-shadow: 0 1px 3px rgb(0 0 0 / 4%);
    --wb-radius: 8px;
}

/* ============ Reset & Base ============ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.wb-body {
    background: var(--wb-bg);
    color: var(--wb-text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft Yahei", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--wb-orange); }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

/* ============ 顶部微博橙固定导航条 ============ */
.wb-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 48px;
    background: linear-gradient(180deg, #ff8f20, #ff7a00);
    box-shadow: 0 1px 4px rgb(255 130 0 / 25%);
}
.wb-topbar-in {
    max-width: 1200px;
    height: 48px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 24px;
}
.wb-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    flex: none;
}
.wb-logo:hover { color: #fff; }
.wb-logo svg { width: 26px; height: 26px; }
.wb-logo img { height: 26px; width: auto; }

.wb-search {
    flex: 0 1 340px;
    display: flex;
    align-items: center;
    height: 32px;
    background: rgb(255 255 255 / 92%);
    border-radius: 16px;
    overflow: hidden;
}
.wb-search input {
    flex: 1;
    height: 32px;
    padding: 0 12px;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--wb-text);
    font-size: 13px;
}
.wb-search button {
    width: 34px;
    height: 32px;
    border: 0;
    background: transparent;
    color: #ff8200;
    display: grid;
    place-items: center;
}
.wb-search button svg { width: 16px; height: 16px; }
.wb-search button:hover { color: #ff5a00; }

.wb-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}
.wb-nav > a {
    position: relative;
    height: 48px;
    padding: 0 14px;
    color: rgb(255 255 255 / 92%);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}
.wb-nav > a:hover { color: #fff; background: rgb(0 0 0 / 8%); }
.wb-nav > a.on {
    color: #fff;
    font-weight: 600;
}
.wb-nav > a.on::after {
    content: "";
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 2px;
    border-radius: 1px;
    background: #fff;
}

.wb-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    margin-left: auto;
}
.wb-user-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    padding: 4px 8px;
    border-radius: 16px;
}
.wb-user-me:hover { background: rgb(0 0 0 / 10%); color: #fff; }
.wb-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgb(255 255 255 / 25%);
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #fff;
}
.wb-user-avatar svg { width: 20px; height: 20px; }
.wb-user-name { font-size: 13px; }
.wb-user-logout {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    color: rgb(255 255 255 / 85%);
}
.wb-user-logout svg { width: 16px; height: 16px; }
.wb-user-logout:hover { background: rgb(0 0 0 / 12%); color: #fff; }
.wb-user-btn {
    height: 28px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    border-radius: 14px;
    color: #fff;
    background: rgb(255 255 255 / 18%);
    font-size: 13px;
}
.wb-user-btn:hover { background: rgb(255 255 255 / 30%); color: #fff; }
.wb-user-btn-primary {
    background: #fff;
    color: var(--wb-orange);
    font-weight: 600;
}
.wb-user-btn-primary:hover { background: #fff; color: #ff5a00; }

.wb-topbar-spacer { height: 48px; }

/* ============ 主体两栏 ============ */
.wb-wrap {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.wb-side { grid-column: 1; }
.wb-right { grid-column: 2; min-width: 0; }
.wb-topics-area { margin-bottom: 20px; }
@media (max-width: 820px) {
    .wb-wrap { grid-template-columns: 1fr; }
    .wb-right { grid-column: 1; order: 1; }
    .wb-side { grid-column: 1; order: 2; }
}

/* ============ 卡片通用 ============ */
.wb-card {
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    box-shadow: var(--wb-shadow);
    margin-bottom: 16px;
    overflow: hidden;
}

/* ============ 左栏：用户卡 ============ */
.wb-user-panel { text-align: center; }
.wb-user-cover {
    height: 76px;
    background: linear-gradient(135deg, #ffb36b, #ff8200);
    position: relative;
}
.wb-user-avatar-lg {
    position: absolute;
    left: 50%;
    bottom: -32px;
    transform: translateX(-50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgb(0 0 0 / 12%);
    display: grid;
    place-items: center;
    color: #c9c9c9;
    overflow: hidden;
}
.wb-user-avatar-lg svg { width: 40px; height: 40px; }
.wb-user-panel > .wb-user-name-lg,
.wb-user-panel > .wb-user-level,
.wb-user-panel > .wb-user-desc,
.wb-user-panel > .wb-user-cta,
.wb-user-panel > .wb-user-stats { padding-left: 16px; padding-right: 16px; }
.wb-user-name-lg {
    margin-top: 42px;
    font-size: 16px;
    font-weight: 700;
    color: var(--wb-text);
    word-break: break-all;
}
.wb-user-level { margin-top: 6px; }
.wb-lv-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--wb-orange-soft);
    color: var(--wb-orange);
    font-size: 12px;
    font-weight: 600;
}
.wb-lv-badge svg { width: 12px; height: 12px; }
.wb-user-desc {
    margin-top: 6px;
    color: var(--wb-muted);
    font-size: 12px;
}
.wb-user-cta {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    justify-content: center;
}
.wb-user-btn-lg {
    flex: 1;
    height: 32px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: var(--wb-text);
    font-size: 13px;
}
.wb-user-btn-lg:hover { background: #ebebeb; color: var(--wb-text); }
.wb-user-btn-primary.wb-user-btn-lg,
.wb-user-cta .wb-user-btn-primary {
    background: var(--wb-orange);
    color: #fff;
    font-weight: 600;
}
.wb-user-cta .wb-user-btn-primary:hover { background: var(--wb-orange-hover); color: #fff; }
.wb-user-stats {
    margin-top: 18px;
    padding-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    border-top: 1px solid var(--wb-line);
    padding-top: 14px;
}
.wb-user-stats li a {
    display: block;
    padding: 2px 0;
}
.wb-user-stats b {
    display: block;
    font-size: 16px;
    color: var(--wb-orange);
    font-weight: 700;
}
.wb-user-stats span {
    display: block;
    font-size: 12px;
    color: var(--wb-muted);
    margin-top: 2px;
}

/* ============ 左栏：侧导航 ============ */
.wb-side-nav { padding: 6px 0; }
.wb-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 42px;
    padding: 0 16px;
    color: var(--wb-text);
    font-size: 14px;
    position: relative;
}
.wb-nav-item:hover { background: var(--wb-hover-bg); color: var(--wb-orange); }
.wb-nav-item.on { color: var(--wb-orange); background: var(--wb-orange-soft); font-weight: 600; }
.wb-nav-item.on::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--wb-orange);
    border-radius: 0 2px 2px 0;
}
.wbi {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    color: currentColor;
}
.wbi svg { width: 18px; height: 18px; }

/* ============ 轮播图 ============ */
.wb-banner {
    border-radius: var(--wb-radius);
    overflow: hidden;
    margin-bottom: 16px;
    background: #f5f5f5;
    height: 250px;
}
.wb-banner .swiper-slide a {
    display: block;
    height: 100%;
}
.wb-banner .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
}
.wb-banner .swiper-button-prev,
.wb-banner .swiper-button-next {
    color: #fff;
    background: rgb(0 0 0 / 25%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
}
.wb-banner .swiper-button-prev::after,
.wb-banner .swiper-button-next::after {
    font-size: 16px;
}
.wb-banner .swiper-pagination-bullet-active {
    background: var(--wb-orange);
}

/* ============ 中栏：一级分类（大圆角按钮+图标） ============ */
.wb-topics {
    padding: 12px 16px;
}
.wb-topics-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.wb-topic {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 18px;
    background: #f5f7fa;
    color: var(--wb-text);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    transition: all .15s;
    border: 1px solid transparent;
}
.wb-topic:hover {
    background: #fff;
    border-color: var(--wb-line);
    box-shadow: 0 2px 8px rgb(0 0 0 / 6%);
    color: var(--wb-text);
}
.wb-topic.on {
    background: var(--wb-blue);
    color: #fff;
    border-color: var(--wb-blue);
    font-weight: 600;
}
.wb-topic.on:hover {
    background: #1666d1;
    border-color: #1666d1;
    color: #fff;
}
.wb-topic-icon {
    width: 20px;
    height: 20px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 4px;
    overflow: hidden;
}
.wb-topic-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.wb-topic-icon svg {
    width: 16px;
    height: 16px;
    opacity: .6;
}
.wb-topic.on .wb-topic-icon svg { opacity: 1; }

/* ============ 中栏：二级分类行 ============ */
.wb-subtopics {
    padding: 12px 20px;
    margin-top: -8px;
    border-top: 1px solid var(--wb-line);
    border-radius: 0 0 var(--wb-radius) var(--wb-radius);
    box-shadow: none;
    background: #fafbfc;
}
.wb-subtopics-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.wb-subtopic {
    color: var(--wb-sub);
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 4px;
    line-height: 1.4;
    transition: all .15s;
    background: #f0f2f5;
    border-bottom: 2px solid transparent;
}
.wb-subtopic:hover { color: var(--wb-blue); background: var(--wb-blue-soft); }
.wb-subtopic.on {
    color: var(--wb-blue);
    background: transparent;
    font-weight: 600;
    border-bottom-color: var(--wb-blue);
}
.wb-subtopic.on:hover { background: var(--wb-blue-soft); color: var(--wb-blue); }

/* ============ 主栏：商品方形宫格 ============ */
.wb-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.wb-cell {
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    box-shadow: var(--wb-shadow);
    overflow: hidden;
    display: flex;
}
.wb-cell-link {
    display: flex;
    flex-direction: column;
    width: 100%;
    color: inherit;
}
.wb-cell-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f5f5f5;
    overflow: hidden;
}
.wb-cell-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s;
}
.wb-cell-link:hover .wb-cell-media img { transform: scale(1.05); }
.wb-cell-media.is-off img { filter: grayscale(1); opacity: .55; }
.wb-cell-state {
    position: absolute;
    left: 0;
    top: 0;
    height: 20px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    line-height: 1;
    border-radius: 0 0 8px 0;
    color: #fff;
}
.wb-cell-state.is-on { background: rgba(20, 168, 56, .9); }
.wb-cell-state.is-off { background: rgba(0, 0, 0, .55); }
.wb-cell-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
}
.wb-cell-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--wb-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}
.wb-cell-link:hover .wb-cell-title { color: var(--wb-orange); }
.wb-cell-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.wb-cell-price {
    color: var(--wb-red);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wb-cell-price i {
    font-style: normal;
    font-size: 12px;
    margin-right: 1px;
}
.wb-cell-buy {
    flex: none;
    height: 28px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    border-radius: 14px;
    background: var(--wb-orange);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    transition: background .15s;
}
.wb-cell-link:hover .wb-cell-buy { background: var(--wb-orange-hover); color: #fff; }
@media (max-width: 480px) {
    .wb-feed { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}

/* 信息流到底/空态 */
.wb-feed-end {
    text-align: center;
    color: var(--wb-muted);
    font-size: 13px;
    padding: 20px 0 30px;
}
.wb-feed-empty {
    grid-column: 1 / -1;
    padding: 40px 20px;
    text-align: center;
    color: var(--wb-muted);
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    box-shadow: var(--wb-shadow);
    font-size: 13px;
}
.wb-more {
    display: block;
    margin: 20px auto 30px;
    width: 200px;
    height: 40px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--wb-line);
    color: var(--wb-sub);
    text-align: center;
    line-height: 38px;
    font-size: 13px;
    transition: all .15s;
}
.wb-more:hover {
    background: var(--wb-orange);
    border-color: var(--wb-orange);
    color: #fff;
}
.wb-more.is-loading {
    color: var(--wb-muted);
    background: #f7f7f7;
    pointer-events: none;
}

/* ============ 骨架屏（方形宫格） ============ */
.wb-sk-cell {
    background: var(--wb-card);
    border-radius: var(--wb-radius);
    box-shadow: var(--wb-shadow);
    overflow: hidden;
}
.wb-sk-media {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: wbShimmer 1.4s infinite linear;
}
.wb-sk-title {
    height: 14px;
    margin: 10px 12px 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: wbShimmer 1.4s infinite linear;
}
.wb-sk-foot {
    height: 18px;
    width: 60%;
    margin: 8px 12px 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: wbShimmer 1.4s infinite linear;
}
@keyframes wbShimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* ============ 骨架屏（轮播 / 分类胶囊 / 用户卡 / 榜单 / 推荐） ============ */
.wb-sk-banner-fill,
.wb-sk-chip,
.wb-sk-cover,
.wb-sk-avatar,
.wb-sk-name,
.wb-sk-badge,
.wb-sk-statnum,
.wb-sk-statlab,
.wb-sk-no,
.wb-sk-line,
.wb-sk-price,
.wb-sk-time,
.wb-sk-thumb {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: wbShimmer 1.4s infinite linear;
    border-radius: 6px;
}

/* 轮播骨架（容器沿用 .wb-banner 尺寸，注入真实 slides 后移除 .wb-sk-banner） */
.wb-banner.wb-sk-banner { height: 250px; }
.wb-sk-banner-fill { width: 100%; height: 100%; border-radius: var(--wb-radius); }

/* 一级分类胶囊骨架（容器保留 .wb-topics-chips 的 flex/gap） */
.wb-sk-chip {
    display: inline-block;
    width: 96px;
    height: 36px;
    border-radius: 18px;
}

/* 用户卡骨架 */
.wb-user-panel.wb-sk { padding-bottom: 16px; }
.wb-sk-cover { height: 76px; border-radius: 0; position: relative; }
.wb-sk-avatar {
    position: absolute;
    left: 50%;
    bottom: -32px;
    transform: translateX(-50%);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid #fff;
}
.wb-sk-name { height: 18px; width: 55%; margin: 46px auto 0; }
.wb-sk-badge { height: 20px; width: 84px; margin: 10px auto 0; border-radius: 10px; }
.wb-sk-stats {
    list-style: none;
    display: flex;
    margin: 16px 16px 0;
    padding: 14px 0 0;
    border-top: 1px solid var(--wb-line);
}
.wb-sk-stats li { flex: 1; text-align: center; }
.wb-sk-statnum { display: block; height: 16px; width: 40%; margin: 0 auto 6px; }
.wb-sk-statlab { display: block; height: 12px; width: 60%; margin: 0 auto; }

/* 榜单 / 最新 / 推荐 行骨架 */
.wb-sk-row { display: flex; align-items: center; gap: 10px; padding: 9px 16px; }
.wb-sk-no { width: 20px; height: 20px; flex: none; }
.wb-sk-line { height: 14px; }
.wb-sk-grow { flex: 1; }
.wb-sk-short { width: 60%; }
.wb-sk-price { width: 48px; height: 14px; flex: none; }
.wb-sk-time { width: 56px; height: 12px; flex: none; }
.wb-sk-new { padding: 9px 16px; }
.wb-sk-new .wb-sk-line { margin-bottom: 8px; }
.wb-sk-foot-row { display: flex; gap: 12px; }
.wb-sk-reco { display: flex; align-items: center; gap: 10px; padding: 9px 16px; }
.wb-sk-thumb { width: 44px; height: 44px; flex: none; }
.wb-sk-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }

/* ============ 左栏：热门榜 / 最新上架 / 猜你喜欢 ============ */
.wb-rank,
.wb-newbox { padding: 12px 16px 14px; }
.wb-rank-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 8px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--wb-line);
}
.wb-rank-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--wb-text);
}
.wb-rank-more {
    font-size: 12px;
    color: var(--wb-muted);
}
.wb-rank-more:hover { color: var(--wb-orange); }
.wb-rank-empty {
    padding: 20px 0;
    text-align: center;
    color: var(--wb-muted);
    font-size: 12px;
}

.wb-rank-list li { padding: 0; }
.wb-rank-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 4px;
    border-radius: 4px;
    font-size: 13px;
}
.wb-rank-list a:hover { background: var(--wb-hover-bg); }
.wb-rank-no {
    width: 20px;
    height: 20px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: #f2f2f2;
    color: #999;
    font-size: 12px;
    font-weight: 600;
}
.wb-rank-no.top {
    background: linear-gradient(135deg, #ff8a3d, #ff3a3a);
    color: #fff;
}
.wb-rank-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--wb-text);
}
.wb-rank-list a:hover .wb-rank-name { color: var(--wb-orange); }
.wb-rank-price {
    color: var(--wb-red);
    font-size: 12px;
    font-weight: 600;
    flex: none;
}

/* ============ 左栏：最新上架 ============ */
.wb-new-list li { padding: 0; }
.wb-new-list a {
    display: block;
    padding: 8px 4px;
    border-radius: 4px;
}
.wb-new-list a:hover { background: var(--wb-hover-bg); }
.wb-new-name {
    font-size: 13px;
    color: var(--wb-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 3px;
}
.wb-new-list a:hover .wb-new-name { color: var(--wb-orange); }
.wb-new-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}
.wb-new-price { color: var(--wb-red); font-weight: 600; }
.wb-new-time { color: var(--wb-muted); }

/* ============ 左栏：猜你喜欢 ============ */
.wb-reco { padding: 12px 16px 14px; }
.wb-reco-refresh {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 3px 6px;
    border: 1px solid var(--wb-line);
    border-radius: 12px;
    background: #fff;
    color: var(--wb-muted);
    font-size: 12px;
    line-height: 1;
    transition: all .15s;
}
.wb-reco-refresh svg { width: 12px; height: 12px; }
.wb-reco-refresh:hover { border-color: var(--wb-orange); color: var(--wb-orange); background: var(--wb-orange-soft); }
.wb-reco-refresh.is-loading {
    color: #c9c9c9;
    border-color: #eee;
    background: #fafafa;
    pointer-events: none;
}
.wb-reco-refresh.is-loading svg { animation: wbRecoSpin .8s linear infinite; }
@keyframes wbRecoSpin { to { transform: rotate(360deg); } }

.wb-reco-list li + li { border-top: 1px dashed #eef1f4; }
.wb-reco-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 4px;
    border-radius: 4px;
}
.wb-reco-list a:hover { background: var(--wb-hover-bg); }
.wb-reco-img {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
    display: block;
}
.wb-reco-img img { width: 100%; height: 100%; object-fit: cover; }
.wb-reco-info {
    flex: 1;
    min-width: 0;
    display: block;
}
.wb-reco-name {
    display: block;
    font-size: 13px;
    color: var(--wb-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}
.wb-reco-list a:hover .wb-reco-name { color: var(--wb-orange); }
.wb-reco-price {
    display: block;
    font-size: 12px;
    color: var(--wb-red);
    font-weight: 600;
}

/* ============ 底部 ============ */
.wb-footer {
    margin-top: 40px;
    padding: 24px 16px;
    background: #fff;
    border-top: 1px solid var(--wb-line);
}
.wb-footer-in {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    color: var(--wb-muted);
    font-size: 12px;
}
.wb-footer-links {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}
.wb-footer-links a { color: var(--wb-sub); }
.wb-footer-links a:hover { color: var(--wb-orange); }
.wb-footer-links span { color: #ccc; }
.wb-footer-copy a { color: var(--wb-muted); }
.wb-footer-copy a:hover { color: var(--wb-orange); }

/* ============ 站点公告覆盖（走 common 的 site-notice.css，这里只调颜色主题） ============ */
body.wb-body .sn-mask { background: rgb(0 0 0 / 45%); }

/* ============ 商品详情页（buy.php）============ */
.wb-page {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 16px;
}
.wb-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--wb-muted);
}
.wb-crumb a { color: var(--wb-sub); }
.wb-crumb a:hover { color: var(--wb-orange); }
.wb-crumb i { color: #cfcfcf; font-style: normal; }
.wb-crumb b { color: var(--wb-text); font-weight: 600; }

/* 商品卡：左图 + 右信息 */
.wb-detail { padding: 22px; }
.wb-detail-main {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.wb-detail-side { min-width: 0; }
.wb-detail-img { width: 100%; }
.wb-detail-img .goods-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 12px;
    background: #f5f6f8;
}
.wb-detail-img .goods-cover > img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* 主图加载骨架：buy.js 给 .goods-cover 挂 .is-loading 时盖一层微光，复用 @keyframes wbShimmer */
.wb-detail-img .goods-cover.is-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(90deg, #eef1f5 25%, #e3e8ef 50%, #eef1f5 75%);
    background-size: 200% 100%;
    animation: wbShimmer 1.15s infinite linear;
}
.wb-detail-imgfoot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
}
.wb-detail-no { color: var(--wb-muted); font-size: 12px; }
.wb-detail-share {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--wb-line);
    border-radius: 15px;
    background: #fff;
    color: var(--wb-sub);
    font-size: 12px;
    transition: all .15s;
}
.wb-detail-share svg { width: 15px; height: 15px; }
.wb-detail-share:hover { border-color: var(--wb-orange); color: var(--wb-orange); background: var(--wb-orange-soft); }

.wb-detail-info { min-width: 0; }
.wb-detail-name {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--wb-text);
    word-break: break-all;
}
.wb-detail-price {
    padding: 14px 16px;
    margin-bottom: 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff5ec, #fffaf5);
    border: 1px solid #ffe6cf;
}
.wb-detail-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: var(--wb-sub);
    font-size: 13px;
}
.wb-detail-price-row b {
    color: var(--wb-red);
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}
.wb-detail-price-row b i { font-style: normal; font-size: 15px; margin-right: 2px; }

/* 下单表单：沿用下单库要求的类名/ID，这里只做微博风重排 */
.goods-buy-form { display: flex; flex-direction: column; gap: 16px; }
.goods-buy-form .buy-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.goods-buy-form .buy-label {
    flex: none;
    width: 92px;
    padding-top: 7px;
    color: var(--wb-sub);
    font-size: 13px;
    text-align: right;
}
.goods-buy-form .buy-label em { color: var(--wb-red); font-style: normal; margin-right: 2px; }
.goods-buy-form .input-container {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.goods-buy-form .input_info {
    width: 100%;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--wb-line);
    border-radius: 8px;
    background: #fff;
    color: var(--wb-text);
    font-size: 14px;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.goods-buy-form textarea.input_info { min-height: 80px; resize: vertical; }
.goods-buy-form .input_info:focus {
    border-color: var(--wb-orange);
    box-shadow: 0 0 0 3px rgb(255 130 0 / 12%);
}
.goods-buy-form .input_info.char-range-error {
    border-color: var(--wb-red);
    box-shadow: 0 0 0 3px rgb(255 58 58 / 10%);
}
.wb-buy-tip { color: var(--wb-muted); font-size: 12px; line-height: 1.5; }
.wb-buy-radios { display: flex; flex-wrap: wrap; gap: 10px 18px; padding-top: 6px; }
.wb-buy-radios .checkbox-line { display: inline-flex; align-items: center; gap: 6px; color: var(--wb-text); font-size: 14px; cursor: pointer; }
.wb-buy-radios input[type="radio"] { accent-color: var(--wb-orange); width: 16px; height: 16px; }

/* 数量步进 */
.goods-buy-form .buy-qty {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.goods-buy-form .buy-qty #qty-minus,
.goods-buy-form .buy-qty #qty-plus {
    width: 34px;
    height: 34px;
    border: 1px solid var(--wb-line);
    background: #fafafa;
    color: var(--wb-text);
    font-size: 18px;
    line-height: 1;
    border-radius: 8px;
    transition: all .15s;
}
.goods-buy-form .buy-qty #qty-minus:hover,
.goods-buy-form .buy-qty #qty-plus:hover { border-color: var(--wb-orange); color: var(--wb-orange); background: var(--wb-orange-soft); }
.goods-buy-form .buy-qty #quantity {
    width: 68px;
    height: 34px;
    text-align: center;
    border: 1px solid var(--wb-line);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
}
.goods-buy-form .buy-qty #quantity:focus { border-color: var(--wb-orange); box-shadow: 0 0 0 3px rgb(255 130 0 / 12%); }
.goods-buy-form .qty-tips { color: var(--wb-muted); font-size: 12px; }
.goods-buy-form .qty-tips i { display: block; font-style: normal; }

/* 支付行（弹窗接管时由 order-payment-dialog 注入 :has(.pay) 隐藏；此为无 JS 兜底外观） */
.goods-buy-form .buy-field.pay { flex: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.goods-buy-form .buy-field.pay span {
    padding: 6px 14px;
    border: 1px solid var(--wb-line);
    border-radius: 16px;
    background: #fafafa;
    color: var(--wb-sub);
    font-size: 13px;
    cursor: pointer;
}
.goods-buy-form .buy-field.pay span.hover { border-color: var(--wb-orange); color: var(--wb-orange); background: var(--wb-orange-soft); }
.goods-buy-form .buy-field.pay span.guest-disabled { opacity: .5; cursor: not-allowed; }

.goods-buy-form .buy-rule-row .tips { color: var(--wb-muted); font-size: 12px; }
.goods-buy-form .buy-rule-row .tips a { color: var(--wb-orange); }
.goods-buy-form .buy-off-tip {
    padding: 10px 14px;
    border-radius: 8px;
    background: #fff1f0;
    border: 1px solid #ffd7d5;
    color: var(--wb-red);
    font-size: 13px;
}

/* 动作按钮 */
.goods-buy-form .buy-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.goods-buy-form .paybut {
    height: 46px;
    padding: 0 34px;
    border: 0;
    border-radius: 23px;
    background: linear-gradient(180deg, #ff8f20, #ff7a00);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgb(255 122 0 / 28%);
    transition: all .15s;
}
.goods-buy-form .paybut:hover { filter: brightness(1.04); }
.goods-buy-form .batch-order-btn {
    height: 46px;
    padding: 0 26px;
    border: 1px solid var(--wb-orange);
    border-radius: 23px;
    background: #fff;
    color: var(--wb-orange);
    font-size: 15px;
    font-weight: 600;
    transition: all .15s;
}
.goods-buy-form .batch-order-btn:hover { background: var(--wb-orange-soft); }
.goods-buy-form .paybut.disabled,
.goods-buy-form .batch-order-btn.disabled {
    background: #f0f0f0;
    border-color: #e2e2e2;
    color: #b0b0b0;
    box-shadow: none;
    cursor: not-allowed;
    filter: none;
}

.wb-btn-ghost {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 20px;
    border: 1px solid var(--wb-orange);
    border-radius: 18px;
    color: var(--wb-orange);
    font-size: 14px;
}
.wb-btn-ghost:hover { background: var(--wb-orange-soft); color: var(--wb-orange); }

.wb-detail-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--wb-muted);
    font-size: 14px;
    line-height: 1.8;
}

/* 详情 / 历史：纯 CSS 页签（radio 前置，兄弟选择器驱动显隐） */
.wb-buy-tabs-card { padding: 0 0 6px; }
.wb-buy-radio { position: absolute; opacity: 0; pointer-events: none; }
.wb-buy-tabs {
    display: flex;
    gap: 4px;
    padding: 0 22px;
    border-bottom: 1px solid var(--wb-line);
}
.wb-buy-tab {
    position: relative;
    padding: 16px 18px;
    color: var(--wb-sub);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.wb-buy-tab::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: transparent;
    transition: background .15s;
}
.wb-buy-pane { display: none; padding: 20px 22px 18px; }
#wb-tab-detail:checked ~ .wb-buy-tabs .wb-buy-tab[for="wb-tab-detail"],
#wb-tab-history:checked ~ .wb-buy-tabs .wb-buy-tab[for="wb-tab-history"] { color: var(--wb-orange); }
#wb-tab-detail:checked ~ .wb-buy-tabs .wb-buy-tab[for="wb-tab-detail"]::after,
#wb-tab-history:checked ~ .wb-buy-tabs .wb-buy-tab[for="wb-tab-history"]::after { background: var(--wb-orange); }
#wb-tab-detail:checked ~ .wb-buy-pane-detail,
#wb-tab-history:checked ~ .wb-buy-pane-history { display: block; }

.wb-buy-content { color: var(--wb-text); font-size: 14px; line-height: 1.7; }
.wb-buy-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 8px 0; }

/* 历史下单筛选条 + 表格 */
.wb-buy-his-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.wb-buy-his-kw,
.wb-buy-his-st {
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--wb-line);
    border-radius: 8px;
    background: #fff;
    color: var(--wb-text);
    font-size: 13px;
    outline: none;
}
.wb-buy-his-kw { width: 200px; }
.wb-buy-his-kw:focus,
.wb-buy-his-st:focus { border-color: var(--wb-orange); }
.wb-buy-his-go {
    height: 34px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: var(--wb-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
.wb-buy-his-go:hover { background: var(--wb-orange-hover); }
.wb-buy-his-reset { color: var(--wb-sub); font-size: 13px; }
.wb-buy-his-reset:hover { color: var(--wb-orange); }

.wb-order-table { border: 1px solid var(--wb-line); border-radius: 10px; overflow: hidden; }
.wb-order-row {
    display: grid;
    grid-template-columns: 1.4fr 1.6fr .7fr 1fr 1fr;
    gap: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--wb-text);
    border-bottom: 1px solid #f0f2f5;
}
.wb-order-row:last-child { border-bottom: 0; }
.wb-order-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-order-row.head { background: #fafbfc; color: var(--wb-sub); font-weight: 600; }
.wb-order-row:not(.head):hover { background: var(--wb-hover-bg); }
.wb-order-row a { color: var(--wb-blue); }
.wb-order-row a:hover { color: var(--wb-orange); }
.wb-buy-his-more { margin-top: 12px; color: var(--wb-muted); font-size: 12px; }

/* ===== 分享弹窗（buy.js 用 layer type:1 + skin:'layer-share' 拼出 .share-* 结构；
   样式原只在 yike.css，weibo 不加载 yike.css 会散架，这里自带一份微博风） =====
   外壳透明：白卡由 .share-card 自绘，layer 关闭按钮落在白卡外 */
.layui-layer.layer-share { background: transparent; box-shadow: none; border-radius: 0; }
.layui-layer.layer-share .layui-layer-content { overflow: visible; }
.share-wrap { width: 300px; }
.share-card {
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 20px 50px rgb(31 41 66 / 25%);
}
.share-img { width: 100%; height: 260px; background: #f5f6fa; }
.share-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.share-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 18px;
}
.share-info { flex: 1; min-width: 0; }
.share-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--wb-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.share-price { margin-top: 6px; font-size: 17px; font-weight: 700; color: var(--wb-red); }
.share-tip { margin-top: 8px; font-size: 12px; color: var(--wb-muted); }
.share-qr { flex: none; width: 96px; height: 96px; }
/* 二维码按 260px 画布生成，再缩到这里 */
.share-qr img,
.share-qr canvas { display: block; width: 100%; height: 100%; }
.share-qr-fail { font-size: 12px; color: #bbb; }

@media (max-width: 820px) {
    .wb-detail-main { grid-template-columns: 1fr; gap: 18px; }
    .wb-detail-img .goods-cover { max-height: 360px; }
    .goods-buy-form .buy-row { flex-direction: column; gap: 6px; }
    .goods-buy-form .buy-label { width: auto; padding-top: 0; text-align: left; }
    .wb-order-row { grid-template-columns: 1.2fr 1.4fr .6fr .9fr .9fr; padding: 10px 12px; font-size: 12px; }
}
