/* ============================================================
   OAR 购物车 · 产品配置页补充样式
   在 product-detail.css（v25 1:1）基础上，为原生表单控件提供
   与 v25 设计完全一致的视觉层（隐藏原生 input、样式化注入控件）
   ============================================================ */

/* ---- 单选卡 .opt：隐藏原生 radio，保留表单语义 ---- */
.opt input[type="radio"], .opt input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}

/* ---- 下拉 dd：隐藏同步用的原生 input/select ---- */
.oar-cfg-input, .oar-hide { display: none !important; }

/* ---- 开关行：原生 checkbox 承载 value ---- */
.sw-row input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.sw-row { cursor: pointer; }

/* ---- 滑块行：数值输入框（.bw-num 内） ---- */
.bw-num { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--text-1); }
.bw-num input {
  width: 64px; height: 38px; border: 1px solid #E3E7ED; background: #fff;
  padding: 0 10px; font-size: 14px; color: var(--text-1); outline: none; border-radius: 0;
}
.bw-num input:focus { border-color: var(--primary); }
.bw-num small { font-size: 12px; color: var(--text-4); }

/* 滑块刻度禁用区（与 default 主题 range_none 行为一致） */
.range_none { position: absolute; height: 12px; background: #EFF2F6; top: 14px; z-index: 1; pointer-events: none; }
.bw-slider-wrap { position: relative; }

/* ---- OS 网格：真实系统 Logo ---- */
.os-item .os-ico img { width: 22px; height: 22px; display: block; }
.os-item .os-ico { background: #F4F6F9 !important; color: transparent; overflow: hidden; }
.os-item .os-name { text-align: center; }

/* OS 版本下拉（复用 dd 样式，非 data-dd 组件，由配置脚本接管） */
.os-ver-dd { position: relative; }
.os-ver-dd .dd-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 240px; height: 40px; padding: 0 12px; border: 1px solid #E3E7ED; background: #fff;
  font-size: 14px; color: var(--text-1); cursor: pointer; user-select: none;
}
.os-ver-dd .dd-trigger:hover { border-color: #9CC1F5; }
.os-ver-dd .dd-trigger .dd-arrow {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--text-4); transition: transform .15s;
}
.os-ver-dd.open .dd-trigger .dd-arrow { transform: rotate(180deg); }
.os-ver-dd .dd-menu {
  display: none; position: absolute; top: 42px; left: 0; min-width: 240px; max-height: 240px; overflow: auto;
  background: #fff; border: 1px solid #E3E7ED; box-shadow: 0 8px 24px rgba(16,24,40,.08); z-index: 30;
}
.os-ver-dd.open .dd-menu { display: block; }
.os-ver-dd .dd-option { padding: 9px 12px; font-size: 13px; color: var(--text-1); cursor: pointer; }
.os-ver-dd .dd-option:hover { background: #F0F6FF; color: var(--primary); }
.os-ver-dd .dd-option.active { background: #F0F6FF; color: var(--primary); }

/* ---- 自定义字段 / 主机名等文本输入（与 v25 host-field 输入一致） ---- */
.oar-input {
  height: 40px; border: 1px solid #E3E7ED; background: #FAFBFC; padding: 0 12px;
  font-size: 14px; color: var(--text-1); outline: none; border-radius: 0; min-width: 240px;
}
.oar-input:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(0,111,255,.08); }
textarea.oar-input { height: auto; min-height: 64px; padding: 10px 12px; line-height: 1.6; }
select.oar-input { min-width: 240px; }
.oar-input.is-invalid { border-color: var(--danger); }
select.oar-input option { padding: 6px; }

/* ---- 联动子选项区（default JS 注入 .btn 按钮组 → 重塑为 v25 opt 卡片） ---- */
.lingAge-son-restyled .form-group { display: flex; align-items: flex-start; margin-bottom: 18px; }
.lingAge-son-restyled .form-group > label {
  width: 88px; flex: none; font-size: 14px; color: var(--text-2); padding: 10px 0 0; background: none; border: none;
}
.lingAge-son-restyled .btn-group, .lingAge-son-restyled .btn-group-toggle {
  display: flex !important; flex-wrap: wrap; gap: 10px; background: none !important; border: none !important; box-shadow: none !important;
}
.lingAge-son-restyled .btn-group label.btn, .lingAge-son-restyled .btn-group-toggle label.btn {
  min-width: 96px; padding: 9px 16px !important; border: 1px solid #E3E7ED !important; border-radius: 0 !important;
  background: #fff !important; font-size: 14px !important; color: var(--text-1) !important; cursor: pointer;
  text-align: center; transition: all .15s; user-select: none; line-height: 1.4; margin: 0 !important; font-weight: 400 !important;
}
.lingAge-son-restyled .btn-group label.btn:hover, .lingAge-son-restyled .btn-group-toggle label.btn:hover { border-color: #9CC1F5 !important; }
.lingAge-son-restyled .btn-group label.btn.active, .lingAge-son-restyled .btn-group-toggle label.btn.active {
  border-color: var(--primary) !important; background: #F0F6FF !important; color: var(--primary) !important; font-weight: 500 !important;
  box-shadow: none !important; outline: none;
}
.lingAge-son-restyled .btn-group label.btn input, .lingAge-son-restyled .btn-group-toggle label.btn input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.lingAge-son-restyled .btn-group .active .form-check-input, .lingAge-son-restyled .btn-group-toggle .active .form-check-input { background: none; }

/* ---- 费用预览区：AJAX 注入的订单明细（ordersummary 输出 v25 fee-box 结构） ---- */
.configoption_total .order-item { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--text-2); padding: 8px 0; border-bottom: 1px dashed #EFF1F4; }
.configoption_total .order-item span:last-child { color: var(--text-1); text-align: right; word-break: break-all; }
.configoption_total .order-item img { vertical-align: -3px; margin-right: 4px; }
.configoption_total .fee-box { margin: 12px 0 4px; background: #F7F9FC; border-radius: 2px; padding: 12px 14px; }
.configoption_total .fee-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); padding: 5px 0; }
.configoption_total .fee-row .fee-val { color: var(--text-1); }
.configoption_total .fee-row.discount .fee-val { color: var(--success, #12B76A); }
.configoption_total .fee-total { display: flex; align-items: baseline; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #E1E6EC; }
.configoption_total .fee-total .ft-label { font-size: 14px; color: var(--text-2); }
.configoption_total .fee-total .ft-price { font-size: 26px; font-weight: 700; color: var(--primary); }
.configoption_total .fee-total .ft-price .cny { font-size: 16px; }
.configoption_total .fee-total .ft-price .ft-unit { font-size: 12px; font-weight: 400; color: #101010; margin-left: 4px; }
.configoption_total .fee-total .ft-origin { font-size: 12px; color: var(--text-4); text-decoration: line-through; margin-left: 8px; font-weight: 400; }

/* ---- 提示与校验 ---- */
.oar-tip {
  display: inline-flex; width: 16px; height: 16px; align-items: center; justify-content: center;
  border-radius: 50%; background: #E8EDF3; color: var(--text-3); font-size: 11px; cursor: help; flex: none;
}
.oar-error-tip { display: none; color: var(--danger, #E5484D); font-size: 12px; margin-top: 6px; }

/* ---- 面包屑 / 标题（若 product-detail.css 缺失则兜底） ---- */
.pd-wrap { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
.pd-crumb { font-size: 13px; color: var(--text-4); margin-bottom: 18px; }
.pd-crumb a { color: var(--text-4); }
.pd-crumb a:hover { color: var(--primary); }
.pd-title { font-size: 24px; font-weight: 700; color: var(--text-1); margin-bottom: 18px; }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cfg-wrap { background: #fff; border: 1px solid #EEF1F5; }
.order-panel { background: #fff; border: 1px solid #EEF1F5; padding: 22px 20px; position: sticky; top: 84px; }
.order-panel > h3 { font-size: 16px; font-weight: 600; color: var(--text-1); margin-bottom: 12px; }

/* ---- 移动端 ---- */
@media (max-width: 900px) {
  .pd-grid { grid-template-columns: 1fr; }
  .order-panel { position: static; }
  .cfg-label { width: 100%; padding-top: 0; margin-bottom: 8px; }
  .cfg-row { flex-direction: column; }
  .cfg-section { padding: 18px 16px; }
  .bw-slider { width: 100% !important; }
}
