/* Suntc cart and checkout. Tokens, buttons, fields and the modal window are in suntc-dialog.css (load it first).
   Rebuilt 20.11.2026 on one system: spacing 4/8/12/16/24/32/48, type 13/15/16/17/24/26, radii 6/10/999.
   Selection states (23.11): segment with a light «selected» fill for tabs and buyer type; card with a radio dot for delivery and payment. */

/* ---- Page frame ---- */
/* Same container as the theme header: edges line up with the logo and the icons at every width. */
.sc-checkout { box-sizing: border-box; max-width: 1700px; margin: 40px auto 64px; padding: 0 40px; font-size: 16px; line-height: 1.5; }
.sc-checkout *, .sc-checkout *::before, .sc-checkout *::after { box-sizing: border-box; }
.sc-checkout [hidden] { display: none !important; }
:where(.sc-checkout) :is(h1, h2, h3) { padding: 0; font-family: inherit; color: inherit; text-transform: none; text-indent: 0; }
#sc-checkout h1 { margin: 0; padding: 0; text-indent: 0; font-size: clamp(32px, 4.5vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -.03em; }
:where(.sc-checkout) h2 { margin: 0 0 var(--s-5); font-size: 24px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.sc-checkout h3::before, .sc-checkout h3::after { content: none !important; display: none !important; }
:where(.sc-checkout) a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
:where(.sc-checkout) p { margin: 0; }
:where(.sc-checkout) button { font-family: inherit; color: inherit; line-height: 1.3; }
.sc-note, .sc-hint { color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.sc-label { display: block; font-size: 15px; line-height: 1.4; }
.sc-optional { color: var(--ink-2); }
/* The theme sets overflow-x:hidden on html/body: that silently disables position:sticky. clip keeps the page from scrolling sideways. */
html:has(#sc-checkout.sc-has-checkout), body:has(#sc-checkout.sc-has-checkout) { overflow-x: clip; overflow-y: visible; }
body:has(.sc-checkout) :is(.call-btn, .scrollup) { display: none !important; }

.sc-head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); margin: 0 0 var(--s-6); }
.sc-checkout .sc-continue { color: var(--ink-2); font-size: 15px; text-decoration: none; }
@media (hover: hover) { .sc-checkout .sc-continue:hover { color: var(--ink); text-decoration: underline; } }

.sc-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 400px); gap: clamp(32px, 4vw, 64px); align-items: start; }
.sc-main { min-width: 0; counter-reset: sc-step; }
.sc-section { padding: var(--s-6) 0; border-top: 1px solid var(--line); }
.sc-section:first-child { padding-top: var(--s-5); }

