/*!
 * Request a Quote — front-end styles. Everything is scoped to .qb.
 * Theme it with: --qb-accent, --qb-line, --qb-soft, --qb-text, --qb-muted, --qb-bg, --qb-radius
 */
.qb {
  --qb-accent: #4f46e5;
  --qb-line: #e5e7eb;
  --qb-soft: #f8fafc;
  --qb-text: #111827;
  --qb-muted: #6b7280;
  --qb-bg: #fff;
  --qb-danger: #dc2626;
  --qb-radius: 16px;
  color: var(--qb-text);
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 0 40px;
  font-size: 16px;
  line-height: 1.5;
  box-sizing: border-box;
}
.qb *, .qb *::before, .qb *::after { box-sizing: border-box; }

.qb-header { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.qb .qb-title { font-size: clamp(1.9rem, 3.5vw, 2.6rem); line-height: 1.15; font-weight: 700; margin: 0 0 14px; color: inherit; letter-spacing: -0.01em; }
.qb .qb-intro { margin: 0; color: var(--qb-muted); font-size: 1.06rem; line-height: 1.7; }

.qb-layout { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr); gap: 36px; align-items: start; }
.qb-services { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.qb-side { display: flex; flex-direction: column; gap: 24px; position: sticky; top: 24px; }

/* ---------- category cards ---------- */
.qb-cat { background: var(--qb-bg); border: 1px solid var(--qb-line); border-radius: var(--qb-radius); transition: border-color .15s, box-shadow .15s; }
.qb-cat.is-open { border-color: color-mix(in srgb, var(--qb-accent) 45%, var(--qb-line)); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.qb-cat-head { display: flex; gap: 14px; align-items: flex-start; padding: 24px 22px; cursor: pointer; margin: 0; }
.qb-cat.is-open .qb-cat-head { border-bottom: 1px solid var(--qb-line); }
.qb-check { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--qb-accent); cursor: pointer; }
.qb-cat-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.qb-cat-name { font-weight: 600; font-size: 1.08rem; line-height: 1.35; }
.qb-cat-desc { color: var(--qb-muted); font-size: .92rem; }
.qb-cat-body { padding: 6px 22px 22px; }
.qb-cat-body[hidden] { display: none; }

/* ---------- questions ---------- */
.qb-q { border: 0; margin: 0; padding: 18px 0 0; min-width: 0; }
.qb-q + .qb-q { margin-top: 6px; border-top: 1px dashed var(--qb-line); }
.qb-q-label { display: block; padding: 0; font-weight: 500; font-size: .95rem; margin: 0 0 10px; }
.qb-req { color: var(--qb-danger); margin-left: 2px; }
.qb-q-help { margin: -4px 0 10px; color: var(--qb-muted); font-size: .88rem; }
.qb-opts { display: flex; flex-direction: column; gap: 10px; }
.qb-opt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--qb-line); border-radius: 12px; cursor: pointer; background: var(--qb-bg); transition: border-color .15s, background .15s; margin: 0; }
.qb-opt:hover { border-color: color-mix(in srgb, var(--qb-accent) 35%, var(--qb-line)); }
.qb-opt.is-checked { border-color: var(--qb-accent); background: color-mix(in srgb, var(--qb-accent) 5%, var(--qb-bg)); }
.qb-opt input[type=radio], .qb-opt input[type=checkbox] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--qb-accent); cursor: pointer; }
.qb-opt-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; cursor: pointer; }
.qb-opt-label { font-size: 1rem; }
.qb-opt-desc { color: var(--qb-muted); font-size: .85rem; }
.qb-opt-price { flex: none; font-weight: 600; font-size: .92rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qb-per { color: var(--qb-muted); font-weight: 400; }
.qb-opt--qty { cursor: default; }
.qb-qty { flex: none; width: 76px; padding: 8px 10px; border: 1px solid var(--qb-line); border-radius: 10px; font: inherit; text-align: center; background: var(--qb-bg); color: inherit; }
.qb-q.has-error .qb-opt, .qb-q.has-error .qb-input { border-color: var(--qb-danger); }

/* ---------- side cards ---------- */
.qb-card { background: var(--qb-bg); border: 1px solid var(--qb-line); border-radius: var(--qb-radius); overflow: hidden; }
.qb .qb-card-title { margin: 0; padding: 22px 24px; background: var(--qb-soft); border-bottom: 1px solid var(--qb-line); font-size: clamp(1.5rem, 2.4vw, 2.05rem); font-weight: 700; line-height: 1.15; color: inherit; }
.qb-card-body { padding: 20px 22px 22px; }
.qb-est-empty { text-align: center; color: var(--qb-muted); font-size: .92rem; margin: 22px 0 26px; }
.qb-est-lines[hidden], .qb-est-empty[hidden] { display: none; }
.qb-est-group + .qb-est-group { margin-top: 14px; }
.qb-est-cat { margin: 0 0 6px; font-weight: 600; font-size: .9rem; }
.qb-est-list { list-style: none; margin: 0; padding: 0; }
.qb-est-list li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: .88rem; color: var(--qb-muted); }
.qb-est-amount { color: var(--qb-text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.qb-est-qty { white-space: nowrap; }
.qb-totals { margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid var(--qb-line); }
.qb-total { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; font-size: .92rem; }
.qb-total dt { color: var(--qb-muted); }
.qb-total dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.qb-note { margin: 12px 0 0; color: var(--qb-muted); font-size: .74rem; }

.qb-form { display: flex; flex-direction: column; gap: 12px; }
.qb-field { margin: 0; }
.qb-input { display: block; width: 100%; padding: 11px 14px; border: 1px solid #cbd5e1; border-radius: 10px; font: inherit; font-size: .95rem; color: inherit; background: var(--qb-bg); }
.qb-input:focus, .qb-qty:focus { outline: 2px solid color-mix(in srgb, var(--qb-accent) 35%, transparent); outline-offset: 1px; border-color: var(--qb-accent); }
.qb-input[aria-invalid="true"] { border-color: var(--qb-danger); }
textarea.qb-input { resize: vertical; min-height: 96px; }
.qb-q .qb-input { margin-top: 2px; }

.qb-btn { display: inline-flex; justify-content: center; align-items: center; width: 100%; padding: 14px 18px; border: 0; border-radius: 12px; background: var(--qb-accent); color: #fff; font: inherit; font-weight: 600; font-size: 1rem; cursor: pointer; transition: filter .15s; }
.qb-btn:hover { filter: brightness(1.08); }
.qb-btn:disabled { opacity: .65; cursor: progress; }
.qb-btn:focus-visible, .qb-check:focus-visible, .qb-opt input:focus-visible { outline: 3px solid color-mix(in srgb, var(--qb-accent) 40%, transparent); outline-offset: 2px; }
.qb-btn--ghost { width: auto; background: transparent; color: var(--qb-accent); border: 1px solid var(--qb-line); }

.qb-error { margin: 6px 0 0; color: var(--qb-danger); font-size: .85rem; }
.qb-error:empty { display: none; }
.qb-error--cats { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fef2f2; }
.qb-error--form { margin: 0; }

/* ---------- done ---------- */
.qb-done { max-width: 620px; margin: 0 auto; padding: 36px 30px; text-align: center; }
.qb-done:focus { outline: none; }
.qb-done-icon { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; align-items: center; justify-content: center; background: color-mix(in srgb, var(--qb-accent) 12%, #fff); color: var(--qb-accent); margin-bottom: 12px; }
.qb .qb-done-title { font-size: 1.5rem; margin: 0 0 8px; color: inherit; }
.qb-done-text { color: var(--qb-muted); margin: 0 0 8px; }
.qb-ref { margin: 0 0 20px; }
.qb-done-summary { text-align: left; border-top: 1px solid var(--qb-line); padding-top: 18px; margin-bottom: 22px; }

.qb-empty-catalog { text-align: center; color: var(--qb-muted); }
.qb-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.qb-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 960px) {
  .qb-layout { grid-template-columns: 1fr; }
  .qb-side { position: static; }
  .qb-header { margin-bottom: 32px; }
}
@media (max-width: 520px) {
  .qb-cat-head { padding: 18px 16px; }
  .qb-cat-body { padding: 4px 16px 18px; }
  .qb-opt { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: 12px; row-gap: 4px; padding: 12px 14px; }
  .qb-opt input[type=radio], .qb-opt input[type=checkbox] { grid-row: 1 / span 2; align-self: start; margin-top: 3px; }
  .qb-opt-price { grid-column: 2; }
  .qb-opt--qty { grid-template-columns: minmax(0, 1fr) auto; }
  .qb-opt--qty .qb-opt-price { grid-column: 1; }
  .qb-opt--qty .qb-qty { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  .qb-cat, .qb-opt, .qb-btn { transition: none; }
}
