/* cloud-mall — 云服务商城购物车主题 */
/* 官网顶栏布局：无侧栏，内容区全宽 */
body.cart,
body.product,
body.configureproduct,
body.viewcart,
body[class] {
  background: #f5f7fa !important;
}
.cm-shell,
.cm-mall {
  --cm-brand: #1677ff;
  --cm-brand-hover: #0958d9;
  --cm-ink: #1f2329;
  --cm-muted: #8a9099;
  --cm-line: #e8eaed;
  --cm-price: #f5222d;
  --cm-stock: #389e0d;
  --cm-stock-bg: #f6ffed;
  --cm-stock-border: #95de64;
  --cm-bg: #f5f7fa;
  --cm-card: #ffffff;
  --cm-font-size: 14px;
  /* 先预留顶栏高度，避免 JS 测完才从 0 顶下去 */
  --cm-host-header-offset: 64px;
  font-size: var(--cm-font-size, 14px);
}

/* 强制隐藏会员中心侧栏 / 顶栏（防残留） */
.vertical-menu,
#sidebar-menu,
.ae-sidebar-brand,
.ae-sidebar-support,
#page-topbar,
.navbar-header,
.main-content > .page-content > .ix-nav-bar,
body.ae-clientarea .vertical-menu,
body.ix-infra .vertical-menu {
  display: none !important;
}

/* 购物车顶栏 Logo：与官网一致，居中放大 */
.header-container-left .navbar-brand.header-container-topbar,
.navbar-brand.header-container-topbar {
  width: 210px !important;
  height: 48px !important;
  min-width: 210px !important;
  margin: 0 14px 0 0 !important;
  padding: 0 !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  display: block !important;
  flex-shrink: 0;
}
.header-container-topbar {
  height: 64px !important;
  line-height: 64px !important;
}

/* 购物车页隐藏官网底部与右侧悬浮栏 */
.footer,
footer.footer,
.footer-service-bar,
.footer-main,
.footer-bottom,
.footer-quote-section,
.float-sidebar,
.float-menu,
.side-toolbar,
.right-bar {
  display: none !important;
}
.main-content {
  margin-left: 0 !important;
  padding: 0 !important;
}
#page-topbar { left: 0 !important; }

/* 购物车内容区：官网顶栏下方 */
.cm-mall {
  max-width: var(--cm-frame-max-width, 1600px);
  width: 100%;
  margin: 0 auto;
  /* --cm-host-header-offset：CSS 默认 64px，JS 只微调一次，避免刷新跳动 */
  padding: calc(1.25rem + var(--cm-host-header-offset, 64px)) 1.5rem 3rem;
  box-sizing: border-box;
}
/* 部分页面外层容器 */
.container-fluid .cm-mall,
.page-content .cm-mall {
  padding-left: 0;
  padding-right: 0;
}
/* 官网 header 固定时的内容顶距兜底 */
.header-container-wrap + .cm-mall,
body > .cm-mall {
  padding-top: calc(1.25rem + var(--cm-host-header-offset, 64px));
}

/* 白色大框架：包裹标题、筛选、产品列表 */
.cm-panel {
  background: #fff;
  border: 1px solid var(--cm-line);
  border-radius: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 1.15rem 1.25rem 1.35rem;
  box-sizing: border-box;
  min-height: var(--cm-frame-min-height, 0);
  /* 不用 transform，避免与顶栏计算叠加造成视觉跳动；改用 margin */
  margin-top: var(--cm-frame-offset-y, 0px);
}

/* 顶部站内公告 */
.cm-top-notice {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin: 0 0 1rem;
  min-height: 44px;
  border: 1px solid #e5e7eb;
  background: #fff;
  overflow: hidden;
}
.cm-top-notice-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  padding: 0.55rem 1.35rem 0.55rem 0.85rem;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 1;
}
.cm-top-notice-label::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #dbeafe 0%, #eff6ff 72%, rgba(239,246,255,0) 100%);
  clip-path: polygon(0 0, 88% 0, 100% 100%, 0 100%);
  z-index: -1;
}
.cm-top-notice-ico {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.cm-top-notice-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0.55rem 0.75rem;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}
.cm-top-notice-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
  padding: 0.55rem 0.95rem;
  white-space: nowrap;
}
.cm-top-notice-date {
  color: #94a3b8;
  font-size: 12px;
}
.cm-top-notice-sep {
  display: inline-block;
  width: 1px;
  height: 14px;
  background: #e2e8f0;
}
.cm-top-notice-dismiss {
  color: #1677ff !important;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none !important;
}
.cm-top-notice-dismiss:hover {
  color: #0958d9 !important;
  text-decoration: underline !important;
}
@media (max-width: 767px) {
  .cm-top-notice {
    flex-wrap: wrap;
  }
  .cm-top-notice-label {
    width: 100%;
    padding-right: 0.85rem;
  }
  .cm-top-notice-label::before {
    clip-path: none;
  }
  .cm-top-notice-meta {
    width: 100%;
    justify-content: flex-end;
    border-top: 1px dashed #eef2f7;
  }
}

/* 底部公告条（插件「购物车配置」可改文案） */
.cm-cart-notice {
  margin-top: 1.25rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid #c9d6f0;
  border-radius: 0;
  background: #fff;
  font-size: calc(var(--cm-font-size, 14px) * 0.93);
  line-height: 1.75;
  color: #333;
  word-break: break-word;
}
.cm-cart-notice a {
  color: #5b8def;
  text-decoration: none;
}
.cm-cart-notice a:hover {
  text-decoration: underline;
}
.cm-cart-notice a.cm-notice-btn,
.cm-cart-notice .cm-notice-btn {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.2rem 0.7rem;
  border-radius: 2px;
  background: #1677ff;
  color: #fff !important;
  text-decoration: none !important;
  line-height: 1.5;
  vertical-align: baseline;
}
.cm-cart-notice a.cm-notice-btn:hover,
.cm-cart-notice .cm-notice-btn:hover {
  background: #0958d9;
  text-decoration: none !important;
}

