/* ============ 星途拓联 · 全站精修层（2026-11-22） ============ */
: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:16px;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; }
}
