/* ==========================================================
   BKCElectronics — advanced quote page
   ========================================================== */
.qp-body { background: #f3f5f9; }
.qp { max-width: 1360px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px) 80px; }
.qp-hero { padding: 34px 0 18px; }
.crumbs { display: flex; gap: 8px; font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--accent); }
.qp-hero h1 { margin: 12px 0 10px; font-size: clamp(28px, 3.6vw, 44px); letter-spacing: -.035em; line-height: 1.1; }
.qp-hero p { margin: 0; max-width: 760px; color: var(--muted); line-height: 1.6; }
.qp-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 16px 0 0; padding: 0; font-size: 14px; font-weight: 600; color: #166534; }

/* product tabs */
.ptabs { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin: 16px 0 22px; }
.ptab { all: unset; cursor: pointer; display: grid; justify-items: center; gap: 8px; padding: 14px 8px 12px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); text-align: center; font-size: 13px; font-weight: 600; color: #334155; transition: border-color .2s, transform .25s var(--ease), box-shadow .25s; }
.ptab:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -22px rgba(15,23,42,.5); }
.ptab.on { border-color: var(--accent); color: var(--ink); box-shadow: 0 0 0 4px rgba(37,99,235,.1); }
.ptab__ic { width: 44px; height: 32px; display: grid; place-items: center; }
.ptab__ic svg { width: 44px; height: 32px; }

.qp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; }
.qp-form { display: grid; gap: 16px; }

