.ct-storefront .ct-purchase {display:grid;gap:var(--ct-space-3);padding:var(--ct-space-4);border:1px solid var(--ct-color-border);border-radius:var(--ct-radius-md);}
.ct-storefront .ct-purchase-message {margin:0;overflow-wrap:anywhere;}
.ct-storefront .ct-purchase > [data-ct-quantity-rules] {grid-column:1 / -1;margin:0;}
.ct-storefront .ct-purchase-message:empty {display:none;}
.ct-storefront .ct-purchase-message[role="alert"] {color:var(--ct-color-danger);}
.ct-storefront .ct-order-heading {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 24px;margin-block:16px 32px;}
.ct-storefront .ct-order-heading h1 {margin:0;font-size:clamp(28px,4vw,44px);letter-spacing:-.025em;}
.ct-storefront .ct-order-heading > a {display:inline-flex;align-items:center;gap:12px;min-height:44px;}
.ct-storefront .ct-order-grid {display:grid;gap:clamp(20px,3vw,36px);margin-top:var(--ct-space-6);align-items:start;}
.ct-storefront .ct-order-panel {min-width:0;padding:clamp(16px,2.5vw,32px);border:1px solid var(--ct-color-border);border-radius:var(--ct-radius-lg);background:var(--ct-color-bg);}
.ct-storefront #ct-order-cart.ct-order-panel {background:var(--ct-color-surface);}
.ct-storefront .ct-order-empty {margin-top:var(--ct-space-6);padding:var(--ct-space-6);}
.ct-storefront .ct-order-empty p {margin:0 0 var(--ct-space-5);}
.ct-storefront .ct-order-panel > h2 {display:flex;align-items:center;gap:12px;margin:0 0 24px;font-size:clamp(20px,2vw,24px);line-height:1.3;}
.ct-storefront .ct-order-section-number {display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;background:var(--ct-color-primary);color:var(--ct-color-on-primary);font-size:14px;font-weight:600;}
.ct-storefront #ct-order-cart .wa-column-image img {border-radius:var(--ct-radius-sm);object-fit:contain;}
.ct-storefront #ct-order-cart .wa-cart-details {display:flex;flex-direction:column;align-items:stretch;box-sizing:border-box;padding:16px;border:1px solid var(--ct-color-border);border-radius:var(--ct-radius-md);background:var(--ct-color-bg);}
.ct-storefront #ct-order-cart .wa-cart-details > :is(.wa-column-content,.wa-column-price) {width:100%;min-width:0;margin:0;}
.ct-storefront #ct-order-cart .wa-cart-details .wa-column-content > * {margin-bottom:20px;}
.ct-storefront #ct-order-cart .wa-cart-details :is(.wa-price-section,.wa-price-total) {margin-top:0;}
.ct-storefront #ct-order-cart .wa-cart-details .wa-price-discount {margin-bottom:12px;}
.ct-storefront #ct-order-cart .wa-coupon-section:not(.is-active) .wa-inactive-state,
.ct-storefront #ct-order-cart .wa-coupon-section.is-active .wa-active-state {display:flex;flex-wrap:wrap;align-items:center;gap:8px;}
.ct-storefront #ct-order-cart .wa-coupon-section .wa-input.js-coupon-code {flex:1 1 10rem;min-width:0;width:auto;max-width:100%;margin:0;}
.ct-storefront #ct-order-cart .wa-coupon-section :is(.js-use-coupon,.js-cancel-coupon) {flex:0 0 auto;margin:0;}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-section-header .wa-header {font-family:inherit;font-size:18px;line-height:1.4;color:var(--ct-color-text);}
/* Native rows use a -20px right margin; keep them inside the framed panel. */
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-fields-group {margin-right:0;}
.ct-storefront .ct-purchase [hidden] {display:none;}
@media(min-width:1100px){.ct-storefront .ct-order-grid {grid-template-columns:minmax(0,1fr) minmax(0,1fr);}}

/* B025 — название и вариант товара в штатной корзине */
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-details > a.wa-name {
  font-family: inherit;
  font-size: inherit;
  font-weight: var(--ct-font-weight-semibold);
  color: var(--ct-color-text);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-details > a.wa-name:hover {
  color: var(--ct-color-primary);
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-details > a.wa-name:focus-visible {
  outline: 2px solid var(--ct-color-primary);
  outline-offset: 2px;
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-details > span.wa-sku {
  display: block;
  margin-top: var(--ct-space-1);
  color: var(--ct-color-muted);
  font-weight: 400;
  overflow-wrap: anywhere;
}

/* Keep the checkout logout hint inside the viewport, including while hidden. */
.ct-storefront #ct-order-form .wa-step-auth-section > .wa-section-header {
  position: relative;
}
.ct-storefront #ct-order-form .wa-logout-link.wa-tooltip {
  position: static;
}
.ct-storefront #ct-order-form .wa-logout-link.wa-tooltip.bottom:not(.custom)::after {
  left: auto;
  right: 0;
  transform: translateY(8px);
  max-width: calc(100vw - 32px);
}
.ct-storefront #ct-order-form .wa-logout-link.wa-tooltip::before {
  display: none;
}
.ct-storefront #ct-order-form .wa-logout-link.wa-tooltip:focus-visible {
  outline: 2px solid var(--ct-color-primary);
  outline-offset: 2px;
}
.ct-storefront #ct-order-form .wa-logout-link.wa-tooltip:focus-visible::after {
  visibility: visible;
  opacity: 1;
}

