/* ============ 彩虹发卡模板 1.0 · 前台增强层（内置版） ============ */
/* 由站点前台精修层整合进模板；不修改商品/订单/支付逻辑。 */
:root{
  --pol-line:#e9eef7;
  --pol-ink:#1f2a44;
  --pol-ink2:#5b6478;
  --pol-muted:#98a1b2;
  --pol-brand:#2f6bff;
  --pol-shadow:0 8px 22px -18px rgba(23,54,102,.38);
}

/* 1) 页面标题统一 */
.page-title,.ch-page-title{font-size:20px;font-weight:800;color:var(--pol-ink);letter-spacing:-.2px;margin:2px 0 14px;padding-left:13px;position:relative;line-height:1.4}
.page-title::before,.ch-page-title::before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);width:3px;height:18px;border-radius:2px;background:var(--pol-brand)}

/* 2) 卡片统一 */
.card,.ch-card,.ch-buy-card,.blog-article-card,.ch-goods-table{border-radius:18px;border:1px solid var(--pol-line);box-shadow:var(--pol-shadow);background:#fff}
.blog-article-card{transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.blog-article-card:hover{transform:translateY(-2px);border-color:#dfe8f8;box-shadow:0 14px 30px -22px rgba(23,54,102,.45)}

/* 3) 按钮统一 */
.btn,.btn-primary,.ch-buy-now{height:38px;border-radius:12px;font-size:13.5px;font-weight:700;letter-spacing:.2px}
.ch-goods-table .ch-buy-btn,.ch-col-buy .ch-buy-btn{height:34px;min-width:88px;border-radius:10px;font-size:12.5px;font-weight:600;box-shadow:0 8px 16px -12px rgba(47,107,255,.7)}
.btn:active,.btn-primary:active,.ch-buy-now:active{transform:translateY(1px)}

/* 4) 表单控件统一 */
input[type=text],input[type=number],input[type=password],input[type=email],input[type=tel],textarea,select{border:1px solid #e6ebf4;border-radius:10px;font-size:13.5px;background:#fff;transition:border-color .15s ease,box-shadow .15s ease}
input[type=text],input[type=number],input[type=password],input[type=email],input[type=tel],select{height:40px}
input:focus,textarea:focus,select:focus{outline:0;border-color:var(--pol-brand);box-shadow:0 0 0 3px rgba(47,107,255,.10)}

/* 5) 商品表 */
.ch-goods-table{overflow:hidden}
.ch-goods-thead{font-size:12px;color:#98a1b2;font-weight:600;letter-spacing:.2px;background:#fafcff}
.ch-goods-row{min-height:64px;transition:background .16s ease}
.ch-goods-row:hover{background:#f7faff}
.ch-goods-thumb{width:52px;height:52px;border-radius:12px;background:#f5f8ff;border:1px solid #eef3fb}
.ch-goods-thumb img{width:100%;height:100%;object-fit:contain}
.ch-goods-name{font-size:14px;font-weight:600;color:var(--pol-ink);line-height:1.5}
.ch-col-price{font-size:16px;font-weight:800;color:var(--pol-brand);font-variant-numeric:tabular-nums}

/* 6) 侧栏 */
.shop-side .ch-side-card,.shop-side .sidebar-cat-list{border-radius:14px;border:1px solid var(--pol-line)}
.sidebar-cat-parent{height:38px;border-radius:10px;font-size:13px;transition:background .15s ease,color .15s ease}
.sidebar-cat-parent:hover{background:#f6f9ff}

/* 7) 标签 */
.ch-buy-badges span,.article-tag-label,.blog-article-badge{font-size:11.5px;padding:3px 9px;border-radius:999px;background:#f2f7ff;color:#4a74cf;border:0}

/* 8) 图片展示 */
.ch-gallery-card{border-radius:16px;border:1px solid var(--pol-line);background:linear-gradient(180deg,#f8fbff,#f2f6fd)}
.ch-gallery-card img{max-height:420px;object-fit:contain}

/* 9) 文章卡 */
.blog-article-img{border-radius:12px 12px 0 0;overflow:hidden}
.blog-article-title{font-size:15.5px;font-weight:700;color:var(--pol-ink);line-height:1.45}
.blog-article-excerpt{font-size:12.5px;color:var(--pol-ink2);line-height:1.65}
.blog-article-meta{font-size:11.5px;color:var(--pol-muted)}

/* 10) 桌面滚动条 */
@media (hover:hover){
  ::-webkit-scrollbar{width:10px;height:10px}
  ::-webkit-scrollbar-thumb{background:#dfe6f2;border-radius:8px;border:2px solid transparent;background-clip:content-box}
  ::-webkit-scrollbar-thumb:hover{background:#c7d3e8;background-clip:content-box}
}

/* 11) 手机端 */
@media (max-width:768px){
  .ch-quick-cats{flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;gap:7px!important;padding:2px 0 6px!important;-webkit-overflow-scrolling:touch}
  .ch-quick-cats::-webkit-scrollbar{display:none}
  .ch-quick-cat{flex:0 0 auto!important;white-space:nowrap}
  .category-tabs{flex-wrap:nowrap!important;overflow-x:auto!important;gap:7px!important}
  .category-tabs::-webkit-scrollbar{display:none}
  .category-tab{flex:0 0 auto!important;white-space:nowrap}
  .ch-shop-control{flex-wrap:nowrap!important}
  body.ch-body .ch-blog-page .blog-article-grid--3col .blog-article-img{height:150px!important;max-height:150px!important;min-height:150px!important}
  .ch-goods-row .ch-goods-name{display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important;overflow:hidden!important;line-height:1.45!important}
  .page-title,.ch-page-title{font-size:18px;margin:4px 0 12px}
  .btn,.btn-primary,.ch-buy-now{height:40px;border-radius:12px;font-size:14px}
  .blog-article-card{border-radius:14px}
  .blog-article-title{font-size:15px}
  .ch-goods-thumb{width:46px;height:46px;border-radius:10px}
}

/* 12) 社区封面统一（固定高度、等齐） */
body.ch-body .ch-blog-page .blog-article-grid--3col .blog-article-img{aspect-ratio:auto!important;height:200px!important;max-height:200px!important;min-height:200px!important;margin:0!important;border-radius:16px 16px 0 0!important;overflow:hidden!important}
body.ch-body .ch-blog-page .blog-article-grid--3col .blog-article-img img{width:100%!important;height:100%!important;object-fit:cover!important;object-position:center!important}

/* 13) 详情图台 */
.detail-img,.ch-gallery-main{border:1px solid #e9eef7;background:linear-gradient(160deg,#f8fbff 0%,#eaf1fe 100%)}
.ch-gallery-main{border-radius:12px}

/* 14) 公告统一单行收起 */
body.ch-body .ch-notice-body{-webkit-line-clamp:1!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;overflow:hidden!important}
body.ch-body .ch-notice.is-open .ch-notice-body,body.ch-body .ch-notice-body.is-open{-webkit-line-clamp:unset!important;display:block!important;overflow:visible!important}

/* 15) 侧栏文章缩略 */
.blog-sidebar .sidebar-widget img{width:44px;height:44px;object-fit:cover;border-radius:10px}

/* 16) 手机端封面高度（后置覆盖） */
@media (max-width:768px){
  body.ch-body .ch-blog-page .blog-article-grid--3col .blog-article-img{height:150px!important;max-height:150px!important;min-height:150px!important}
}

/* 17) 详情图区收窄居中 */
.ch-gallery-main{max-width:660px!important;margin:0 auto!important;width:100%!important;border-radius:14px!important;background:linear-gradient(160deg,#f9fbff 0%,#eef4fe 100%)!important;border:1px solid #e9eef7!important}
.ch-gallery-main img{max-height:100%!important;max-width:100%!important}

/* 18) 手机端：胶囊隐藏（改用筛选分类入口）+ 商品卡等高 */
@media (max-width:768px){
  body .page-home-mall .ch-quick-cats,
  body .ch-quick-cats,
  body .page-home-mall .ch-quick-subcats{display:none!important}
  body .category-tabs{flex-wrap:nowrap!important;overflow-x:auto!important;gap:7px!important}
  body .category-tab{flex:0 0 auto!important;white-space:nowrap}
  .ch-goods-row .ch-goods-name{min-height:2.9em!important}
}

/* 19) 手机端商品缩略统一尺寸 */
@media (max-width:768px){
  .ch-goods-row .ch-goods-thumb{width:64px!important;height:64px!important;min-width:64px!important;max-width:64px!important;border-radius:12px!important;overflow:hidden!important;padding:0!important}
  .ch-goods-row .ch-goods-thumb img{width:100%!important;height:100%!important;object-fit:contain!important;display:block!important}
}

/* 20) 手机分类面板：二级子类弱化 */
@media (max-width:991px){
  body.ch-side-open #shopSide .sidebar-cat-children{padding:2px 0 6px 18px!important}
  body.ch-side-open #shopSide .sidebar-cat-child{background:transparent!important;border:0!important;box-shadow:none!important;height:32px!important;padding:0 8px!important;border-radius:8px!important;color:#5b6478!important;font-size:12px!important}
  body.ch-side-open #shopSide .sidebar-cat-child .sidebar-cat-name{font-size:12px!important;color:inherit!important}
  body.ch-side-open #shopSide .sidebar-cat-child .sidebar-cat-count{min-width:22px!important;height:17px!important;line-height:17px!important;font-size:10.5px!important;background:#eef3fb!important;color:#7b879c!important}
  body.ch-side-open #shopSide .sidebar-cat-child.is-active{background:#eef4ff!important;color:#2f6bff!important}
  body.ch-side-open #shopSide .sidebar-cat-child.is-active .sidebar-cat-count{background:#dbe8ff!important;color:#2f6bff!important}
}

/* ===== 系统级升级 2026-11-22（21-28） ===== */

/* 21) 商品表：表头、列对齐、无图占位 */
.ch-goods-thead{background:linear-gradient(180deg,#fcfdff,#f4f8ff);border-bottom:1px solid #e4ecf8;letter-spacing:.3px}
.ch-goods-thead span{font-weight:700}
.ch-goods-thead .ch-col-price,.ch-goods-row .ch-col-price{text-align:right;padding-right:8px}
.ch-goods-thead .ch-col-stock,.ch-goods-row .ch-col-stock{text-align:center}
.ch-goods-thead .ch-col-buy,.ch-goods-row .ch-col-buy{text-align:right}
.ch-goods-row{border-bottom:1px solid #f3f7fd}
.ch-goods-row:last-child{border-bottom:0}
.ch-goods-thumb.is-thumb-broken{position:relative;background:linear-gradient(160deg,#f8fbff,#edf3fe);border:1px dashed #dbe6f7}
.ch-goods-thumb.is-thumb-broken::after{content:"\f03e";font-family:FontAwesome;position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#c9d8ee;font-size:17px}

/* 22) 排序组胶囊 */
.ch-sort{gap:2px;padding:3px;border-radius:999px;background:#f5f9ff;border:1px solid #e9f0fc}
.ch-sort-link{height:30px;line-height:30px;padding:0 12px;border-radius:999px;font-size:12.5px;font-weight:600;color:#5b6478;text-decoration:none;transition:background .15s,color .15s}
.ch-sort-link:hover{background:#e9f1ff;color:#2f6bff}
.ch-sort-link.is-active{background:#2f6bff;color:#fff;box-shadow:0 6px 14px -10px rgba(47,107,255,.9)}

/* 23) 分类胶囊 */
.ch-quick-cat{height:32px;line-height:30px;padding:0 13px;border-radius:999px;border:1px solid #e6edf9;background:#fff;font-size:12.5px;font-weight:600;color:#4b576e;transition:.15s}
.ch-quick-cat>span{margin-left:6px;font-size:11px;color:#9aa6ba;font-variant-numeric:tabular-nums}
.ch-quick-cat:hover{border-color:#cfe0ff;color:#2f6bff;background:#f7faff}
.ch-quick-cat.is-active{background:#2f6bff;border-color:#2f6bff;color:#fff;box-shadow:0 8px 18px -12px rgba(47,107,255,.95)}
.ch-quick-cat.is-active>span{color:rgba(255,255,255,.8)}

/* 24) 面包屑胶囊 */
.ch-crumb{background:rgba(255,255,255,.92);border:1px solid #e9eef7;border-radius:999px;padding:0 14px;height:30px;display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#6b7791;box-shadow:0 4px 12px -12px rgba(23,54,102,.4)}

/* 25) 社区卡等高、元信息贴底 */
body.ch-body .blog-article-grid--3col .blog-article-card{height:100%}
.blog-article-body{display:flex;flex-direction:column;flex:1 1 auto}
.blog-article-excerpt{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}
.blog-article-meta{margin-top:auto;padding-top:10px;border-top:1px solid #f2f6fd}

/* 26) 文章付费区 */
.bgv-lock{border-radius:16px;padding:28px 24px 24px;background:linear-gradient(180deg,#fbfdff,#f5f9ff)}
.bgv-trial-hint{display:block;width:max-content;margin:0 auto 18px;padding:4px 12px;border-radius:999px;background:#eef4ff;color:#3f6bc4;font-size:12px;font-weight:600}
.bgv-lock-icon{width:54px;height:54px;border-radius:50%;background:linear-gradient(160deg,#eaf2ff,#dbe8ff);margin:0 auto 12px!important}
.bgv-btn{height:38px;border-radius:10px;font-size:13px;font-weight:700}

/* 27) 详情数量步进器 */
.detail-qty-selector{height:40px;border:1px solid #e6ebf4;border-radius:10px;overflow:hidden;background:#fff}
.detail-qty-btn{width:34px;height:100%;background:#f7faff;border:0;color:#5b6478;font-size:15px}
.detail-qty-btn:hover{background:#eef4ff;color:#2f6bff}
.detail-qty-input{height:100%;border:0;border-left:1px solid #eff3fa;border-right:1px solid #eff3fa;font-size:14px;font-weight:700;color:#1f2a44}

/* 28) 手机端列表与排序条 */
@media (max-width:768px){
  .ch-list-head{padding:12px 12px 8px!important}
  .ch-sort{overflow-x:auto;flex-wrap:nowrap!important;justify-content:flex-start!important;background:transparent;border:0;padding:0!important;gap:6px!important;-webkit-overflow-scrolling:touch}
  .ch-sort::-webkit-scrollbar{display:none}
  .ch-sort-link{flex:0 0 auto;border:1px solid #e6edf9;background:#fff;font-size:12px;height:28px;line-height:26px;padding:0 11px}
  .ch-sort-link.is-active{background:#2f6bff;border-color:#2f6bff;color:#fff}
  .ch-goods-row{min-height:96px!important;align-items:center}
  .ch-quick-cat{height:30px;line-height:28px;font-size:12px;padding:0 11px}
}

/* 29) 第二轮：列间距、控件收口、侧栏计数留白 */
.ch-goods-thead .ch-col-price,.ch-goods-row .ch-col-price{padding-right:22px}
.detail-qty-selector{padding:0}
.detail-qty-btn{border-radius:0!important;height:100%!important;width:36px!important}
.detail-qty-input{border-radius:0!important;border-top:0!important;border-bottom:0!important;width:56px!important}
.sidebar-cat-list{padding-right:6px}
.sidebar-cat-count{min-width:24px;height:18px;line-height:18px;text-align:center;border-radius:6px;font-size:11px;font-variant-numeric:tabular-nums}

/* 30) 手机端分类行留白与价格层级 */
@media (max-width:768px){
  .category-tabs{padding-right:14px!important}
  .ch-goods-row .ch-col-price{font-size:15px;font-weight:800}
  .blog-article-card{margin-bottom:14px}
}

/* Xtul: 列表缩略图视觉尺寸统一（原图比例不同也不再一大一小） */
.ch-goods-thumb { background: #f6f7fb; border-radius: 10px; overflow: hidden; }
.ch-goods-thumb img, .ch-goods-row .ch-goods-thumb img { object-fit: cover !important; background: #f6f7fb; }

/* Xtul: 购买流程 · 收货地址弹层移动端优化（省市区竖排、输入框防缩放、触控友好） */
@media (max-width: 768px) {
    .detail-addr-layer { padding: 0 2px; max-height: 72vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .detail-addr-form .detail-addr-row { display: block; }
    .detail-addr-field { margin-bottom: 12px; }
    .detail-addr-field > label { display: block; margin-bottom: 6px; font-size: 13px; color: #5b6577; }
    .detail-addr-input,
    .detail-addr-textarea {
        width: 100%; box-sizing: border-box;
        height: 44px; padding: 10px 12px;
        font-size: 16px; line-height: 1.3;
        border: 1px solid #e6ecf7; border-radius: 10px; background: #fff;
    }
    .detail-addr-textarea { height: auto; min-height: 68px; resize: vertical; }
    .detail-addr-cascade { display: flex; flex-direction: column; gap: 8px; }
    .detail-addr-select {
        width: 100% !important; box-sizing: border-box;
        height: 42px; font-size: 15px;
        border: 1px solid #e6ecf7; border-radius: 10px; background: #fff;
    }
    .detail-addr-tip { font-size: 12px; line-height: 1.5; margin-top: 4px; }
    .detail-addr-item { padding: 12px; }
    .detail-addr-item-text { font-size: 13px; line-height: 1.5; }
}
/* 校验失败的字段高亮（配合前端定位） */
.detail-addr-input.is-invalid,
.detail-addr-textarea.is-invalid,
.detail-addr-select.is-invalid { border-color: #f0645c !important; box-shadow: 0 0 0 3px rgba(240,100,92,.12); }

/* Xtul: 购买流程 · 省市区下拉补齐（cityAreaSelect 自带的压缩样式会覆盖，这里提权） */
@media (max-width: 768px) {
    .detail-addr-layer .detail-addr-cascade .detail-addr-select {
        height: 42px !important; min-height: 42px !important;
        font-size: 15px !important; line-height: 42px !important;
        padding: 0 10px !important; width: 100% !important;
        border: 1px solid #e6ecf7 !important; border-radius: 10px !important;
        background: #fff !important; color: #20242f !important;
        -webkit-appearance: menulist !important; appearance: menulist !important;
    }
    .detail-addr-layer .detail-addr-cascade { gap: 10px !important; }
}

/* Xtul: 购买流程增强（支付方式标签 / 必填高亮 / 提交遮罩） */
.ch-mbb-price { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.ch-mbb-price > b { line-height: 1.15; display: block; }
.ch-mbb-pay { font-style: normal; font-size: 11px; line-height: 1.2; color: #7b8aa3; margin-top: 1px;
    white-space: nowrap; cursor: pointer; border-bottom: 1px dashed rgba(123,138,163,.55); padding-bottom: 1px; }
.ch-mbb-pay:active { color: #2f6bff; border-bottom-color: rgba(47,107,255,.6); }
.ch-bf-invalid { border-color: #ff5b5b !important; background: #fff7f7 !important;
    box-shadow: 0 0 0 3px rgba(255,91,91,.14) !important; }
.ch-bf-flash { animation: chbfGlow 1.05s ease; }
@keyframes chbfGlow {
    0% { box-shadow: 0 0 0 0 rgba(47,107,255,.55); border-color: #2f6bff; }
    100% { box-shadow: 0 0 0 0 rgba(47,107,255,0); }
}
.ch-bf-toast { position: fixed; left: 50%; bottom: 118px; transform: translate(-50%, 8px);
    background: rgba(26,32,46,.93); color: #fff; font-size: 13px; line-height: 1.4;
    padding: 9px 16px; border-radius: 20px; max-width: 82vw; text-align: center;
    z-index: 40000; opacity: 0; pointer-events: none; transition: opacity .22s, transform .22s; }
.ch-bf-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.ch-bf-mask { position: fixed; inset: 0; z-index: 30000; display: none; align-items: center; justify-content: center;
    background: rgba(244,247,252,.76); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.ch-bf-mask.is-show { display: flex; }
.ch-bf-mask-box { display: flex; flex-direction: column; align-items: center; gap: 10px; background: #fff;
    padding: 18px 26px; border-radius: 14px; box-shadow: 0 10px 34px rgba(20,40,90,.14); }
.ch-bf-spin { width: 22px; height: 22px; border: 2px solid #dce6f8; border-top-color: #2f6bff;
    border-radius: 50%; animation: chbfSpin .8s linear infinite; }
@keyframes chbfSpin { to { transform: rotate(360deg); } }
.ch-bf-mask-txt { font-size: 13px; font-weight: 400; color: #3b465c; }
@media (max-width: 768px) {
    .ch-mbb-pay { font-size: 10.5px; }
}

/* Xtul: 购买流程增强 · 细节微调 */
.ch-mbb-pay { font-size: 11px !important; color: #5b6577 !important; background: #f1f5fc;
    border-radius: 6px; padding: 1px 6px; border-bottom: 0 !important; letter-spacing: .2px; }
.ch-bf-toast { bottom: 132px !important; }

/* Xtul: 购买流程增强 · 提示位置（避开底部购买条与导航） */
.ch-bf-toast { bottom: 150px !important; }
@media (max-width: 768px) { .ch-bf-toast { bottom: 150px !important; } }

/* Xtul: 购买流程增强 · 移动端输入框字号（16px，避免 iOS 聚焦自动放大） */
@media (max-width: 768px) {
    .ch-buy-card .detail-form-field-input.ch-input,
    .ch-buy-card .detail-coupon-input.ch-input,
    #guestFindContactQuery,
    input[name^="extra_input"],
    input[name^="extra_"] { font-size: 16px !important; line-height: 1.4 !important; }
    .detail-addr-layer .detail-addr-input,
    .detail-addr-layer .detail-addr-textarea { font-size: 16px !important; }
    .detail-addr-layer .detail-addr-select { font-size: 16px !important; }
}

/* Xtul: 前台全站移动端一致性（表单 / 复选框 / 小链接触控 / 面包屑 / 投稿导航） */
@media (max-width: 768px) {
    /* 1. 输入控件统一 16px，避免 iOS 聚焦自动缩放 */
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="file"]),
    textarea, select { font-size: 16px !important; }

    /* 2. 复选框 / 单选框：加大到 18px，整个 label 可点 */
    input[type="checkbox"], input[type="radio"] {
        width: 18px !important; height: 18px !important;
        min-width: 18px; min-height: 18px;
        accent-color: #2f6bff; vertical-align: middle;
    }
    label:has(input[type="checkbox"]), label:has(input[type="radio"]) {
        min-height: 40px; display: flex; align-items: center; cursor: pointer;
    }

    /* 3. 小文字链接：垂直方向扩大点击热区，视觉位置不变 */
    a.back, .ch-notice-more, .auth-link, .bs-user__link {
        min-height: 32px; display: inline-flex; align-items: center;
        padding-top: 5px; padding-bottom: 5px;
        margin-top: -5px; margin-bottom: -5px;
    }

    /* 4. 面包屑：文字链接点击热区 */
    .ch-crumb a { display: inline-block; padding: 5px 1px; }

    /* 5. 投稿中心导航盒左侧被裁 6px */
    .bs-nav { margin-left: -14px !important; padding-left: 14px !important; }
}

/* Xtul: 前台全站移动端一致性（面包屑 / 文章翻页 / 页脚返回） */
@media (max-width: 768px) {
    .breadcrumb a, .ch-crumb a { display: inline-block; padding: 5px 2px; }
    .article-nav a { min-height: 34px; display: inline-flex; align-items: center; }
    footer .bottom .back, #go-back {
        min-height: 32px; display: inline-flex; align-items: center;
        padding: 4px 6px; margin: -4px -6px;
    }
}

/* Xtul: 前台全站移动端一致性（登录/注册页脚链接） */
@media (max-width: 768px) {
    .auth-foot a { min-height: 32px; display: inline-flex; align-items: center; padding: 4px 2px; margin-top: -4px; margin-bottom: -4px; }
}
/* ===== 星途拓联 · 全站主题升级层 v3（容器/标题/卡片/空状态/详情/社区/按钮） ===== */
:root{--xt-brand:#2f6bff;--xt-brand-2:#4a84ff;--xt-ink:#1a2540;--xt-ink-2:#5b6478;--xt-muted:#98a1b2;--xt-line:#e6ecf7;--xt-bg:#f4f7fc;--xt-r-lg:18px;--xt-sd-1:0 1px 2px rgba(23,54,102,.06),0 8px 20px -18px rgba(23,54,102,.28);--xt-sd-2:0 18px 34px -26px rgba(23,54,102,.5)}

@media(min-width:1600px){.wrapper{max-width:1480px;margin-left:auto;margin-right:auto}}

.page-title{font-size:22px!important;font-weight:800!important;line-height:1.35!important;letter-spacing:-.2px;color:var(--xt-ink)!important;margin:6px 0 16px!important;padding-left:14px!important;position:relative}
.page-title::before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);width:4px;height:20px;border-radius:3px;background:linear-gradient(180deg,var(--xt-brand-2),var(--xt-brand))}
.ch-list-title{font-size:19px!important;font-weight:800!important;letter-spacing:-.1px;color:var(--xt-ink)!important}

.card,.ch-card{border-radius:var(--xt-r-lg)!important;border:1px solid var(--xt-line)!important;box-shadow:var(--xt-sd-1)!important;background:#fff}
.card.empty-state{max-width:600px!important;margin:24px auto!important;padding:48px 28px 44px!important;border-radius:18px!important;text-align:center}
.empty-state .empty-icon{width:72px;height:72px;border-radius:22px;margin:0 auto 18px;display:flex;align-items:center;justify-content:center;background:linear-gradient(155deg,#eff5ff,#dbe8ff);color:var(--xt-brand);font-size:26px;box-shadow:inset 0 0 0 1px rgba(47,107,255,.08)}
.empty-state h3{font-size:16px;font-weight:800;color:var(--xt-ink);margin:0 0 8px}
.empty-state p{font-size:13px;color:var(--xt-ink-2);margin:0 0 22px}
.empty-state .empty-cta{display:inline-flex;align-items:center;justify-content:center;height:42px;padding:0 24px;border-radius:12px;background:linear-gradient(135deg,var(--xt-brand-2),var(--xt-brand));color:#fff;font-size:13.5px;font-weight:700;text-decoration:none;box-shadow:0 12px 22px -14px rgba(47,107,255,.85);transition:transform .16s,box-shadow .16s}
.empty-state .empty-cta:hover{transform:translateY(-1px);box-shadow:0 16px 26px -13px rgba(47,107,255,.9)}

@media(min-width:1024px){
 .ch-buy-main{gap:20px!important;align-items:flex-start}
 .ch-buy-card{flex:0 0 372px!important;max-width:372px!important}
 .ch-gallery-card{flex:1 1 auto!important;min-width:0}
}
.ch-gallery-main{position:relative;border-radius:16px!important;background:linear-gradient(160deg,#f9fbff,#ecf2fd)!important;min-height:340px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.ch-gallery-main img{position:relative;z-index:1;max-width:100%;max-height:100%;object-fit:contain;font-size:0;color:transparent}
.ch-price-main{align-items:baseline;gap:8px}
.ch-price-label{font-size:12px!important;color:var(--xt-muted)!important;font-weight:600}
.ch-price-now{font-size:32px!important;font-weight:800!important;letter-spacing:-.5px;color:var(--xt-brand)!important;font-variant-numeric:tabular-nums}
.ch-field-label{font-size:12.5px!important;font-weight:600!important;color:var(--xt-ink-2)!important}
.ch-field{margin-bottom:14px!important}
.ch-buy-card .ch-input{height:42px!important;border-radius:11px!important}
.ch-buy-now{height:46px!important;border-radius:13px!important;font-size:14.5px!important;font-weight:800!important;background:linear-gradient(135deg,var(--xt-brand-2),var(--xt-brand))!important;border-color:transparent!important;box-shadow:0 16px 28px -16px rgba(47,107,255,.9)!important}
.ch-buy-now:hover{box-shadow:0 18px 30px -14px rgba(47,107,255,.95)!important}
.ch-buy-now:active{transform:translateY(1px)}

.blog-article-grid--3col{gap:18px!important}
@media(min-width:1100px){.blog-article-grid--3col{grid-template-columns:repeat(auto-fill,minmax(318px,1fr))!important}}
.blog-article-card{border-radius:18px!important;overflow:hidden;border:1px solid var(--xt-line)!important;box-shadow:var(--xt-sd-1)!important;transition:transform .18s,box-shadow .18s,border-color .18s}
.blog-article-card:hover{transform:translateY(-3px);border-color:#d5e2f9!important;box-shadow:var(--xt-sd-2)!important}
.blog-article-title{font-size:16px!important;font-weight:700!important;line-height:1.45!important}
.blog-article-excerpt{font-size:12.5px!important;color:var(--xt-ink-2)!important}

.ch-goods-row{min-height:70px!important}
.ch-goods-thumb{border-radius:12px!important}

.btn,.btn-primary,.ch-buy-now,.ch-buy-btn,.empty-cta{transition:transform .16s,box-shadow .16s,background-color .16s,border-color .16s}
.btn-primary{background:linear-gradient(135deg,var(--xt-brand-2),var(--xt-brand))!important;border-color:transparent!important}
:focus-visible{outline:2px solid rgba(47,107,255,.5);outline-offset:2px}

@media(max-width:1023px){
 .ch-buy-main{flex-direction:column}
 .ch-buy-card{width:100%!important;max-width:none!important}
 .ch-gallery-main{min-height:0}
}
@media(max-width:768px){
 .page-title{font-size:19px!important;margin:2px 0 12px!important;padding-left:12px!important}
 .page-title::before{height:17px;width:3px}
 .card.empty-state{margin:14px 10px!important;padding:38px 18px 34px!important}
 .ch-price-now{font-size:28px!important}
 .ch-buy-now{height:48px!important}
}

@media(min-width:1600px){.wrapper{max-width:1480px!important;margin-left:auto!important;margin-right:auto!important}}

@media(min-width:1600px){
 body.ch-body .page-body .wrapper,
 body.ch-body .site-header .wrapper{max-width:1480px!important;margin-left:auto!important;margin-right:auto!important;width:100%!important}
}
@media(min-width:1600px){body.ch-body .page-body{max-width:1480px!important;margin-left:auto!important;margin-right:auto!important}}
@media(min-width:1024px){.ch-buy-main{align-items:stretch!important}.ch-buy-main > .ch-card{width:100%!important}
}.ch-buy-title{font-size:22px!important;font-weight:800!important;line-height:1.45!important;letter-spacing:-.2px;margin:16px 4px 10px!important;color:#1a2540}
.ch-gallery-main{max-width:760px!important;margin-left:auto!important;margin-right:auto!important}
.ch-detail-body{padding:22px 26px!important}
.blog-article-grid--3col{align-items:stretch!important}

/* Xtul 全站统一层 v2：卡片圆角 / 按钮尺度 / 徽标字号 / 移动端触控 */
body.ch-body .card, body.ch-body .ch-card, body.ch-body .blog-article-card, body.ch-body .card.empty-state{border-radius:18px}
body.ch-body .blog-article-img{border-radius:18px 18px 0 0}
body.ch-body .ch-buy-btn{height:38px!important;min-height:38px;border-radius:10px;font-size:13px}
body.ch-body .ch-notice-more{height:36px!important;border-radius:10px;font-size:12px}
body.ch-body .pagination-btn{width:36px!important;height:36px!important;line-height:34px;border-radius:10px}
body.ch-body .blog-article-badge{font-size:12px;padding:3px 10px;border-radius:999px}
@media (max-width:768px){
body.ch-body .ch-buy-btn{height:40px!important}
body.ch-body .pagination-btn{width:40px!important;height:40px!important;line-height:38px}
body.ch-body .ch-notice-more{height:34px!important}
}

/* Xtul 全站统一层 v3：详情主图圆角 / 插件页宽度对齐 */
body.ch-body .ch-gallery-main{border-radius:18px!important}
.bgv-lock,.ch-gallery-card{border-radius:16px}
@media (min-width:1100px){.bs-wrap{max-width:1180px}}

/* Xtul 社区布局重置：3 列大图 + 封面 16:10 + 卡片等高 */
@media (min-width:1200px){
body.ch-body .blog-article-grid.blog-article-grid--3col{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:22px!important}
body.ch-body .blog-article-grid.blog-article-grid--3col .blog-article-card{height:100%!important}
}
@media (min-width:768px) and (max-width:1199px){
body.ch-body .blog-article-grid.blog-article-grid--3col{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important}
}
body.ch-body .ch-blog-page .blog-article-grid--3col .blog-article-img{aspect-ratio:16/10!important;height:auto!important;max-height:none!important;min-height:0!important;border-radius:18px 18px 0 0!important}
body.ch-body .blog-article-grid--3col .blog-article-img img{object-fit:cover!important;width:100%!important;height:100%!important}
body.ch-body .blog-article-grid--3col .blog-article-body{display:flex!important;flex-direction:column;flex:1;padding:18px 20px 16px!important}
body.ch-body .blog-article-grid--3col .blog-article-meta{margin-top:auto;padding-top:12px}

/* Xtul 全站移动端适配修复：底部固定栏留白 / 触控目标放大 */
@media (max-width:768px){
body.ch-body{padding-bottom:calc(72px + env(safe-area-inset-bottom,0px))!important}
body.ch-body:has(.ch-mobile-buybar){padding-bottom:calc(150px + env(safe-area-inset-bottom,0px))!important}
body.ch-body .ch-sort-link{min-height:36px;padding:0 12px;display:inline-flex;align-items:center}
body.ch-body .pagination-num{width:40px!important;height:40px!important;line-height:38px}
body.ch-body .header-action-btn{width:40px!important;height:40px!important}
body.ch-body .ch-notice-more{height:36px!important}
}

/* Xtul 移动端：页脚为固定底部栏留白，避免被遮挡 */
@media (max-width:768px){
body.ch-body .ch-footer, body.ch-body footer{padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))!important}
}

/* 首页「最新动态」模块底部留白收窄（覆盖模板内联 padding） */
body.ch-body .page-body.ch-page > div[style*="6px 16px 44px"]{padding-bottom:8px!important}
body.ch-body .page-body.ch-page:has(a[href*="c=blog_list"]){padding-bottom:14px!important}

/* ==================================================================
   前台体验升级 · 2026-11-25
   1) 搜索结果改为横向列表卡，解决单条结果半屏空白
   2) 商品详情长文折叠、手机固定购买条智能显隐
   3) 图片加载失败占位 / 混合内容图片代理配合
   4) 焦点可见、减少动效、返回顶部避让
   ================================================================== */

/* ---------- 1. 搜索结果：横向列表卡 ---------- */
.search-sec .goods-grid{
  display:flex!important;
  flex-direction:column!important;
  gap:10px!important;
  max-width:920px;
  grid-template-columns:none!important;
}
.search-sec .goods-grid > .goods-card{
  display:flex!important;
  flex-direction:row!important;
  align-items:stretch!important;
  width:100%!important;
  height:auto!important;
  min-height:118px;
  border-radius:14px!important;
  overflow:hidden;
  background:#fff;
  border:1px solid var(--pol-line);
  box-shadow:var(--pol-shadow);
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.search-sec .goods-grid > .goods-card:hover{
  transform:translateY(-1px);
  border-color:#dfe8f8;
  box-shadow:0 14px 30px -24px rgba(23,54,102,.5);
}
.search-sec .goods-grid .card-img{
  position:relative;
  flex:0 0 132px;
  width:132px!important;
  height:auto!important;
  aspect-ratio:1/1;
  border-radius:0!important;
  background:linear-gradient(180deg,#f8fbff,#f1f6fd);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.search-sec .goods-grid .card-img img{
  width:100%;
  height:100%;
  object-fit:cover;
  transition:transform .35s ease;
}
.search-sec .goods-grid > .goods-card:hover .card-img img{transform:scale(1.035)}
.search-sec .goods-grid .card-body{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:10px;
  padding:15px 18px;
}
.search-sec .goods-grid .card-title{
  margin:0;
  font-size:15.5px;
  font-weight:700;
  line-height:1.55;
  color:var(--pol-ink);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.search-sec .goods-grid .card-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0;
}
.search-sec .goods-grid .price{
  font-size:19px;
  font-weight:800;
  color:var(--pol-brand);
  font-variant-numeric:tabular-nums;
}
.search-sec .goods-grid .card-bottom::after{
  content:"查看详情 ›";
  font-size:12px;
  color:#8aa0b6;
  white-space:nowrap;
}
@media (max-width:640px){
  .search-sec .goods-grid{max-width:none;gap:8px!important}
  .search-sec .goods-grid > .goods-card{min-height:96px;border-radius:13px!important}
  .search-sec .goods-grid .card-img{flex-basis:104px;width:104px!important}
  .search-sec .goods-grid .card-body{padding:11px 12px;gap:8px}
  .search-sec .goods-grid .card-title{font-size:14px;line-height:1.45;-webkit-line-clamp:2}
  .search-sec .goods-grid .price{font-size:17px}
  .search-sec .goods-grid .card-bottom::after{display:none}
}

/* 搜索关键词高亮 */
mark.kky-hl{
  background:linear-gradient(180deg,transparent 58%,#ffe08a 58%);
  color:inherit;
  padding:0 1px;
  border-radius:2px;
}

/* ---------- 2. 商品详情：长文折叠 ---------- */
.ch-detail-body .detail-body{position:relative}
.ch-detail-body.kky-foldable .detail-body{
  max-height:430px;
  overflow:hidden;
  -webkit-mask-image:linear-gradient(180deg,#000 72%,rgba(0,0,0,.35) 94%,transparent);
  mask-image:linear-gradient(180deg,#000 72%,rgba(0,0,0,.35) 94%,transparent);
}
.ch-detail-body.kky-foldable.kky-expanded .detail-body{
  max-height:none;
  -webkit-mask-image:none;
  mask-image:none;
}
.kky-fold-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  width:100%;
  height:40px;
  margin:10px 0 2px;
  border:1px solid #e6edf9;
  border-radius:11px;
  background:#f7faff;
  color:#3f6fd8;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:background .16s ease,border-color .16s ease;
}
.kky-fold-btn:hover{background:#eff5ff;border-color:#d6e4fb}
.kky-fold-btn i{transition:transform .2s ease}
.kky-fold-btn.is-open i{transform:rotate(180deg)}

/* ---------- 3. 手机固定购买条：主按钮可见时自动收起 ---------- */
.ch-mobile-buybar{
  transition:transform .26s ease,opacity .2s ease;
  will-change:transform;
}
.ch-mobile-buybar.kky-bar-hidden{
  transform:translateY(calc(100% + 16px));
  opacity:0;
  pointer-events:none;
}

/* ---------- 4. 图片加载失败占位 ---------- */
img.kky-img-fallback{
  object-fit:contain!important;
  background:#f3f6fb!important;
}

/* ---------- 5. 返回顶部：避让底部导航 / 购买条 ---------- */
@media (max-width:820px){
  .ch-backtop{
    width:40px!important;
    height:40px!important;
    right:10px!important;
    bottom:calc(78px + env(safe-area-inset-bottom))!important;
    border-radius:12px!important;
    box-shadow:0 10px 24px -12px rgba(23,54,102,.55)!important;
  }
  body.kky-buybar-on .ch-backtop{
    bottom:calc(148px + env(safe-area-inset-bottom))!important;
  }
}

/* ---------- 6. 焦点可见与减少动效 ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible{
  outline:2px solid rgba(47,107,255,.55);
  outline-offset:2px;
}
input:focus-visible,textarea:focus-visible,select:focus-visible{outline:none}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    animation-iteration-count:1!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}

/* 搜索卡片细节修正：完整展示方形/横向主图，徽标不压住画面 */
.search-sec .goods-grid .card-img{background:#f7faff}
.search-sec .goods-grid .card-img img{object-fit:contain!important;background:#f7faff}
.search-sec .goods-grid .goods-badge{
  top:auto!important;
  bottom:6px!important;
  left:6px!important;
  right:auto!important;
  padding:2px 7px!important;
  height:auto!important;
  font-size:10px!important;
  border-radius:7px!important;
  opacity:.92;
  box-shadow:none!important;
}
mark.kky-hl{
  background:#fff2b8!important;
  color:#8a5a00!important;
  padding:0 2px!important;
  border-radius:3px;
  box-shadow:inset 0 -.45em 0 rgba(255,214,64,.55);
}

/* 游客查单：收起态 + 展开态 */
#guestFindContactSection{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
.kky-guest-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  width:100%;
  height:38px;
  padding:0 12px;
  border:1px solid #e5edfa;
  border-radius:10px;
  background:#f7faff;
  color:#3f6fd8;
  font-size:12.5px;
  font-weight:600;
  cursor:pointer;
}
.kky-guest-toggle span{flex:1 1 auto;text-align:left}
.kky-guest-toggle:hover{background:#eff5ff;border-color:#d5e3fb}
.kky-guest-toggle .fa-angle-down{transition:transform .2s ease;color:#8aa0b6}
.kky-guest-toggle .fa-search{color:#2f6bff}
.kky-guest-body{display:none;padding:8px 0 2px}
#guestFindContactSection.kky-guest-open .kky-guest-body{display:block}
.kky-guest-hint{
  margin:0 0 8px;
  padding:7px 10px;
  border-radius:8px;
  background:#f5f8ff;
  color:#7b879b;
  font-size:11.5px;
  line-height:1.5;
}

@media (min-width:821px){
  .ch-detail-body.kky-foldable .detail-body{max-height:600px}
}

/* 查单模块容器（收起时不占表单校验） */
.kky-guest-wrap{margin:0 0 2px}
.kky-guest-wrap + *{margin-top:0}

/* 手机商品卡标题最多 3 行，尽量展示完整商品名 */
@media (max-width:640px){
  .ch-goods-row .ch-goods-name{
    -webkit-line-clamp:3!important;
    font-size:13.5px!important;
    line-height:1.42!important;
  }
}


/* ================= 视觉与移动端升级 ================= */

/* 首页主视觉：补上明确的浏览与查单入口 */
.ch-mall-actions{display:flex;align-items:center;gap:10px;margin-top:18px;position:relative;z-index:3}
.ch-mall-cta{display:inline-flex;align-items:center;justify-content:center;height:38px;padding:0 20px;border-radius:10px;background:#fff;color:#2f6bff;font-size:13px;font-weight:700;text-decoration:none;box-shadow:0 10px 22px -14px rgba(9,32,92,.55);transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.ch-mall-cta:hover{transform:translateY(-1px);box-shadow:0 14px 26px -16px rgba(9,32,92,.62);color:#1f57e6}
.ch-mall-cta.is-ghost{background:rgba(255,255,255,.14);color:#fff;border:1px solid rgba(255,255,255,.32);box-shadow:none}
.ch-mall-cta.is-ghost:hover{background:rgba(255,255,255,.22);color:#fff}
#chGoodsShelf{scroll-margin-top:78px}

@media (max-width:640px){
  .ch-mall-actions{margin-top:13px;gap:8px}
  .ch-mall-cta{height:33px;padding:0 14px;font-size:12.5px;border-radius:9px}
  #chGoodsShelf{scroll-margin-top:64px}
}

/* 手机商品卡：标题给足三行，价格与购买收在同一行，去掉多余库存行 */
@media (max-width:640px){
  .ch-body .ch-goods-row{
    grid-template-columns:64px minmax(0,1fr) auto!important;
    grid-template-areas:"thumb name name" "thumb prices buy"!important;
    align-items:center!important;
    gap:6px 10px!important;
    padding:12px!important;
  }
  .ch-body .ch-goods-row .ch-goods-thumb{
    width:64px!important;height:64px!important;align-self:start!important;margin-top:1px;
  }
  .ch-body .ch-goods-row .ch-goods-name{
    display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:3!important;
    overflow:hidden!important;white-space:normal!important;
    font-size:13.5px!important;line-height:1.4!important;
  }
  .ch-body .ch-goods-row .ch-goods-tags{display:none!important}
  .ch-body .ch-goods-row .ch-col-price{
    grid-area:prices!important;align-self:end!important;
    flex-direction:row!important;align-items:baseline!important;
    gap:6px!important;flex-wrap:nowrap!important;min-width:0;
  }
  .ch-body .ch-goods-row .ch-price{font-size:17px!important;line-height:1.2!important}
  .ch-body .ch-goods-row .ch-price-old{font-size:11px!important}
  .ch-body .ch-goods-row .ch-col-price-meta,
  .ch-body .ch-goods-row .ch-col-stock{display:none!important}
  .ch-body .ch-goods-row .ch-col-buy{
    grid-area:buy!important;align-self:end!important;justify-content:flex-end!important;
  }
  .ch-body .ch-goods-row .ch-buy-btn{
    min-width:62px!important;height:32px!important;padding:0 12px!important;
    font-size:12.5px!important;border-radius:9px!important;
  }
}


/* 2026-11-25 修复：手机端底部空白。
   之前 body 留 72/150px，页脚再留 84px，形成双重留白。
   现在由页脚单独承担固定栏留白，正文不再重复留白。 */
@media (max-width:768px){
  body.ch-body{padding-bottom:0!important}
  body.ch-body:has(.ch-mobile-buybar){padding-bottom:0!important}
  body.ch-body .ch-footer,
  body.ch-body footer{padding-bottom:calc(69px + env(safe-area-inset-bottom,0px))!important}
  body.ch-body .ch-footer-bar .wrapper{padding-bottom:0!important}
  body.ch-body:has(.ch-mobile-buybar) .ch-footer,
  body.ch-body:has(.ch-mobile-buybar) footer{padding-bottom:calc(162px + env(safe-area-inset-bottom,0px))!important}
  body.no-tabbar .ch-footer,
  body.no-tabbar footer{padding-bottom:16px!important}
}
