﻿/* Keep all adjustments confined to the original efcart configuration form. */
#addCartForm .ordersummary td { border: 0 !important; padding: 5px !important; }
#addCartForm .configoption_total { overflow: visible; }
#addCartForm .efcart-cycle-option { position: relative; margin: 6px 8px 6px 0; }
#addCartForm .efcart-cycle-option .cycle-select-discount { right: 0; top: -10px; white-space: nowrap; }
#addCartForm .efcart-promo { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid #eff2f7; }
#addCartForm .efcart-promo-controls { display: flex; flex-wrap: nowrap; align-items: stretch; }
#addCartForm .efcart-promo-controls > input { flex: 1 1 0; width: 0; min-width: 0; height: 38px; border-radius: 0; }
#addCartForm .efcart-promo-controls .input-group-append { flex: 0 0 auto; }
#addCartForm .efcart-promo-controls .btn { height: 38px; line-height: normal; padding: 0 12px; border-radius: 0; white-space: nowrap; }
#addCartForm .efcart-summary-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
#addCartForm .efcart-mobile-total { display: none; }
@media (max-width: 991.98px) {
  #addCartForm { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  #addCartForm .efcart-desktop-only { display: none !important; }
  #addCartForm .efcart-mobile-total {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; width: auto;
    box-sizing: border-box; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 64px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: #fff; box-shadow: 0 -2px 12px rgba(0,0,0,.08); z-index: 1001;
  }
  #addCartForm .efcart-mobile-total .total { font-size: 16px; color: #0064ff; line-height: 1.5; }
  #addCartForm .efcart-mobile-total .btn { flex: 0 0 auto; min-height: 40px; }
}

/* Summary and its mobile dock stay flat. */
#addCartForm .efcart-summary-card,
#addCartForm .configoption_total,
#addCartForm .efcart-mobile-total { box-shadow: none !important; -webkit-box-shadow: none !important; }

/* Both configuration columns use flat cards. */
#addCartForm .card { box-shadow: none !important; -webkit-box-shadow: none !important; }

/* ================= 顶栏修复 =================
   configureproduct.css 里无作用域限定的 .btn（font-size:12px; line-height:35px; padding:0）
   会污染顶栏的 .header-item 按钮，把图标顶高 4px。这里恢复为 bootstrap 默认值。 */
#page-topbar .btn.header-item {
  line-height: 1.5;
}
#page-topbar .btn.header-item:not(.font-size-16) {
  font-size: 0.8125rem;
}

/* ================= 产品配置页视觉：与购物车卡片统一 ================= */
#addCartForm .card {
  border: 1px solid #eef2f8 !important;
  border-bottom: 1px solid #eef2f8 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(15, 55, 120, .06) !important;
  margin-bottom: 14px !important;
  overflow: hidden;
}
#addCartForm .card-body { padding: 24px !important; }

/* 产品名称 / 汇总标题 */
#addCartForm .card-title {
  font-size: 16px !important;
  font-weight: 600;
  line-height: 1.8;
  color: #1b2941;
  margin: 0;
}
#addCartForm .card-title.fs-16 { font-size: 16px !important; }

/* 配置项行 */
#addCartForm .configureproduct { margin-bottom: 18px !important; }
#addCartForm .configureproduct > label,
#addCartForm .configureproduct .col-form-label {
  color: #5b6b86;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
}
#addCartForm .form-group.row > label.col-form-label {
  color: #5b6b86;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.8;
}

/* 配置项按钮（2核 / 4核 / 月 / 季 …） */
#addCartForm .btn-group-toggle > .btn {
  height: 36px;
  line-height: 34px;
  padding: 0 16px !important;
  margin: 0 8px 8px 0;
  border: 1px solid #dce3ef !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #3d4a63 !important;
  font-size: 14px;
  box-shadow: none !important;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
#addCartForm .btn-group-toggle > .btn:hover {
  border-color: #0064ff !important;
  background: #edf4ff !important;
  color: #0064ff !important;
}
#addCartForm .btn-group-toggle > .btn.active {
  background: #0064ff !important;
  border-color: #0064ff !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(0, 100, 255, .22) !important;
}

/* 输入框 / 下拉统一圆角 */
#addCartForm .form-control:not([type="range"]),
#addCartForm .selectpicker,
#addCartForm .dropdown-toggle.btn-default {
  border-radius: 6px !important;
  border-color: #e0e5ed !important;
}