/* Общие поля покупателя и адреса доставки */
.ct-storefront #ct-order-form .wa-order-form-wrapper :is(.wa-step-auth-section, .wa-step-region-section) input.wa-input,
.ct-storefront #ct-order-form .wa-order-form-wrapper :is(.wa-step-auth-section, .wa-step-region-section) select.wa-select,
.ct-storefront #ct-order-form .wa-order-form-wrapper :is(.wa-step-auth-section, .wa-step-region-section) textarea.wa-textarea {
  font-family: inherit;
  font-size: var(--ct-font-size-base);
  line-height: var(--ct-line-height-base);
  border-radius:var(--ct-control-radius);
  min-height: 44px;
  box-sizing: border-box;
}
.ct-storefront #ct-order-form .wa-order-form-wrapper :is(.wa-step-auth-section, .wa-step-region-section) input.wa-input:not(:disabled):not([readonly]):not(.wa-error),
.ct-storefront #ct-order-form .wa-order-form-wrapper :is(.wa-step-auth-section, .wa-step-region-section) select.wa-select:not(:disabled):not([readonly]):not(.wa-error),
.ct-storefront #ct-order-form .wa-order-form-wrapper :is(.wa-step-auth-section, .wa-step-region-section) textarea.wa-textarea:not(:disabled):not([readonly]):not(.wa-error) {
  color: var(--ct-color-text);
  background-color: var(--ct-color-bg);
  border-color: var(--ct-color-border);
}
.ct-storefront #ct-order-form .wa-order-form-wrapper :is(.wa-step-auth-section, .wa-step-region-section) input.wa-input:not(:disabled):not([readonly]):focus-visible,
.ct-storefront #ct-order-form .wa-order-form-wrapper :is(.wa-step-auth-section, .wa-step-region-section) select.wa-select:not(:disabled):not([readonly]):focus-visible,
.ct-storefront #ct-order-form .wa-order-form-wrapper :is(.wa-step-auth-section, .wa-step-region-section) textarea.wa-textarea:not(:disabled):not([readonly]):focus-visible {
  outline: 2px solid var(--ct-color-primary);
  outline-offset: 2px;
}

