/* 卡乐售 - hongxingchuqiang 模板（PC 端）样式
   小红书风：白底 + 红色主色（#FF2442）、大圆角卡片、瀑布流商品卡
   命名统一 xhs- 前缀，不依赖 bootstrap / swiper，纯手写 */

:root {
    --xhs-red: #ff2442;
    --xhs-red-d: #e01f3c;
    --sn-a: #ff2442;   /* 公告弹窗头部/按钮渐变（覆盖公共 site-notice.css 的默认蓝） */
    --sn-b: #ff6b81;
    --xhs-red-l: #fff3f5;
    --xhs-red-b: #ffe8ec;
    --xhs-ink: #222;
    --xhs-ink2: #666;
    --xhs-ink3: #999;
    --xhs-line: #f0f0f0;
    --xhs-bg: #f7f7f8;
    --xhs-r: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--xhs-bg);
    color: var(--xhs-ink);
    font: 14px/1.6 -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; border: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
input, button { font: inherit; color: inherit; }

.xhs-wrap { width: 1240px; max-width: 100%; margin: 0 auto; padding: 0 16px; }
.xhs-hidden { display: none !important; }

/* ============ 顶部工具条 ============ */
.xhs-top { background: #fff; border-bottom: 1px solid var(--xhs-line); }
.xhs-top-in { display: flex; align-items: center; justify-content: flex-end; gap: 18px; height: 38px; font-size: 12.5px; color: var(--xhs-ink2); }
.xhs-top-in a { position: relative; transition: color .15s; }
.xhs-top-in a:hover { color: var(--xhs-red); }
.xhs-top-in a + a::before { content: ""; position: absolute; left: -9px; top: 50%; width: 1px; height: 11px; margin-top: -5.5px; background: #e5e5e5; }
.xhs-top-l { margin-right: auto; color: var(--xhs-ink3); }
.xhs-top-l b { color: var(--xhs-red); font-weight: 600; }

/* ============ 主头部 ============ */
.xhs-head { position: sticky; top: 0; z-index: 900; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--xhs-line); }
.xhs-head-in { display: flex; align-items: center; gap: 26px; height: 68px; }
.xhs-logo { display: flex; align-items: center; gap: 9px; flex: none; font-size: 21px; font-weight: 700; letter-spacing: .5px; color: var(--xhs-ink); }
.xhs-logo i { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #ff4d6d, var(--xhs-red)); color: #fff; font-size: 15px; font-style: normal; font-weight: 700; }
.xhs-logo img { height: 34px; width: auto; }
.xhs-logo:hover { color: var(--xhs-red); }

.xhs-nav { display: flex; align-items: center; gap: 26px; flex: none; }
.xhs-nav a { position: relative; padding: 24px 0 22px; font-size: 15px; color: var(--xhs-ink2); transition: color .15s; }
.xhs-nav a:hover { color: var(--xhs-ink); }
.xhs-nav a.on { color: var(--xhs-red); font-weight: 600; }
.xhs-nav a.on::after { content: ""; position: absolute; left: 50%; bottom: 14px; width: 18px; height: 3px; margin-left: -9px; border-radius: 2px; background: var(--xhs-red); }

.xhs-search { display: flex; align-items: center; flex: 1; min-width: 180px; max-width: 460px; height: 40px; margin-left: auto; padding: 0 4px 0 16px; background: #f2f2f3; border: 1.5px solid transparent; border-radius: 22px; transition: background .15s, border-color .15s; }
.xhs-search:focus-within { background: #fff; border-color: var(--xhs-red); }
.xhs-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 13.5px; }
.xhs-search input::placeholder { color: #a3a3a3; }
.xhs-search button { display: inline-flex; align-items: center; justify-content: center; width: 66px; height: 32px; border: 0; border-radius: 18px; background: var(--xhs-red); color: #fff; font-size: 13.5px; cursor: pointer; transition: background .15s; }
.xhs-search button:hover { background: var(--xhs-red-d); }
.xhs-search button svg { width: 15px; height: 15px; }

/* ============ 首屏：轮播 + 会员卡 ============ */
.xhs-hero { display: flex; gap: 16px; margin-top: 16px; align-items: stretch; }

.xhs-cats { flex: none; width: 208px; padding: 10px 0; background: #fff; border-radius: var(--xhs-r); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.xhs-cats-h { padding: 8px 18px 10px; font-size: 13px; color: var(--xhs-ink3); letter-spacing: .5px; }
.xhs-cats a { display: flex; align-items: center; gap: 10px; padding: 9px 18px; font-size: 14px; color: #3a3a3a; border-left: 3px solid transparent; transition: background .15s, color .15s; }
.xhs-cats a:hover { background: var(--xhs-red-l); color: var(--xhs-red); border-left-color: var(--xhs-red); }
.xhs-cats a.on { background: var(--xhs-red-l); color: var(--xhs-red); border-left-color: var(--xhs-red); font-weight: 600; }
.xhs-cats a img { width: 22px; height: 22px; border-radius: 7px; object-fit: cover; flex: none; background: #f2f2f3; }
.xhs-cats a em { font-style: normal; margin-left: auto; font-size: 12px; color: #c4c4c4; }
.xhs-cats-none { padding: 10px 18px 14px; font-size: 12.5px; color: var(--xhs-ink3); line-height: 1.7; }

/* ============ 商品区：左分类栏 + 右瀑布流 ============ */
.xhs-body { display: flex; align-items: flex-start; gap: 16px; margin-top: 16px; }
.xhs-banner-box { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.xhs-banner { position: relative; overflow: hidden; flex: 1; min-height: 266px; background: #fff; border-radius: var(--xhs-r); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.xhs-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease; }
.xhs-slide.on { opacity: 1; }
.xhs-slide a { display: block; height: 100%; }
.xhs-slide img { width: 100%; height: 100%; object-fit: fill; }
.xhs-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 7px; }
.xhs-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .55); cursor: pointer; transition: width .2s, background .2s; }
.xhs-dots i.on { width: 18px; border-radius: 4px; background: var(--xhs-red); }
.xhs-arrow { position: absolute; top: 50%; display: flex; align-items: center; justify-content: center; width: 30px; height: 44px; margin-top: -22px; border: 0; border-radius: 10px; background: rgba(0, 0, 0, .22); color: #fff; font-size: 18px; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; }
.xhs-banner:hover .xhs-arrow { opacity: 1; }
.xhs-arrow:hover { background: var(--xhs-red); }
.xhs-prev { left: 12px; }
.xhs-next { right: 12px; }
.xhs-banner-none { display: flex; align-items: center; justify-content: center; height: 100%; background: linear-gradient(135deg, #ffe3e8, #fff); color: var(--xhs-red); font-size: 26px; font-weight: 700; letter-spacing: 2px; }

/* 会员卡片 */
.xhs-user { flex: none; width: 268px; display: flex; flex-direction: column; padding: 20px 18px; background: #fff; border-radius: var(--xhs-r); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.xhs-user-top { display: flex; align-items: center; gap: 12px; }
.xhs-ava { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--xhs-red-l); color: var(--xhs-red); }
.xhs-ava svg { width: 26px; height: 26px; }
.xhs-hi { min-width: 0; font-size: 13.5px; color: var(--xhs-ink2); }
.xhs-hi b { display: block; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; color: var(--xhs-ink); }
.xhs-loginbuts { display: flex; gap: 10px; margin-top: 16px; }
.xhs-loginbuts a { flex: 1; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 19px; font-size: 14px; }
.xhs-loginbuts .g { border: 1px solid var(--xhs-red); color: var(--xhs-red); }
.xhs-loginbuts .g:hover { background: var(--xhs-red-l); }
.xhs-loginbuts .m { background: var(--xhs-red); color: #fff; }
.xhs-loginbuts .m:hover { background: var(--xhs-red-d); }
.xhs-stats { display: flex; margin-top: 18px; }
.xhs-stats a { flex: 1; text-align: center; }
.xhs-stats b { display: block; font-size: 19px; font-weight: 700; color: var(--xhs-ink); transition: color .15s; }
.xhs-stats span { display: block; margin-top: 2px; font-size: 12px; color: var(--xhs-ink3); }
.xhs-stats a:hover b { color: var(--xhs-red); }
.xhs-user-links { margin-top: auto; padding-top: 18px; }
.xhs-user-links a { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 10px; font-size: 13.5px; color: var(--xhs-ink2); transition: background .15s, color .15s; }
.xhs-user-links a:hover { background: var(--xhs-red-l); color: var(--xhs-red); }
.xhs-user-links a i { font-style: normal; font-size: 12px; color: #c4c4c4; }
.xhs-user-links a:hover i { color: var(--xhs-red); }

/* ============ 瀑布流商品区 ============ */
.xhs-main { flex: 1; min-width: 0; }
.xhs-sec-h { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.xhs-sec-h h2 { position: relative; padding-left: 13px; font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.xhs-sec-h h2::before { content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 17px; margin-top: -8.5px; border-radius: 2px; background: var(--xhs-red); }
.xhs-sec-h .sub { font-size: 12.5px; color: var(--xhs-ink3); }

.xhs-pills { display: flex; flex-wrap: wrap; gap: 9px; }
.xhs-pill { padding: 6px 15px; border: 1px solid #e8e8e9; border-radius: 17px; background: #fff; font-size: 13.5px; color: var(--xhs-ink2); cursor: pointer; transition: all .15s; }
.xhs-pill:hover { border-color: var(--xhs-red); color: var(--xhs-red); }
.xhs-pill.on { border-color: var(--xhs-red); background: var(--xhs-red); color: #fff; font-weight: 600; }
.xhs-sorts { display: flex; gap: 16px; margin-left: auto; }
.xhs-sort { font-size: 13.5px; color: var(--xhs-ink3); cursor: pointer; padding: 4px 0; }
.xhs-sort:hover { color: var(--xhs-ink); }
.xhs-sort.on { color: var(--xhs-red); font-weight: 600; }

.xhs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.xhs-card { display: block; margin: 0; background: #fff; border-radius: var(--xhs-r); overflow: hidden; box-shadow: 0 1px 3px rgba(0, 0, 0, .05); transition: box-shadow .18s ease; }
/* hover 不能改变卡片自身的位置/尺寸：位移会让鼠标瞬间脱离 hover，落回后又触发，
   鼠标停在卡片下缘时就是「一直弹一直闪」；这里只改阴影 + 图内缩放（在 overflow:hidden 里，不影响命中区域） */
.xhs-card:hover { box-shadow: 0 10px 24px rgba(0, 0, 0, .1); }
.xhs-card-img { position: relative; display: block; height: 0; padding-top: 100%; overflow: hidden; background: #f4f4f5; }
.xhs-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.xhs-card:hover .xhs-card-img img { transform: scale(1.035); }
.xhs-tag { position: absolute; left: 9px; top: 9px; padding: 2px 8px; border-radius: 10px; background: rgba(255, 36, 66, .92); color: #fff; font-size: 11.5px; letter-spacing: .5px; }
.xhs-tag-stop { background: rgba(0, 0, 0, .55); }
.xhs-card-body { display: block; padding: 8px 12px 12px; }
.xhs-card-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; line-height: 1.45; color: #2b2b2b; }
.xhs-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.xhs-price { color: var(--xhs-red); font-weight: 700; font-size: 15.5px; }
.xhs-price i { font-style: normal; font-size: 12px; margin-right: 1px; }
.xhs-like { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: #b0b0b0; }
.xhs-like svg { width: 14px; height: 14px; fill: #d9d9d9; transition: fill .15s; }
.xhs-card:hover .xhs-like svg { fill: var(--xhs-red); }
.xhs-card:hover .xhs-like { color: var(--xhs-red); }
.xhs-empty { padding: 60px 0; text-align: center; color: var(--xhs-ink3); font-size: 14px; }

.xhs-more { display: flex; justify-content: center; margin: 8px 0 4px; }
.xhs-more a, .xhs-more button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 34px; border: 1px solid #e8e8e9; border-radius: 22px; background: #fff; font-size: 14px; color: var(--xhs-ink2); cursor: pointer; transition: all .15s; }
.xhs-more a:hover, .xhs-more button:hover { border-color: var(--xhs-red); color: var(--xhs-red); }
.xhs-more .end { padding: 0; border: 0; background: none; color: #c4c4c4; font-size: 13px; cursor: default; }

/* ============ 特色条 + 页脚 ============ */
.xhs-feature { display: flex; gap: 14px; margin: 26px 0 18px; }
.xhs-feature li { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 10px; background: #fff; border-radius: var(--xhs-r); font-size: 14px; color: var(--xhs-ink2); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.xhs-feature svg { width: 24px; height: 24px; flex: none; }

.xhs-footer { padding: 26px 0 30px; background: #fff; border-top: 1px solid var(--xhs-line); color: var(--xhs-ink3); font-size: 12.5px; }
.xhs-footer-in { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; justify-content: center; text-align: center; }
.xhs-footer a { color: var(--xhs-ink3); }
.xhs-footer a:hover { color: var(--xhs-red); }

/* ============ 右侧悬浮 ============ */
.xhs-float { position: fixed; right: 18px; bottom: 90px; z-index: 950; display: flex; flex-direction: column; gap: 10px; }
.xhs-float a, .xhs-float button { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 52px; height: 52px; border: 0; border-radius: 16px; background: #fff; color: var(--xhs-ink2); font-size: 11px; cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, .1); transition: all .15s; }
.xhs-float a:hover, .xhs-float button:hover { background: var(--xhs-red); color: #fff; }
.xhs-float svg { width: 20px; height: 20px; margin-bottom: 2px; }
.xhs-float .m { background: var(--xhs-red); color: #fff; }
.xhs-float .m:hover { background: var(--xhs-red-d); }
.xhs-top-btn { opacity: 0; pointer-events: none; transition: opacity .2s, background .15s, color .15s; }
.xhs-top-btn.show { opacity: 1; pointer-events: auto; }

/* ============ 白卡与空态（分类页 / 详情页共用） ============ */
.xhs-panel { margin-top: 16px; padding: 20px 22px; background: #fff; border-radius: var(--xhs-r); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.xhs-blank { padding: 46px 0; text-align: center; color: var(--xhs-ink3); font-size: 14px; line-height: 1.9; }
.xhs-crumb { margin-top: 16px; font-size: 13px; color: var(--xhs-ink3); }
.xhs-crumb a { color: var(--xhs-ink3); }
.xhs-crumb a:hover { color: var(--xhs-red); }
.xhs-crumb i { margin: 0 8px; font-style: normal; color: #d5d5d5; }
.xhs-crumb b { font-weight: 400; color: #4a4a4a; }
.xhs-crumb span { margin: 0 8px; color: #d5d5d5; }
.xhs-crumb em { font-style: normal; color: #4a4a4a; }

/* ============ 内容页：文章列表 / 详情 / 客服 ============ */
.xhs-back { display: inline-block; color: var(--xhs-red); }
.xhs-arts { margin-top: 4px; }
.xhs-art + .xhs-art { border-top: 1px solid var(--xhs-line); }
.xhs-art-in { display: block; padding: 16px 4px; transition: background .15s; }
.xhs-art-in:hover { background: var(--xhs-red-l); }
.xhs-art-title { display: block; font-size: 15.5px; font-weight: 600; color: var(--xhs-ink); }
.xhs-art-sum { display: block; margin-top: 5px; font-size: 13px; color: var(--xhs-ink2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.xhs-art-date { display: block; margin-top: 6px; font-size: 12px; color: var(--xhs-ink3); }
.xhs-article-title { font-size: 22px; font-weight: 700; line-height: 1.4; }
.xhs-article-meta { margin: 10px 0 18px; font-size: 12.5px; color: var(--xhs-ink3); }
.xhs-article-body { font-size: 15px; line-height: 1.85; color: #333; word-break: break-word; }
.xhs-article-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 10px 0; }
.xhs-article-body p { margin: 0 0 12px; }
.xhs-kefu { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; padding: 26px 0 8px; }
.xhs-kefu-item { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 190px; padding: 28px 40px; border: 1px solid var(--xhs-line); border-radius: 16px; background: #fff; color: var(--xhs-ink); text-align: center; transition: box-shadow .18s, border-color .18s; }
.xhs-kefu-item:hover { border-color: var(--xhs-red-b); box-shadow: 0 8px 22px rgba(255, 36, 66, .08); }
.xhs-kefu-ico { width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--xhs-red-l); color: var(--xhs-red); font-size: 18px; font-weight: 700; }
.xhs-kefu-name { font-size: 15px; font-weight: 600; }
.xhs-kefu-val { font-size: 13px; color: var(--xhs-ink2); }
.xhs-kefu-tip { font-size: 12px; color: var(--xhs-ink3); }

/* ============ 会员中心：整体两栏 + 左侧栏 ============ */
.xhs-uc { display: flex; gap: 16px; align-items: flex-start; margin-top: 16px; }
.xhs-uc-side { flex: none; width: 236px; position: sticky; top: 84px; display: flex; flex-direction: column; gap: 12px; }
.xhs-uc-main { flex: 1; min-width: 0; }
.xhs-uc-card { background: #fff; border-radius: var(--xhs-r); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); padding: 18px; }
.xhs-uc-card-top { display: flex; align-items: center; gap: 12px; }
.xhs-uc-avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--xhs-red), #ff6b81); display: flex; align-items: center; justify-content: center; flex: none; }
.xhs-uc-id { min-width: 0; }
.xhs-uc-id b { display: block; font-size: 15px; color: var(--xhs-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xhs-uc-badge { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 10px; background: var(--xhs-red-l); color: var(--xhs-red); font-size: 11.5px; }
.xhs-uc-bal { display: flex; align-items: baseline; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--xhs-line); }
.xhs-uc-bal span { font-size: 13px; color: var(--xhs-ink2); }
.xhs-uc-bal em { font-style: normal; font-size: 20px; font-weight: 700; color: var(--xhs-red); }
.xhs-uc-btns { display: flex; gap: 10px; margin-top: 14px; }
.xhs-uc-btn { flex: 1; text-align: center; padding: 8px 0; border-radius: 20px; font-size: 13.5px; border: 1px solid var(--xhs-line); color: var(--xhs-ink2); transition: all .15s; }
.xhs-uc-btn:hover { border-color: var(--xhs-red); color: var(--xhs-red); }
.xhs-uc-btn-p { background: var(--xhs-red); border-color: var(--xhs-red); color: #fff; }
.xhs-uc-btn-p:hover { background: var(--xhs-red-d); border-color: var(--xhs-red-d); color: #fff; }
.xhs-uc-nav { background: #fff; border-radius: var(--xhs-r); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); padding: 8px 8px 10px; }
.xhs-uc-nav-t { padding: 10px 12px 6px; font-size: 12.5px; color: var(--xhs-ink3); }
.xhs-uc-nav-i { display: block; padding: 9px 12px; border-radius: 10px; font-size: 14px; color: #3a3a3a; transition: background .15s, color .15s; }
.xhs-uc-nav-i:hover { background: var(--xhs-red-l); color: var(--xhs-red); }
.xhs-uc-nav-i.on { background: var(--xhs-red-l); color: var(--xhs-red); font-weight: 600; }
.xhs-uc-nav-todo { color: var(--xhs-ink3); cursor: default; }
.xhs-uc-nav-todo em { font-style: normal; margin-left: 6px; font-size: 11px; color: #c4c4c4; }

/* ============ 常见问题手风琴（articles.php，原生 details） ============ */
.xhs-faq { border-bottom: 1px solid var(--xhs-line); }
.xhs-faq:last-child { border-bottom: 0; }
.xhs-faq summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 15px 2px; cursor: pointer; font-size: 15px; color: var(--xhs-ink); }
.xhs-faq summary::-webkit-details-marker { display: none; }
.xhs-faq-no { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--xhs-red-l); color: var(--xhs-red); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.xhs-faq-t { flex: 1; min-width: 0; }
.xhs-faq-arrow { width: 8px; height: 8px; flex: none; border-right: 2px solid var(--xhs-ink3); border-bottom: 2px solid var(--xhs-ink3); transform: rotate(45deg); transition: transform .2s; margin-right: 4px; }
.xhs-faq[open] .xhs-faq-arrow { transform: rotate(-135deg); }
.xhs-faq[open] .xhs-faq-t { color: var(--xhs-red); }
.xhs-faq-body { padding: 2px 2px 16px 32px; font-size: 14px; line-height: 1.85; color: #444; word-break: break-word; }
.xhs-faq-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 8px 0; }
.xhs-faq-time { margin-top: 10px; font-size: 12px; color: var(--xhs-ink3); }

/* ============ 个人中心首页（会员卡 / 快捷入口 / 六宫格 / 数据统计 / 知识中心） ============ */
.xhs-home-card { background: #fff; border-radius: var(--xhs-r); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); padding: 18px 20px; margin-bottom: 14px; }
.xhs-member-top { display: flex; align-items: center; gap: 16px; }
.xhs-avatar { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--xhs-red), #ff6b81); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.xhs-avatar svg { width: 30px; height: 30px; }
.xhs-member-info { flex: 1; min-width: 0; }
.xhs-member-name { font-size: 17px; font-weight: 700; color: var(--xhs-ink); }
.xhs-member-sub { font-size: 12.5px; color: var(--xhs-ink3); margin-top: 3px; }
.xhs-member-level { display: inline-block; margin-top: 6px; padding: 1px 10px; border-radius: 10px; background: var(--xhs-red-l); color: var(--xhs-red); font-size: 12px; }
.xhs-login-buts { margin-top: 10px; display: flex; gap: 10px; }
.xhs-login-buts a { padding: 5px 16px; border: 1px solid var(--xhs-line); border-radius: 16px; font-size: 13px; color: var(--xhs-ink2); }
.xhs-login-buts a.on { background: var(--xhs-red); color: #fff; border-color: var(--xhs-red); }
.xhs-member-bar { display: flex; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--xhs-line); }
.xhs-member-cell { flex: 1; min-width: 0; }
.xhs-member-cell span { display: block; font-size: 12.5px; color: var(--xhs-ink3); }
.xhs-member-cell b { display: inline-block; margin-top: 4px; font-size: 18px; font-weight: 700; color: var(--xhs-ink); }
.xhs-btn-mini { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 12px; background: var(--xhs-red); color: #fff; font-size: 12px; vertical-align: middle; }
.xhs-btn-mini.xhs-btn-line { background: #fff; border: 1px solid var(--xhs-line); color: var(--xhs-ink2); }
.xhs-uc-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.xhs-uc-cols .xhs-home-card { margin-bottom: 0; }
.xhs-quick-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.xhs-quick-items { display: flex; flex-wrap: wrap; gap: 16px 8px; }
.xhs-quick-items a { display: flex; flex-direction: column; align-items: center; gap: 7px; width: calc(33.333% - 6px); font-size: 12.5px; color: var(--xhs-ink2); }
.xhs-quick-items a:hover { color: var(--xhs-red); }
.qi { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.qi svg { width: 20px; height: 20px; }
.qi-blue { background: #e8f1ff; color: #2f77f1; }
.qi-cyan { background: #e6fbff; color: #0ea5e9; }
.qi-orange { background: #fff3e6; color: #e6822a; }
.qi-green { background: #e7f7ec; color: #22a558; }
.qi-red { background: #fdeaea; color: #e6494f; }
.qi-gray { background: #f1f4f8; color: #8a94a6; }
.qi-yellow { background: #fff6e0; color: #d99a1f; }
.qi-purple { background: #f3e8ff; color: #8b5cf6; }
.qi-indigo { background: #eaeaff; color: #6366f1; }
.xhs-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 12px; }
.xhs-metric { display: flex; align-items: center; gap: 12px; }
.xhs-metric em { display: block; font-style: normal; font-size: 12.5px; color: var(--xhs-ink3); }
.xhs-metric b { font-size: 19px; font-weight: 700; color: var(--xhs-ink); }
.xhs-stat-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.xhs-stat-title { font-size: 15px; font-weight: 700; }
.xhs-stat-ranges { display: flex; gap: 4px; flex-wrap: wrap; }
.xhs-stat-ranges a { padding: 4px 12px; border-radius: 14px; font-size: 13px; color: var(--xhs-ink2); }
.xhs-stat-ranges a.on { background: var(--xhs-red); color: #fff; }
.xhs-stat-date { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 13px; color: var(--xhs-ink3); }
.xhs-stat-date input { padding: 5px 8px; border: 1px solid var(--xhs-line); border-radius: 8px; font-size: 13px; }
.xhs-stat-date button { padding: 5px 14px; border: 1px solid var(--xhs-red); background: #fff; color: var(--xhs-red); border-radius: 8px; font-size: 13px; cursor: pointer; }
.xhs-stat-body { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.xhs-stat-cell { text-align: center; padding: 14px 6px; background: var(--xhs-bg); border-radius: 10px; }
.xhs-stat-cell b { display: block; font-size: 18px; font-weight: 700; color: var(--xhs-ink); }
.xhs-stat-cell span { display: block; margin-top: 4px; font-size: 12px; color: var(--xhs-ink3); }
.xhs-stat-foot { margin-top: 12px; font-size: 12px; color: var(--xhs-ink3); }
.xhs-know-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.xhs-know-more { font-size: 13px; color: var(--xhs-red); }
.xhs-know-list li { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--xhs-line); }
.xhs-know-list li:last-child { border-bottom: 0; }
.xhs-know-list a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: #3a3a3a; }
.xhs-know-list a:hover { color: var(--xhs-red); }
.xhs-know-list span { flex: none; margin-left: 12px; font-size: 12px; color: var(--xhs-ink3); }

/* 内容区通用：页标题条 / 表单 / 表格 / 统计卡 / 分页 */
.xhs-uc-h { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 14px; }
.xhs-uc-h h2 { font-size: 17px; font-weight: 700; }
.xhs-uc-h .sub { font-size: 12.5px; color: var(--xhs-ink3); margin-left: 10px; font-weight: 400; }
.xhs-form { max-width: 560px; }
.xhs-form-row { margin-bottom: 16px; }
.xhs-form-row > label { display: block; margin-bottom: 7px; font-size: 13.5px; color: var(--xhs-ink2); }
.xhs-input, .xhs-form select, .xhs-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--xhs-line); border-radius: 10px; background: #fff; font-size: 14px; color: var(--xhs-ink); outline: none; transition: border-color .15s; }
.xhs-input:focus, .xhs-form select:focus, .xhs-form textarea:focus { border-color: var(--xhs-red); }
.xhs-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 22px; border: 1px solid var(--xhs-line); border-radius: 22px; background: #fff; color: var(--xhs-ink2); font-size: 14px; cursor: pointer; transition: all .15s; }
.xhs-btn:hover { border-color: var(--xhs-red); color: var(--xhs-red); }
.xhs-btn-p { background: var(--xhs-red); border-color: var(--xhs-red); color: #fff; }
.xhs-btn-p:hover { background: var(--xhs-red-d); border-color: var(--xhs-red-d); color: #fff; }
.xhs-btn-sm { padding: 6px 14px; font-size: 13px; }
.xhs-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.xhs-table th, .xhs-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--xhs-line); }
.xhs-table th { color: var(--xhs-ink3); font-weight: 500; background: #fafbfc; }
.xhs-table td { color: #3a3a3a; }
.xhs-table .num { font-variant-numeric: tabular-nums; }
.xhs-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.xhs-stat { background: #fff; border-radius: var(--xhs-r); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); padding: 18px 20px; }
.xhs-stat .k { font-size: 13px; color: var(--xhs-ink3); }
.xhs-stat .v { margin-top: 8px; font-size: 24px; font-weight: 700; color: var(--xhs-ink); }
.xhs-stat .v.red { color: var(--xhs-red); }
.xhs-auth { max-width: 400px; margin: 30px auto; }
.xhs-auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; background: linear-gradient(160deg, #fff5f6 0%, var(--xhs-bg) 40%, #fff 100%); }
.xhs-auth-box { width: 400px; max-width: 100%; background: #fff; border-radius: 20px; box-shadow: 0 18px 48px rgba(0, 0, 0, .08); padding: 34px 34px 30px; }
.xhs-auth-brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 22px; font-size: 19px; font-weight: 700; color: var(--xhs-ink); }
.xhs-auth-brand img { max-height: 44px; max-width: 200px; object-fit: contain; }
.xhs-auth-logo-i { width: 34px; height: 34px; border-radius: 9px; background: var(--xhs-red); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.xhs-auth-tabs { display: flex; border-bottom: 1px solid var(--xhs-line); margin-bottom: 24px; }
.xhs-auth-tabs a { position: relative; flex: 1; text-align: center; padding: 4px 0 14px; font-size: 17px; color: var(--xhs-ink2); }
.xhs-auth-tabs a.on { color: var(--xhs-red); font-weight: 600; }
.xhs-auth-tabs a.on::after { content: ''; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); width: 44px; height: 3px; border-radius: 3px; background: var(--xhs-red); }
.xhs-auth-submit { width: 100%; border-radius: 12px; padding: 12px 0; font-size: 15px; }
.xhs-auth-code { display: flex; gap: 10px; }
.xhs-auth-code img { width: 108px; height: 42px; flex: none; border: 1px solid var(--xhs-line); border-radius: 10px; cursor: pointer; object-fit: cover; }
.xhs-auth-links { margin-top: 16px; text-align: center; font-size: 13px; color: var(--xhs-ink3); }
.xhs-auth-links a { color: var(--xhs-red); }
.xhs-wallet { background: linear-gradient(135deg, var(--xhs-red), #ff6b81); }
.xhs-wallet .k { color: rgba(255, 255, 255, .85); }
.xhs-wallet .v, .xhs-wallet .v.red { color: #fff; }
.recharge-pay { display: flex; flex-wrap: wrap; gap: 10px; }
.recharge-pay-item { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1px solid var(--xhs-line); border-radius: 10px; background: #fff; font-size: 13.5px; color: var(--xhs-ink2); cursor: pointer; transition: all .15s; }
.recharge-pay-item:hover { border-color: var(--xhs-red-b); }
.recharge-pay-item svg, .recharge-pay-item img { width: 18px; height: 18px; }
.recharge-pay-item.recharge-on { border-color: var(--xhs-red); color: var(--xhs-red); background: var(--xhs-red-l); }
.xhs-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.xhs-tab { padding: 6px 16px; border-radius: 18px; background: #fff; border: 1px solid var(--xhs-line); font-size: 13.5px; color: var(--xhs-ink2); }
.xhs-tab.on { background: var(--xhs-red); border-color: var(--xhs-red); color: #fff; }
.xhs-pager { display: flex; gap: 8px; justify-content: center; margin-top: 18px; }
.xhs-pager a, .xhs-pager span { padding: 7px 14px; border-radius: 18px; border: 1px solid var(--xhs-line); background: #fff; font-size: 13.5px; color: var(--xhs-ink2); }
.xhs-pager .cur { background: var(--xhs-red); border-color: var(--xhs-red); color: #fff; }
.xhs-pager .off { color: #c4c4c4; }
.xhs-tip { padding: 12px 16px; border-radius: 10px; background: var(--xhs-red-l); color: var(--xhs-red-d); font-size: 13.5px; margin-bottom: 16px; }
.xhs-tip.ok { background: #f0fbf3; color: #16a34a; }
.xhs-kv { display: flex; padding: 10px 0; border-bottom: 1px solid var(--xhs-line); font-size: 13.5px; }
.xhs-kv .kk { width: 120px; flex: none; color: var(--xhs-ink3); }
.xhs-kv .vv { flex: 1; color: #3a3a3a; word-break: break-all; }

/* ============ 订单页：筛选 / 列表 / 详情弹窗 ============ */
.xhs-ofilter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.xhs-ofilter .xhs-input { width: 150px; flex: 0 0 auto; padding: 8px 12px; font-size: 13px; }
.xhs-ofilter select.xhs-input { height: 38px; }
.xhs-otable .order-row { cursor: pointer; transition: background .12s; }
.xhs-otable .order-row:hover { background: var(--xhs-red-l); }
.xhs-ogoods { display: flex; align-items: center; gap: 10px; min-width: 0; }
.xhs-ogoods img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: #f4f4f5; flex: none; }
.xhs-ogoods-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xhs-od { padding: 16px 18px 18px; background: #fff; font-size: 14px; color: #334155; }
.xhs-od-goods { display: flex; align-items: center; gap: 14px; padding: 12px 14px; background: var(--xhs-red-l); border-radius: 12px; }
.xhs-od-goods img { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; background: #fff; flex: none; }
.xhs-od-goods-info { flex: 1; min-width: 0; }
.xhs-od-goods-name { font-size: 15px; font-weight: 600; color: var(--xhs-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xhs-od-goods-sub { margin-top: 4px; font-size: 12.5px; color: var(--xhs-ink3); }
.xhs-od-status { flex: none; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.xhs-od-status.ok { background: #e7f7ec; color: #2e9e5b; }
.xhs-od-status.doing { background: #e8f1ff; color: #2f77f1; }
.xhs-od-status.warn { background: #fff3e6; color: #e6822a; }
.xhs-od-status.off { background: #f1f4f8; color: #8a94a6; }
.xhs-od-total { display: flex; justify-content: flex-end; align-items: baseline; gap: 8px; padding: 12px 2px 0; }
.xhs-od-total span { font-size: 13px; color: var(--xhs-ink3); }
.xhs-od-total b { font-size: 22px; color: var(--xhs-red); }
.xhs-od-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 12px; background: var(--xhs-line); border: 1px solid var(--xhs-line); border-radius: 10px; overflow: hidden; }
.xhs-od-item { padding: 10px 14px; background: #fff; }
.xhs-od-item.full, .xhs-od-full { grid-column: 1 / -1; }
.xhs-od-item span { display: block; margin-bottom: 3px; font-size: 12.5px; color: var(--xhs-ink3); }
.xhs-od-item b { font-weight: 500; color: #334155; word-break: break-all; }
.xhs-od-sec { margin-top: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--xhs-line); border-radius: 10px; }
.xhs-od-sec-t { margin-bottom: 8px; font-size: 12.5px; color: var(--xhs-ink3); }
.xhs-od-sec pre { margin: 0; padding: 10px 12px; background: #f7f9fc; border-radius: 8px; font-size: 13px; white-space: pre-wrap; word-break: break-all; font-family: inherit; }
.xhs-od-kv { padding: 3px 0; font-size: 13.5px; }
.xhs-od-kv span { display: inline-block; width: 96px; color: var(--xhs-ink3); }
.xhs-od-kv b { font-weight: 500; color: #334155; word-break: break-all; }

/* ============ 推广：邀请链接 / 海报 ============ */
.xhs-invite { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.xhs-invite-url { flex: 1; min-width: 240px; padding: 10px 14px; background: var(--xhs-bg); border-radius: 10px; font-size: 13px; color: var(--xhs-ink2); word-break: break-all; }
.xhs-poster-row { display: flex; gap: 28px; flex-wrap: wrap; }
.xhs-poster { width: 320px; flex: none; background: linear-gradient(150deg, var(--xhs-red), #ff6b81); border-radius: 18px; padding: 28px 24px; color: #fff; position: relative; overflow: hidden; }
.xhs-poster-name { font-size: 22px; font-weight: 700; }
.xhs-poster-slogan { font-size: 13px; opacity: .88; margin: 6px 0 22px; }
.xhs-poster-qr { background: rgba(255, 255, 255, .16); border-radius: 14px; padding: 18px; text-align: center; margin-bottom: 18px; }
.xhs-poster-qr-t { font-size: 14px; margin-bottom: 12px; }
.xhs-poster-qr #qrcodeBox { display: inline-block; background: #fff; padding: 10px; border-radius: 8px; line-height: 0; }
.xhs-poster-id { font-size: 12px; opacity: .78; }
.xhs-poster-side { flex: 1; min-width: 240px; }
.xhs-poster-linkbox { background: var(--xhs-bg); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.xhs-poster-link-t { font-size: 13px; color: var(--xhs-ink3); margin-bottom: 6px; }
.xhs-poster-link { font-size: 13px; color: var(--xhs-red); word-break: break-all; margin-bottom: 12px; }
.xhs-poster-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .72); z-index: 9999; justify-content: center; align-items: center; }
.xhs-poster-overlay-in { text-align: center; }
.xhs-poster-overlay canvas { max-width: 90vw; max-height: 82vh; border-radius: 12px; }
.xhs-poster-overlay-btns { margin-top: 16px; display: flex; gap: 12px; justify-content: center; }

/* ============ 搭建分销：FAQ / 版本对比 / 套餐卡 / 域名 ============ */
.xhs-faq { border: 1px solid var(--xhs-line); border-radius: 10px; margin-bottom: 10px; background: #fff; overflow: hidden; }
.sv-faq-q { padding: 12px 14px; font-size: 14px; color: var(--xhs-ink); cursor: pointer; }
.sv-faq-a { display: none; padding: 0 14px 12px; font-size: 13px; color: var(--xhs-ink2); line-height: 1.9; }
.xhs-fchk { display: inline-block; min-width: 24px; height: 24px; line-height: 24px; padding: 0 4px; border-radius: 6px; color: #fff; font-size: 13px; font-weight: 700; }
.xhs-fchk.yes { background: #8bc34a; }
.xhs-fchk.no { background: #e8695f; }
.xhs-sv-cards { display: flex; flex-wrap: wrap; gap: 14px; }
.sv-card { min-width: 150px; padding: 16px 22px; border: 1px solid var(--xhs-line); border-radius: 12px; background: #fff; text-align: center; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.sv-card.on { border-color: var(--xhs-red); box-shadow: 0 0 0 2px var(--xhs-red-b); }
.xhs-sv-name { font-size: 15px; font-weight: 600; color: var(--xhs-ink); }
.xhs-sv-price { margin-top: 6px; font-size: 20px; font-weight: 700; color: var(--xhs-red); }
.xhs-sv-gift { margin-top: 2px; font-size: 12px; color: var(--xhs-ink3); }
#sv-card-intro { margin-top: 8px; padding: 8px 12px; border-radius: 8px; background: var(--xhs-red-l); font-size: 12.5px; color: var(--xhs-red-d); line-height: 1.9; }
.xhs-domain { display: flex; align-items: stretch; }
.xhs-domain input { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid var(--xhs-line); border-right: 0; border-radius: 10px 0 0 10px; font-size: 14px; outline: none; }
.xhs-domain input:focus { border-color: var(--xhs-red); }
.xhs-domain-sep { display: flex; align-items: center; padding: 0 6px; border-top: 1px solid var(--xhs-line); border-bottom: 1px solid var(--xhs-line); background: #fff; color: var(--xhs-ink2); }
.xhs-domain-main { display: flex; align-items: center; padding: 9px 14px; border: 1px solid var(--xhs-line); border-left: 0; border-radius: 0 10px 10px 0; background: var(--xhs-bg); font-size: 14px; color: var(--xhs-ink2); }
.xhs-paybox { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--xhs-red-b); border-radius: 10px; background: var(--xhs-red-l); font-size: 14px; }
.xhs-paybox b { color: var(--xhs-red); }
.xhs-paybox span { font-size: 12.5px; color: var(--xhs-ink3); }
.xhs-sv-open { width: 100%; border-radius: 12px; padding: 13px 0; font-size: 16px; }

/* ============ 分销管理（分站后台） ============ */
.xhs-ssm-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.xhs-ssm-cell { padding: 14px 16px; background: var(--xhs-bg); border-radius: 12px; }
.xhs-ssm-cell span { font-size: 12.5px; color: var(--xhs-ink3); }
.xhs-ssm-cell b { display: block; margin-top: 5px; font-size: 16px; font-weight: 700; color: var(--xhs-ink); }
.xhs-ssm-cell b.green { color: #15803d; }
.xhs-ssm-perms { margin-bottom: 16px; }
.xhs-ssm-perms-t { font-size: 13px; color: var(--xhs-ink3); margin-bottom: 8px; }
.xhs-ssm-perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.xhs-ssm-perm { padding: 12px 14px; border: 1px solid var(--xhs-line); border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: space-between; }
.xhs-ssm-perm span { font-size: 13.5px; color: var(--xhs-ink); }
.xhs-ssm-perm em { font-style: normal; font-size: 11.5px; color: var(--xhs-red); }
.xhs-ssm-perm:not(.on) { background: var(--xhs-bg); }
.xhs-ssm-perm:not(.on) span { color: var(--xhs-ink3); }
.xhs-ssm-perm:not(.on) em { color: #c3cad4; }
.xhs-ssm-tabs { margin-top: 4px; }
.ssm-pane { margin-top: 12px; border: 1px solid var(--xhs-line); border-radius: 12px; overflow: hidden; }
.xhs-ssm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 16px; background: #fafbfc; border-bottom: 1px solid var(--xhs-line); font-size: 14px; font-weight: 600; color: var(--xhs-ink); }
.xhs-ssm-head em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--xhs-ink3); }
.xhs-ssm-body { padding: 16px; }
.xhs-ssm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.xhs-ssm-grid label, .xhs-ssm-grid > div, .xhs-ssm-grid1 label, .xhs-ssm-grid1 > div { font-size: 13px; color: var(--xhs-ink2); }
.xhs-ssm-grid .full, .xhs-ssm-grid1 { grid-column: 1 / -1; }
.xhs-ssm-grid1 { display: grid; gap: 12px; }
.xhs-ssm-grid input.xhs-input, .xhs-ssm-grid select.xhs-input, .xhs-ssm-grid textarea.xhs-input, .xhs-ssm-grid1 input.xhs-input, .xhs-ssm-grid1 textarea.xhs-input { margin-top: 4px; padding: 8px 10px; font-size: 13px; }
.xhs-ssm-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.xhs-ssm-logorow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.xhs-ssm-logorow img { height: 32px; border-radius: 4px; border: 1px solid var(--xhs-line); }
.xhs-ssm-logorow .xhs-input { flex: 1; min-width: 200px; padding: 8px 10px; font-size: 13px; }
.xhs-ssm-actions { margin-top: 14px; display: flex; gap: 8px; justify-content: flex-end; }
.xhs-ssm-tip { margin-top: 6px; font-size: 12px; color: var(--xhs-ink3); }
.xhs-ssm-tools { display: flex; gap: 8px; }
.xhs-ssm-tools .xhs-input { width: 220px; padding: 7px 10px; font-size: 12.5px; }
.xhs-ssm-pager { margin-top: 10px; text-align: right; font-size: 12.5px; color: var(--xhs-ink2); }
.xhs-ssm-pager a { display: inline-block; min-width: 28px; padding: 4px 8px; margin-left: 6px; border: 1px solid var(--xhs-line); border-radius: 6px; }
.xhs-ssm-pager .cur { background: var(--xhs-red); border-color: var(--xhs-red); color: #fff; }
.xhs-ssm-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--xhs-line); font-size: 13px; color: var(--xhs-ink); }
.xhs-ssm-child { gap: 12px; justify-content: flex-start; color: var(--xhs-ink2); }
.xhs-ssm-child .id { color: var(--xhs-ink3); }
.xhs-ssm-child .nm { min-width: 120px; color: var(--xhs-ink); font-weight: 500; }
.xhs-ssm-child .dm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xhs-ssm-child .tm { color: var(--xhs-ink3); }
.xhs-ssm-child b.ok { color: #15803d; } .xhs-ssm-child b.no { color: #e6494f; }
/* 覆盖 subsite_manage.js 给 tab 写死的蓝色内联样式（仅本模板 xhs.css，红色主题），.on 由 JS 切换 */
.ssm-tab { background: #fff !important; border-color: var(--xhs-line) !important; color: var(--xhs-ink2) !important; }
.ssm-tab.on { background: var(--xhs-red) !important; border-color: var(--xhs-red) !important; color: #fff !important; }

/* ============ 商品分类页 ============ */
.xhs-fg-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; font-size: 16px; font-weight: 700; }
.xhs-fg-head i { width: 4px; height: 15px; border-radius: 2px; background: var(--xhs-red); }
.xhs-fg-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.xhs-fg-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px; border-radius: 12px; transition: background .15s; }
.xhs-fg-item:hover { background: var(--xhs-red-l); }
.xhs-fg-ico { width: 54px; height: 54px; border-radius: 50%; overflow: hidden; background: #f4f4f5; }
.xhs-fg-ico img { width: 100%; height: 100%; object-fit: cover; }
.xhs-fg-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: #3a3a3a; }
.xhs-fg-item:hover .xhs-fg-name { color: var(--xhs-red); }

/* ============ 商品详情页 ============ */
.xhs-buy { padding: 24px; }
.xhs-buy-main { display: flex; gap: 28px; align-items: flex-start; }
.xhs-buy-side { flex: none; width: 320px; }
.xhs-buy-img { overflow: hidden; border-radius: 12px; background: #f7f7f8; border: 1px solid var(--xhs-line); }
.xhs-buy-img img { width: 100%; height: auto; }
.xhs-buy-img-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.xhs-buy-img-no { font-size: 12.5px; color: var(--xhs-ink3); }
.xhs-buy-share { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 13px; border: 1px solid var(--xhs-red); border-radius: 16px; background: #fff; color: var(--xhs-red); font-size: 12.5px; cursor: pointer; transition: background .15s; }
.xhs-buy-share:hover { background: var(--xhs-red-l); }
.xhs-buy-share svg { width: 14px; height: 14px; }
.xhs-buy-info { flex: 1; min-width: 0; }
.xhs-buy-name { font-size: 20px; font-weight: 700; line-height: 1.45; }
.xhs-buy-price { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: linear-gradient(90deg, var(--xhs-red-b), #fff6f7); }
.xhs-buy-price-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.xhs-buy-price-row > span:first-child { font-size: 13px; color: #a05a66; }
.xhs-buy-price-row b { color: var(--xhs-red); font-size: 26px; font-weight: 700; line-height: 1.1; }
.xhs-buy-price-row b i { font-style: normal; font-size: 15px; margin-right: 2px; }
.xhs-buy-sales { font-size: 12.5px; color: #b06874; }
.xhs-buy-back { display: inline-block; padding: 8px 22px; border: 1px solid var(--xhs-red); border-radius: 20px; color: var(--xhs-red); font-size: 13.5px; }
.xhs-buy-back:hover { background: var(--xhs-red-l); }
/* 「查看拿货价」胶囊：结构由 level_price_html() 输出，这里只改成本模板的红胶囊外观 */
.xhs-buy-price-row .lp-open { height: 30px; margin-left: 0; padding: 0 14px; border: 1px solid var(--xhs-red); border-radius: 16px; background: #fff; color: var(--xhs-red); font-size: 12.5px; }
.xhs-buy-price-row .lp-open:hover { background: var(--xhs-red-l); }

/* ---- 以下类名是下单脚本的钩子（order-common.js / buy.js / batch-order.js），只改外观不碰结构 ---- */
#goodsBuyPanel { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--xhs-line); }
.goods-buy-form { width: 100%; }
.goods-buy-form .buy-row { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 15px; }
.goods-buy-form .buy-label { flex: none; width: 88px; padding-top: 11px; font-size: 13.5px; color: #8b8b8b; text-align: right; }
.goods-buy-form .buy-label em { margin-right: 3px; font-style: normal; color: var(--xhs-red); }
.goods-buy-form .input-container,
.goods-buy-form .buy-field { flex: 1; min-width: 0; }
.goods-buy-form .input_info,
.goods-buy-form textarea,
.goods-buy-form select {
    width: 100%;
    min-height: 42px;
    padding: 9px 14px;
    border: 1.5px solid transparent;
    border-radius: 10px;
    background: #f6f6f7;
    box-sizing: border-box;
    font-size: 14px;
    color: #2b2b2b;
    outline: none;
    transition: border-color .15s, background .15s;
}
.goods-buy-form .input_info:focus,
.goods-buy-form textarea:focus,
.goods-buy-form select:focus { border-color: var(--xhs-red); background: #fff; }
.goods-buy-form textarea { min-height: 92px; resize: vertical; }
.goods-buy-form .extract-btn { height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--xhs-red); color: #fff; white-space: nowrap; }
.xhs-buy-tip { margin-top: 6px; font-size: 12.5px; color: #a8a8a8; line-height: 1.7; }
.xhs-buy-radios { display: flex; flex-wrap: wrap; gap: 10px 18px; padding-top: 10px; }
.xhs-buy-radios .checkbox-line { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #3a3a3a; cursor: pointer; }

.goods-buy-form .buy-qty { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.goods-buy-form .buy-qty button { width: 42px; height: 42px; flex: none; border: 1px solid #ececee; background: #f6f6f7; color: #666; font-size: 18px; cursor: pointer; transition: color .15s, border-color .15s; }
.goods-buy-form .buy-qty button:hover { color: var(--xhs-red); border-color: var(--xhs-red); }
.goods-buy-form .buy-qty input { width: 116px; height: 42px; padding: 0 10px; border: 1px solid #ececee; border-left: 0; border-right: 0; background: #fff; text-align: center; font-size: 15px; color: #2b2b2b; outline: none; -moz-appearance: textfield; appearance: textfield; }
/* 已有 -/+ 两个按钮，浏览器自带的上下箭头去掉 */
.goods-buy-form .buy-qty input::-webkit-outer-spin-button,
.goods-buy-form .buy-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.goods-buy-form #qty-minus { border-radius: 10px 0 0 10px; }
.goods-buy-form #qty-plus { border-radius: 0 10px 10px 0; }
.goods-buy-form .qty-tips { font-size: 12.5px; color: #a8a8a8; }
.goods-buy-form .qty-tips i { font-style: normal; margin-left: 6px; color: var(--xhs-red); }

.goods-buy-form .pay { display: flex; flex-wrap: wrap; gap: 10px; }
.goods-buy-form .pay span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    height: 42px;
    padding: 0 16px;
    border: 1.5px solid #ececee;
    border-radius: 21px;
    background: #fff;
    color: #4a4a4a;
    font-size: 14px;
    cursor: pointer;
    transition: all .15s;
}
.goods-buy-form .pay span.hover,
.goods-buy-form .pay span:hover { border-color: var(--xhs-red); color: var(--xhs-red); background: var(--xhs-red-l); }
.goods-buy-form .pay span.guest-disabled { opacity: .5; cursor: not-allowed; }

.goods-buy-form .buy-rule-row .tips { font-size: 12.5px; color: #a8a8a8; }
.goods-buy-form .buy-off-tip { margin: 4px 0 14px 102px; padding: 10px 14px; border-radius: 10px; background: var(--xhs-red-l); color: var(--xhs-red-d); font-size: 13.5px; }
.goods-buy-form .buy-actions { display: flex; align-items: center; gap: 14px; margin-left: 102px; }
.goods-buy-form .paybut,
.goods-buy-form .batch-order-btn { height: 46px; padding: 0 30px; border-radius: 23px; font-size: 15px; cursor: pointer; }
.goods-buy-form .paybut { border: 0; background: var(--xhs-red); color: #fff; font-weight: 600; box-shadow: 0 10px 22px rgba(255, 36, 66, .24); transition: background .15s; }
.goods-buy-form .paybut:hover { background: var(--xhs-red-d); }
.goods-buy-form .batch-order-btn { border: 1.5px solid var(--xhs-red); background: #fff; color: var(--xhs-red); }
.goods-buy-form .batch-order-btn:hover { background: var(--xhs-red-l); }
.goods-buy-form .paybut.disabled,
.goods-buy-form .batch-order-btn.disabled { background: #d9d9db; border: 0; color: #fff; box-shadow: none; cursor: not-allowed; opacity: 1; }

/* ---- 详情 / 历史下单页签：纯 CSS 切换，radio 必须是本卡片直接子元素且排在面板前 ---- */
.xhs-buy-tabs-card { padding: 0 24px 24px; }
.xhs-buy-radio { display: none; }
.xhs-buy-tabs { display: flex; gap: 30px; border-bottom: 1px solid var(--xhs-line); }
.xhs-buy-tab { position: relative; padding: 16px 2px; font-size: 15px; color: #6b6b6b; cursor: pointer; }
.xhs-buy-tab:hover { color: var(--xhs-ink); }
.xhs-buy-pane { display: none; padding-top: 20px; }
#xhs-tab-detail:checked ~ .xhs-buy-tabs .xhs-buy-tab[for="xhs-tab-detail"],
#xhs-tab-history:checked ~ .xhs-buy-tabs .xhs-buy-tab[for="xhs-tab-history"] { color: var(--xhs-red); font-weight: 600; }
#xhs-tab-detail:checked ~ .xhs-buy-tabs .xhs-buy-tab[for="xhs-tab-detail"]::after,
#xhs-tab-history:checked ~ .xhs-buy-tabs .xhs-buy-tab[for="xhs-tab-history"]::after {
    content: ""; position: absolute; left: 50%; bottom: -1px; width: 26px; height: 3px; margin-left: -13px; border-radius: 2px; background: var(--xhs-red);
}
#xhs-tab-detail:checked ~ .xhs-buy-pane-detail,
#xhs-tab-history:checked ~ .xhs-buy-pane-history { display: block; }

/* 详情富文本：后台编辑器输出的标签统一收进内容区 */
.xhs-buy-content { font-size: 14.5px; line-height: 1.9; color: #3a3a3a; word-break: break-word; }
.xhs-buy-content img { max-width: 100%; height: auto; border-radius: 10px; }
.xhs-buy-content p { margin: 0 0 12px; }
.xhs-buy-content table { max-width: 100%; border-collapse: collapse; }
.xhs-buy-content td, .xhs-buy-content th { padding: 6px 10px; border: 1px solid var(--xhs-line); }

/* 历史下单：筛选条 + 表格 */
.xhs-his-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.xhs-his-kw, .xhs-his-st { height: 36px; padding: 0 12px; border: 1px solid #e8e8e9; border-radius: 10px; background: #fff; font-size: 13.5px; outline: none; }
.xhs-his-kw { width: 200px; }
.xhs-his-kw:focus, .xhs-his-st:focus { border-color: var(--xhs-red); }
.xhs-his-go { height: 36px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--xhs-red); color: #fff; font-size: 13.5px; cursor: pointer; }
.xhs-his-go:hover { background: var(--xhs-red-d); }
.xhs-his-reset { font-size: 13px; color: var(--xhs-ink3); }
.xhs-his-reset:hover { color: var(--xhs-red); }
.xhs-his-table { border: 1px solid var(--xhs-line); border-radius: 12px; overflow: hidden; }
.xhs-his-row { display: grid; grid-template-columns: 1.4fr 2fr .7fr 1fr 1fr; gap: 10px; padding: 11px 16px; font-size: 13.5px; color: #4a4a4a; border-top: 1px solid var(--xhs-line); }
.xhs-his-row:first-child { border-top: 0; }
.xhs-his-head { background: #fafafa; color: #9a9a9a; font-size: 13px; }
.xhs-his-row a { color: var(--xhs-red); }
.xhs-his-more { margin-top: 10px; font-size: 12.5px; color: var(--xhs-ink3); }

/* 分享商品弹窗：内容由 buy.js 生成，layer 皮肤类 layer-share */
.layui-layer.layer-share { border-radius: 16px; overflow: hidden; }
.layui-layer.layer-share .layui-layer-title { background: #fff; border-bottom: 1px solid var(--xhs-line); font-weight: 600; }
.share-wrap { padding: 18px; }
.share-card { display: flex; gap: 16px; align-items: center; }
.share-img { flex: none; width: 116px; height: 116px; border-radius: 12px; overflow: hidden; background: #f6f6f7; }
.share-img img { width: 100%; height: 100%; object-fit: cover; }
.share-foot { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.share-info { min-width: 0; }
.share-name { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 14.5px; font-weight: 600; line-height: 1.5; }
.share-price { margin-top: 8px; color: var(--xhs-red); font-size: 19px; font-weight: 700; }
.share-tip { margin-top: 6px; font-size: 12.5px; color: var(--xhs-ink3); }
.share-qr { flex: none; width: 124px; height: 124px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--xhs-line); border-radius: 12px; background: #fff; }
.share-qr canvas, .share-qr img { max-width: 116px; max-height: 116px; }
.share-qr-fail { font-size: 12px; color: var(--xhs-ink3); text-align: center; padding: 0 6px; }

@media (max-width: 1080px) {
    .xhs-buy-main { flex-wrap: wrap; }
    .xhs-buy-side { width: 100%; }
    .xhs-buy-img img { max-height: 320px; object-fit: cover; }
    .xhs-fg-grid { grid-template-columns: repeat(4, 1fr); }
    .xhs-his-row { grid-template-columns: 1.2fr 1.6fr .7fr 1fr 1fr; font-size: 12.5px; }
}
@media (max-width: 780px) {
    .xhs-fg-grid { grid-template-columns: repeat(3, 1fr); }
    .goods-buy-form .buy-row { flex-direction: column; gap: 6px; }
    .goods-buy-form .buy-label { width: auto; padding-top: 0; text-align: left; }
    .goods-buy-form .buy-off-tip,
    .goods-buy-form .buy-actions { margin-left: 0; }
    .xhs-his-row { grid-template-columns: 1fr 1fr; }
}

/* ============ 自适应 ============ */
@media (max-width: 1180px) {
    .xhs-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1080px) {
    .xhs-hero, .xhs-body { flex-wrap: wrap; }
    .xhs-cats { width: 100%; display: flex; flex-wrap: wrap; padding: 6px 10px; position: static; max-height: none; overflow: visible; }
    .xhs-cats-h { width: 100%; padding: 6px 8px; }
    .xhs-cats a { border-left: 0; border-radius: 10px; }
    .xhs-main { width: 100%; }
    .xhs-banner { min-height: 200px; }
    .xhs-user { width: 100%; }
    .xhs-nav { gap: 18px; }
    .xhs-head-in { gap: 16px; }
}
@media (max-width: 780px) {
    .xhs-search { max-width: none; }
    .xhs-head-in { flex-wrap: wrap; height: auto; padding: 10px 0; }
    .xhs-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 4px; }
    .xhs-nav a { padding: 10px 0 8px; white-space: nowrap; }
    .xhs-nav a.on::after { bottom: 2px; }
    .xhs-grid { grid-template-columns: repeat(2, 1fr); }
    .xhs-uc-cols { grid-template-columns: 1fr; }
    .xhs-metrics { grid-template-columns: repeat(2, 1fr); }
    .xhs-stat-body { grid-template-columns: repeat(3, 1fr); }
    .xhs-stat-date { margin-left: 0; width: 100%; }
    .xhs-feature { flex-wrap: wrap; }
    .xhs-feature li { flex: 1 1 45%; }
    .xhs-float { right: 10px; bottom: 60px; }
}

/* ============ 首页商品瀑布流骨架屏（首屏改纯 JS 加载，几何对齐真实 .xhs-card，替换时无跳动） ============ */
.xhs-card-skeleton { pointer-events: none; }
.xhs-card-skeleton .sk {
    display: block;
    background: linear-gradient(90deg, #eef1f5 25%, #e3e8ef 50%, #eef1f5 75%);
    background-size: 200% 100%;
    animation: hx-sk-shimmer 1.2s infinite;
    pointer-events: none;
}
/* 图片占位：真实 .xhs-card-img 用 padding-top:100% 撑正方形，骨架用绝对定位铺满同一方块 */
.xhs-card-skeleton .xhs-card-img .sk-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; }
.xhs-card-skeleton .xhs-card-name { display: block; }
.xhs-card-skeleton .xhs-card-name .sk-line { width: 100%; height: 16px; margin-bottom: 8px; border-radius: 6px; }
.xhs-card-skeleton .xhs-card-name .sk-line.short { width: 55%; margin-bottom: 0; }
.xhs-card-skeleton .xhs-card-foot { margin-top: 10px; }
.xhs-card-skeleton .xhs-card-foot .sk-price { width: 72px; height: 20px; border-radius: 6px; }
.xhs-card-skeleton .xhs-card-foot .sk-like { width: 46px; height: 16px; border-radius: 8px; }
@keyframes hx-sk-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============ 首页左侧一级分类栏骨架屏（分类列表改纯 JS 加载，几何对齐真实 .xhs-cats a，复用全局 hx-sk-shimmer 微光） ============ */
.xhs-cat-sk { display: flex; align-items: center; gap: 10px; padding: 9px 18px; pointer-events: none; }
.xhs-cat-sk .sk { display: block; background: linear-gradient(90deg, #eef1f5 25%, #e3e8ef 50%, #eef1f5 75%); background-size: 200% 100%; animation: hx-sk-shimmer 1.2s infinite; }
.xhs-cat-sk .sk-ico { width: 22px; height: 22px; border-radius: 7px; flex: none; }
.xhs-cat-sk .sk-txt { width: 60%; height: 14px; border-radius: 6px; }
.xhs-cats-none #xhs-cats-retry { margin-left: 2px; padding: 1px 8px; border: 1px solid var(--xhs-red); border-radius: 12px; background: #fff; color: var(--xhs-red); font-size: 12.5px; cursor: pointer; }
.xhs-cats-none #xhs-cats-retry:hover { background: var(--xhs-red-l); }
