/* Task 17 — запрос КП: блок в шапке, /cart/, /checkout/, подтверждение. */
.primer-header-cart{display:inline-flex;align-items:center;gap:7px;padding:3px 8px;border:1px solid #60798a;border-radius:999px;line-height:1.5;text-decoration:none;color:inherit;white-space:nowrap}
.primer-header-cart:hover{text-decoration:none;background:#ffffff14}
.primer-header-cart__icon{display:inline-flex;color:#cfdfe8}
.primer-header-cart__label{font-weight:600}
.primer-header-cart__total{color:#f7d2b9}
.primer-header-cart__count{min-width:18px;padding:0 5px;border-radius:9px;background:#f26c2a;color:#fff;font-weight:700;font-size:11px;text-align:center;line-height:16px}
.primer-header-cart.is-active{border-color:#f26c2a;background:#f26c2a1f}
.primer-header-cart.is-active .primer-header-cart__icon{color:#f8b48c}
.primer-header-cart.is-active .primer-header-cart__total{color:#fff}
@media(max-width:620px){.primer-header-cart__label{display:none}}

.quote-page{max-width:1080px;margin:0 auto;padding:34px 20px 64px}
.quote-page h1{margin:0 0 8px}
.quote-page__lead{margin:0 0 26px;color:#5a7387;font-size:15px}
.quote-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:28px;align-items:start}
@media(max-width:860px){.quote-grid{grid-template-columns:minmax(0,1fr)}}

.quote-lines{list-style:none;margin:0;padding:0;display:grid;gap:14px}
.quote-line{display:grid;grid-template-columns:96px minmax(0,1fr);gap:16px;padding:16px;border:1px solid #dde7ec;border-radius:12px;background:#fff}
.quote-line__media{display:grid;place-items:center;background:#f2f7fa;border-radius:8px;min-height:88px;color:#93a9b8;font-size:11px;text-align:center;padding:6px}
.quote-line__media img{max-width:100%;border-radius:6px}
.quote-line__head{display:flex;justify-content:space-between;gap:12px;align-items:baseline}
.quote-line__name{font-size:15px;font-weight:700;color:#1e3a5f;text-decoration:none}
.quote-line__name:hover{text-decoration:underline}
.quote-line__sum{font-weight:750;color:#1e3a5f;white-space:nowrap;flex:0 0 auto}
.quote-line__params{margin:4px 0 10px;color:#63798a;font-size:12px;line-height:1.6}
.quote-line__foot{display:flex;flex-wrap:wrap;align-items:center;gap:10px;justify-content:space-between}
.quote-line__unit{color:#63798a;font-size:12px}
/* Задача 18 — единый контрол количества: карточка товара, панель КП, /cart/. */
.qty-control{display:inline-flex;align-items:stretch;height:34px;border:1px solid #d3e0e8;border-radius:8px;overflow:hidden;background:#fff;flex:0 0 auto}
.qty-control button{width:34px;height:32px;padding:0;border:0;border-radius:0;background:#f2f7fa;color:#2a5570;font:600 16px/1 Inter,sans-serif;display:grid;place-items:center}
.qty-control button:hover:not(:disabled){background:#e6f0f7}
.qty-control button:active:not(:disabled){background:#d9e8f2}
.qty-control button:disabled{background:#f2f7fa;color:#8fa6b6;cursor:not-allowed;opacity:1}
.qty-control button:focus-visible{outline:2px solid #e08036;outline-offset:-2px}
.qty-control__value{display:flex;align-items:center;justify-content:center;width:46px;background:#fff;color:#1e3a5f;font:700 14px/1 Inter,sans-serif;font-variant-numeric:tabular-nums;text-align:center}
.quote-line__remove,.quote-item__remove{padding:4px 8px;border:1px solid #e6dfd8;border-radius:6px;background:#fff;color:#a4552a;font-size:12px}
.quote-line__remove:hover,.quote-item__remove:hover{background:#fdf3ec}

/* Задача 20 — панель КП: шапка, прокручиваемый список, закреплённый низ. */
#drawer[open]{display:flex;flex-direction:column;gap:0;max-height:100dvh;padding:0;overflow:hidden;background:#fff;color:#29425d;font-size:13px;line-height:1.6}
@supports(height:100dvh){#drawer[open]{height:100dvh}}
#drawer::backdrop{background:#102a3899}
.drawer__head{flex:0 0 auto;display:flex;align-items:center;gap:12px;padding:18px 18px 14px;border-bottom:1px solid #dde7ec;background:#fff}
.drawer__heading{min-width:0;flex:1 1 auto}
.drawer__head h2{margin:0;color:#17465e;font-size:19px;line-height:1.25;font-weight:800}
.drawer__count{margin:2px 0 0;color:#6b8090;font-size:12px;font-weight:600}
#drawer [data-close]{flex:0 0 auto;display:grid;place-items:center;width:38px;height:38px;margin:0;padding:0;border:1px solid #d3e0e8;border-radius:10px;background:#fff;color:#2a5570;font-size:15px;line-height:1;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
#drawer [data-close]:hover{border-color:#8fb9cf;background:#eef6fa;color:#17465e}
#drawer [data-close]:focus-visible{outline:2px solid #e08036;outline-offset:1px}
#drawer-status{flex:0 0 auto;margin:0;padding:10px 18px;border-bottom:1px solid #e6eef3;background:#f4faf6;color:#2f7a4a;font-size:12px}
#drawer-status:empty{display:none;padding:0;border:0}
#drawer-status[data-state=error]{background:#fdf1f1;color:#a33a3a;border-bottom-color:#f0dcdc}
#drawer[aria-busy=true] #drawer-status{background:#fdf6f1;color:#9a531b}
#items{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 18px 4px;-webkit-overflow-scrolling:touch}
.drawer__foot{flex:0 0 auto;padding:14px 18px calc(14px + env(safe-area-inset-bottom));border-top:1px solid #dde7ec;background:#f8fbfd;box-shadow:0 -8px 18px #19344a0f}
.drawer__total{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:0 0 12px;color:#557a80;font-size:13px;font-weight:600}
.drawer__total strong{color:#17465e;font-size:21px;font-weight:800;line-height:1.2;white-space:nowrap;font-variant-numeric:tabular-nums}
.drawer__note{margin:10px 0 0;color:#7b8f9d;font-size:11px;line-height:1.5}
#drawer .quote-actions{display:grid;gap:8px;margin:0}
#drawer .quote-actions__checkout{order:-1;min-height:46px}
#drawer .quote-actions__view{min-height:44px}

/* Позиция: название и сумма, параметры, цена за штуку и тот же контрол, что в корзине. */
.quote-item{display:block;padding:14px 0;border-top:1px solid #e3edf3}
#items .quote-item:first-child{padding-top:10px;border-top:0}
.quote-item__head{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.quote-item__name{display:block;min-width:0;color:#1e3a5f;font-size:14px;font-weight:700;line-height:1.4}
.quote-item__sum{flex:0 0 auto;color:#17465e;font-size:14px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}
.quote-item__params{margin:4px 0 8px;color:#63798a;font-size:12px;line-height:1.5}
.quote-item__foot{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.quote-item__unit{margin:0;color:#6b8090;font-size:12px;white-space:nowrap}
.quote-item__actions{display:flex;align-items:center;gap:10px}
.quote-item__remove{align-self:center}
.quote-empty-note{margin:14px 0;padding:18px 16px;border:1px dashed #cfdde5;border-radius:10px;background:#fbfdfe;color:#5a7387;font-size:13px;text-align:center}
@media(max-width:520px){.drawer__head{padding:16px 14px 12px}#items{padding:0 14px 4px}.drawer__foot{padding:12px 14px calc(12px + env(safe-area-inset-bottom))}.drawer__total strong{font-size:19px}.quote-item__head{flex-wrap:wrap;gap:2px 12px}.quote-item__sum{font-size:13px}}

.quote-totals-inner{border:1px solid #e2e8ec;border-radius:12px;background:#fff;padding:22px;box-shadow:0 10px 26px #102c4014}
.quote-totals-inner h2{margin:0 0 16px;font-size:16px}
.quote-totals-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;font-size:14px;color:#4a6274}
.quote-totals-row span{min-width:0}
.quote-totals-row+.quote-totals-row{border-top:1px dashed #e6edf1}
.quote-totals-row b{color:#1e3a5f;white-space:nowrap}
.quote-order-total{display:flex;justify-content:space-between;gap:12px;margin:10px 0 18px;padding:14px 0 0;border-top:1px solid #dde7ec;font-size:15px}
.quote-order-total strong{color:#f26c2a;font-size:20px;font-weight:800;white-space:nowrap}
.quote-cta{display:block;width:100%;padding:16px 18px;border:0;border-radius:6px;background:linear-gradient(135deg,#e86a2a,#f0873f);color:#fff;font-size:13px;font-weight:750;letter-spacing:.06em;text-transform:uppercase;text-align:center;text-decoration:none}
.quote-cta:hover{filter:brightness(1.05);text-decoration:none;color:#fff}
.quote-cta:disabled{opacity:.55;cursor:not-allowed}
.quote-cta--ghost{margin-top:10px;background:#fff;border:1px solid #d3e0e8;color:#2a5570;text-transform:none;letter-spacing:0;font-size:14px;font-weight:600;padding:12px}
.quote-cta--ghost:hover{background:#f4f9fb;color:#2a5570}
.quote-note{margin:14px 0 0;color:#6b8090;font-size:12px;line-height:1.6}
.quote-empty{padding:34px;border:1px dashed #cfdde5;border-radius:12px;background:#fbfdfe;text-align:center;color:#5a7387}
.quote-empty a{display:inline-block;margin-top:12px}
@media(max-width:560px){.quote-page{padding:24px 16px 48px}
.quote-line{grid-template-columns:64px minmax(0,1fr);gap:12px;padding:12px}
.quote-line__media{min-height:64px}
.quote-line__head{flex-direction:column;align-items:flex-start;gap:2px}
.quote-line__name{font-size:14px}
.quote-line__sum{font-size:15px}
.quote-totals-inner{padding:18px}
.quote-totals-row{font-size:13px;gap:10px}
.quote-totals-row b{white-space:nowrap}
.quote-totals-row span{min-width:0}
.quote-done{padding:28px 16px 56px}
.quote-done__actions .quote-cta{width:100%;min-width:0}}

.quote-form{display:grid;gap:16px;margin:0}
.quote-field{display:grid;gap:6px}
.quote-field label{font-size:13px;font-weight:650;color:#2a4a5e}
.quote-field small{color:#6b8090;font-size:12px}
.quote-field input,.quote-field textarea{width:100%;padding:11px 12px;border:1px solid #c9d8e1;border-radius:8px;background:#fff;color:#1e3a5f;font:inherit;font-size:14px}
.quote-field textarea{min-height:96px;resize:vertical}
.quote-field input:focus,.quote-field textarea:focus{border-color:#e08a52;outline:2px solid #f0873f55;outline-offset:1px}
.quote-field[data-invalid] input,.quote-field[data-invalid] textarea{border-color:#c9502f;background:#fdf6f3}
.quote-field__error{color:#a83c1c;font-size:12px}
.quote-check{display:flex;gap:10px;align-items:flex-start;font-size:13px;color:#4a6274;line-height:1.55}
.quote-check input{margin:3px 0 0;width:16px;height:16px;flex:0 0 auto}
.quote-check a{color:#1e3a5f;text-decoration:underline;text-underline-offset:2px}
.quote-check a:hover{color:#f26c2a}
.quote-status{margin:0;font-size:13px;color:#a4552a;min-height:1em}
.quote-status:empty{margin:0}

.quote-done{max-width:760px;margin:0 auto;padding:40px 20px 70px;text-align:center}
.quote-done__badge{display:inline-grid;place-items:center;width:56px;height:56px;margin-bottom:14px;border-radius:50%;background:#eaf6ee;color:#2f7a4a;font-size:26px}
.quote-done h1{margin:0 0 10px}
.quote-done__number{font-weight:750;color:#1e3a5f}
.quote-done__meta{margin:14px auto 0;max-width:520px;color:#5b6b7a;font-size:14px}
.quote-done__actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin:24px 0 0}
.quote-done__actions .quote-cta{width:auto;min-width:250px;padding:15px 22px}
.quote-done__summary{max-width:460px;margin:26px auto 0;text-align:left}
.quote-done__error{margin:26px auto 0;max-width:520px;padding:20px;border:1px solid #f0d3c6;border-radius:12px;background:#fdf6f2;color:#8f3f1d;font-size:14px}

/* Task 19 — подтверждение: инструкция и контакты */
.quote-done__lead{margin:10px auto 24px;max-width:540px;color:#43576e;font-size:15px;line-height:1.7}
.quote-done__lead a{color:#f26c2a;font-weight:700;text-decoration:underline;text-underline-offset:2px}
.quote-done__lead a:hover{color:#c95722}
.quote-done__lead[hidden],.quote-cta[hidden]{display:none!important}
.quote-done__actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin:24px auto 0;max-width:560px}
.quote-done__actions .quote-cta{width:auto;min-width:250px;padding:15px 22px}
.quote-cta--download{position:relative;box-shadow:0 12px 24px #e86a2a33}
.quote-cta:focus-visible{outline:3px solid #1e3a5f;outline-offset:3px}
.quote-download__icon{flex:0 0 18px}
.quote-done__contacts{margin:32px auto 0;max-width:560px;border:1px solid #e2e8ec;border-radius:12px;background:#fff;text-align:left}
.quote-done__contacts h2{margin:0 0 16px;padding:0 20px;font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:#2a5570}
.quote-contacts__list{list-style:none;margin:0;padding:0 20px 20px}
.quote-contacts__list li{margin-bottom:10px}
.quote-contact{display:flex;align-items:center;gap:12px;padding:11px 20px 11px 16px;border:none;background:none;color:#1e3a5f;text-decoration:none;font-size:15px;font-weight:600}
.quote-contact__icon{flex:0 0 18px;color:#2a5570;display:inline-flex;align-items:center;justify-content:center}
.quote-contact__body{flex:1 1 auto}
.quote-contact__label{display:block;font-size:12px;font-weight:550;color:#63798a;letter-spacing:.02em}
.quote-contact__value{display:block;white-space:nowrap}
.quote-contact:focus-visible{outline:3px solid #f26c2a;outline-offset:2px;border-radius:8px}
.quote-contact:hover{color:#1e3a5f;text-decoration:underline}
.quote-contact__pair{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:10px;border-top:1px solid #eef2f5}
.quote-copy{flex:0 0 auto;display:inline-flex;align-items:center;gap:8px;min-width:44px;min-height:44px;padding:0 12px;border:1px solid #d3e0e8;background:#fff;color:#2a5570;border-radius:10px;cursor:pointer;font:inherit;white-space:nowrap}
.quote-copy:hover{border-color:#f26c2a;background:#fdf6f1;color:#1e3a5f}
.quote-copy:focus-visible{outline:3px solid #f26c2a;outline-offset:2px}
.quote-copy__icon{width:16px;height:16px}
.quote-copy__tip{display:none;font-size:12px;font-weight:650}
.quote-copy.is-copied{border-color:#2f9d78;background:#eaf6ee;color:#2f9d78}
.quote-copy.is-copy-error{border-color:#a83c1c;background:#fdf6f3;color:#a83c1c}
.quote-copy.is-copied .quote-copy__tip,.quote-copy.is-copy-error .quote-copy__tip{display:inline}
/* Ошибочная обратная связь на кнопках страниц-пакета (tooltip появляется и при is-copy-error). */
.sb-page .ph-qcontact--copy.is-copy-error .ph-qcontact__tooltip,.sb-page .ph-qcontact--copy.is-copy-error:hover .ph-qcontact__tooltip{opacity:1;visibility:visible;transform:translate(-50%,0)}
.sb-page .ph-qcontact--copy.is-copy-error .ph-qcontact__tooltip{background:#8f3f1d}
.sb-page .ph-qcontact--copy.is-copy-error .ph-qcontact__tooltip::after{border-top-color:#8f3f1d}
@media(max-width:560px){
.quote-done__actions{flex-direction:column;align-items:stretch}
.quote-done__actions .quote-cta{width:100%;min-width:0}
.quote-contact__pair{flex-wrap:wrap}
.quote-contact__pair .quote-contact{padding-right:0}
}

@media(max-width:540px){#drawer[open]{margin:8px 8px 8px auto;width:calc(100% - 16px);max-width:calc(100% - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border:1px solid #b9cbd6;border-radius:16px;box-shadow:0 8px 28px #132c3d55}}
