/* =============================================================
   cart-modern.css  —  智简魔方购物车 / 配置页 + 结算页 美化样式 v4
   设计参考：腾讯云 / 阿里云控制台，品牌色取自 znetyun.com 首页
   作用域：.cart-modern
   站点主题 web/jincloud-banner-tx 的 app.css 自带 .jdc-rwd .col-md-*
   栅格（特异性 0,2,0），会覆盖 Bootstrap 列宽/间距/浮动。
   本文件对布局关键属性一律使用「高特异性 + !important」彻底制服它。
   ============================================================= */

.cart-modern {
  /* ---------- 设计令牌（改这一处即可换肤） ---------- */
  --zy-primary: #006eff;
  --zy-primary-dk: #0052d9;
  --zy-primary-soft: #eaf2ff;
  --zy-primary-grad: linear-gradient(135deg, #006eff 0%, #0052d9 100%);
  --zy-danger: #e1251b;
  --zy-text: #262626;
  --zy-text-2: #4e5969;
  --zy-muted: #6b7280;
  --zy-border: #e3e8ef;
  --zy-line: #f0f2f5;
  --zy-bg: #f4f6fb;
  --zy-card: #fff;
  --zy-radius: 16px;
  --zy-radius-sm: 10px;
  --zy-shadow: 0 8px 40px rgba(20, 60, 140, .10);
  --zy-shadow-sm: 0 4px 16px rgba(0, 110, 255, .10);
  --zy-t: all .18s cubic-bezier(.4, 0, .2, 1);
  --zy-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 线上站点头部(.jc_hd / header_home.html)高度基准：PC 70px，移动端在媒体查询覆盖为 50px。
     配置页内容统一以它为 clearance 基准，确保三个卡片（.zy-hero + 配置卡 + 订单摘要卡）绝不压到顶部 banner 下。 */
  --zy-header-h: 70px;
}

.cart-modern * { box-sizing: border-box; }
/* 顶部站点头部 clearance：线上头部为 fixed/脱离文档流，配置页内容需留白才不会被 banner 盖住 */
.cart-modern { font-family: var(--zy-font); color: var(--zy-text); overflow-x: hidden; padding-top: calc(var(--zy-header-h) + 18px); }

/* ============================================================
   顶部步骤条
   ============================================================ */
.cart-modern .zy-steps {
  display: flex; align-items: center;
}
.cart-modern .zy-steps .step {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--zy-muted);
}
.cart-modern .zy-steps .step .num {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: #fff; border: 1px solid var(--zy-border);
  color: var(--zy-muted); font-size: 13px; font-weight: 700;
}
.cart-modern .zy-steps .step.active { color: var(--zy-primary-dk); }
.cart-modern .zy-steps .step.active .num {
  background: var(--zy-primary-grad); border: none; color: #fff;
  box-shadow: 0 6px 16px rgba(0, 110, 255, .32);
}
.cart-modern .zy-steps .step.done .num { background: #e8f3ff; border-color: #bcd9ff; color: var(--zy-primary); }
.cart-modern .zy-steps .line { flex: 1; max-width: 90px; height: 2px; background: var(--zy-border); margin: 0 16px; }

/* Hero 内步骤条：白色主题 + 绝对定位 */
.cart-modern .zy-steps--hero {
  position: absolute;
  top: 16px;
  right: 24px;
  z-index: 2;
  padding: 0;
  max-width: none;
}
.cart-modern .zy-hero .zy-steps--hero .step { color: rgba(255,255,255,.72); }
.cart-modern .zy-hero .zy-steps--hero .step .num {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35);
  color: #fff;
}
.cart-modern .zy-hero .zy-steps--hero .step.active { color: #fff; }
.cart-modern .zy-hero .zy-steps--hero .step.active .num {
  background: #fff;
  border-color: #fff;
  color: var(--zy-primary-dk);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.cart-modern .zy-hero .zy-steps--hero .line { background: rgba(255,255,255,.28); }
@media (max-width: 767px) {
  .cart-modern .zy-steps--hero { display: none !important; }
}

/* ============================================================
   三栏布局：左菜单 / 中配置 / 右清单
   ============================================================ */
.cart-modern > .row {
  display: flex !important; flex-wrap: wrap; align-items: flex-start;
  margin-left: -12px !important; margin-right: -12px !important;
}
.cart-modern > .row > [class*="col-"] { float: none !important; }

.cart-modern .col-xl-2 { flex: 0 0 calc(20% - 24px) !important; max-width: calc(20% - 24px) !important; padding: 0 12px !important; }
.cart-modern .col-xl-8 { flex: 0 0 calc(53% - 24px) !important; max-width: calc(53% - 24px) !important; padding: 0 12px !important; }
.cart-modern .col-xl-4 { flex: 0 0 calc(27% - 24px) !important; max-width: calc(27% - 24px) !important; padding: 0 12px !important; }

@media (max-width: 1199px) {
  .cart-modern .col-xl-2 { display: none !important; }
  .cart-modern .col-xl-8 { flex: 0 0 calc(73% - 24px) !important; max-width: calc(73% - 24px) !important; }
  .cart-modern .col-xl-4 { flex: 0 0 calc(27% - 24px) !important; max-width: calc(27% - 24px) !important; }
}
@media (max-width: 991px) {
  .cart-modern .col-xl-8, .cart-modern .col-xl-4 { flex: 0 0 calc(100% - 24px) !important; max-width: calc(100% - 24px) !important; }
  .cart-modern .zy-steps { display: none !important; }
}

/* ============================================================
   左侧产品菜单（后台 product_first_groups + product_groups 动态）
   ============================================================ */
.cart-modern .zy-sidenav {
  background: #fff; border: 1px solid rgba(0, 110, 255, .10);
  border-radius: var(--zy-radius); box-shadow: var(--zy-shadow);
  padding: 14px 12px; position: sticky; top: calc(var(--zy-header-h) + 18px);
}
.cart-modern .zy-sidenav .nav-title {
  font-size: 13px; color: var(--zy-text); font-weight: 700;
  padding: 4px 10px 12px;
  display: flex; align-items: baseline; gap: 8px;
}
.cart-modern .zy-sidenav .nav-title::after {
  content: 'PRODUCTS'; font-size: 10px; color: var(--zy-muted);
  letter-spacing: .6px; font-weight: 700;
}
.cart-modern .zy-sidenav-list { list-style: none; margin: 0; padding: 0; }
.cart-modern .zy-sidenav-list li { list-style: none; }

.cart-modern .zy-sidenav-group-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-radius: 10px; border: none; background: transparent;
  color: var(--zy-text); font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: var(--zy-t); text-align: left;
}
.cart-modern .zy-sidenav-group-btn:hover { background: #f4f6fb; }
.cart-modern .zy-sidenav-group-btn .arrow {
  color: var(--zy-muted); transition: var(--zy-t);
  display: grid; place-items: center;
}
.cart-modern .zy-sidenav-group.open .zy-sidenav-group-btn .arrow { transform: rotate(180deg); }

.cart-modern .zy-sidenav-children {
  max-height: 0; overflow: hidden;
  padding: 0 0 0 10px;
  transition: max-height .22s ease, padding .22s ease;
}
.cart-modern .zy-sidenav-group.open .zy-sidenav-children {
  max-height: 600px;
  padding: 4px 0 8px 10px;
}

.cart-modern .zy-sidenav-child {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 8px;
  color: var(--zy-text-2); font-size: 13px; font-weight: 500;
  text-decoration: none; margin-bottom: 2px;
  transition: var(--zy-t); position: relative;
}
.cart-modern .zy-sidenav-child:hover { background: #f4f6fb; color: var(--zy-primary-dk); }
.cart-modern .zy-sidenav-child.active {
  background: linear-gradient(135deg, #eaf2ff, #f6f9ff);
  color: var(--zy-primary-dk); font-weight: 700;
}
.cart-modern .zy-sidenav-child .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--zy-border); flex: 0 0 auto;
  transition: var(--zy-t);
}
.cart-modern .zy-sidenav-child:hover .dot { background: var(--zy-primary); }
.cart-modern .zy-sidenav-child.active .dot { background: var(--zy-primary); }

.cart-modern .zy-sidenav .nav-foot {
  margin-top: 10px; padding: 12px 10px 2px; border-top: 1px solid #f0f2f5;
  font-size: 12px; color: var(--zy-muted); line-height: 1.6;
}

/* ============================================================
   产品 Hero
   ============================================================ */
.cart-modern .zy-hero {
  position: relative; overflow: hidden; z-index: 1;
  background: var(--zy-primary-grad);
  border-radius: var(--zy-radius); padding: 24px 28px;
  color: #fff; margin-bottom: 0;
  box-shadow: 0 8px 24px rgba(0, 82, 217, .22);
  display: flex; gap: 18px; align-items: flex-start;
}
.cart-modern .zy-hero::after { content: ''; position: absolute; right: -50px; top: -50px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.cart-modern .zy-hero::before { content: ''; position: absolute; right: 60px; bottom: -30px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255, 255, 255, .06); }
.cart-modern .zy-hero .zy-hero-ico {
  width: 54px; height: 54px; border-radius: 14px;
  background: rgba(255, 255, 255, .16); display: grid; place-items: center; flex: 0 0 auto;
  position: relative; z-index: 1;
}
.cart-modern .zy-hero .zy-hero-main { position: relative; z-index: 1; min-width: 0; }
.cart-modern .zy-hero .crumb { font-size: 12px; opacity: .82; margin-bottom: 8px; }
.cart-modern .zy-hero .crumb a { color: #fff; opacity: .85; text-decoration: none; }
.cart-modern .zy-hero h1 { font-size: 23px; font-weight: 800; margin: 0 0 8px; color: #fff !important; }
.cart-modern .zy-hero .desc { font-size: 13px; opacity: .92; margin: 0; line-height: 1.6; /* PC 强制单行显示，避免折行或省略号尾巴外漏；移动端在下方媒体查询改为 normal 即可换行 */ white-space: nowrap; overflow: hidden; text-overflow: clip; }
.cart-modern .zy-hero .tags { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.cart-modern .zy-hero .tag { font-size: 12px; font-weight: 700; padding: 4px 11px; border-radius: 20px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); }
.cart-modern .zy-hero .tag.hot { background: #fff; color: var(--zy-danger); border: none; }

/* 结算页紧凑版 hero */
.cart-modern .zy-hero--compact {
  padding: 22px 28px 28px;
  margin-bottom: 20px;
  align-items: center;
  min-height: 120px;
}
.cart-modern .zy-hero--compact::before { right: 40px; bottom: -40px; width: 120px; height: 120px; }
.cart-modern .zy-hero--compact .zy-hero-main { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.cart-modern .zy-hero--compact h1 { margin: 0; font-size: 22px; }
.cart-modern .zy-hero--compact .desc { margin: 0; opacity: .85; }
.cart-modern .zy-hero--compact .zy-steps--hero { top: 14px; right: 22px; }

/* ============================================================
   卡片 Card
   ============================================================ */
.cart-modern .card {
  background: var(--zy-card) !important;
  border: 1px solid rgba(0, 110, 255, .10) !important;
  border-radius: var(--zy-radius) !important;
  box-shadow: var(--zy-shadow) !important;
  margin-bottom: 20px; overflow: visible; position: relative;
}
/* banner 与卡片干净分离，相互无遮挡 */
.cart-modern .zy-hero + .card,
.cart-modern .zy-hero--compact + .card {
  margin-top: 24px; position: relative;
}
.cart-modern .card-body { padding: 28px 30px; }
.cart-modern .card-title { font-size: 20px; font-weight: 700; color: var(--zy-text); margin-bottom: 6px; position: relative; padding-left: 14px; }
.cart-modern .card-title::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 4px; height: 20px; border-radius: 2px; background: var(--zy-primary-grad); }

/* 配置项分组小标题（后台配置项分组 / JS 保底 均输出此结构）。
   与「周期 / 主机密码」行（.zy-has-bar）保持完全一致：宽 132px、字号 13.5、字重 600、深色文字，
   标签前 3x14 深蓝竖线，垂直位置贴近下一行第一根 3x14 竖线。 */
.cart-modern .zy-section {
  font-size: 13.5px; font-weight: 600; color: var(--zy-text);
  margin: 18px 0 0; padding: 0;
  display: flex; align-items: center; gap: 8px;
  width: 132px; min-height: 1px;
}
.cart-modern .zy-section::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--zy-primary-grad); }
.cart-modern .zy-section .hint { font-size: 12px; font-weight: 400; color: var(--zy-muted); }

/* ============================================================
   配置项行：标签左 / 控件右
   ============================================================ */
.cart-modern .form-group.row.configureproduct,
.cart-modern .configureproduct.row {
  display: flex !important; align-items: center; gap: 18px;
  margin: 0 !important; padding: 18px 0;
  border-bottom: 1px solid var(--zy-line); position: relative;
}
.cart-modern .form-group.row.configureproduct:last-of-type { border-bottom: none; padding-bottom: 0; }
.cart-modern .form-group.row.configureproduct > .col-md-2,
.cart-modern .form-group.row.configureproduct > [class*="col-"]:first-child {
  flex: 0 0 132px !important; max-width: 132px; width: 132px !important;
  padding: 10px 0 0 0 !important; margin: 0 !important;
  font-size: 13.5px; font-weight: 600; color: var(--zy-text);
  text-align: left; float: none;
  /* 浅蓝竖线统一移除：仅 .zy-has-bar 行保留深蓝竖线（见下），其它行不再有左侧装饰条 */
}
.cart-modern .form-group.row.configureproduct > .col-md-10,
.cart-modern .form-group.row.configureproduct > .col-md-3,
.cart-modern .form-group.row.configureproduct > [class*="col-"]:nth-child(2) {
  flex: 1 !important; max-width: none; width: auto; padding: 0; margin: 0; float: none;
}

/* ============================================================
   选项组：单选按钮 → 规格芯片（grid + 选中角标）
   ============================================================ */
/* grid 布局：gap > border-radius，确保每个芯片 4 个角都明显成弧，不被相邻元素遮挡 */
.cart-modern .btn-group-toggle,
.cart-modern .btn-group,
.cart-modern .btn-group-vertical {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
  gap: 14px !important; width: 100%; margin: 0 !important;
}
.cart-modern .btn-group-toggle.btn-group-vertical,
.cart-modern .btn-group.btn-group-vertical { grid-template-columns: 1fr !important; }

/* 区域（数据中心）radio 组：宽度自适应文字——短名保默认 120px，长名加宽不折行 */
.cart-modern .btn-group-toggle.zy-region-group {
  display: flex !important;
  flex-wrap: wrap;
  gap: 14px !important;
}
.cart-modern .btn-group-toggle.zy-region-group .btn {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 120px;
  max-width: none;
  white-space: nowrap !important;
  word-break: normal;
}

.cart-modern .btn-group-toggle .btn,
.cart-modern .btn-group .btn,
.cart-modern .btn-group-vertical .btn,
.cart-modern .btn-primary,
.cart-modern .btn-secondary,
.cart-modern .btn-light,
.cart-modern .btn-custom,
.cart-modern .btn-outline-primary {
  display: flex !important; align-items: center; justify-content: flex-start;
  width: 100% !important; height: auto !important; min-height: 44px !important;
  padding: 9px 13px !important; margin: 0 !important;
  font-size: 13px !important; font-weight: 500 !important; line-height: 1.3 !important;
  color: var(--zy-text); background: var(--zy-card);
  border: 1px solid var(--zy-border);
  /* 强制四角圆弧：用 !important 防止被 bootstrap .btn-sm (3.2px) 或 site 主题覆盖 */
  border-radius: var(--zy-radius-sm) !important;
  box-shadow: none; cursor: pointer; text-align: left;
  white-space: normal; word-break: break-word;
  position: relative; overflow: visible; transition: var(--zy-t);
}
.cart-modern .btn-group .btn { margin-left: 0 !important; margin-right: 0 !important; }
.cart-modern .btn-group-toggle .btn:hover,
.cart-modern .btn-group .btn:hover,
.cart-modern .btn-custom:hover,
.cart-modern .btn-light:hover,
.cart-modern .btn-outline-primary:hover,
.cart-modern .btn-secondary:hover {
  border-color: var(--zy-primary); background: var(--zy-primary-soft);
  box-shadow: 0 4px 14px rgba(0, 110, 255, .12); transform: translateY(-1px);
  color: var(--zy-primary-dk);
}
/* 选中态 */
.cart-modern .btn-group-toggle .btn.active,
.cart-modern .btn-group .btn.active,
.cart-modern .btn-custom.active,
.cart-modern .btn-primary.active,
.cart-modern .btn-primary:active,
.cart-modern .btn-group-toggle label:has(input:checked),
.cart-modern .btn-group-toggle input[type="radio"]:checked + label,
.cart-modern .btn-group-toggle input[type="checkbox"]:checked + label {
  border-color: var(--zy-primary);
  background: linear-gradient(135deg, #eaf2ff, #f6f9ff);
  color: var(--zy-primary-dk); font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 110, 255, .16);
}
.cart-modern .btn-group-toggle .btn.active::after,
.cart-modern .btn-group-toggle label:has(input:checked)::after,
.cart-modern .btn-custom.active::after {
  content: ''; position: absolute; top: 0; right: 0;
  width: 0; height: 0; border-style: solid;
  border-width: 0 22px 22px 0;
  border-color: transparent var(--zy-primary) transparent transparent;
  border-top-right-radius: var(--zy-radius-sm);
}
.cart-modern .btn-group-toggle .btn.active::before,
.cart-modern .btn-group-toggle label:has(input:checked)::before,
.cart-modern .btn-custom.active::before {
  content: ''; position: absolute; z-index: 3;
  top: 3px; right: 4px; width: 6px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.cart-modern .btn-group-toggle input[type="radio"],
.cart-modern .btn-group-toggle input[type="checkbox"] { position: absolute; clip: rect(0, 0, 0, 0); pointer-events: none; }
.cart-modern .btn-group-toggle .btn.disabled,
.cart-modern .btn-group-toggle .btn:disabled { opacity: .5; cursor: not-allowed; background: #f7f8fa; border-color: #e8eaed; color: #9aa1ab; }
.cart-modern .btn-group-toggle .btn .badge,
.cart-modern .btn-group-toggle .btn .tag { margin-left: 6px; padding: 2px 7px; font-size: 11px; font-weight: 700; border-radius: 5px; background: var(--zy-danger); color: #fff; align-self: center; }

/* ============================================================
   复选框（option_type==3）
   ============================================================ */
.cart-modern .custom-control.custom-checkbox { padding-left: 30px; min-height: 24px; margin-bottom: 12px; }
.cart-modern .custom-control.custom-checkbox .custom-control-input { width: 18px; height: 18px; }
.cart-modern .custom-control-label::before { width: 18px !important; height: 18px; border-radius: 5px; border: 1px solid #c7cedb; background: #fff !important; top: 1px; left: -30px; }
.cart-modern .custom-control-input:checked ~ .custom-control-label::before { background: var(--zy-primary) !important; border-color: var(--zy-primary); }
.cart-modern .custom-control-input:checked ~ .custom-control-label::after { background-image: none; content: ''; width: 5px !important; height: 9px !important; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); top: 4px; left: -25px; }
.cart-modern .custom-control-label { font-size: 14px; color: var(--zy-text); cursor: pointer; }

/* ============================================================
   滑条（数量 / 带宽等，option_type 4/7/9/...）
   ============================================================ */
.cart-modern .configoption_range { -webkit-appearance: none; appearance: none; width: 100% !important; height: 6px; border-radius: 6px; background: var(--zy-border) !important; outline: none; margin: 0; }
.cart-modern .configoption_range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--zy-primary); box-shadow: 0 2px 6px rgba(0, 110, 255, .3); cursor: pointer; }
.cart-modern .configoption_range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 4px solid var(--zy-primary); cursor: pointer; }
.cart-modern .configoption_range_val.form-control { width: 86px !important; min-width: 86px; text-align: center; font-weight: 600; margin: 0 10px !important; }
.cart-modern .range_none { background: var(--zy-border); height: 6px; border-radius: 6px; }

/* ============================================================
   计费周期：药丸 + 折扣角标
   ============================================================ */
.cart-modern .cycle.btn-custom-group,
.cart-modern .btn-group.cycle { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)) !important; gap: 10px; margin: 0 !important; }
.cart-modern .cycle.btn-custom-group .btn-custom,
.cart-modern .btn-group.cycle .btn {
  position: relative; min-height: 42px; padding: 9px 16px;
  font-size: 14px; font-weight: 500; color: var(--zy-text-2);
  background: #fff; border: 1px solid var(--zy-border); border-radius: 999px;
  box-shadow: none; transition: var(--zy-t); display: flex; align-items: center; justify-content: center;
}
.cart-modern .cycle.btn-custom-group .btn-custom:hover,
.cart-modern .btn-group.cycle .btn:hover { border-color: var(--zy-primary); color: var(--zy-primary); }
.cart-modern .cycle.btn-custom-group .btn-custom.active,
.cart-modern .btn-group.cycle .btn.active { background: var(--zy-primary-grad); border-color: transparent; color: #fff; font-weight: 600; }
.cart-modern .cycle-select-discount {
  position: absolute; top: -10px; right: 8px; height: 16px; padding: 0 6px;
  background: var(--zy-danger); color: #fff; font-size: 11px; line-height: 16px;
  border-radius: 6px 6px 6px 0; z-index: 3;
}

/* ============================================================
   普通输入框（主机密码 / 主机名 / 自定义字段）
   ============================================================ */
.cart-modern input.form-control,
.cart-modern textarea.form-control {
  width: 100% !important; min-height: 44px !important; height: 44px !important;
  padding: 0 13px !important; font-size: 13px !important; font-weight: 500; line-height: 42px;
  color: var(--zy-text); background: #fff;
  border: 1px solid var(--zy-border); border-radius: var(--zy-radius-sm);
  box-shadow: none; transition: var(--zy-t); font-family: inherit;
}
.cart-modern textarea.form-control { height: auto; line-height: 1.5; padding: 10px 13px; }
.cart-modern input.form-control:hover { border-color: var(--zy-primary); }
.cart-modern input.form-control:focus,
.cart-modern textarea.form-control:focus { border-color: var(--zy-primary); box-shadow: 0 0 0 3px rgba(0, 110, 255, .10); outline: none; }
.cart-modern label, .cart-modern .col-form-label { font-size: 13.5px; color: var(--zy-text-2); font-weight: 600; }
.cart-modern .bxs-help-circle { color: var(--zy-muted) !important; font-size: 15px; }

/* ============================================================
   Bootstrap-Select 下拉框（操作系统 / 区域 / 普通下拉）
   注：bootstrap-select 可能把 .dropdown-menu 挂到 <body>，故补全局兜底
   ============================================================ */
.cart-modern .bootstrap-select { width: auto !important; max-width: 100%; }
.cart-modern .bootstrap-select > .dropdown-toggle,
.bootstrap-select > .dropdown-toggle {
  width: 100% !important; min-height: 44px !important;
  padding: 10px 34px 10px 13px !important; font-size: 13px !important; font-weight: 500;
  color: var(--zy-text); background: #fff;
  border: 1px solid var(--zy-border); border-radius: var(--zy-radius-sm);
  box-shadow: none; outline: none; transition: var(--zy-t);
}
.cart-modern .bootstrap-select > .dropdown-toggle:hover,
.cart-modern .bootstrap-select > .dropdown-toggle:focus,
.cart-modern .bootstrap-select.show > .dropdown-toggle { border-color: var(--zy-primary); box-shadow: 0 0 0 3px rgba(0, 110, 255, .10); }
.cart-modern .bootstrap-select .dropdown-menu,
.bootstrap-select .dropdown-menu { border: 1px solid var(--zy-border); border-radius: var(--zy-radius-sm); box-shadow: var(--zy-shadow); padding: 6px; margin-top: 4px; min-width: 100%; }
.cart-modern .bootstrap-select .dropdown-menu li a,
.bootstrap-select .dropdown-menu li a { padding: 10px 13px; font-size: 13px; color: var(--zy-text); border-radius: 7px; }
.cart-modern .bootstrap-select .dropdown-menu li a:hover,
.bootstrap-select .dropdown-menu li a:hover { background: var(--zy-primary-soft); color: var(--zy-primary-dk); }
.cart-modern .bootstrap-select .dropdown-menu li.selected a,
.bootstrap-select .dropdown-menu li.active a,
.bootstrap-select .dropdown-menu li.selected a,
.bootstrap-select .dropdown-menu li.active a { background: var(--zy-primary); color: #fff; }

/* ============================================================
   右侧订单摘要（粘性）
   ============================================================ */
.cart-modern .col-xl-4 > .card,
.cart-modern .col-md-4 > .card,
.cart-modern .configoption_total .card {
  position: sticky; top: calc(var(--zy-header-h) + 18px);
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  border: 1px solid rgba(0, 110, 255, .14); border-radius: var(--zy-radius);
  box-shadow: var(--zy-shadow);
}
.cart-modern .zy-summary .card-body,
.cart-modern .configoption_total .card-body { padding: 24px; }
.cart-modern .zy-summary .sum-head,
.cart-modern .configoption_total .sum-head {
  font-size: 12px; font-weight: 700; letter-spacing: .5px; color: var(--zy-muted);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.cart-modern .zy-summary .sum-head::before,
.cart-modern .configoption_total .sum-head::before { content: ''; width: 3px; height: 14px; border-radius: 2px; background: var(--zy-primary-grad); }

.cart-modern .zy-summary .zy-list .item,
.cart-modern .configoption_total .zy-list .item { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 9px 0; border-bottom: 1px dashed #eef1f6; color: var(--zy-text); }
.cart-modern .zy-summary .zy-list .item .k,
.cart-modern .configoption_total .zy-list .item .k { color: var(--zy-muted); flex: 0 0 auto; }
.cart-modern .zy-summary .zy-list .item .v,
.cart-modern .configoption_total .zy-list .item .v { text-align: right; font-weight: 600; }

.cart-modern .zy-summary .zy-price,
.cart-modern .configoption_total .zy-price {
  background: linear-gradient(135deg, #fff5f5, #fff); border: 1px solid #ffd9d6;
  border-radius: 12px; padding: 16px; margin: 16px 0 14px; text-align: center;
}
.cart-modern .zy-summary .zy-price .lab,
.cart-modern .configoption_total .zy-price .lab { font-size: 12px; color: var(--zy-muted); margin-bottom: 4px; }
.cart-modern .zy-summary .zy-price .val,
.cart-modern .configoption_total .zy-price .val { font-size: 30px; font-weight: 800; color: var(--zy-danger); line-height: 1.1; }
.cart-modern .zy-summary .zy-price .val small,
.cart-modern .configoption_total .zy-price .val small { font-size: 14px; font-weight: 600; }

.cart-modern .zy-summary .zy-promises { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cart-modern .zy-summary .zy-promises span { font-size: 11px; color: var(--zy-muted); background: #f4f6fb; border: 1px solid var(--zy-border); border-radius: 6px; padding: 5px 9px; }

/* 摘要原有的表格/价格行（JS 渲染） */
.cart-modern .configoption_total { font-size: 14px; }
.cart-modern table.ordersummary { width: 100%; margin: 0; }
.cart-modern table.ordersummary td { border: none !important; padding: 9px 4px; font-size: 13.5px; vertical-align: top; line-height: 1.5; }
.cart-modern table.ordersummary td.color-999, .cart-modern .configoption_total .color-999 { color: var(--zy-muted) !important; }
.cart-modern table.ordersummary td.text-right { text-align: right; color: var(--zy-text); white-space: nowrap; }
.cart-modern table.ordersummary tr:last-child td:last-child { font-size: 22px; font-weight: 700; color: var(--zy-danger) !important; }
.cart-modern .configoption_total .font-weight-bold { font-size: 15px; }
.cart-modern .configoption_total .text-dark { color: var(--zy-text) !important; }

/* 加入购物车 / 立即购买 CTA */
.cart-modern #addToCartBtn,
.cart-modern #addToCartBtnTwo,
.cart-modern .configoption_form .btn-primary,
.cart-modern #addCartForm .btn-primary,
.cart-modern .btn-primary[type="submit"],
.cart-modern .btn-block,
.cart-modern .btn-lg {
  display: block !important; width: 100% !important; padding: 14px 24px !important; margin-top: 18px;
  font-size: 16px !important; font-weight: 700 !important; letter-spacing: .5px; color: #fff;
  background: var(--zy-primary-grad); border: none; border-radius: var(--zy-radius-sm);
  box-shadow: 0 10px 26px rgba(0, 110, 255, .32); transition: var(--zy-t); cursor: pointer;
}
.cart-modern #addToCartBtn:hover,
.cart-modern #addToCartBtnTwo:hover,
.cart-modern .btn-primary[type="submit"]:hover,
.cart-modern .configoption_form .btn-primary:hover { background: linear-gradient(135deg, #338aff, #006eff); box-shadow: 0 14px 32px rgba(0, 110, 255, .42); transform: translateY(-2px); }

/* ============================================================
   结算页（viewcart）
   ============================================================ */
.cart-modern .invoice-title h4 { font-size: 17px; font-weight: 600; }
.cart-modern .col-md-8 .card .card-body address { padding: 14px 0; border-bottom: 1px solid #f0f2f5; }
.cart-modern .col-md-8 .card .card-body address:last-child { border-bottom: none; }
.cart-modern .goods_info .title { color: var(--zy-primary) !important; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; padding: 2px 0; }
.cart-modern .goods_info .title font { float: none; color: var(--zy-muted); font-size: 12px; }
.cart-modern .goods_info .info { color: var(--zy-text-2); line-height: 1.7; padding: 6px 0 0; font-size: 13.5px; }
.cart-modern .goods_info .info font { color: var(--zy-text); font-weight: 500; }
.cart-modern .cart_qty .number, .cart-modern .cart_qty input[type="number"] { width: 64px; }
.cart-modern .cart_qty .btn { background: #eef1f5; border: none; height: 36px; padding: 0 12px; border-radius: 8px; }

.cart-modern .font-size-16 { font-size: 14px !important; }
.cart-modern .font-size-18 { font-size: 17px; color: var(--zy-primary); font-weight: 700; }

/* 支付方式卡片 */
.cart-modern .addfunds .addfunds-payment { display: flex; align-items: center; justify-content: center; height: 56px; padding: 0 10px; background: #fff; border: 1px solid var(--zy-border); border-radius: 10px; cursor: pointer; transition: var(--zy-t); margin-bottom: 12px; }
.cart-modern .addfunds .addfunds-payment:hover { border-color: var(--zy-primary); }
.cart-modern .addfunds .addfunds-payment.active { border-color: var(--zy-primary); background: var(--zy-primary-soft); box-shadow: 0 0 0 1px var(--zy-primary) inset; }
.cart-modern .addfunds .addfunds-payment img { max-height: 26px; }

.cart-modern .checkboxDiv { width: auto; flex: 1; height: auto; padding: 12px 14px; margin-right: 12px; border: 1px solid var(--zy-border); border-radius: 10px; background: #fff; transition: var(--zy-t); }
.cart-modern .checkboxDiv:hover { border-color: var(--zy-primary); }
.cart-modern .checkboxSelect { border-color: var(--zy-primary); background: var(--zy-primary-soft); }

.cart-modern .input-group { display: flex; }
.cart-modern .input-group .form-control { flex: 1; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cart-modern .input-group-append .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; height: 44px; white-space: nowrap; }
.cart-modern .remarksInput { max-width: 480px; }

.cart-modern .submit-btn { width: 100%; height: 48px; font-size: 15px; font-weight: 600; border-radius: 9px; background: var(--zy-primary-grad); border: none; box-shadow: 0 6px 16px rgba(0, 110, 255, .28); }
.cart-modern .submit-btn:disabled { opacity: .5; }
.cart-modern .payDiv .custom-control { margin-bottom: 12px; }
.cart-modern .payDiv a { color: var(--zy-primary); }

.cart-modern .col-md-4 > .card { position: relative; }
.cart-modern .col-md-4 .card-body { padding: 24px 26px; }
.cart-modern .col-md-4 .invoice-title h4 { font-size: 16px; font-weight: 600; }
.cart-modern .col-md-4 .font-size-18 { font-size: 18px; }

/* 移动端底部价格条 */
.cart-modern .mobile-bottom-total { display: none; position: fixed; left: 0; bottom: 0; width: 100%; background: #fff; box-shadow: 0 -4px 16px rgba(16, 24, 40, .1); z-index: 99999; padding: 10px 16px; }
.cart-modern .mobile-bottom-total .total { font-size: 15px; color: var(--zy-text-2); }
.cart-modern .mobile-bottom-total .font-size-18 { font-size: 18px; }
.cart-modern .mobile-bottom-total .btn { width: auto; min-width: 120px; height: 42px; margin-left: 12px; }

/* ============================================================
   提示 / 帮助
   ============================================================ */
.cart-modern .alert { border-radius: 10px; font-size: 14px; }
.cart-modern .alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.cart-modern .alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; }
.cart-modern .error-tip { color: var(--zy-danger) !important; font-size: 12.5px; line-height: 1.6; }
.cart-modern hr[style*="13px"] { border: none; height: 0; }

.was-validated .custom-control-input:valid ~ .custom-control-label::before { background-color: #fff; }
.bootstrap-select.is-valid .dropdown-toggle,
.was-validated .bootstrap-select select:valid + .dropdown-toggle { border-color: #ced4da !important; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 991px) {
  .cart-modern .card-body { padding: 22px 20px; }
  .cart-modern .form-group.row.configureproduct { flex-direction: column !important; gap: 4px; }
  .cart-modern .form-group.row.configureproduct > .col-md-2,
  .cart-modern .form-group.row.configureproduct > [class*="col-"]:first-child { flex: 0 0 auto; width: 100%; max-width: none; border-left: none; padding-left: 0; padding-top: 0; }
  .cart-modern .form-group.row.configureproduct > .col-md-10,
  .cart-modern .form-group.row.configureproduct > .col-md-3,
  .cart-modern .form-group.row.configureproduct > [class*="col-"]:nth-child(2) { flex: 0 0 auto; width: 100%; max-width: none; }
  /* 干掉 Bootstrap 工具类 mt-2（margin-top:8px !important），避免名称↔选项框间隙过大（大屏手机/平板） */
  .cart-modern .form-group.row.configureproduct .btn-group-toggle.mt-2,
  .cart-modern .form-group.row.configureproduct .btn-group.mt-2,
  .cart-modern .form-group.row.configureproduct .zy-region-group.mt-2 { margin-top: 0 !important; }
}
@media (max-width: 767px) {
  /* ---------- 1. hero 贴合顶部 header 与下方配置卡片 ---------- */
  .cart-modern { --zy-header-h: 50px; box-sizing: border-box !important; width: 100% !important; max-width: 100% !important; padding: 0 8px calc(72px + env(safe-area-inset-bottom)); }
  .cart-modern .zy-hero { padding: 18px 16px; border-radius: 14px !important; }
  .cart-modern .zy-hero + .card,
  .cart-modern .zy-hero--compact + .card { margin-top: 8px; }

  /* ---------- 2/3/4. 标题与选项框贴合、全部左对齐、行间距统一 4px ---------- */
  /* 所有标题（蓝色竖线大标题 / 卡片标题 / 配置项小标题）移动端一律左对齐 */
  .cart-modern .card h1, .cart-modern .card h2, .cart-modern .card h3,
  .cart-modern .card h4, .cart-modern .card h5, .cart-modern .card h6,
  .cart-modern .card .sum-head, .cart-modern .card .card-title,
  .cart-modern .card .block-title,
  .cart-modern .configoption_total .sum-head { text-align: left !important; }

  /* 配置行：标题与控件均左对齐、纵向堆叠。
     上下 padding 5px 保证板块最上元素（label）上方、最下元素（控件）下方各有 5px 留白，
     不紧贴行分隔线；gap 4px 控制 label↔控件 内部间距。
     基础配置 / 区域 / 操作系统 / 网络带宽 / 存储磁盘 / 安全运维 全部一致（以基础配置为范本） */
  .cart-modern .form-group.row.configureproduct { align-items: flex-start !important; gap: 4px !important; padding: 5px 0 !important; margin: 0 !important; }
  /* 基础块 .col-md-2 有 flex: 0 0 132px !important (让 label 列固定 132px)。
     移动端必须用 !important 覆盖，否则在 column 中 132px 变成主轴高度 = 132px，
     控件仅 44px，导致 label→控件 132- 44px- = 大空白。
     控件列同理覆盖基础 flex: 1 !important / width: auto !important。 */
  .cart-modern .form-group.row.configureproduct > .col-md-2,
  .cart-modern .form-group.row.configureproduct > [class*="col-"]:first-child {
    flex: 0 0 auto !important; width: 100% !important; max-width: none !important;
    text-align: left !important; padding: 0 !important; margin: 0 !important;
  }
  .cart-modern .form-group.row.configureproduct > .col-md-10,
  .cart-modern .form-group.row.configureproduct > .col-md-3,
  .cart-modern .form-group.row.configureproduct > [class*="col-"]:nth-child(2) {
    flex: 0 0 auto !important; width: 100% !important; max-width: none !important;
    text-align: left !important; align-items: flex-start !important; padding: 0 !important; margin: 0 !important;
  }
  /* 选项控件：取消强制 flex（改由 JS 按选项数设 grid 2/3 列），仅清掉上间距、左对齐 */
  .cart-modern .form-group.row.configureproduct .btn-group-toggle,
  .cart-modern .form-group.row.configureproduct .btn-group,
  .cart-modern .form-group.row.configureproduct .zy-region-group {
    margin-top: 0 !important; text-align: left !important;
  }
  /* 彻底干掉 Bootstrap 工具类 mt-2（margin-top:8px !important），防止名称↔选项框间隙过大 */
  .cart-modern .form-group.row.configureproduct .btn-group-toggle.mt-2,
  .cart-modern .form-group.row.configureproduct .btn-group.mt-2,
  .cart-modern .form-group.row.configureproduct .zy-region-group.mt-2 { margin-top: 0 !important; }
  /* 清掉选项 chip 上的 mr-2 等水平外边距，保证 grid 2/3 列整齐贴合 */
  .cart-modern .form-group.row.configureproduct .btn-group-toggle > .btn,
  .cart-modern .form-group.row.configureproduct .zy-region-group > .btn { margin: 0 !important; }
  /* 配置行内的控件列：不换行（避免拖动条被挤到第二行）；垂直居中 */
  .cart-modern .form-group.row.configureproduct .col-md-10.d-flex {
    justify-content: flex-start !important; align-items: center !important; flex-wrap: nowrap !important;
  }
  /* 拖动式选项条（range + 输入框）必须同行：range 自适应占满剩余、输入框固定 70px。
     覆盖 range 的 inline width:100% 与 desktop 的 width:100%!important，以及输入框的 width:20% */
  .cart-modern .configoption_range { width: auto !important; flex: 1 1 auto !important; min-width: 0 !important; margin: 0 !important; }
  .cart-modern .configoption_range_val.form-control,
  .cart-modern .configoption_range_val {
    flex: 0 0 auto !important; width: 70px !important; min-width: 70px !important; margin: 0 0 0 10px !important;
  }
  /* 区域按钮在手机端允许收缩与换行，避免 2/3 列时长名（如"香港BGP直连优化"）溢出 */
  .cart-modern .btn-group-toggle.zy-region-group .btn { min-width: 0 !important; white-space: normal !important; }
  /* 操作系统（option_type=5）：两个下拉（系统族 + 版本）在同一行并排、均左对齐。
     用 max-width:48% 保证即使在小屏/长文字下也不会换行，且文字过长时 ellipsis。 */
  .cart-modern .os-picker { flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; gap: 10px !important; width: 100% !important; margin-top: 0 !important; }
  .cart-modern .os-picker .zy-os-wrap,
  .cart-modern .os-picker select.zy-native-select.os-group:not(.zy-os-hidden-select),
  .cart-modern .os-picker select.zy-native-select.os-version:not(.zy-os-hidden-select) { flex: 0 1 auto !important; max-width: 48% !important; min-width: 0 !important; width: auto !important; }
  /* 去掉标题默认下边距，避免“配置名称 ↔ 配置选项”之间空隙过大 */
  .cart-modern .form-group.row.configureproduct label,
  .cart-modern .form-group.row.configureproduct .col-form-label,
  .cart-modern .form-group.row.configureproduct .control-label {
    margin-bottom: 0 !important; text-align: left !important;
  }

  /* 周期 / 主机密码（.zy-has-bar）蓝色竖线：手机端竖线移到 label 左外 6px（紧贴名称前），
     名称与其它配置名称左对齐齐平（覆盖基础 padding-left:12px）。 */
  .cart-modern .form-group.row.configureproduct.zy-has-bar > .col-md-2,
  .cart-modern .form-group.row.configureproduct.zy-has-bar > [class*="col-"]:first-child {
    padding-left: 0 !important;
  }
  .cart-modern .form-group.row.configureproduct.zy-has-bar > .col-md-2::before,
  .cart-modern .form-group.row.configureproduct.zy-has-bar > [class*="col-"]:first-child::before {
    left: -6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 3px !important;
    height: 14px !important;
  }

  /* 拖动式选项条：单位 <span>{$option.unit}</span> 在手机端绝对定位到输入框内右侧，PC 端保持原样。
     .col-md-10.d-flex 容器有 position:relative（模板 inline style），故 right 相对容器。 */
  .cart-modern .configoption_range_val { padding-right: 30px !important; }
  .cart-modern .configoption_range_val + span {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 12px !important;
    color: #8a94a6 !important;
    pointer-events: none !important;
    z-index: 3 !important;
    line-height: 1 !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ---------- 3. 底部价格条 / 加购按钮：跨浏览器统一吸底（sticky 方案） ---------- */
  /* 夸克等浏览器把页面包进带 transform 的容器，position:fixed 的包含块会变成该容器而非视口，
     导致底栏掉回卡片。position:sticky 不受 transform 祖先影响，故底栏挂到 body 末尾 + sticky;bottom:0，
     在微信 / 夸克 / Safari 中均稳定吸底。 */
  .mobile-bottom-total {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: sticky !important;
    bottom: 0;
    width: 100%;
    height: auto !important;
    min-height: 54px;
    line-height: normal !important;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
    background: #fff;
    box-shadow: 0 -4px 16px rgba(16, 24, 40, .1);
    z-index: 99999;
  }
  .mobile-bottom-total .total {
    flex: 1 1 auto; font-size: 15px !important; color: var(--zy-text-2) !important;
    text-align: left !important; margin-right: 12px !important;
  }
  .mobile-bottom-total .total b,
  .mobile-bottom-total .total strong,
  .mobile-bottom-total .total .font-size-18 { font-size: 20px; color: var(--zy-danger); }
  .mobile-bottom-total .btn,
  .mobile-bottom-total #addToCartBtnTwo {
    display: inline-flex !important; align-items: center !important; justify-content: center !important;
    width: auto !important; min-width: 120px !important; flex: 0 0 auto !important;
    margin-top: 0 !important; height: 42px !important; padding: 0 18px !important;
    font-size: 15px !important; border-radius: var(--zy-radius-sm) !important;
  }

  /* ---------- 4. 页面铺满 + 卡片两侧留白（不再贴边） ---------- */
  .cart-modern { margin-left: 0; margin-right: 0; overflow-x: hidden; }
  .cart-modern > .row { margin-left: 0 !important; margin-right: 0 !important; }
  .cart-modern .col-xl-8,
  .cart-modern .col-xl-4 { flex: 0 0 100% !important; max-width: 100% !important; padding: 0 !important; }
  .cart-modern .card { border-radius: 14px !important; }
  .cart-modern .col-xl-4 > .card { margin-top: 12px; }
  .cart-modern .card-body { padding: 16px 14px; }
  .cart-modern .btn-group-toggle .btn { font-size: 13px; }
  .cart-modern .zy-hero .desc { white-space: normal; }
}

/* ============================================================
   操作系统下拉（bootstrap-select）：芯片化 + 每系统图标
   ============================================================ */
.cart-modern .bootstrap-select { width: 100% !important; }
.cart-modern .bootstrap-select > .dropdown-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  min-height: 44px !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--zy-text) !important;
  background: #fff !important;
  border: 1px solid var(--zy-border) !important;
  border-radius: var(--zy-radius-sm) !important;
  box-shadow: none !important;
  transition: var(--zy-t) !important;
}
.cart-modern .bootstrap-select > .dropdown-toggle:hover,
.cart-modern .bootstrap-select.show > .dropdown-toggle,
.cart-modern .bootstrap-select > .dropdown-toggle:focus {
  border-color: var(--zy-primary) !important;
  box-shadow: 0 0 0 3px rgba(0,110,255,.10) !important;
  outline: none !important;
}
.cart-modern .bootstrap-select .dropdown-toggle .bx,
.cart-modern .bootstrap-select .dropdown-menu .bx {
  font-size: 16px !important;
  line-height: 1 !important;
  color: var(--zy-primary) !important;
}
.cart-modern .bootstrap-select .dropdown-toggle .filter-option { font-weight: 500; }
/* 下拉菜单品牌化（菜单可能被挂到 body，故补全局兜底；本 CSS 仅购物车页加载） */
.bootstrap-select .dropdown-menu {
  padding: 6px !important;
  border: 1px solid var(--zy-border) !important;
  border-radius: var(--zy-radius-sm) !important;
  box-shadow: var(--zy-shadow) !important;
}
.bootstrap-select .dropdown-menu li a {
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
}
.bootstrap-select .dropdown-menu li a:hover { background: var(--zy-primary-soft) !important; color: var(--zy-primary-dk) !important; }
.bootstrap-select .dropdown-menu li.selected a { background: var(--zy-primary-soft) !important; color: var(--zy-primary-dk) !important; font-weight: 600; }

/* ============================================================
   区域（数据中心）下拉：默认长度(≈25%)保底，所选文字过长时按真实宽度加长
   说明：宽度由 JS 以 inline !important 直接写在 .bootstrap-select wrapper 上
   （inline !important 优先级高于第598行的样式表 !important），此处只兜底 min/max
   与下拉菜单最小宽度。区域 select 带 col-md-3（max-width:25%）即“默认长度”。
   ============================================================ */
.cart-modern .bootstrap-select.zy-region-select {
  min-width: 160px !important;
  max-width: 100% !important;
}
.cart-modern .bootstrap-select.zy-region-select .dropdown-menu {
  min-width: var(--zy-region-menu, 160px) !important;
}

/* ============================================================
   操作系统下拉（原生 select 自包含版）
   替代 bootstrap-select，避免 select.selectpicker{display:none}
   在 JS 未成功初始化时导致「没有下拉」。
   ============================================================ */
.cart-modern .os-picker {
  display: flex !important; align-items: center; gap: 12px;
  width: 100% !important;
}
.cart-modern .os-picker .os-group {
  flex: 0 0 180px !important; max-width: 180px; min-width: 0;
}
.cart-modern .os-picker .os-version {
  flex: 1 !important; min-width: 0;
}
.cart-modern select.zy-native-select {
  width: 100% !important; height: 44px !important; min-height: 44px !important;
  padding: 0 36px 0 13px !important;
  font-size: 13px !important; font-weight: 500; line-height: 42px;
  color: var(--zy-text); background-color: #fff;
  border: 1px solid var(--zy-border); border-radius: var(--zy-radius-sm);
  box-shadow: none; transition: var(--zy-t); cursor: pointer;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.cart-modern select.zy-native-select:hover { border-color: var(--zy-primary); }
.cart-modern select.zy-native-select:focus {
  border-color: var(--zy-primary); box-shadow: 0 0 0 3px rgba(0,110,255,.10); outline: none;
}

/* ============================================================
   操作系统图标（放入选项栏 select 框内左侧，不在标题）
   图标来源：官方 v10 主题本地资源 /themes/cart/default/v10/assets/{os}.svg
   ============================================================ */
.cart-modern .os-row > label { display: flex; align-items: center; }
/* select 框内左侧留给图标：加左内边距，图标由 JS 以 background 绘制（左图标 + 右箭头） */
.cart-modern select.zy-native-select.zy-os-ico-sel { padding-left: 42px !important; }

/* ============================================================
   操作系统自定义下拉组件（原生 <select> 隐藏在底下，
   渲染自定义 trigger + menu 以支持选项内嵌图标）
   ============================================================ */
.cart-modern select.zy-os-hidden-select {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  opacity: 0 !important; pointer-events: none !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important;
  overflow: hidden !important;
}
.cart-modern .zy-os-wrap {
  position: relative;
  display: inline-flex;
  vertical-align: top;
  flex: 0 0 auto;
  width: 180px;
  max-width: 70%;
}
.cart-modern .os-picker .zy-os-wrap { display: inline-flex; }
.cart-modern .zy-os-wrap:not(.zy-os-version-wrap).zy-os-when-empty { display: none; }

/* Mod 2：版本下拉（无图标）：左内边距收一点，避免宽度浪费；同样的字体、按钮高度 44px 保持一致 */
.cart-modern .zy-os-wrap.zy-os-version-wrap .zy-os-trigger {
  padding-left: 14px !important;
}
.cart-modern .zy-os-wrap.zy-os-version-wrap .zy-os-trigger .zy-os-text {
  font-weight: 500;
}

.cart-modern .zy-os-trigger {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 44px;
  padding: 0 36px 0 12px;
  background: #fff;
  border: 1px solid var(--zy-border);
  border-radius: var(--zy-radius-sm);
  cursor: pointer; font-size: 13px; font-weight: 500;
  color: var(--zy-text);
  position: relative;
  text-align: left;
  transition: var(--zy-t);
}
.cart-modern .zy-os-trigger:hover { border-color: var(--zy-primary); }
.cart-modern .zy-os-wrap.open .zy-os-trigger {
  border-color: var(--zy-primary);
  box-shadow: 0 0 0 3px rgba(0,110,255,.10);
}
.cart-modern .zy-os-trigger .zy-os-ico {
  width: 24px; height: 24px; flex: 0 0 auto;
  border-radius: 6px; background: #f4f6fb;
  padding: 3px;
  object-fit: contain;
}
.cart-modern .zy-os-trigger .zy-os-text {
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cart-modern .zy-os-trigger .zy-os-arrow {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-size: 16px;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  transition: transform .18s ease;
}
.cart-modern .zy-os-wrap.open .zy-os-trigger .zy-os-arrow { transform: translateY(-50%) rotate(180deg); }

.cart-modern .zy-os-menu {
  display: none;
  position: absolute; left: 0; right: auto;
  top: calc(100% + 6px);
  min-width: 100%; max-width: 320px;
  background: #fff;
  border: 1px solid var(--zy-border);
  border-radius: var(--zy-radius-sm);
  box-shadow: 0 12px 32px rgba(16,24,40,.12);
  padding: 6px;
  margin: 0; list-style: none;
  max-height: 280px; overflow-y: auto;
  z-index: 250;
  animation: zyOsMenuIn .18s ease both;
}
.cart-modern .zy-os-wrap.open .zy-os-menu { display: block; }
@keyframes zyOsMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cart-modern .zy-os-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  border-radius: var(--zy-radius-sm);
  font-size: 13.5px;
  color: var(--zy-text);
  list-style: none;
  transition: var(--zy-t);
}
.cart-modern .zy-os-option:hover {
  background: rgba(0,110,255,.08);
  color: var(--zy-primary);
}
.cart-modern .zy-os-option.selected {
  background: var(--zy-primary-grad);
  color: #fff;
  font-weight: 600;
}
.cart-modern .zy-os-option img {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: #f4f6fb;
  padding: 3px;
  object-fit: contain;
  flex: 0 0 auto;
}
.cart-modern .zy-os-option.selected img { background: rgba(255,255,255,.22); }

/* 蓝色丨：周期 / 主机密码 行与配置项对齐，并在标签前加蓝色竖条（与安全与运维一致） */
.cart-modern .form-group.row.configureproduct.zy-has-bar > .col-md-2,
.cart-modern .form-group.row.configureproduct.zy-has-bar > [class*="col-"]:first-child {
  position: relative !important;
  padding-left: 12px !important;
}
.cart-modern .form-group.row.configureproduct.zy-has-bar > .col-md-2::before,
.cart-modern .form-group.row.configureproduct.zy-has-bar > [class*="col-"]:first-child::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 14px;
  border-radius: 2px;
  background: var(--zy-primary-grad);
}
@media (max-width: 767px) {
  .cart-modern .form-group.row.configureproduct.zy-has-bar > .col-md-2::before { width: 3px; height: 12px; }
}

/* 防御性：统一所有选项控件四角圆弧（防止个别控件出现直角） */
.cart-modern .configureproduct select,
.cart-modern .configureproduct input,
.cart-modern .configureproduct textarea,
.cart-modern .configureproduct .bootstrap-select > .dropdown-toggle,
.cart-modern select.zy-native-select,
.cart-modern .os-picker .os-group,
.cart-modern .os-picker .os-version,
.cart-modern input.form-control,
.cart-modern textarea.form-control,
.cart-modern .bootstrap-select > .dropdown-toggle {
  border-radius: var(--zy-radius-sm) !important;
}

/* ============================================================
   滑块 / 数量选项（ionRangeSlider）品牌主题
   ============================================================ */
.cart-modern .irs { height: 46px !important; }
.cart-modern .irs-line { top: 21px !important; height: 6px !important; background: #e6e9ef !important; border-radius: 3px !important; }
.cart-modern .irs-bar { top: 21px !important; height: 6px !important; background: var(--zy-primary) !important; }
.cart-modern .irs-handle { top: 14px !important; width: 20px !important; height: 20px !important; background: #fff !important; border: 2px solid var(--zy-primary) !important; border-radius: 50% !important; box-shadow: 0 2px 8px rgba(0,110,255,.28) !important; }
.cart-modern .irs-single, .cart-modern .irs-from, .cart-modern .irs-to { background: var(--zy-primary) !important; color: #fff !important; font-size: 11px !important; border-radius: 4px !important; }
.cart-modern .irs-min, .cart-modern .irs-max { font-size: 11px !important; color: var(--zy-muted) !important; background: transparent !important; }

/* ============================================================
   结算页 viewcart 专属（2026-08-26 重构）
   - hero 与支付订单卡片 PC 统一 85% 居中（同一容器 .viewcart-main，对齐）
   - 所购产品配置详情融入支付订单卡片（含删除按钮）
   - 立即结账放最后一行
   - 手机端 100% 不变
   ============================================================ */
@media (min-width: 768px) {
  /* viewcart 结算页：hero 与支付订单卡片统一 85% 居中（同一容器，对齐）
     通过限制 viewcart-row 宽度，hero/card 在 1280 屏下约 1088px（85% of viewport） */
  .cart-modern .viewcart-row {
    max-width: 85% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  /* viewcart-main 直接强制 100% 占满 row（绕过 Bootstrap col-12 的 flex 收缩） */
  .cart-modern .viewcart-main {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: 0 0 100% !important;
  }
}
.zy-cart-products { margin-bottom: 4px; }
.zy-cart-total { font-size: 14px; color: #666; }
.zy-cart-total strong { color: #e83e8c; font-size: 17px; }
.zy-cart-item {
  border: 1px solid #e8ecf3;
  border-radius: 10px;
  /* 板块内上下 5px 留白（不贴外围/分隔线） */
  padding: 5px 14px;
  margin-bottom: 10px;
  background: #fbfcfe;
}
.zy-cart-item:last-child { margin-bottom: 0; }
.zy-cart-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.zy-cart-item-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 36px; }
.zy-cart-item-name strong { font-size: 14px; white-space: nowrap; }
.zy-cart-item-actions a { color: #8a94a6; margin-left: 8px; font-size: 15px; }
.zy-cart-item-actions a:hover { opacity: .8; }
/* 删除按钮：红色背景 + 四角圆弧（修改2） */
.zy-cart-item-actions .zy-cart-del {
  display: inline-flex; align-items: center; gap: 4px;
  color: #fff !important;
  background: #ff4d4f;
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 13px;
  line-height: 1;
  text-decoration: none;
}
.zy-cart-item-actions .zy-cart-del:hover { opacity: .85; background: #e03e40; }
.zy-cart-item .goods_info { padding: 4px 0 0; }
.zy-cart-opt { font-size: 13px; color: #555; line-height: 22px; }
.zy-cart-item-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e8ecf3;
  font-size: 13px; color: #666;
}
.zy-cart-item-foot strong { color: #e83e8c; font-size: 16px; }
/* 用户信息 / 产品板块 之间的分隔线上下留空（修改3） */
.cart-modern .viewcart-main hr { margin: 14px 0; }

/* 支付方式：PC 一行展开；手机端一个方式一行撑满（修改4） */
.cart-modern .payment-checkbox-wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cart-modern .payment-checkbox-wrap .checkboxDiv { flex: 1 1 auto; }
@media (min-width: 768px) {
  .cart-modern .payment-methods { display: flex; flex-wrap: nowrap; gap: 10px; }
  .cart-modern .payment-methods .addfunds { flex: 1 1 0; min-width: 0; padding: 0 !important; }
  .cart-modern .payment-methods .addfunds-payment { width: 100% !important; }
}
@media (max-width: 767px) {
  .cart-modern .payment-methods { display: block; }
  .cart-modern .payment-methods .addfunds { width: 100% !important; max-width: 100% !important; flex: none !important; padding: 0 !important; margin-bottom: 8px; }
  .cart-modern .payment-methods .addfunds-payment { width: 100% !important; }
  .cart-modern .payment-checkbox-wrap { display: block; }
  .cart-modern .payment-checkbox-wrap .checkboxDiv { width: 100% !important; margin-bottom: 8px; }
  /* 手机端：支付方式标题另起一行、左对齐 */
  .cart-modern .viewcart-main > p { display: block; text-align: left; }
}

/* 立即结账（最后一行）：terms 左对齐 + 按钮更高更大（修改5） */
.zy-checkout { margin-top: 8px; }
.zy-checkout .custom-control { margin-left: 0; padding-left: 0; }
.zy-checkout .custom-control-label { padding-left: 24px; }
.zy-checkout .zy-submit-btn {
  height: 54px; font-size: 18px; font-weight: 600;
  border-radius: 10px;
  background: linear-gradient(135deg, #2c5cff, #4d7dff);
  border: none;
  box-shadow: 0 4px 14px rgba(44, 92, 255, .28);
}
.zy-checkout .zy-submit-btn:hover { opacity: .92; }
@media (max-width: 767px) {
  .zy-cart-item { padding: 5px 12px; }
  .zy-checkout .zy-submit-btn { height: 50px; font-size: 17px; }
  /* 手机端底部条：总计+价格一行，条款+按钮一行（修改6） */
  .cart-modern .mobile-bottom-total .mobile-flex {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-left: 12px;
  }
  .cart-modern .mobile-bottom-total .mobile-flex .custom-control { flex: 1 1 auto; min-width: 0; }
  .cart-modern .mobile-bottom-total .mobile-flex .text-sm-right { flex: 0 0 auto; }
}

/* ===== viewcart v3 追加（2026-08-26 22:40） ===== */

/* 修改1：支付订单标题 变大加粗 */
.cart-modern .viewcart-main .card > .card-body:first-child h5,
.cart-modern .viewcart-main .card > .card-body:first-child .h5 {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: var(--zy-text);
}

/* 修改2：客户信息 PC 横向展开 + 字号放大；手机端不变 */
.zy-userinfo { display: block; }
@media (min-width: 768px) {
  .zy-userinfo { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; }
  .zy-userinfo > div {
    flex: 0 0 auto;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    font-size: 15px;
  }
  .zy-userinfo > div > span { font-size: 14px; }
}
/* 客户备注（并入客户信息板块） */
.zy-remark {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 4px;
}
.zy-remark .zy-remark-label { color: #979699; font-size: 14px; white-space: nowrap; }
.zy-remark .remarksInput { flex: 1 1 280px; max-width: 420px; }
@media (max-width: 767px) {
  /* 手机端：客户备注 label + 输入框同行（label 与"销售："字样左对齐）。
     强制 zy-userinfo 为 grid 1 列（垂直堆叠），避免被某些主题 CSS 干扰成 flex 横排
     导致 zy-remark 跑到销售行右侧 width:0（之前线上实测的 bug）。 */
  .zy-userinfo { display: grid !important; grid-template-columns: 1fr !important; row-gap: 4px !important; }
  .zy-remark { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
  .zy-remark .zy-remark-label { margin-bottom: 0; }
  .zy-remark .remarksInput { flex: 1 1 200px; width: auto !important; max-width: 100% !important; }
}

/* 修改3：所购产品总价 移到产品卡片下方右下角 */
.zy-cart-total-bottom {
  text-align: right;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e8ecf3;
  font-size: 15px;
}
.zy-cart-total-bottom strong { font-size: 20px; }

/* 修改4：支付方式 PC 一行展开（余额 checkbox + 微信/支付宝/余额支付 并排）；手机端不变 */
.payment-area { display: block; }
@media (min-width: 768px) {
  .payment-area { display: flex; align-items: stretch; gap: 10px; }
  .payment-area .payment-checkbox-wrap { flex: 0 0 auto; min-width: 220px; display: flex; align-items: center; }
  .payment-area .payment-checkbox-wrap .checkboxDiv { width: 100% !important; margin-bottom: 0 !important; flex: 1; }
  .payment-area .payment-methods { flex: 1 1 auto; }
}

/* 修改5：terms 与优惠码对齐 + 立即结账按钮更明显 */
.zy-checkout .custom-control {
  margin-left: 0;
  padding-left: 0;
}
.zy-checkout .zy-submit-btn {
  height: 56px;
  font-size: 19px;
  font-weight: 700;
  border-radius: 10px;
  background: linear-gradient(135deg, #2c5cff, #4d7dff);
  border: none;
  box-shadow: 0 4px 16px rgba(44, 92, 255, .32);
  letter-spacing: 1px;
}
.zy-checkout .zy-submit-btn:hover { opacity: .92; }

/* 修改6：手机端底部条两行（总计一行：左“总计：”右价格；第二行：左条款+勾选、右立即结账） */
@media (max-width: 767px) {
  .cart-modern .mobile-bottom-total .mobile-flex {
    justify-content: space-between;
  }
  .cart-modern .mobile-bottom-total .mobile-flex .custom-control { flex: 1 1 auto; }
  .cart-modern .mobile-bottom-total .mobile-flex .text-sm-right { flex: 0 0 auto; }
  .cart-modern .mobile-bottom-total .mobile-flex .text-sm-right .btn { white-space: nowrap; }
}

/* ===== viewcart 结算页二次调整（2026-08-26 23:40） ===== */

/* 修改1：支付方式标题 加粗加大 + 相对下移10px（PC/手机端均生效） */
.cart-modern .zy-pay-title {
  font-size: 18px;
  font-weight: 700;
  padding-top: 10px;
}

/* 修改2：PC端支付方式卡片（支付宝/后续微信等）累计下移6px（用户两次“再下移2px”：首轮 2px → 4px → 6px），手机端不动 */
@media (min-width: 768px) {
  .cart-modern .payment-methods .addfunds-payment { margin-top: 6px; }
  /* 单选圈（input.radio，13×13）与支付宝图标（img）间隔 3px（之前完全贴边 0px） */
  .cart-modern .payment-methods .addfunds-payment img { margin-left: 3px; }
}

/* 修改3：优惠码“应用”按钮向右移动3px，与输入框保持间距 */
.cart-modern #promo .input-group-append { margin-left: 3px; }

/* 修改4（修复 v3）：PC端底部“同意服务条款+选择框”左边对齐立即结账按钮左边框
   （checkbox 视觉 + 文字都与按钮左边框 x 对齐：都从 x=0 开始，
   checkbox ::before 在 label 起点即按钮起点，文字紧跟 checkbox 右侧） */
.zy-checkout .custom-control { padding-left: 0 !important; min-height: auto !important; }
.zy-checkout .custom-control-label { padding-left: 0 !important; position: relative; }
.zy-checkout .custom-control-label::before { left: 0 !important; top: 2px !important; }
.zy-checkout .custom-control-label::after { left: 2px !important; }

/* 修改5：客户备注已并入用户信息板块（销售行下方）。
   PC 端用户信息为横排 flex，备注项换行独占一行，视觉位置与原来一致（“PC端不动”）；手机端保持同行排列 */
@media (min-width: 768px) {
  .zy-userinfo .zy-remark { flex: 0 0 100%; width: 100%; margin-top: 8px !important; }
}

/* 修改6（修复后 v2）：手机端底部条 2×2 grid 布局
   左列跨两行：总计行（顶对齐）+ 选择框行（底对齐）
   右列跨两行：价格（顶对齐总计顶）+ 立即结账按钮（拉伸填满，底对齐选择框底）
   选择器用 viewcart-row > mobile-bottom-total（直接子，因为 mobile-bottom-total 与 viewcart-main 是兄弟节点） */
@media (max-width: 767px) {
  .viewcart-row > .mobile-bottom-total {
    display: grid !important;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: stretch;
    gap: 6px 12px;
  }
  .mobile-bottom-total .mb-left {
    grid-column: 1; grid-row: 1 / 3;
    display: flex; flex-direction: column; justify-content: center;
    gap: 6px; padding-left: 1rem;
  }
  .mobile-bottom-total .mb-right {
    grid-column: 2; grid-row: 1 / 3;
    display: flex; flex-direction: column; align-items: stretch;
  }
  .mobile-bottom-total .mb-total-line { font-size: 15px; color: var(--zy-text-2); }
  .mobile-bottom-total .mb-terms-line { font-size: 13px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
  .mobile-bottom-total .mb-terms-line input { width: 16px; height: 16px; flex: 0 0 auto; }
  /* 按钮：跨两行高，flex column 内容两端对齐（金额在顶、立即结账在底，中间是按钮背景 = "金额融入按钮"）。
     加蓝色背景（Bootstrap CSS 没加载，btn-primary 默认无色，用 PC 端 zy-submit-btn 同款蓝色渐变）。 */
  .mobile-bottom-total .mb-checkout-btn {
    flex: 1 !important;
    display: flex !important; flex-direction: column !important;
    justify-content: space-between !important; align-items: center !important;
    padding: 12px 10px !important;
    min-width: 100px !important; min-height: 0 !important;
    margin: 0 !important; line-height: 1.2 !important;
    background: linear-gradient(135deg, #2c5cff, #4d7dff) !important;
    border: none !important; color: #fff !important;
    box-shadow: 0 4px 12px rgba(44, 92, 255, .25) !important;
  }
  .mobile-bottom-total .mb-checkout-price { font-size: 18px; font-weight: 700; color: #fff; }
  .mobile-bottom-total .mb-checkout-text { font-size: 13px; color: #fff; }
}