.cm-mall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--cm-line);
}
.cm-mall-title {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: calc(var(--cm-font-size, 14px) * 1.15);
  font-weight: 600;
  color: var(--cm-ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.cm-mall-title:has(.cm-back-btn) {
  gap: 1.15rem;
}
.cm-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: #595959 !important;
  text-decoration: none !important;
  border-radius: 4px;
  flex-shrink: 0;
}
.cm-back:hover {
  color: var(--cm-brand) !important;
  background: #f5f7fa;
}
.cm-back-btn {
  width: auto;
  height: auto;
  min-height: 30px;
  padding: 0.2rem 0.85rem;
  border: 1px solid var(--cm-brand);
  background: #fff;
  color: var(--cm-brand) !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 0;
  margin-right: 0.15rem;
}
.cm-back-btn:hover {
  color: #fff !important;
  border-color: var(--cm-brand);
  background: var(--cm-brand);
}

/* 搜索框 */
.cm-search {
  position: relative;
  flex: 0 0 auto;
  width: 240px;
  max-width: 42vw;
}
.cm-search-input {
  width: 100%;
  height: 34px;
  padding: 0 2.1rem 0 0.85rem;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: var(--cm-ink);
  font-size: 0.8125rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.cm-search-input::placeholder {
  color: #bfbfbf;
}
.cm-search-input:focus {
  border-color: var(--cm-brand);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}
.cm-search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #8c8c8c;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
}

.cm-section-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  margin: 0.45rem 0 1rem;
}
.cm-section-bar {
  width: 3px;
  height: 18px;
  background: var(--cm-brand);
  border-radius: 1px;
  flex-shrink: 0;
}
.cm-section-title {
  font-size: calc(var(--cm-font-size, 14px) * 1.15);
  font-weight: 600;
  color: var(--cm-ink);
}
.cm-section-sep {
  color: #8c8c8c;
  font-size: calc(var(--cm-font-size, 14px) * 1.05);
  font-weight: 400;
}
.cm-section-group {
  font-size: calc(var(--cm-font-size, 14px) * 1.05);
  font-weight: 500;
  color: var(--cm-ink);
}
.cm-section-chevron {
  color: #bfbfbf;
  font-size: calc(var(--cm-font-size, 14px) * 1.15);
  line-height: 1;
  margin: 0 0.1rem;
}
.cm-section-slogan {
  font-size: calc(var(--cm-font-size, 14px) * 1);
  font-weight: 400;
  color: #8c8c8c;
  line-height: 1.45;
}

/* Filter bar（已在白框内，不再单独铺底） */
.cm-filter {
  background: transparent;
  border: 0;
  padding: 0 0 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--cm-line);
}
.cm-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.cm-filter-row + .cm-filter-row {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--cm-line);
}
.cm-filter-label {
  flex: 0 0 auto;
  min-width: 88px;
  padding-top: 8px;
  font-size: calc(var(--cm-font-size, 14px) * 0.975);
  font-weight: 600;
  color: var(--cm-ink);
  white-space: nowrap;
}
.cm-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  flex: 1;
  min-width: 0;
}
.cm-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.4rem 1.05rem;
  border: 1px solid var(--cm-line);
  background: #fff;
  color: #595959 !important;
  font-size: calc(var(--cm-font-size, 14px) * 0.975);
  text-decoration: none !important;
  line-height: 1.35;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.cm-tab:hover {
  border-color: var(--cm-brand);
  color: var(--cm-brand) !important;
}
.cm-tab.active {
  border-color: var(--cm-brand);
  color: var(--cm-brand) !important;
  background: #e6f4ff;
  font-weight: 500;
}

/* 产品规格：名称 + 右上角标语角标 */
.cm-tab-spec {
  position: relative;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0.4rem 1.05rem;
  overflow: visible;
  text-align: center;
}
.cm-tab-spec .cm-tab-name {
  font-size: 0.975rem;
  font-weight: 500;
  line-height: 1.35;
  color: inherit;
}
.cm-tab-spec .cm-tab-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  z-index: 2;
  max-width: 96px;
  padding: 0 6px;
  height: 18px;
  line-height: 18px;
  background: #f5222d;
  color: #fff !important;
  font-size: 11px;
  font-weight: 500;
  border-radius: 2px 2px 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  box-shadow: 0 1px 2px rgba(245, 34, 45, 0.25);
}
.cm-filter-row-spec .cm-filter-label {
  padding-top: 8px;
}
.cm-filter-row-spec .cm-filter-tabs {
  padding-top: 6px;
}

/* Product grid */
.cm-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
  align-items: stretch;
}
@media (max-width: 1399px) {
  .cm-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
  .cm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .cm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
  .cm-grid { grid-template-columns: 1fr; }
  .cm-filter-row { flex-direction: column; gap: 0.4rem; }
  .cm-filter-label { padding-top: 0; }
  .cm-mall-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .cm-search {
    width: 100%;
    max-width: none;
  }
  .cm-panel {
    padding: 0.95rem 0.85rem 1.1rem;
  }
}

.cm-card {
  display: flex;
  flex-direction: column;
  background: var(--cm-card);
  border: 1px solid var(--cm-line);
  height: 100%;
  min-height: 0;
  position: relative;
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
}
.cm-card:hover {
  border-color: var(--cm-brand);
  box-shadow: 0 4px 16px rgba(22, 119, 255, 0.1);
}
.cm-card.is-soldout {
  opacity: 0.72;
}
.cm-card.is-soldout:hover {
  border-color: var(--cm-line);
  box-shadow: none;
}

.cm-card-body {
  flex: 1 1 auto;
  padding: 0.95rem 1rem 0.65rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
}

.cm-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #e8eaed;
}
.cm-card-name {
  margin: 0;
  font-size: calc(var(--cm-font-size, 14px) * 0.95);
  font-weight: 700;
  color: var(--cm-ink);
  line-height: 1.35;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}