/* B029 — основная кнопка checkout */
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section .wa-flex-wrapper:has(> .wa-total-section) {flex-direction:column;align-items:stretch;gap:16px;}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section :is(.wa-total-section,.wa-actions-section) {width:100%;min-width:0;margin:0;}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section button.wa-submit-button {
  width:100%;
  font-family: inherit;
  font-size: var(--ct-font-size-base);
  font-weight: var(--ct-font-weight-semibold);
  line-height: 1.2;
  min-height: 44px;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: var(--ct-space-3) var(--ct-space-5);
  border: var(--ct-border-width) solid var(--ct-color-primary);
  border-radius:var(--ct-control-radius);
  text-shadow: none;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section button.wa-submit-button:not(:disabled) {
  background-color: var(--ct-color-primary);
  color: var(--ct-color-on-primary);
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section button.wa-submit-button:not(:disabled):hover {
  background-color: var(--ct-color-primary-hover);
  border-color: var(--ct-color-primary-hover);
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section button.wa-submit-button:disabled {
  background-color: var(--ct-color-surface);
  color: var(--ct-color-muted);
  border-color: var(--ct-color-border);
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section button.wa-submit-button:not(:disabled):focus-visible {
  outline: 2px solid var(--ct-color-primary);
  outline-offset: 2px;
}

/* B030 — shipping types cards */
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-shipping-section .wa-delivery-types-section .wa-types-list > .wa-type-wrapper {
  border-radius: var(--ct-radius-sm);
  background-color: var(--ct-color-bg);
  color: var(--ct-color-text);
  min-height: 44px;
  background-image: none;
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-shipping-section .wa-delivery-types-section .wa-types-list:not(.wa-error) > .wa-type-wrapper {
  border-color: var(--ct-color-border);
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-shipping-section .wa-delivery-types-section .wa-types-list:not(.wa-error) > .wa-type-wrapper:not(.is-disabled):hover {
  border-color: var(--ct-color-primary);
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-shipping-section .wa-delivery-types-section .wa-types-list > .wa-type-wrapper.is-active {
  background-color: var(--ct-color-surface);
  box-shadow: none;
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-shipping-section .wa-delivery-types-section .wa-types-list:not(.wa-error) > .wa-type-wrapper.is-active {
  border-color: var(--ct-color-primary);
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-shipping-section .wa-delivery-types-section .wa-types-list.wa-error > .wa-type-wrapper {
  border-color: var(--ct-color-danger);
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-shipping-section .wa-delivery-types-section .wa-types-list > .wa-type-wrapper .wa-name {
  font-size: var(--ct-font-size-base);
  overflow-wrap: anywhere;
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-shipping-section .wa-delivery-types-section .wa-types-list > .wa-type-wrapper .wa-name > a {
  text-decoration: none;
  color: inherit;
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-shipping-section .wa-delivery-types-section .wa-types-list > .wa-type-wrapper .wa-name > a:focus-visible {
  outline: 2px solid var(--ct-color-primary);
  outline-offset: 2px;
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-shipping-section .wa-delivery-types-section .wa-types-list > .wa-type-wrapper.is-active .wa-name {
  font-weight: var(--ct-font-weight-semibold);
}

/* B031 — checkout totals */
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section .wa-total-section {
  padding: var(--ct-space-4);
  border: var(--ct-border-width) solid var(--ct-color-border);
  border-radius: var(--ct-radius-md);
  background: var(--ct-color-surface);
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section .wa-total-section .wa-item {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,8em),1fr));
  column-gap: var(--ct-space-3);
  align-items: start;
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section .wa-total-section .wa-item:not(:first-child) {
  margin-top: var(--ct-space-3);
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section .wa-total-section .wa-item > .wa-name,
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section .wa-total-section .wa-item > .wa-value {
  min-width: 0;
  font-size: var(--ct-font-size-base);
  line-height: var(--ct-line-height-base);
  overflow-wrap: anywhere;
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section .wa-total-section .wa-item > .wa-name {
  color: var(--ct-color-muted);
  margin-right: 0;
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section .wa-total-section .wa-item > .wa-value {
  color: var(--ct-color-text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section .wa-total-section .wa-item.wa-item-total {
  border-top: var(--ct-border-width) solid var(--ct-color-border);
  margin-top: var(--ct-space-4);
  padding-top: var(--ct-space-4);
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section .wa-total-section .wa-item-total > .wa-name {
  color: var(--ct-color-text);
  font-weight: var(--ct-font-weight-semibold);
}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-step-confirm-section .wa-total-section .wa-item-total > .wa-value > .wa-price {
  font-size: var(--ct-font-size-xl);
  line-height: 1.2;
  font-weight: var(--ct-font-weight-semibold);
}

/* B032 — checkout field labels */
.ct-storefront #ct-order-form .wa-order-form-wrapper :is(.wa-step-auth-section, .wa-step-region-section) .wa-field-wrapper > .wa-label {
  color: var(--ct-color-muted);
  font-family: inherit;
  font-size: var(--ct-font-size-sm);
  font-weight: var(--ct-font-weight-semibold);
  line-height: var(--ct-line-height-base);
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* B033 — управление количеством в корзине */
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-quantity-cart-section input.wa-field.js-product-quantity {
  font-family: inherit;
  font-size: var(--ct-font-size-base);
  line-height: var(--ct-line-height-base);
  min-height: 44px;
  box-sizing: border-box;
  border-radius:var(--ct-control-radius);
  font-variant-numeric: tabular-nums;
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-quantity-cart-section input.wa-field.js-product-quantity:not(:disabled):not([readonly]):not(.wa-error-field) {
  color: var(--ct-color-text);
  background-color: var(--ct-color-bg);
  border-color: var(--ct-color-border);
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-quantity-cart-section input.wa-field.js-product-quantity:not(:disabled):not([readonly]):focus-visible {
  outline: 2px solid var(--ct-color-primary);
  outline-offset: 2px;
}

.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-quantity-cart-section :is(.s-minus-button, .s-plus-button) {
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  border: var(--ct-border-width) solid var(--ct-color-border);
  border-radius:var(--ct-control-radius);
  background-color: var(--ct-color-surface);
  color: var(--ct-color-muted);
  text-shadow: none;
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-quantity-cart-section:not(.disabled) button:not(:disabled):not(.is-locked):is(.s-minus-button, .s-plus-button) {
  color: var(--ct-color-primary);
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-quantity-cart-section:not(.disabled) button:not(:disabled):not(.is-locked):is(.s-minus-button, .s-plus-button):hover {
  border-color: var(--ct-color-primary);
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-quantity-cart-section:not(.disabled) button:not(:disabled):not(.is-locked):is(.s-minus-button, .s-plus-button):focus-visible {
  outline: 2px solid var(--ct-color-primary);
  outline-offset: 2px;
}

/* B035 — поле и кнопки промокода */
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-coupon-section input.wa-input.js-coupon-code {
  font-family: inherit;
  font-size: var(--ct-font-size-base);
  line-height: var(--ct-line-height-base);
  min-height: 44px;
  box-sizing: border-box;
  border-radius:var(--ct-control-radius);
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-coupon-section input.wa-input.js-coupon-code:not(:disabled):not([readonly]):not(.wa-error-field) {
  color: var(--ct-color-text);
  background-color: var(--ct-color-bg);
  border-color: var(--ct-color-border);
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-coupon-section input.wa-input.js-coupon-code:not(:disabled):not([readonly]):focus-visible {
  outline: 2px solid var(--ct-color-primary);
  outline-offset: 2px;
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-coupon-section button.wa-button:is(.js-use-coupon,.js-cancel-coupon) {
  font-family: inherit;
  font-size: var(--ct-font-size-base);
  line-height: var(--ct-line-height-base);
  font-weight: var(--ct-font-weight-semibold);
  min-height: 44px;
  box-sizing: border-box;
  border-radius:var(--ct-control-radius);
  text-shadow: none;
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-coupon-section button.wa-button:is(.js-use-coupon,.js-cancel-coupon):not(:disabled) {
  background-color: var(--ct-color-surface);
  color: var(--ct-color-primary);
  border: var(--ct-border-width) solid var(--ct-color-border);
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-coupon-section button.wa-button:is(.js-use-coupon,.js-cancel-coupon):not(:disabled):hover {
  border-color: var(--ct-color-primary);
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-coupon-section button.wa-button:is(.js-use-coupon,.js-cancel-coupon):not(:disabled):focus-visible {
  outline: 2px solid var(--ct-color-primary);
  outline-offset: 2px;
}

/* B036 — цены строк корзины */
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-products .wa-product .wa-column-price > .wa-price-section > :is(.wa-price-total, .wa-price-compare, .wa-price-discount) {
  font-family: inherit;
  line-height: var(--ct-line-height-base);
  font-variant-numeric: tabular-nums;
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-products .wa-product .wa-column-price > .wa-price-section > .wa-price-total {
  font-size: var(--ct-font-size-base);
  font-weight: var(--ct-font-weight-semibold);
  color: var(--ct-color-text);
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-products .wa-product .wa-column-price > .wa-price-section > :is(.wa-price-compare, .wa-price-discount) {
  font-size: var(--ct-font-size-sm);
  color: var(--ct-color-muted);
}

/* B037 — типографика итогов корзины */
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-cart-details > .wa-column-price > .wa-price-section > :is(.wa-price-subtotal, .wa-price-discount, .wa-price-total) {
  font-family: inherit;
  line-height: var(--ct-line-height-base);
  font-variant-numeric: tabular-nums;
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-cart-details > .wa-column-price > .wa-price-section > :is(.wa-price-subtotal, .wa-price-discount) {
  font-size: var(--ct-font-size-sm);
  color: var(--ct-color-muted);
}
.ct-storefront #ct-order-cart .wa-order-cart-wrapper .wa-cart-details > .wa-column-price > .wa-price-section > .wa-price-total#wa-cart-total {
  font-size: var(--ct-font-size-lg);
  font-weight: var(--ct-font-weight-semibold);
  color: var(--ct-color-text);
}
.ct-storefront #ct-order-cart .js-variant-field {display:block;width:100%;max-width:100%;min-height:44px;margin-top:8px;padding:10px 12px;font:inherit;color:var(--ct-color-text);background:var(--ct-color-bg);border:1px solid var(--ct-color-border);border-radius:var(--ct-radius-sm);}
.ct-storefront #ct-order-cart .js-variant-field:focus-visible {outline:2px solid var(--ct-color-primary);outline-offset:3px;}

/* Native helper text must remain readable on the framed checkout panels. */
.ct-storefront #ct-order-cart .wa-order-cart-wrapper :is(.wa-actions .wa-tooltip,.wa-quantity-cart-section .wa-description,.wa-quantity-cart-section .wa-unit,.wa-product-fractional-prices .wa-product-price) {color:var(--ct-color-muted);}
.ct-storefront #ct-order-form .wa-order-form-wrapper :is(.wa-required-text,#js-delivery-types-section > .wa-header,#js-delivery-variants-section > .wa-header,.wa-dropdown-toggle,.wa-details-description) {color:var(--ct-color-muted);}
.ct-storefront #ct-order-form .wa-order-form-wrapper .wa-delivery-price {color:var(--ct-color-success);}
