/* Preserve viewport-based sticky positioning without a separate body scroll container. */
body:has(.onepage-checkout):not(.checkout-terms-open):not(.mobile-category-menu-open) { overflow-x:clip; }
.onepage-checkout { max-width:1240px; background:#f7f9fc; border-radius:20px; padding:28px; margin-top:24px; margin-bottom:32px; }
.onepage-heading { margin-bottom:24px; }
.onepage-heading h1 { font-size:clamp(28px,3vw,38px); letter-spacing:-.8px; }
.onepage-layout { grid-template-columns:minmax(0,1fr) minmax(360px,1fr); gap:22px 28px; }
.onepage-layout > .checkout-layout { display:block; grid-column:1; grid-row:1; }
.onepage-layout .checkout-form { gap:20px; }
.checkout-order-column { grid-column:2; grid-row:1; display:grid; gap:22px; align-content:start; min-width:0; position:sticky; top:var(--checkout-sticky-top,112px); }
.onepage-products { min-width:0; }
/* Products, payment fields and the purchase action share the page's normal scrolling. */
.checkout-payment-rail { position:static; min-width:0; background:#fff; border:1px solid #dce4ef; border-radius:16px; padding:24px; box-shadow:0 6px 24px rgb(16 40 80 / 5%); scroll-margin-top:112px; }
.onepage-layout .checkout-summary { position:static; padding:20px 0 0; margin-top:20px; border:0; border-top:1px solid #dce4ef; border-radius:0; box-shadow:none; background:#fff; }
.onepage-checkout .checkout-summary h2 { font-size:19px; margin:0 0 16px; }
.checkout-summary > .eyebrow { display:none; }
.checkout-payment-rail .checkout-payment-panel { border:0; padding-top:0; }
.checkout-payment-rail .checkout-payment-panel h2 { margin:0 0 20px; font-size:18px; gap:0; }
.checkout-payment-rail .checkout-card-choices legend { font-size:14px; }
.checkout-payment-rail label.checkout-card-choice:has(input:checked) { border-color:#285fae; background:#eef4ff; }
.checkout-payment-status:empty { display:none; }
.onepage-checkout .pay-button { min-height:50px; font-size:16px; background:var(--blue-700,#285fae); }
.onepage-checkout .pay-button:disabled { background:#cbd5e1; }
.onepage-checkout .form-grid { grid-template-columns:1fr; }
.onepage-checkout [data-checkout-step="contact"] .form-grid:not([data-organization-fields]),
.onepage-checkout [data-checkout-step="address"] .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.onepage-checkout [data-checkout-step="contact"] .form-grid:not([data-organization-fields]) label:nth-child(n+3) { grid-column:1 / -1; }
.onepage-checkout input[aria-invalid="true"], .onepage-checkout select[aria-invalid="true"] { border-color:#b42318; }
.onepage-checkout .checkout-form fieldset { padding:20px; }
.onepage-checkout .shipping-option:has(input:checked) { border-color:var(--blue-700,#285fae); background:#eef4ff; }
.onepage-checkout input, .onepage-checkout select, .onepage-checkout button, .onepage-checkout summary { accent-color:var(--blue-700,#285fae); }
.onepage-checkout :is(input,select,button,a,summary):focus-visible { outline:3px solid #779ed8; outline-offset:3px; }
.onepage-checkout [hidden] { display:none!important; }
.checkout-product { grid-template-columns:54px minmax(0,1fr) 110px; gap:12px; padding:18px; }
.checkout-product__price { grid-column:2 / 4; display:flex; align-items:center; gap:8px; }
.checkout-product__price form { margin:0 0 0 auto; }
.checkout-product__price > small { margin:0; }
.checkout-products, .onepage-checkout fieldset { scroll-margin-top:112px; }
.checkout-more-delivery { border:1px solid #e0e6ef; border-radius:16px; background:#fff; padding:18px 20px; margin:0; }
.onepage-checkout .checkout-save-address { border:0; border-top:1px solid #e0e6ef; border-radius:0; background:transparent; padding:14px 0 0; margin-top:4px; }
.checkout-save-address > summary { cursor:pointer; font-size:14px; font-weight:650; color:var(--blue-950); }
.checkout-save-address[open] > summary { margin-bottom:14px; }
.checkout-save-address .text-button { margin-top:12px; margin-right:12px; }
.checkout-save-address > a { font-size:12px; }
.checkout-more-delivery > summary { cursor:pointer; font-size:14px; font-weight:650; color:var(--blue-950); }
.checkout-more-delivery > summary small { display:block; margin:5px 0 0 18px; color:var(--muted); font-size:12px; font-weight:400; }
.checkout-more-delivery[open] > summary { margin-bottom:18px; }
.checkout-more-delivery label { margin-top:14px; }
.checkout-more-delivery input[type="checkbox"] { width:18px; height:18px; vertical-align:middle; margin-right:6px; }
.checkout-more-delivery input[type="date"], .checkout-more-delivery input[type="number"] { min-height:44px; max-width:100%; padding:10px; border:1px solid #cbd5e1; border-radius:8px; font:inherit; }
.checkout-more-delivery p { font-size:13px; line-height:1.6; }
.checkout-compact-fields > summary { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; list-style:none; cursor:pointer; font-size:14px; line-height:1.65; }
.checkout-compact-fields > summary::-webkit-details-marker { display:none; }
.checkout-compact-fields > summary > span:first-child { white-space:pre-line; overflow-wrap:anywhere; }
.checkout-compact-fields > summary > span:last-child { color:var(--blue-700); text-decoration:underline; font-weight:600; }
.checkout-compact-fields[open] > summary { margin-bottom:18px; }
.checkout-compact-fields[open] { display:grid; gap:14px; }
.checkout-delivery-review { border-top:1px solid #e0e6ef; padding-top:12px; font-size:12px; color:var(--muted); white-space:pre-line; }
.checkout-mobile-bar { display:none; }
@media(max-width:960px) {
    .onepage-checkout { padding:20px; }
    .onepage-layout { display:block; }
    .onepage-products { margin:0 0 22px; }
    .checkout-order-column { display:block; position:static; margin-top:22px; }
    .onepage-checkout .checkout-summary { margin-top:20px; padding:20px 0 0; }
    .onepage-heading { align-items:flex-start; gap:12px; }
    .checkout-mobile-bar { display:flex; position:fixed; bottom:0; left:0; right:0; z-index:45; align-items:center; justify-content:space-between; gap:12px; border-top:1px solid #dce4ef; padding:12px 20px calc(12px + env(safe-area-inset-bottom)); background:#fff; box-shadow:0 -4px 20px rgb(16 40 80 / 8%); }
    .checkout-mobile-bar small, .checkout-mobile-bar strong { display:block; }
    .checkout-mobile-bar small { font-size:11px; color:var(--muted); }
    .checkout-mobile-bar strong { font-size:17px; }
    .checkout-mobile-bar a { padding:13px 16px; border-radius:10px; color:#fff; background:var(--blue-700); font-size:14px; font-weight:650; text-decoration:none; }
    .onepage-checkout { padding-bottom:100px; }
    .onepage-checkout input:not([type="checkbox"],[type="radio"]), .onepage-checkout select { font-size:16px; }
}
@media(max-width:540px) {
    .onepage-checkout [data-checkout-step="contact"] .form-grid:not([data-organization-fields]),
    .onepage-checkout [data-checkout-step="address"] .form-grid { grid-template-columns:1fr; }
    .onepage-checkout { margin-top:0; border-radius:0; padding:20px 12px 100px; }
    .checkout-payment-rail { padding:18px 14px; }
    .onepage-checkout .checkout-form fieldset { padding:18px 14px; }
    .checkout-secure { padding:6px 10px; }
    .checkout-product { grid-template-columns:48px minmax(0,1fr); }
    .checkout-product__quantity { grid-column:2; max-width:130px; }
    .checkout-product__price { grid-column:1 / -1; }
    .checkout-product__quantity .quantity-control button { min-height:44px; }
}