.cm-card-stock {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-size: calc(var(--cm-font-size, 14px) * 0.72);
  line-height: 1;
  color: var(--cm-stock);
  font-weight: 600;
  white-space: nowrap;
  padding: 0.28rem 0.55rem;
  border: 1px solid var(--cm-stock-border);
  border-radius: 4px;
  background: var(--cm-stock-bg);
}
.cm-card-stock.out {
  color: #8c8c8c;
  background: #fafafa;
  border-color: #d9d9d9;
}

.cm-specs {
  flex: 1;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
  font-size: calc(var(--cm-font-size, 14px) * 0.75);
  color: var(--cm-muted);
  line-height: 1.65;
}
.cm-specs li {
  display: flex;
  gap: 0.25rem;
  margin: 0;
}
.cm-specs .k {
  color: #8c8c8c;
  flex-shrink: 0;
}
.cm-specs .v {
  color: #595959;
  word-break: break-all;
}
.cm-desc {
  flex: 0 0 auto;
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  color: #595959;
  line-height: 1.7;
  max-height: none;
  overflow: visible;
}
.cm-desc p,
.cm-desc div {
  margin: 0;
  line-height: 1.7;
}
.cm-desc br + br { display: none; }
.cm-desc table {
  width: 100%;
  border: 0;
  margin: 0;
}
.cm-desc table td {
  border: 0;
  padding: 0;
  font-size: 0.75rem;
  color: #595959;
  line-height: 1.7;
  vertical-align: top;
}
.cm-desc pre {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  white-space: pre-wrap;
  word-break: break-word;
  color: inherit;
  background: transparent;
  border: 0;
  padding: 0;
}
.cm-desc ul,
.cm-desc ol {
  margin: 0;
  padding-left: 1rem;
}

.cm-price-row {
  margin-top: auto;
  padding-top: 0.7rem;
  border-top: 1px solid #e8eaed;
}
.cm-price {
  color: var(--cm-price);
  font-size: calc(var(--cm-font-size, 14px) * 1.15);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.cm-price small {
  font-size: calc(var(--cm-font-size, 14px) * 0.75);
  font-weight: 500;
  margin-left: 0.15rem;
}
.cm-price-origin {
  margin-top: 0.15rem;
  font-size: calc(var(--cm-font-size, 14px) * 0.7);
  color: #bfbfbf;
  text-decoration: line-through;
}
.cm-trial {
  margin-top: 0.2rem;
  font-size: calc(var(--cm-font-size, 14px) * 0.7);
  color: #fa541c;
}

.cm-card-foot {
  margin-top: auto;
  padding: 0 0.85rem 0.85rem;
  flex-shrink: 0;
}
.cm-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  background: var(--cm-brand) !important;
  border: 1px solid var(--cm-brand) !important;
  color: #fff !important;
  font-size: calc(var(--cm-font-size, 14px) * 0.9);
  font-weight: 500;
  text-decoration: none !important;
  transition: background .12s ease;
}
.cm-buy:hover {
  background: var(--cm-brand-hover) !important;
  border-color: var(--cm-brand-hover) !important;
  color: #fff !important;
}
.cm-buy.is-disabled,
.cm-buy.is-disabled:hover {
  background: #f5f5f5 !important;
  border-color: #d9d9d9 !important;
  color: #bfbfbf !important;
  cursor: not-allowed;
  pointer-events: none;
}

.cm-soldout-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 48px;
  height: auto;
  z-index: 2;
  pointer-events: none;
}

.cm-empty {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  color: var(--cm-muted);
  font-size: 0.9rem;
  background: transparent;
  border: 0;
}
.cm-search-empty[hidden] {
  display: none !important;
}

.cm-pager {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 1rem 0 0.25rem;
}
.cm-pager .pagination {
  margin: 0;
}

/* Hide default breadcrumb/page chrome noise if present */
body.ae-clientarea .page-title-box,
body.ix-infra .page-title-box {
  display: none !important;
}

/* ========== 配置页 / 结算页：与商城列表适配 ========== */
body.cm-checkout-page,
html.cm-checkout-page body,
body.ae-clientarea.cm-checkout-page,
body.ix-infra.cm-checkout-page {
  background: #f5f7fa !important;
}

/* 官网顶栏 mega 菜单收起时禁止拦截页面点击（否则配置页下拉无法点） */
.nav-item .nav-topbar-dropdown-wrap {
  pointer-events: none !important;
}
.header-container .nav-item:hover .nav-topbar-dropdown-wrap,
.header-container .nav-item:focus-within .nav-topbar-dropdown-wrap {
  pointer-events: auto !important;
}

/* 配置/结算仍可能套会员中心壳：强制无侧栏全宽 */
body.cm-checkout-page .vertical-menu,
body.cm-checkout-page #sidebar-menu,
body.cm-checkout-page .ae-sidebar-brand,
body.cm-checkout-page .ae-sidebar-support,
body.cm-checkout-page #page-topbar,
body.cm-checkout-page .navbar-header,
body.cm-checkout-page .ix-nav-bar,
body.ae-clientarea .cm-checkout ~ .vertical-menu {
  display: none !important;
}
body.cm-checkout-page .main-content,
body.cm-checkout-page .page-content,
.main-content:has(.cm-checkout),
.page-content:has(.cm-checkout) {
  margin-left: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
body.cm-checkout-page .container-fluid {
  max-width: 1600px;
  margin: 0 auto;
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
}

.cm-checkout-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--cm-line);
}
.cm-checkout-panel {
  overflow: visible !important;
}