/* 订单汇总表 */
#addCartForm .configoption_total td { padding: 6px 0 !important; font-size: 13px; color: #5b6b86; }
#addCartForm .efcart-summary-actions .btn,
#addCartForm .configoption_total .btn {
  height: 44px;
  border-radius: 8px !important;
  font-size: 15px !important;
  font-weight: 600;
  padding: 0 24px !important;
}

@media (max-width: 991.98px) {
  #addCartForm .card-body { padding: 18px !important; }
  #addCartForm .card-title { font-size: 15px !important; }
}
#addCartForm .efcart-promo-controls > input { border-radius: 6px 0 0 6px !important; }
#addCartForm .efcart-promo-controls .btn { border-radius: 0 6px 6px 0 !important; }

/* ================= 滑块（系统盘/带宽等）：颜色统一 + 不再左右溢出 ================= */
#addCartForm .configoption_range {
  width: auto !important;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 12px 0 0 !important;
  padding: 0;
  box-sizing: border-box;
  background: #0064ff !important;
  height: 4px;
  border-radius: 3px;
}
#addCartForm .configoption_range::-webkit-slider-thumb {
  border-color: #0064ff;
  border-radius: 3px;
}
#addCartForm .configoption_range::-moz-range-thumb {
  border-color: #0064ff;
  border-radius: 3px;
}
#addCartForm .configoption_range_val {
  width: 72px !important;
  flex: 0 0 72px !important;
  margin: 0 8px 0 0 !important;
  box-sizing: border-box;
}
#addCartForm .configureproduct .col-md-10 > span {
  flex: 0 0 auto;
  color: #5b6b86;
  font-size: 14px;
}

/* ================= 警告 / 错误提示 ================= */
#addCartForm .alert {
  border-width: 1px;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 14px;
  box-shadow: none;
}
#addCartForm .alert-danger {
  background: #fff1f0;
  border-color: #ffd6d3;
  color: #d4380d;
}
#addCartForm .alert-danger .close { color: #d4380d; opacity: .55; font-size: 18px; padding: 8px 12px; }
#addCartForm .alert-danger .close:hover { opacity: .9; }
#addCartForm .alert-warning {
  background: #fff8e6;
  border-color: #ffe6a8;
  color: #a86a00;
}
#addCartForm .error-tip {
  display: block;
  margin: 6px 0 0;
  padding: 0;
  color: #f5333f;
  font-size: 13px;
  line-height: 1.8;
  text-align: left;
}
#addCartForm .form-control.is-invalid,
#addCartForm .is-invalid {
  border-color: #f5333f !important;
  box-shadow: 0 0 0 3px rgba(245, 51, 63, .1) !important;
}

/* ================= 优惠码：输入框与按钮等高 ================= */
#addCartForm .efcart-promo-controls > input {
  height: 38px !important;
  box-sizing: border-box !important;
  line-height: 1.5 !important;
}
#addCartForm .efcart-promo-controls .btn {
  height: 38px !important;
  box-sizing: border-box !important;
  line-height: 36px !important;
  padding: 0 16px !important;
}

/* ================= 警告类配置项：左对齐 + 标准提示条 ================= */
/* configureproduct.css 的 .form-check{margin-left:20px} 会让单选圆点比其他行右移 20px */
#addCartForm .configureproduct .form-check {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 10px 14px !important;
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #e5e9f0;
  border-radius: 8px;
  background: #f7f8fa;
}
#addCartForm .configureproduct .form-check .form-check-input {
  position: static !important;
  margin: 6px 0 0 0 !important;
  flex: 0 0 auto;
  float: none;
}
#addCartForm .configureproduct .form-check .form-check-label {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 !important;
  color: #5b6b86;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  cursor: pointer;
}

/* ================= 其余单选/复选框也统一左边界 ================= */
#addCartForm .form-group.row .col-md-10 > .form-check,
#addCartForm .form-group.row .col-md-10 > .custom-control {
  margin-left: 0 !important;
}

/* ================= 滑块行：恢复左右内边距，与上下行对齐 ================= */
/* 该行 .col-md-10 带内联 padding:0，导致内容比其它行左偏 12px、右边多出 12px */
#addCartForm .configureproduct .col-md-10 {
  padding-left: 12px !important;
  padding-right: 12px !important;
}

/* ================= 警告圆点：垂直对齐第一行文字 + 配色统一 ================= */
#addCartForm .configureproduct .form-check .form-check-input {
  margin-top: 4px !important;
  border-color: #b9c1cf !important;
}
#addCartForm .configureproduct .form-check .form-check-input:checked {
  background-color: #8b95a7 !important;
  border-color: #8b95a7 !important;
}