/* sections */
.qs { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px 24px; }
.qs[hidden] { display: none; }
.qs h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-size: 18px; letter-spacing: -.02em; }
.qs h2 em { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-style: normal; font-size: 13px; color: #fff; background: linear-gradient(135deg, #2563eb, #06b6d4); }
.row { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 0; border-top: 1px dashed #eef1f5; }
.row:first-of-type { border-top: 0; }
.row--top { align-items: start; }
.lab { font-size: 14px; font-weight: 600; color: #475569; }
.hint { margin: 4px 0 6px 182px; font-size: 13px; color: var(--muted); }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { all: unset; box-sizing: border-box; cursor: pointer; min-width: 44px; padding: 8px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: #fff; font-size: 14px; font-weight: 600; color: #334155; text-align: center; transition: all .18s; position: relative; }
.opt:hover { border-color: #94a3b8; }
.opt.on { border-color: var(--accent); color: var(--accent); background: #eff5ff; }
.opt.on::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 4px 0 8px 0; background: var(--accent) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'><path d='M3 6l2 2 4-4' stroke='white' stroke-width='1.6' fill='none'/></svg>") center/10px no-repeat; }
.opt:disabled, .opt[aria-disabled="true"] { opacity: .35; cursor: not-allowed; }
.opt small { display: block; font-weight: 500; font-size: 11px; color: var(--soft); }
.opt--hp { border-style: dashed; }
.opts--sw .opt { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.ro { font-size: 14px; color: var(--ink); font-weight: 600; }
.dims { display: flex; align-items: center; gap: 8px; }
.dims input, .row select, .num, .grid4 input, textarea { height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); font: 500 15px Inter, sans-serif; color: var(--ink); background: #fff; }
.dims input { width: 110px; }
.dims em { font-style: normal; color: var(--muted); }
.row select { width: 160px; }
.num { width: 110px; }
textarea { width: 100%; height: auto; padding: 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
.toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tgl { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); cursor: pointer; font-size: 14px; font-weight: 600; color: #334155; transition: border-color .2s, background .2s; }
.tgl small { color: var(--muted); font-weight: 500; }
.tgl:has(input:checked) { border-color: var(--accent); background: #eff5ff; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: background .2s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.qs h2 .switch { margin-left: auto; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.grid4 label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: #475569; }

/* big drop */
.qs--upload { padding: 16px; }
.bigdrop { display: grid; justify-items: center; gap: 8px; padding: 30px 20px; border-radius: 16px; border: 2px dashed #a8c1f5; background: linear-gradient(135deg, rgba(37,99,235,.05), rgba(6,182,212,.07)); cursor: pointer; text-align: center; transition: border-color .2s, transform .3s var(--ease), background .2s; }
.bigdrop:hover, .bigdrop.over { border-color: var(--accent); transform: translateY(-2px); background: rgba(37,99,235,.09); }
.bigdrop__ic { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(135deg, #2563eb, #06b6d4); box-shadow: 0 12px 26px -12px rgba(37,99,235,.9); }
.bigdrop b { font-size: 17px; }
.bigdrop small { color: var(--muted); }
.agent { margin-top: 14px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: #f8fafc; display: grid; gap: 12px; font-size: 14px; }
.agent.is-ok { border-color: #bbf7d0; background: #f0fdf4; }
.agent.is-warn { border-color: #fde68a; background: #fffbeb; }
.agent.is-err { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.agent.is-busy { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.agent__facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.agent__facts li { display: grid; font-weight: 700; }
.agent__facts small { font-weight: 500; color: var(--muted); font-size: 12px; }
.agent__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.agent a { color: var(--accent); font-weight: 600; text-decoration: none; }
.agent ul.tips { margin: 0; padding-left: 18px; color: #475569; display: grid; gap: 4px; }

/* sidebar */
.qp-side { position: sticky; top: calc(var(--hdr) + 14px); display: grid; gap: 14px; }
.qpv, .sum { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.qpv__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.qpv__tag { font-size: 12px; font-weight: 600; color: var(--muted); background: #f1f5f9; padding: 4px 10px; border-radius: 999px; }
.qpv__stage { position: relative; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; display: grid; place-items: center; perspective: 900px;
  background: radial-gradient(circle at 50% 40%, #ffffff, #e9eef5 70%), #eef2f6; }
.qpv__stage::after { content: ""; position: absolute; inset: auto 15% 6% 15%; height: 14px; border-radius: 50%; background: radial-gradient(ellipse, rgba(15,23,42,.25), transparent 70%); filter: blur(4px); }
.qpv__stage svg { width: 86%; height: 86%; transform: rotateX(18deg) rotateZ(-4deg); transition: transform .5s var(--ease); filter: drop-shadow(0 14px 18px rgba(15,23,42,.28)); animation: pvIn .5s var(--ease); }
.qpv__stage:hover svg { transform: rotateX(4deg) rotateZ(0); }
.qpv__stage .qpv__gerber { width: 92%; height: 92%; object-fit: contain; animation: pvIn .5s var(--ease); }
@keyframes pvIn { from { opacity: .3; filter: blur(4px); } }
.qpv__switch { display: flex; gap: 6px; margin-top: 10px; }
.qpv__switch button { all: unset; cursor: pointer; flex: 1; text-align: center; padding: 7px 0; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--muted); background: #f1f5f9; }
.qpv__switch button.on { background: var(--ink); color: #fff; }
.sum h3 { margin: 0 0 10px; font-size: 16px; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; max-height: 300px; overflow: auto; font-size: 13.5px; }
.lines li { display: flex; justify-content: space-between; gap: 12px; color: #475569; animation: in .35s var(--ease) both; }
.lines li b { color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lines li.grp { margin-top: 6px; color: var(--ink); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.speed { display: grid; gap: 6px; margin: 14px 0; padding: 12px 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); }
.speed label { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; padding: 6px 8px; border-radius: 10px; }
.speed label:has(input:checked) { background: #eff5ff; }
.speed label.dis { opacity: .4; cursor: not-allowed; }
.speed span { flex: 1; } .speed em { font-style: normal; color: var(--muted); font-size: 13px; }
.speed b { font-variant-numeric: tabular-nums; }
.ship { display: grid; gap: 4px; font-size: 14px; }
.ship label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; color: #475569; }
.ship select { height: 36px; border-radius: 10px; border: 1.5px solid var(--line); padding: 0 8px; font: 500 13.5px Inter, sans-serif; }
.ship span { color: var(--muted); font-size: 13px; text-align: right; }
.tot { display: grid; gap: 6px; margin: 14px 0; font-size: 14px; }
.tot div { display: flex; justify-content: space-between; color: #475569; }
.tot b { color: var(--ink); font-variant-numeric: tabular-nums; }
.tot__big { padding-top: 8px; border-top: 1px solid var(--line); }
.tot__big span { color: var(--ink) !important; font-weight: 700; }
.tot__big b { font-size: 28px; letter-spacing: -.03em; color: #ea580c !important; }
.tot small { text-align: right; color: var(--muted); }
.sum__note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(15,23,42,.5); backdrop-filter: blur(6px); }
.modal[hidden] { display: none; }
.modal__card { position: relative; width: min(620px, 100%); max-height: 90vh; overflow: auto; background: #fff; border-radius: 22px; padding: 26px; animation: in .4s var(--ease) both; }
.modal__x { position: absolute; right: 14px; top: 10px; border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--muted); }
.modal__card h3 { margin: 0 0 12px; }
.modal__sum { max-height: 220px; overflow: auto; padding: 12px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--line); font: 12.5px/1.55 ui-monospace, Consolas, monospace; white-space: pre-wrap; }
.modal__form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.modal__form input { height: 42px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line); font: 500 14.5px Inter, sans-serif; }
.modal__act { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

@media (max-width: 1180px) { .ptabs { grid-template-columns: repeat(4, minmax(0, 1fr)); } .qp-grid { grid-template-columns: minmax(0, 1fr) 360px; } .agent__facts { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 960px) {
  .qp-grid { grid-template-columns: minmax(0, 1fr); }
  .qp-side { position: static; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hint { margin-left: 0; }
  .toggles, .grid4 { grid-template-columns: 1fr 1fr; }
  .mnav { display: none; }
}
@media (max-width: 560px) { .toggles { grid-template-columns: minmax(0, 1fr); } .ptabs { grid-template-columns: repeat(2, 1fr); } .modal__form { grid-template-columns: 1fr; } .agent__facts { grid-template-columns: repeat(2, 1fr); } }
.qp [hidden], .modal[hidden] { display: none !important; }