/* 白框内默认卡片去阴影、统一边框 */
.cm-checkout .card {
  border: 1px solid var(--cm-line) !important;
  box-shadow: none !important;
  border-radius: 4px !important;
  background: #fff !important;
  margin-bottom: 0.85rem !important;
  overflow: visible !important;
}
.cm-checkout .card.border-bottom {
  border-bottom: 1px solid var(--cm-line) !important;
  margin-bottom: 0 !important;
  border-radius: 4px 4px 0 0 !important;
}
.cm-checkout .card.border-bottom + .card {
  border-radius: 0 0 4px 4px !important;
  border-top: 0 !important;
}
.cm-checkout .card-title {
  font-size: calc(var(--cm-font-size, 14px) * 1.05) !important;
  font-weight: 600 !important;
  color: var(--cm-ink) !important;
  margin-bottom: 0 !important;
}
.cm-checkout .card-body {
  padding: 1rem 1.15rem !important;
  overflow: visible !important;
}

/* 表单控件与标签 */
.cm-checkout .col-form-label,
.cm-checkout label.col-form-label {
  font-size: calc(var(--cm-font-size, 14px) * 0.95) !important;
  color: #595959 !important;
  font-weight: 500 !important;
}
.cm-checkout .form-control {
  border-color: #d9d9d9 !important;
  border-radius: 4px !important;
  font-size: calc(var(--cm-font-size, 14px) * 0.9) !important;
}
.cm-checkout .form-control:focus {
  border-color: var(--cm-brand) !important;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12) !important;
}

/* 配置页：使用原生 select，保证可点击下拉 */
.cm-checkout select,
.cm-checkout select.form-control,
.cm-checkout select.selectpicker,
.cm-checkout select.selectpicker_refresh,
.cm-checkout select.configoption_os {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  max-width: 420px !important;
  height: 38px !important;
  line-height: 36px !important;
  padding: 0 12px !important;
  border: 1px solid #d9d9d9 !important;
  border-radius: 4px !important;
  background: #fff !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 30 !important;
  -webkit-appearance: menulist !important;
  appearance: menulist !important;
}
.cm-checkout select.configoption_os_group,
.cm-checkout select.configoption_os_group.selectpicker,
.cm-checkout select.form-control.configoption_os_group {
  display: none !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}
.cm-checkout .bootstrap-select {
  display: none !important;
}

/* 操作系统：卡片网格（对齐全快云） */
.cm-os-cards-host {
  position: relative;
  z-index: 40;
}
.cm-os-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 920px;
}
.cm-os-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 78px;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  user-select: none;
  overflow: visible;
  transition: border-color .15s, box-shadow .15s;
}
.cm-os-card:hover {
  border-color: #91caff;
}
.cm-os-card.active {
  border-color: #1677ff;
  box-shadow: 0 0 0 1px #1677ff inset;
  background: #fff;
}
.cm-os-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 10px;
  background: #f7f8fa;
  border-radius: 3px 3px 0 0;
}
.cm-os-card.active .cm-os-card-top {
  background: #fff;
}
.cm-os-card-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}
.cm-os-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2329;
  line-height: 1.2;
}
.cm-os-card.active .cm-os-card-name {
  color: #1677ff;
}
.cm-os-card-ver {
  margin-top: auto;
  padding: 8px 12px 10px;
  border-top: 1px solid #eef0f3;
  font-size: 12px;
  color: #8a9099;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: #fff;
}
.cm-os-card.active .cm-os-card-ver {
  color: #1677ff;
}
.cm-os-card-menu {
  position: absolute;
  left: -1px;
  right: -1px;
  top: calc(100% + 4px);
  z-index: 80;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #1677ff;
  border-radius: 4px;
  max-height: 220px;
  overflow: auto;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}