/* Numbered steps */
.sc-step h2, .sc-step-head h2 { display: flex; align-items: center; gap: var(--s-3); }
.sc-step h2::before, .sc-step-head h2::before {
  counter-increment: sc-step; content: counter(sc-step); flex: 0 0 32px; height: 32px; display: inline-grid; place-items: center;
  border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; letter-spacing: 0;
}
.sc-step-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-5); margin-bottom: var(--s-5); }
.sc-step-head h2 { margin: 0; }
.sc-buyer-step { padding-bottom: 0; }
.sc-buyer-step:has(#sc-login:not([hidden])) { padding-bottom: var(--s-6); }
.sc-section.sc-buyer-fields { padding-top: 0; border-top: 0; }

/* ---- Products ---- */
.sc-overview-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-5); margin-bottom: var(--s-2); }
.sc-overview-heading h2 { margin: 0; }
.sc-product { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: var(--s-4); align-items: start; padding: var(--s-5) 0; }
.sc-product + .sc-product { border-top: 1px solid var(--line); }
.sc-overview-image { display: block; }
.sc-overview-image img, .sc-product img { display: block; width: 76px; height: 76px; object-fit: contain; }
.sc-overview-description { min-width: 0; padding-top: 2px; }
.sc-checkout .sc-name { font-size: 17px; line-height: 1.35; font-weight: 500; text-decoration: none; overflow-wrap: anywhere; }
@media (hover: hover) { .sc-checkout .sc-name:hover { text-decoration: underline; } }
.sc-overview-description p { margin-top: var(--s-1); overflow-wrap: anywhere; }
.sc-overview-description .sc-note { font-size: 13px; }
.sc-unavailable-item { color: var(--error-text); font-size: 13px; line-height: 1.4; }
.sc-overview-amount { display: grid; justify-items: end; gap: var(--s-2); padding-top: 2px; }
.sc-overview-amount strong { font-size: 17px; line-height: 1.35; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-overview-amount .sc-on-request { color: var(--ink-2); font-weight: 500; }
.sc-checkout .sc-delete { padding: var(--s-1) 0; border: 0; background: none; color: var(--ink-2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (hover: hover) { .sc-checkout .sc-delete:hover { color: var(--error-text); } }
.sc-overview-amount .sc-field-error { max-width: 180px; text-align: right; }
.sc-voucher { grid-template-columns: minmax(0, 1fr) auto; }

/* Quantity stepper */
.sc-stepper { display: inline-flex; align-items: stretch; height: 40px; border: 1px solid var(--control); border-radius: var(--r-ctl); background: #fff; overflow: hidden; }
.sc-checkout .sc-stepper button { width: 40px; padding: 0; border: 0; background: #fff; font-size: 18px; line-height: 1; cursor: pointer; transition: background-color var(--t-fast); }
@media (hover: hover) { .sc-checkout .sc-stepper button:hover:enabled { background: var(--surface-2); } }
.sc-checkout .sc-stepper button:disabled { color: #b9bbb2; cursor: not-allowed; }
#sc-checkout .sc-stepper input { width: 52px; min-height: 0; height: 100%; margin: 0; padding: 0 4px; border: 0; border-inline: 1px solid var(--line); border-radius: 0; box-shadow: none; text-align: center; font-size: 16px; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
#sc-checkout .sc-stepper input::-webkit-inner-spin-button, #sc-checkout .sc-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sc-stepper:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.sc-stepper :focus-visible { outline: none; }
.sc-stepper:has([aria-invalid="true"]) { border-color: var(--error); box-shadow: 0 0 0 1px var(--error); }
#sc-checkout .sc-stepper input[aria-invalid="true"] { box-shadow: none; border-color: var(--line) !important; }

/* ---- Selection: segment (tabs, buyer type, delivery) ---- */
.sc-choice, .sc-tabs { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: 0 0 var(--s-5); }
.sc-tabs { margin: 0; }
.sc-choice label, .sc-tabs label { position: relative; margin: 0; cursor: pointer; }
.sc-checkout :is(.sc-choice, .sc-tabs) input[type=radio] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sc-choice span, .sc-tabs span {
  display: inline-flex; align-items: center; justify-content: center; min-height: var(--h-ctl); padding: 10px 16px;
  border: 1px solid var(--control); border-radius: var(--r-ctl); background: #fff; color: var(--ink);
  font-size: 15px; font-weight: 500; line-height: 1.25; text-align: center;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
@media (hover: hover) { :is(.sc-choice, .sc-tabs) label:hover input:not(:checked):not(:disabled) + span { border-color: var(--ink); background: var(--surface); } }
/* Selected segment is light (as the chosen payment card): dark fill stays for action buttons only. Inset shadow = 2px border without a jump. */
:is(.sc-choice, .sc-tabs) input:checked + span { border-color: var(--ink); background: var(--selected-bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
:is(.sc-choice, .sc-tabs) input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.sc-choice input:disabled + span { background: var(--disabled-bg); border-color: var(--disabled-bg); color: var(--disabled-text); cursor: not-allowed; }

/* ---- Fields ---- */
.sc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); margin: 0 0 var(--s-4); }
.sc-wide { grid-column: 1 / -1; }
.sc-checkout .sc-check { display: flex; align-items: flex-start; gap: var(--s-3); margin: var(--s-3) 0; font-size: 15px; line-height: 1.4; cursor: pointer; }
.sc-checkout .sc-check a { color: var(--ink); text-decoration-color: #c98a12; }
.sc-checkout .sc-check + .sc-field-error { margin: calc(-1 * var(--s-2)) 0 var(--s-3) 32px; }
#sc-other, #sc-company { margin-top: var(--s-2); }
#sc-recipient, #sc-password { margin-top: var(--s-2); }
#sc-checkout textarea { resize: vertical; min-height: 88px; }
#sc-checkout select { appearance: none; -webkit-appearance: none; padding-right: 40px !important; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2323241f' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 14px center; }

/* File for the organisation card */
.sc-file-field .sc-hint { display: block; margin-top: var(--s-2); }
#sc-checkout label.sc-file { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-2); min-height: var(--h-ctl); cursor: pointer; }
.sc-file input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.sc-file .sc-file-button { flex: none; }
.sc-file-name { min-width: 0; color: var(--ink-2); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-file-chosen .sc-file-name { color: var(--ink); font-weight: 500; }
.sc-file:focus-within .sc-file-button { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (hover: hover) { .sc-file:hover .sc-file-button { background: var(--ink); color: #fff; } }

/* ---- Delivery ---- */
#sc-cdek { margin-bottom: var(--s-4); }
#sc-cdek > label { position: relative; }
.sc-suggest { margin-top: -1px; border: 1px solid var(--control); border-radius: 0 0 var(--r-ctl) var(--r-ctl); background: #fff; max-height: min(60vh, 440px); overflow: auto; box-shadow: 0 8px 20px #23241f14; }
.sc-checkout .sc-suggest-item { display: block; width: 100%; min-height: 44px; padding: var(--s-2) var(--s-3); border: 0; border-bottom: 1px solid #ecece6; background: #fff; text-align: left; cursor: pointer; }
.sc-suggest-item:last-child { border-bottom: 0; }
.sc-suggest-host { position: relative; }
.sc-suggest-pop { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: var(--s-1); border-radius: var(--r-ctl); }
.sc-suggest-pop .sc-suggest-item { cursor: pointer; }
.sc-suggest-stale { opacity: .55; }
.sc-checkout .sc-suggest-item[aria-selected="true"] { background: var(--surface); box-shadow: inset 3px 0 0 var(--focus); }
.sc-suggest-item b { display: block; font-size: 15px; font-weight: 500; line-height: 1.3; }
.sc-suggest-item span { display: block; color: var(--ink-2); font-size: 13px; line-height: 1.35; }
@media (hover: hover) { .sc-checkout .sc-suggest-item:hover { background: var(--surface); } }
.sc-checkout .sc-suggest-item:focus-visible { outline: none; background: var(--surface); box-shadow: inset 3px 0 0 var(--focus); }
#sc-city-status:not(:empty) { display: block; margin-top: 6px; }
#sc-pvz, #sc-address { margin-top: var(--s-4); }
#sc-delivery-days:not(:empty) { margin: 0 0 var(--s-4); }
#sc-delivery-days:empty { display: none; }
#sc-pickup { margin: 0 0 var(--s-4); }
#sc-pickup p + p { margin-top: var(--s-1); }
#sc-map-wrap { margin-top: var(--s-2); }
#sc-map-status:not(:empty) { margin-top: var(--s-2); }
.sc-map { width: 100%; height: 280px; margin-top: var(--s-3); background: #eef0ea; border: 1px solid var(--control); border-radius: var(--r-card); overflow: hidden; }
.sc-map-marker { background: var(--gold); border: 2px solid var(--ink); border-radius: 50%; box-shadow: 0 1px 3px #0004; transform: scale(.7); transition: transform var(--t-fast); }
.sc-map-marker:hover, .sc-map-marker:focus-visible { transform: scale(1); }
.sc-map-marker.sc-marker-selected { background: var(--ink); border: 3px solid #fff; outline: 2px solid var(--ink); transform: scale(1.15); z-index: 1000 !important; }
.sc-map .leaflet-control-attribution { font-size: 11px; }
.sc-map .leaflet-control-zoom a { text-decoration: none; }

/* ---- Payment: card with a radio dot ---- */
#sc-pay-options { display: grid; gap: var(--s-2); margin: 0 0 var(--s-4); text-align: left; }
#sc-pay-options label { position: relative; cursor: pointer; }
#sc-pay-options input[type=radio] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
#sc-pay-options .sc-pay-option span {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 14px 48px;
  border: 1px solid var(--control); border-radius: var(--r-card); background: #fff;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
#sc-pay-options .sc-pay-option span::before {
  content: ""; position: absolute; left: 16px; top: 16px; width: 20px; height: 20px;
  border: 2px solid var(--control); border-radius: 50%; background: #fff;
}
#sc-pay-options b { color: var(--ink); font-size: 16px; font-weight: 500; line-height: 1.35; }
#sc-pay-options small { color: var(--ink-2); font-size: 13px; line-height: 1.4; }
@media (hover: hover) { #sc-pay-options label:hover input:not(:checked) + span { border-color: var(--ink); background: var(--surface); } }
#sc-pay-options input:checked + span { padding: 13px 15px 13px 47px; border: 2px solid var(--ink); background: var(--selected-bg); }
#sc-pay-options input:checked + span::before { left: 15px; top: 15px; border: 6px solid var(--ink); }
#sc-pay-options input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
#sc-pay-info { padding: var(--s-4); border-radius: var(--r-card); background: var(--surface); color: var(--ink); font-size: 15px; line-height: 1.5; }
#sc-pay-info:empty { display: none; }
#sc-pay-info p + p, #sc-pay-info p + ul, #sc-pay-info ul + p { margin-top: var(--s-2); }
.sc-checklist { margin: 0; padding: 0; list-style: none; }
.sc-checklist li { position: relative; margin: var(--s-1) 0; padding-left: 22px; }
.sc-checklist li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 10px; height: 6px; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-45deg); }

/* Comment */
.sc-comment { padding-top: var(--s-5); }
.sc-comment summary { display: inline-block; padding: var(--s-1) 0; cursor: pointer; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.sc-comment summary::-webkit-details-marker { display: none; }
.sc-comment details[open] summary { margin-bottom: var(--s-3); }

/* Login form («Я уже зарегистрировался») */
#sc-login .sc-note { margin: 0 0 var(--s-4); font-size: 15px; }
#sc-login .sc-fields { margin-bottom: var(--s-5); }
.sc-inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }
.sc-inline-actions a { font-size: 15px; }

/* ---- Summary panel ---- */
.sc-panel { position: relative; padding: var(--s-5); border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.sc-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gold); }
@media (min-width: 841px) {
  .sc-panel { position: sticky; top: 100px; max-height: calc(100vh - 116px); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
}
.sc-panel h2 { margin: var(--s-1) 0 var(--s-4); }
.sc-line, .sc-total { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); }
.sc-line { margin: 0 0 var(--s-2); font-size: 15px; line-height: 1.4; }
.sc-line b, .sc-total b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-line b { font-weight: 500; }
.sc-panel .sc-line a, .sc-panel #sc-order-payment a { color: var(--ink); }
#sc-discount { color: var(--success); }
.sc-free-note { margin: 0 0 var(--s-2); font-size: 13px; }
.sc-coupon-box { margin: var(--s-3) 0 0; }
.sc-coupon-box summary { display: inline-block; padding: var(--s-1) 0; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sc-coupon-box summary::-webkit-details-marker { display: none; }
.sc-coupon { display: flex; align-items: stretch; gap: var(--s-2); margin-top: var(--s-2); }
#sc-checkout .sc-coupon input { flex: 1; min-width: 0; margin: 0; }
.sc-coupon .sc-button { flex: none; height: var(--h-ctl); }
.sc-coupon + .sc-field-error { margin-top: 6px; }
#sc-clear { margin-top: var(--s-2); font-size: 13px; }
#sc-status:empty, #sc-order-payment:empty { display: none; }
#sc-status { margin-top: var(--s-2); color: var(--success); font-size: 13px; }
#sc-order-payment { margin: var(--s-3) 0 0; color: var(--ink-2); font-size: 15px; }
.sc-total { margin: var(--s-4) 0 var(--s-4); padding-top: var(--s-4); border-top: 1px solid #c9cbc3; }
.sc-total strong { font-size: 17px; font-weight: 700; }
.sc-total b { font-size: 26px; line-height: 1.1; font-weight: 700; }
#sc-grand { padding: 0 2px; border-radius: 4px; }
.sc-total-note { margin: calc(-1 * var(--s-2)) 0 var(--s-4); font-size: 13px; }
.sc-panel .sc-check { margin: 0 0 var(--s-3); font-size: 14px; }
.sc-panel .sc-check + .sc-field-error { margin: calc(-1 * var(--s-2)) 0 var(--s-3) 32px; }
.sc-panel #sc-submit { margin-top: var(--s-4); }
.sc-blocker:not(:empty) { margin: var(--s-3) 0 0; padding: var(--s-3); border-radius: var(--r-ctl); background: #fff3e6; color: #6e3a0b; font-size: 13px; }
.sc-blocker:empty { display: none; }
.sc-panel-actions { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-2); }
.sc-panel-actions:not(:has(button:not([hidden]))) { display: none; }
.sc-or { display: flex; align-items: center; gap: var(--s-3); margin: var(--s-5) 0 var(--s-3); color: var(--ink-2); font-size: 13px; }
.sc-or::before, .sc-or::after { content: ""; flex: 1; border-top: 1px solid #d3d5cc; }
.sc-checkout .sc-quick-button { width: 100%; min-height: var(--h-ctl); }
.sc-quick-entry .sc-note { margin-top: var(--s-2); text-align: center; }
.sc-notice { margin: 0 0 var(--s-4); }
.sc-overview-status { color: var(--ink); font-size: 15px; font-weight: 500; }
.sc-overview-status + .sc-note { margin-top: var(--s-1); }
.sc-overview .sc-panel > .sc-primary { margin-top: var(--s-2); }

/* «Я уже зарегистрировался»: the panel keeps goods, delivery and total; «Войти» is the only main button. */
.sc-login-note { display: none; margin: 0 0 var(--s-2); padding: var(--s-3); border-radius: var(--r-ctl); background: #fff; color: var(--ink-2); font-size: 13px; }
.sc-login-mode .sc-login-note { display: block; }
.sc-login-mode .sc-panel :is(.sc-check, #sc-submit, .sc-blocker, .sc-panel-actions, .sc-quick-entry, #sc-order-payment, .sc-free-note, .sc-coupon-box),
.sc-login-mode .sc-mobile { display: none !important; }

/* Messages */
.sc-error { padding: var(--s-3) var(--s-4); border-radius: var(--r-ctl); background: var(--error-bg); color: var(--error-text); }
.sc-toast { position: fixed; top: 100px; right: 20px; z-index: 1100; display: flex; align-items: flex-start; gap: var(--s-3); width: min(400px, calc(100% - 32px)); max-height: calc(100dvh - 120px); overflow: auto; padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4); border: 1px solid var(--error-line); border-radius: var(--r-card); background: var(--error-bg); color: var(--error-text); box-shadow: 0 8px 28px #4122181f; }
.sc-toast-content { flex: 1; min-width: 0; align-self: center; }
.sc-toast p { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.4; }
.sc-toast small { display: block; margin-top: 2px; font-size: 12px; opacity: .8; }
.sc-toast button { flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--r-ctl); background: #f7e0d4; color: inherit; font-size: 22px; cursor: pointer; }
#sc-error-list { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .sc-toast:not([hidden]) { animation: sc-toast-in 180ms ease-out both; }
  @keyframes sc-toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
}

/* Where «Исправить» took you: a soft background that fades, the focus ring does the rest */
.sc-attention { border-radius: var(--r-ctl); }
@media (prefers-reduced-motion: no-preference) {
  .sc-attention { animation: sc-attention 1.2s ease-out; }
  .sc-check.sc-attention, label.sc-attention { margin-inline: -8px; padding-inline: 8px; }
  @keyframes sc-attention { 0%, 30% { background-color: var(--attention); } 100% { background-color: transparent; } }
  #sc-grand.sc-flash { animation: sc-flash 900ms ease-out; }
  @keyframes sc-flash { 0% { background: #ffe2a8; } 100% { background: transparent; } }
}

/* Scroll targets under the fixed site header */
#sc-buyer, #sc-delivery, #sc-payment, #sc-summary { scroll-margin-top: 100px; }
#sc-form :is(input, select, textarea, button):focus { scroll-margin-block: 100px 150px; }

/* ---- Empty cart ---- */
.sc-checkout.sc-empty { min-height: 300px; margin: 56px auto 80px; }
.sc-empty-content { position: relative; padding: 40px clamp(24px, 4vw, 48px); border-radius: var(--r-card); background: var(--surface); overflow: hidden; }
.sc-empty-content::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gold); }
.sc-empty .sc-empty-content h1 { margin: 0 0 var(--s-3); }
.sc-empty-content p { margin: 0 0 var(--s-5); color: var(--ink-2); font-size: 17px; }
.sc-checkout .sc-empty-link { display: inline-flex; align-items: center; min-height: var(--h-btn); padding: 12px 24px; border-radius: var(--r-ctl); background: var(--gold); color: var(--on-gold); font-weight: 700; text-decoration: none; }
@media (hover: hover) { .sc-checkout .sc-empty-link:hover { background: var(--gold-hover); } }

/* ---- «Спасибо за заказ» ---- */
.sc-result-hero { display: flex; gap: var(--s-4); align-items: flex-start; margin: 0 0 var(--s-6); }
.sc-result-mark { flex: 0 0 56px; height: 56px; display: grid; place-items: center; border-radius: var(--r-pill); background: var(--success-bg); color: var(--success); }
.sc-checkout.sc-result h1 { margin: var(--s-1) 0 var(--s-2); font-size: clamp(30px, 4vw, 44px); }
.sc-result-lead { color: var(--ink-2); font-size: 17px; }
.sc-result-pay { margin: 0 0 var(--s-5); padding: var(--s-4) var(--s-5); border: 1px solid #f3d9a4; border-radius: var(--r-card); background: var(--selected-bg); }
.sc-result-pay p { margin: 0 0 var(--s-3); }
.sc-result-status { margin: 0 0 var(--s-3); font-weight: 500; }
.sc-result-steps { margin: 0; padding: 0; list-style: none; counter-reset: sc-r; display: grid; gap: var(--s-3); }
.sc-result-steps li { counter-increment: sc-r; position: relative; padding-left: 40px; line-height: 1.5; }
.sc-result-steps li::before { content: counter(sc-r); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: var(--r-pill); background: var(--ink); color: #fff; font-size: 14px; font-weight: 700; }
.sc-result-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--s-4); align-items: center; padding: var(--s-3) 0; }
.sc-result-item + .sc-result-item { border-top: 1px solid var(--line); }
.sc-result-item img { width: 56px; height: 56px; object-fit: contain; }
.sc-result-item a { font-weight: 500; text-decoration: none; }
@media (hover: hover) { .sc-result-item a:hover { text-decoration: underline; } }
.sc-result-item .sc-note { display: block; margin-top: 2px; }
.sc-result-item b { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-result-item .sc-on-request { color: var(--ink-2); font-weight: 500; }
.sc-result-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5) var(--s-6); }
.sc-result-details h3 { margin: 0 0 var(--s-2); padding: 0; color: var(--ink-2); font-size: 12px; font-weight: 700; line-height: 1.3; letter-spacing: .05em; text-transform: uppercase; }
.sc-result-details p { margin: 0 0 var(--s-1); font-size: 15px; line-height: 1.5; }
.sc-result-details p.sc-note { font-size: 13px; }
.sc-nowrap { white-space: nowrap; }
.sc-result-panel .sc-primary { margin-top: var(--s-1); }
.sc-checkout .sc-result-secondary { width: 100%; margin-top: var(--s-3); }
.sc-result-account { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid #d3d5cc; }
.sc-result-account p { margin: 0 0 var(--s-1); font-size: 14px; line-height: 1.45; }
.sc-result-help { margin-top: var(--s-4); text-align: center; }

/* ---- Tablets and phones ---- */
@media (max-width: 840px) {
  .sc-checkout { margin-top: 24px; padding: 0 16px 88px; }
  .sc-layout { display: block; }
  .sc-panel { margin-top: var(--s-2); }
  .sc-head { margin-bottom: var(--s-5); }
  .sc-section { padding: var(--s-5) 0; }
  .sc-step-head { flex-direction: column; align-items: stretch; }
  .sc-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .sc-tabs span { width: 100%; min-height: 48px; padding: 8px; font-size: 14px; }
  .sc-buyer-fields > .sc-choice { display: grid; grid-template-columns: 1fr 1fr; }
  .sc-buyer-fields > .sc-choice span { width: 100%; }
  .sc-toast { top: 76px; right: 16px; }
  .sc-checkout .sc-mobile {
    position: fixed; inset-inline: 0; bottom: var(--suntc-cookie-space, 0px); z-index: 1040;
    display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin: 0;
    padding: 10px 16px max(10px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line);
    background: #fff; box-shadow: var(--sh-sticky); transition: transform 180ms ease, opacity 180ms ease;
  }
  .sc-mobile-total { display: flex; flex-direction: column; color: var(--ink-2); font-size: 13px; line-height: 1.2; }
  .sc-mobile-total b { color: var(--ink); font-size: 20px; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .sc-checkout .sc-mobile .sc-primary { flex: 1; width: auto; max-width: 260px; }
  .sc-submit-visible .sc-mobile { transform: translateY(110%); opacity: 0; pointer-events: none; }
  .sc-checkout:has(input:is([type=text], [type=email], [type=tel], [type=password], [type=number], [type=search]):focus, textarea:focus) .sc-mobile { visibility: hidden; }
  .sc-result-details { grid-template-columns: 1fr; }
}
@media (min-width: 841px) { .sc-mobile { display: none; } }
@media (max-width: 570px) {
  .sc-checkout h2 { font-size: 22px; }
  .sc-step h2::before, .sc-step-head h2::before { flex-basis: 28px; height: 28px; font-size: 14px; }
  .sc-fields { grid-template-columns: 1fr; }
  .sc-panel { padding: var(--s-4); }
  /* Products: picture, name, then price + stepper + delete on one row */
  .sc-product { grid-template-columns: 60px minmax(0, 1fr); gap: var(--s-3); }
  .sc-overview-image img, .sc-product img { width: 60px; height: 60px; }
  .sc-overview-amount { grid-column: 2; grid-template-columns: 1fr auto; justify-items: start; align-items: center; gap: var(--s-2) var(--s-3); padding-top: 0; }
  .sc-overview-amount strong { grid-column: 1 / -1; }
  .sc-overview-amount .sc-delete { justify-self: end; }
  .sc-overview-amount .sc-field-error { grid-column: 1 / -1; max-width: none; text-align: left; }
  .sc-voucher { grid-template-columns: minmax(0, 1fr); }
  .sc-voucher .sc-overview-amount { grid-column: 1; }
  .sc-result-hero { gap: var(--s-3); }
  .sc-result-mark { flex-basis: 44px; height: 44px; }
  .sc-result-mark svg { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .sc-checkout *, .sc-checkout *::before, .sc-checkout *::after { transition: none !important; animation: none !important; }
  .sc-attention { outline: 2px solid var(--focus); outline-offset: 2px; }
}

/* ---- Theme overrides (madeshop hides checkboxes and strips link underlines) ---- */
.sc-checkout :is(.sc-check a, .sc-line a, #sc-order-payment a, .sc-link, .sc-delete, summary, .sc-inline-actions a, .sc-continue:hover),
.sc-dialog :is(.suntc-order-check a, .sc-link) { text-decoration: underline !important; text-underline-offset: 3px; }
#sc-checkout.sc-result h1 { margin: var(--s-1) 0 var(--s-2); font-size: clamp(30px, 4vw, 44px); }

/* ---- Review round 2 ---- */
/* Attention: the whole consent block lights up, incl. the box; spread instead of padding so nothing moves */
@media (prefers-reduced-motion: no-preference) {
  .sc-check.sc-attention, label.sc-attention { margin-inline: 0; padding-inline: 0; animation: sc-attention-spread 1.2s ease-out; }
  @keyframes sc-attention-spread { 0%, 30% { background-color: var(--attention); box-shadow: 0 0 0 8px var(--attention); } 100% { background-color: transparent; box-shadow: 0 0 0 8px transparent; } }
}
/* Phones: the two account tabs one under the other, each on one line */
@media (max-width: 440px) {
  .sc-tabs { grid-template-columns: 1fr; }
  .sc-tabs span { min-height: var(--h-ctl); font-size: 15px; }
}
@media (max-width: 840px) {
  #sc-buyer, #sc-delivery, #sc-payment, #sc-summary { scroll-margin-top: 120px; }
  #sc-form :is(input, select, textarea, button):focus { scroll-margin-block: 120px 150px; }
  .sc-result-details { grid-template-columns: 1fr; }
}

/* ---- Payment notice (bank did not open the form, declined, paid) ---- */
.sc-result-mark-warn { background: var(--attention); color: #9a5b00; }
.sc-pay-notice > * { max-width: 820px; }
.sc-pay-notice .sc-result-hero { margin-bottom: var(--s-5); }
.sc-pay-notice-body { margin-left: calc(56px + var(--s-4)); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.sc-pay-notice-body > p { margin: 0 0 var(--s-5); font-size: 16px; line-height: 1.55; }
.sc-pay-notice-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin: 0 0 var(--s-5); }
.sc-pay-notice-actions .sc-button { min-height: var(--h-btn); padding-inline: 24px; }
.sc-pay-notice .sc-note a { color: inherit; }
@media (max-width: 570px) {
  .sc-pay-notice-body { margin-left: 0; }
  .sc-pay-notice-actions > * { flex: 1 1 100%; }
}

/* Phones: the bottom bar hides while a field has focus (keyboard open, suggestions below the field). */
@media (max-width: 840px) { .sc-checkout.sc-typing .sc-mobile { display: none; } }

/* ---- Delivery cards (23.11): price and time on each option, same «selected» language as payment ---- */
.sc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-2); margin: 0 0 var(--s-5); }
.sc-card { position: relative; margin: 0; cursor: pointer; }
.sc-checkout .sc-card input[type=radio] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sc-card > span {
  position: relative; display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 16px 14px 48px;
  border: 1px solid var(--control); border-radius: var(--r-card); background: #fff;
  transition: background-color var(--t-fast), border-color var(--t-fast);
}
.sc-card > span::before { content: ""; position: absolute; left: 16px; top: 16px; width: 20px; height: 20px; border: 2px solid var(--control); border-radius: 50%; background: #fff; }
.sc-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-2); }
.sc-card b { color: var(--ink); font-size: 16px; font-weight: 500; line-height: 1.35; }
.sc-card em { flex: none; color: var(--ink); font-size: 15px; font-style: normal; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sc-card em.sc-free { color: var(--success); }
.sc-card small { color: var(--ink-2); font-size: 13px; line-height: 1.4; }
@media (hover: hover) { .sc-card:hover input:not(:checked) + span { border-color: var(--ink); background: var(--surface); } }
.sc-card input:checked + span { border-color: var(--ink); background: var(--selected-bg); box-shadow: inset 0 0 0 1px var(--ink); }
.sc-card input:checked + span::before { border: 6px solid var(--ink); }
.sc-card input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
#sc-city-region:empty { display: none; }
#sc-city-region { margin-top: 6px; }
/* Buyer: «новый / уже зарегистрирован» and «физ / юр» are one step — a small gap, not two section paddings. */
@media (max-width: 840px) {
  .sc-checkout .sc-buyer-step:not(:has(#sc-login:not([hidden]))) { padding-bottom: 0; }
  .sc-checkout #sc-buyer.sc-buyer-fields { padding-top: var(--s-3); }
}

/* ---- 23.11, round 2: switches, line discount, coupon summary, light motion ---- */
/* «Заберёт другой человек» and «Зарегистрироваться» are on/off settings, so they look like switches, not consents. */
.sc-checkout .sc-switch { align-items: center; }
#sc-checkout .sc-switch input[type=checkbox] {
  width: 40px !important; height: 24px !important; border: 0; border-radius: 999px; background: var(--control); place-content: initial;
  position: relative !important; transition: background-color 180ms ease;
}
#sc-checkout .sc-switch input[type=checkbox]::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; margin: 0; border: 0; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px #23241f40; transform: none; transition: transform 200ms cubic-bezier(.2,.7,.3,1);
}
#sc-checkout .sc-switch input[type=checkbox]:checked { background: var(--ink); }
#sc-checkout .sc-switch input[type=checkbox]:checked::before { transform: translateX(16px); }
@media (hover: hover) { #sc-checkout .sc-switch input[type=checkbox]:not(:checked):hover { background: #9a9c94; } }
.sc-switch-note { color: var(--ink-2); font-size: 13px; }

/* Line price with the coupon: old sum crossed out, new sum bold, the discount in green under it. */
.sc-line-price { display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 0 var(--s-2); }
.sc-line-price s { color: var(--ink-2); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-line-price strong { border-radius: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-line-discount { display: block; color: var(--success); font-size: 13px; line-height: 1.3; white-space: nowrap; }
.sc-stepper input { will-change: transform; }

/* Coupon: collapsed summary names the applied code; a chevron shows it opens. */
#sc-coupon-summary b { font-weight: 600; letter-spacing: .02em; }
:is(.sc-coupon-box, .sc-comment details) summary { position: relative; padding-right: 20px; }
:is(.sc-coupon-box, .sc-comment details) summary::after {
  content: ""; position: absolute; right: 2px; top: 50%; width: 7px; height: 7px; margin-top: -5px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform 220ms ease;
}
:is(.sc-coupon-box, .sc-comment details)[open] summary::after { transform: rotate(-135deg); margin-top: -1px; }

@media (prefers-reduced-motion: no-preference) {
  .sc-card > span, .sc-choice span, .sc-tabs span { transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 120ms ease; }
  .sc-card:active > span, .sc-choice label:active span, .sc-tabs label:active span { transform: scale(.985); }
  #sc-pay-info { animation: sc-fade-in 220ms ease-out; }
  @keyframes sc-fade-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
}
@media (max-width: 840px) {
  .sc-overview-amount :is(.sc-line-price, .sc-line-discount) { grid-column: 1 / -1; }
  .sc-overview-amount .sc-line-price { justify-content: flex-start; }
}
.sc-result-amount { text-align: right; }
.sc-result-amount .sc-line-discount { margin-top: 2px; }