.cm-os-card-menu li {
  padding: 8px 12px;
  font-size: 13px;
  color: #1f2329;
  cursor: pointer;
}
.cm-os-card-menu li:hover {
  background: #e6f4ff;
  color: #1677ff;
}
.cm-os-card-menu li.active {
  background: #1677ff;
  color: #fff;
}
@media (max-width: 575px) {
  .cm-os-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* 旧下拉式 OS picker 隐藏（已被卡片替代） */
.cm-os-picker { display: none !important; }

/* CPU/内存等选项：连接块，未选浅灰，选中实心蓝（写死，不依赖宿主主题）
   同时用 .active 与 :has(input:checked)，避免缺 class 时全灰 */
.cm-mall .btn-group-toggle,
.cm-checkout .btn-group-toggle,
body.configureproduct .btn-group-toggle {
  display: inline-flex !important;
  flex-wrap: wrap;
  gap: 0 !important;
  border-radius: 4px;
  overflow: visible;
}
.cm-mall .btn-group-toggle.cycle,
.cm-checkout .btn-group-toggle.cycle,
.cm-mall .btn-custom-group.cycle,
.cm-checkout .btn-custom-group.cycle {
  padding-top: 12px;
  margin-top: 0 !important;
}
.cm-mall .btn-group-toggle.cycle > .btn,
.cm-checkout .btn-group-toggle.cycle > .btn,
.cm-mall .btn-custom-group.cycle > .btn,
.cm-checkout .btn-custom-group.cycle > .btn {
  position: relative;
  overflow: visible;
}
.cm-mall .cycle-select-discount,
.cm-checkout .cycle-select-discount {
  position: absolute;
  top: -10px;
  right: 0;
  z-index: 5;
  display: inline-block;
  padding: 0 5px;
  height: 15px;
  background: #F70302;
  border-radius: 5px 5px 5px 0;
  color: #fff;
  font-size: 12px;
  line-height: 15px;
  white-space: nowrap;
  pointer-events: none;
}

/* 未选中：浅灰 + 文字垂直居中 */
.cm-mall .btn-group-toggle > label.btn,
.cm-mall .btn-group-toggle > .btn,
.cm-checkout .btn-group-toggle > label.btn,
.cm-checkout .btn-group-toggle > .btn,
body.configureproduct .btn-group-toggle > label.btn,
.cm-mall .btn-custom-group label.btn,
.cm-checkout .btn-custom-group label.btn,
.cm-mall .btn-custom-group .btn-custom,
.cm-checkout .btn-custom-group .btn-custom {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  min-height: 32px !important;
  min-width: 68px;
  margin: 0 !important;
  border-radius: 0 !important;
  line-height: 1 !important;
  padding: 0 0.85rem !important;
  box-sizing: border-box !important;
  vertical-align: middle !important;
  background: #f3f4f6 !important;
  background-color: #f3f4f6 !important;
  border: 1px solid #e5e7eb !important;
  border-left-width: 0 !important;
  color: #4b5563 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  font-weight: 500 !important;
}

.cm-mall .btn-group-toggle > label.btn:first-child,
.cm-mall .btn-group-toggle > .btn:first-child,
.cm-checkout .btn-group-toggle > label.btn:first-child,
.cm-checkout .btn-group-toggle > .btn:first-child,
.cm-mall .btn-custom-group label.btn:first-child,
.cm-checkout .btn-custom-group label.btn:first-child {
  border-left-width: 1px !important;
  border-radius: 4px 0 0 4px !important;
}
.cm-mall .btn-group-toggle > label.btn:last-child,
.cm-mall .btn-group-toggle > .btn:last-child,
.cm-checkout .btn-group-toggle > label.btn:last-child,
.cm-checkout .btn-group-toggle > .btn:last-child,
.cm-mall .btn-custom-group label.btn:last-child,
.cm-checkout .btn-custom-group label.btn:last-child {
  border-radius: 0 4px 4px 0 !important;
}
.cm-mall .btn-group-toggle > label.btn:only-child,
.cm-mall .btn-group-toggle > .btn:only-child,
.cm-checkout .btn-group-toggle > label.btn:only-child,
.cm-checkout .btn-group-toggle > .btn:only-child {
  border-left-width: 1px !important;
  border-radius: 4px !important;
}

.cm-mall .btn-group-toggle > label.btn:not(.active):not(:has(> input:checked)):hover,
.cm-checkout .btn-group-toggle > label.btn:not(.active):not(:has(> input:checked)):hover,
.cm-mall .btn-custom-group label.btn:not(.active):not(:has(> input:checked)):hover {
  background-color: #e8eefc !important;
  border-color: #c7d2fe !important;
  color: #1677ff !important;
  z-index: 1;
}

/* 选中：实心蓝（写死）— .active 或 radio:checked 任一成立 */
.cm-mall .btn-group-toggle > label.btn.active,
.cm-mall .btn-group-toggle > label.btn.active:hover,
.cm-mall .btn-group-toggle > label.btn.active:focus,
.cm-mall .btn-group-toggle > label.btn:has(> input:checked),
.cm-mall .btn-group-toggle > label.btn:has(> input:checked):hover,
.cm-mall .btn-group-toggle > .btn.active,
.cm-mall .btn-group-toggle > .btn:has(> input:checked),
.cm-checkout .btn-group-toggle > label.btn.active,
.cm-checkout .btn-group-toggle > label.btn.active:hover,
.cm-checkout .btn-group-toggle > label.btn.active:focus,
.cm-checkout .btn-group-toggle > label.btn:has(> input:checked),
.cm-checkout .btn-group-toggle > label.btn:has(> input:checked):hover,
.cm-checkout .btn-group-toggle > .btn.active,
.cm-checkout .btn-group-toggle > .btn:has(> input:checked),
body.configureproduct .btn-group-toggle > label.btn.active,
body.configureproduct .btn-group-toggle > label.btn:has(> input:checked),
.cm-mall .btn-custom-group label.btn.active,
.cm-mall .btn-custom-group label.btn:has(> input:checked),
.cm-checkout .btn-custom-group label.btn.active,
.cm-checkout .btn-custom-group label.btn:has(> input:checked),
.cm-mall .configureproduct label.btn.btn-primary.active,
.cm-mall .configureproduct label.btn.btn-primary:has(> input:checked),
.cm-checkout .configureproduct label.btn.btn-primary.active,
.cm-checkout .configureproduct label.btn.btn-primary:has(> input:checked) {
  margin: 0 !important;
  min-width: 68px;
  padding: 0 0.85rem !important;
  background: #1677ff !important;
  background-color: #1677ff !important;
  background-image: none !important;
  border: 1px solid #1677ff !important;
  border-left-width: 0 !important;
  color: #fff !important;
  box-shadow: none !important;
  opacity: 1 !important;
  font-weight: 600 !important;
  z-index: 2;
}
.cm-mall .btn-group-toggle > label.btn.active:first-child,
.cm-mall .btn-group-toggle > label.btn:has(> input:checked):first-child,
.cm-checkout .btn-group-toggle > label.btn.active:first-child,
.cm-checkout .btn-group-toggle > label.btn:has(> input:checked):first-child,
.cm-mall .btn-custom-group label.btn.active:first-child,
.cm-checkout .btn-custom-group label.btn.active:first-child {
  border-left-width: 1px !important;
  border-radius: 4px 0 0 4px !important;
}
.cm-mall .btn-group-toggle > label.btn.active:last-child,
.cm-mall .btn-group-toggle > label.btn:has(> input:checked):last-child,
.cm-checkout .btn-group-toggle > label.btn.active:last-child,
.cm-checkout .btn-group-toggle > label.btn:has(> input:checked):last-child {
  border-radius: 0 4px 4px 0 !important;
}
.cm-mall .btn-group-toggle > label.btn.active:only-child,
.cm-mall .btn-group-toggle > label.btn:has(> input:checked):only-child,
.cm-checkout .btn-group-toggle > label.btn.active:only-child,
.cm-checkout .btn-group-toggle > label.btn:has(> input:checked):only-child {
  border-left-width: 1px !important;
  border-radius: 4px !important;
}

/* 机房等单选按钮 */
.cm-mall .configureproduct label.btn.btn-primary:not(.active):not(:has(> input:checked)),
.cm-checkout .configureproduct label.btn.btn-primary:not(.active):not(:has(> input:checked)) {
  background-color: #f3f4f6 !important;
  border: 1px solid #e5e7eb !important;
  color: #4b5563 !important;
}

/* 通用主色按钮：排除配置项按钮组，避免把未选项也染成蓝或互相覆盖 */
.cm-checkout .btn-primary:not(.btn-group-toggle label):not(.btn-custom-group label),
.cm-checkout .btn-primary:focus:not(.btn-group-toggle label):not(.btn-custom-group label),
.cm-checkout .btn-primary:not(:disabled):not(.disabled):active:not(.btn-group-toggle label):not(.btn-custom-group label) {
  background-color: var(--cm-brand) !important;
  border-color: var(--cm-brand) !important;
  color: #fff !important;
}
.cm-checkout .btn-primary:hover:not(.btn-group-toggle label):not(.btn-custom-group label) {
  background-color: var(--cm-brand-hover) !important;
  border-color: var(--cm-brand-hover) !important;
}

/* 配置项控件左对齐：滑块行与 CPU/内存/带宽按钮同一左边线 */
.cm-checkout .configureproduct > .col-md-10,
.cm-mall .configureproduct > .col-md-10 {
  padding-left: 15px !important;
  padding-right: 15px !important;
}
.cm-checkout .configureproduct .cm-range-row,
.cm-mall .configureproduct .cm-range-row {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 10px;
  max-width: none;
  position: relative;
  padding-left: 15px !important;
  padding-right: 15px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.cm-checkout .configureproduct .btn-group-toggle,
.cm-checkout .configureproduct .btn-custom-group,
.cm-mall .configureproduct .btn-group-toggle,
.cm-mall .configureproduct .btn-custom-group {
  margin-left: 0 !important;
}

/* 滑块：适中长度，左对齐（相对内存按钮组略短） */
.cm-checkout .configureproduct .col-md-10.d-flex.align-items-center,
.cm-mall .configureproduct .col-md-10.d-flex.align-items-center {
  justify-content: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 10px;
  max-width: 620px;
}
.cm-checkout input[type='range'],
.cm-checkout input[type="range"],
.cm-mall input[type='range'].configoption_range,
.cm-mall input.form-control-range.configoption_range,
.cm-checkout input.form-control-range.configoption_range {
  background: var(--cm-brand) !important;
  width: 500px !important;
  max-width: 500px !important;
  min-width: 500px !important;
  flex: 0 0 500px !important;
  margin-right: 0 !important;
  float: none !important;
}
.cm-checkout .configoption_range_val,
.cm-mall .configoption_range_val {
  width: 64px !important;
  max-width: 64px !important;
  min-width: 64px !important;
  flex: 0 0 64px !important;
  margin-right: 0 !important;
  float: none !important;
  text-align: center;
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
}
.cm-checkout .configureproduct .col-md-10.d-flex.align-items-center > span,
.cm-mall .configureproduct .col-md-10.d-flex.align-items-center > span {
  flex: 0 0 auto;
  line-height: 32px;
  color: #595959;
}
.cm-checkout input[type="range"]::-webkit-slider-thumb {
  border-color: var(--cm-brand) !important;
}
.cm-checkout input[type="range"]::-moz-range-thumb {
  border-color: var(--cm-brand) !important;
}

/* 右侧订单摘要 */
.cm-checkout .ordersummary,
.cm-checkout table.ordersummary {
  font-size: 0.875rem;
}
.cm-checkout .text-primary,
.cm-checkout .goods_info .title {
  color: var(--cm-brand) !important;
}

/* 结算页支付方式选中 */
.cm-checkout .addfunds-payment.active,
.cm-checkout .checkboxSelect {
  border-color: var(--cm-brand) !important;
}

/* 支付方式图标：固定高度，对抗宿主主题 img{width:100%} 撑爆 */
.cm-checkout .addfunds-payment img,
.cm-checkout .addfunds img,
body.viewcart .addfunds-payment img,
body.viewcart .addfunds img,
.cm-mall .addfunds-payment img {
  width: auto !important;
  max-width: 120px !important;
  height: 28px !important;
  max-height: 28px !important;
  object-fit: contain !important;
  display: inline-block !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}
.cm-checkout .checkboxDiv img,
.cm-checkout .checkDiv img,
body.viewcart .checkboxDiv img,
body.viewcart .checkDiv img {
  width: 20px !important;
  max-width: 24px !important;
  height: 20px !important;
  max-height: 20px !important;
  object-fit: contain !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

@media (max-width: 991px) {
  .cm-checkout-panel {
    padding: 0.95rem 0.85rem 1.1rem;
  }
}

/*
 * 独立购物车适配：不依赖官网 aether / 会员中心 infra-console。
 * 对抗宿主主题全局 img{width:100%;height:auto} 把国旗/系统图标撑爆。
 */
body.configureproduct img.mr-1,
body.configureproduct .bootstrap-select img,
body.configureproduct .filter-option img,
body.configureproduct .filter-option-inner-inner img,
body.configureproduct .dropdown-menu img,
body.configureproduct .dropdown-item img,
body.configureproduct table.ordersummary img,
body.configureproduct .ordersummary img,
body.viewcart .ordersummary img,
.cm-mall img.mr-1,
.cm-checkout img.mr-1,
.cm-mall .bootstrap-select img,
.cm-checkout .bootstrap-select img,
.cm-mall .filter-option img,
.cm-checkout .filter-option img,
.cm-mall .filter-option-inner-inner img,
.cm-checkout .filter-option-inner-inner img,
.cm-mall .dropdown-menu img,
.cm-checkout .dropdown-menu img,
.cm-mall table.ordersummary img,
.cm-checkout table.ordersummary img,
.cm-mall .ordersummary img,
.cm-checkout .ordersummary img,
.cm-os-picker-btn img,
.cm-os-picker-item img {
  width: auto !important;
  max-width: 28px !important;
  height: 20px !important;
  max-height: 20px !important;
  object-fit: contain !important;
  display: inline-block !important;
  vertical-align: middle !important;
  flex-shrink: 0 !important;
}

/* V10 云产品 / 通用配置：区域国旗与系统图标 */
.common-config .area-box .country .item img,
.common-config .area-box .city .item img,
.common-config .os-group-img,
.common-config .option-img,
.common-config .order-right img,
.mf-cloud .image .icon,
.mf-cloud .image-item img.icon,
.mf-dcim .image .icon,
.mf-dcim .image-item img.icon {
  width: 30px !important;
  max-width: 40px !important;
  height: 20px !important;
  max-height: 24px !important;
  object-fit: contain !important;
  flex-shrink: 0 !important;
}

/* 订单汇总里嵌套的大图兜底（无 class 的 img） */
.cm-checkout .card .card-body img[src*="/upload/common/country/"],
.cm-checkout .card .card-body img[src*="/upload/common/system/"],
body.configureproduct .card .card-body img[src*="/upload/common/country/"],
body.configureproduct .card .card-body img[src*="/upload/common/system/"] {
  width: auto !important;
  max-width: 28px !important;
  height: 20px !important;
  max-height: 20px !important;
  object-fit: contain !important;
}

/* ========== 产品选型页 pick5：地域胶囊 + 商品详情卡 ========== */
.cm-picker {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 0.35rem;
}

.cm-pick-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  padding: 1.05rem 0;
}

/* 产品类型 / 地域类型 / 线路 之间横杠分隔 */
.cm-pick-row + .cm-pick-row {
  border-top: 1px solid var(--cm-line);
}

.cm-pick-row:first-child {
  padding-top: 0.35rem;
}

.cm-pick-row:last-child {
  padding-bottom: 0;
}

.cm-pick-label {
  padding-top: 0.55rem;
  font-size: 16px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cm-type-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.cm-type-tile {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 148px;
  max-width: 100%;
  height: 44px;
  padding: 0 36px 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
  color: #1f2937;
  text-decoration: none !important;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.cm-type-tile:hover {
  border-color: #93c5fd;
  color: #1d4ed8;
  background: #f8fbff;
}

.cm-type-tile.is-active {
  border-color: #3b82f6;
  background: #eef5ff;
  color: #2563eb !important;
}

.cm-type-flag {
  width: 24px !important;
  height: 16px !important;
  max-width: 24px !important;
  max-height: 16px !important;
  object-fit: contain !important;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  image-rendering: -webkit-optimize-contrast;
}

.cm-type-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 9.5em;
}

.cm-type-badge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  min-width: 34px;
  height: 16px;
  padding: 0 7px 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  letter-spacing: 0.02em;
  clip-path: polygon(9px 0, 100% 0, 100% 100%, 0 100%);
}

.cm-type-badge-0 { background: #f59e0b; }
.cm-type-badge-1 { background: #e11d48; }
.cm-type-badge-2 { background: #ec4899; }
.cm-type-badge-3 { background: #3b82f6; }
.cm-type-badge-4 { background: #db2777; }
.cm-type-badge-5 { background: #334155; }

/* 旧大卡样式保留兼容，不再使用 */
.cm-type-cards { display: none; }

/* —— 地域类型：图2左标签位置 + 图1大卡样式 —— */

.cm-region-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.cm-region-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 240px;
  max-width: 100%;
  padding: 12px 14px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
  color: #1f2937;
  text-decoration: none !important;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
}

.cm-region-card:hover {
  border-color: #93c5fd;
  background: #f8fbff;
  color: #1f2937;
}

.cm-region-card.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.cm-region-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 3.2rem;
  min-width: 0;
}

.cm-region-flag {
  width: 24px !important;
  height: 16px !important;
  max-width: 24px !important;
  max-height: 16px !important;
  object-fit: contain !important;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  image-rendering: -webkit-optimize-contrast;
}

.cm-region-card.is-active .cm-region-flag {
  border-color: rgba(255,255,255,.35);
}

.cm-region-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-region-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  min-width: 42px;
  height: 18px;
  padding: 0 8px 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: #e11d48;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%);
}

.cm-region-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cm-region-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  min-height: 22px;
  height: auto;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid;
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cm-region-pill-0 {
  color: #2563eb;
  border-color: #93c5fd;
  background: #eff6ff;
}
.cm-region-pill-1 {
  color: #0d9488;
  border-color: #5eead4;
  background: #f0fdfa;
}
.cm-region-pill-2 {
  color: #ea580c;
  border-color: #fdba74;
  background: #fff7ed;
}

.cm-region-card.is-active .cm-region-pill {
  color: #fff !important;
  border-color: rgba(255,255,255,.75) !important;
  background: transparent !important;
}

.cm-region-caret {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 0;
  height: 0;
  margin-left: -7px;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 8px solid #2563eb;
  pointer-events: none;
}

/* —— 线路商品卡 —— */
.cm-line-wrap { min-width: 0; }

.cm-line-tip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0;
  background: linear-gradient(90deg, #eaf3ff 0%, #f5f9ff 100%);
  border: 1px solid #d6e8ff;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.cm-line-tip-ico {
  color: #f5a623;
  font-size: 13px;
  flex-shrink: 0;
}

.cm-line-tip-text { min-width: 0; }

.cm-line-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.cm-line-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-height: 200px;
  padding: 1.05rem 1.05rem 0.95rem;
  border: 1px solid #e6ebf2;
  border-radius: 0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  overflow: visible;
}

.cm-line-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.cm-line-card.is-soldout {
  opacity: 0.72;
  filter: grayscale(0.12);
}

.cm-line-ribbon {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  min-width: 40px;
  padding: 0.18rem 0.55rem 0.22rem;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  border-radius: 0;
}

.cm-line-ribbon-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.cm-line-ribbon-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.cm-line-ribbon-orange { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.cm-line-ribbon-gray { background: linear-gradient(135deg, #94a3b8, #64748b); }

.cm-line-head {
  display: block;
  margin: -1.05rem -1.05rem 0.55rem;
  padding: 0.95rem 4.2rem 0.85rem 1.05rem;
  border-bottom: 1px solid #e8eaed;
  background-color: #fff;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 100% 100%;
}

.cm-line-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  color: #0f172a;
  word-break: break-word;
  position: relative;
  z-index: 1;
}

.cm-line-desc {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0;
  /* 交给官方 .ps-container 自己排版 */
  overflow: visible;
  max-height: none;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
}

.cm-line-desc.is-empty {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.7;
}

/* 卡片内官方描述微调，不覆盖其 label/value 布局 */
.cm-line-card .cm-desc.cm-line-desc {
  max-height: none;
  overflow: visible;
}
.cm-line-card .ps-container {
  max-width: 100% !important;
  padding: 0 !important;
  color: #334155 !important;
}
.cm-line-card .ps-container__item,
.cm-line-card .ps-container__feature {
  opacity: 1 !important;
  animation: none !important;
  transform: none !important;
}
.cm-line-card .ps-container__label {
  font-size: 12px !important;
  min-width: 72px !important;
  max-width: 88px !important;
  color: #64748b !important;
}
/* 强制加深正文/数值：覆盖灰白字与暗色模式浅色 */
.cm-line-card .ps-container__value,
.cm-line-card .ps-container__value *:not(.ps-container__chip),
.cm-line-card .ps-container__feature,
.cm-line-card .ps-container__feature *,
.cm-line-card .ps-container__features,
.cm-line-card .cm-desc,
.cm-line-card .cm-desc *:not(.ps-container__chip):not(a) {
  color: #1e293b !important;
}
.cm-line-card .ps-container__chip,
.cm-line-card .ps-container__chip * {
  color: #0052cc !important;
}
.cm-line-card .ps-container a {
  color: #2563eb !important;
}
.cm-line-card .ps-container__value,
.cm-line-card .ps-container__value * {
  font-size: 12px !important;
}
.cm-line-card .ps-container__chip {
  font-size: 11px !important;
}
.cm-line-card .ps-container__feature {
  font-size: 11px !important;
  padding: 2px 8px !important;
  color: #334155 !important;
}

.cm-line-stock {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 600;
  color: #16a34a;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 0;
  padding: 0.15rem 0.45rem;
}

.cm-line-stock.out {
  color: #94a3b8;
  background: #f8fafc;
  border-color: #e2e8f0;
}

.cm-line-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px dashed #e2e8f0;
}

.cm-line-price strong {
  font-size: 24px;
  font-weight: 800;
  color: #e11d48;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.cm-line-price small {
  margin-left: 0.12rem;
  font-size: 13px;
  color: #94a3b8;
  font-weight: 500;
}

.cm-line-origin {
  margin-top: 0.12rem;
  font-size: 11px;
  color: #cbd5e1;
  text-decoration: line-through;
}

.cm-line-trial {
  margin-top: 0.15rem;
  font-size: 11px;
  color: #ea580c;
}

.cm-line-buy {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 36px;
  padding: 0 0.95rem;
  border-radius: 0;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: filter .15s ease, transform .15s ease;
}

.cm-line-buy:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
  color: #fff !important;
}

.cm-line-buy.is-disabled,
.cm-line-buy.is-disabled:hover {
  background: #cbd5e1;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.cm-line-grid .cm-empty,
.cm-line-grid .cm-pager {
  grid-column: 1 / -1;
}

@media (max-width: 1199px) {
  .cm-line-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
  .cm-line-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .cm-pick-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
  .cm-pick-label { padding-top: 0; }
  .cm-type-tile {
    min-width: calc(50% - 5px);
    flex: 1 1 calc(50% - 5px);
  }
  .cm-line-grid { grid-template-columns: 1fr; }
  .cm-region-card { min-width: calc(50% - 5px); flex: 1 1 calc(50% - 5px); }
}


/* ========== 直角化：产品类型旗标卡也用直角（角标为斜切） ========== */
.cm-mall .cm-panel,
.cm-mall .cm-search-input,
.cm-mall .cm-back,
.cm-mall .cm-tab,
.cm-mall .cm-tab-spec,
.cm-mall .cm-tab-badge,
.cm-mall .cm-card,
.cm-mall .cm-card-stock,
.cm-mall .cm-buy,
.cm-mall .cm-type-tile,
.cm-mall .cm-region-card,
.cm-mall .cm-region-chip,
.cm-mall .cm-line-tip,
.cm-mall .cm-line-card,
.cm-mall .cm-line-ribbon,
.cm-mall .cm-line-stock,
.cm-mall .cm-line-buy,
.cm-mall .cm-cart-notice,
.cm-checkout .card,
.cm-checkout .card.border-bottom,
.cm-checkout .card.border-bottom + .card,
.cm-checkout .form-control,
.cm-checkout select,
.cm-checkout select.form-control,
.cm-checkout .btn,
.cm-checkout .btn-primary,
.cm-checkout .custom-control-label::before,
.cm-checkout .payment-checkbox,
.cm-checkout input[type="text"],
.cm-checkout input[type="password"],
.cm-checkout input[type="email"],
.cm-checkout input[type="number"],
.cm-checkout textarea,
.cm-checkout .bootstrap-select > .dropdown-toggle,
.cm-checkout .dropdown-menu,
.cm-os-picker-btn,
.cm-os-picker-menu,
.cm-os-picker-item,
body.configureproduct .btn,
body.viewcart .btn,
body.configureproduct .form-control,
body.viewcart .form-control,
body.configureproduct .card,
body.viewcart .card {
  border-radius: 0 !important;
}

/* 地域卡内特性标签：保留胶囊圆角（对照图1） */
.cm-mall .cm-region-pill {
  border-radius: 999px !important;
}
