/* Handdn Studio: Shopify-style checkout + cart for WooCommerce blocks (Handdn Studio -> Store). Only on the cart and checkout pages, inlined.
   --hdb-i ink, --hdb-m muted, --hdb-l line, --hdb-s soft surface (as account.css), --hdb-f field border (= muted, 3:1 WCAG 1.4.11), --hdb-r radius: theme presets first, else the cart drawer's colours.
   Rhythm 4/8/12/16/24/32 px, 1px lines, 8px radius. "body …" outranks WooCommerce's selectors; .hdb-co-more and [data-hdb-more] come from checkout.js. */
body{--hdb-i:var(--wp--preset--color--ink,var(--wp--preset--color--contrast,#1c1917));--hdb-m:var(--wp--preset--color--muted,#57534e);--hdb-l:var(--wp--preset--color--line,#e7e5e4);--hdb-s:var(--wp--preset--color--surface,#f5f5f4);--hdb-f:var(--hdb-m);--hdb-r:.5rem}
body :is(.wp-block-woocommerce-checkout,.wp-block-woocommerce-cart){--wc-separator-color:var(--hdb-l)}

/* ---------- layout: form left on white, summary right on a full-height grey column ---------- */
body .wp-block-woocommerce-checkout{max-width:none;margin:0;padding:0}
body .wp-block-woocommerce-checkout .wc-block-components-sidebar-layout,body .wp-block-woocommerce-checkout.is-loading{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);margin:0;min-height:calc(100vh - 4.5rem)}
/* columns pinned: a checkout page may list the summary block first (WooCommerce flips that back with row-reverse) */
body .wp-block-woocommerce-checkout .wc-block-components-main,body .wp-block-woocommerce-checkout.is-loading>.wp-block-woocommerce-checkout-fields-block{grid-area:1/1;width:auto;margin:0;padding:2.5rem 3rem 4rem max(1.25rem,calc(50vw - 37rem))}
body .wp-block-woocommerce-checkout .wc-block-components-sidebar,body .wp-block-woocommerce-checkout.is-loading>.wp-block-woocommerce-checkout-totals-block{grid-area:1/2;align-self:stretch;width:auto;margin:0;padding:2.5rem max(1.25rem,calc(50vw - 33rem)) 4rem 3rem;background:var(--hdb-s);border-left:1px solid var(--hdb-l)}
body .wp-block-woocommerce-checkout .wc-block-components-sidebar>*{position:sticky;top:2rem}
body .wc-block-checkout__form{max-width:36rem;margin-inline-start:auto}

/* ---------- steps: title, 16px to the fields, 32px between steps ---------- */
body .wc-block-components-checkout-step{margin:0 0 2rem;padding:0}
body .wc-block-components-checkout-step__heading-container{gap:.5rem;margin:0 0 1rem}
body .wc-block-components-checkout-step__heading{margin:0}
body .wc-block-components-checkout-step__title{margin:0;font-size:1.25rem;font-weight:600;letter-spacing:-.01em;line-height:1.3}
body .wc-block-components-checkout-step__description{margin:0;color:var(--hdb-m);font-size:.875rem}
body .wc-block-components-checkout-step__heading-content{font-size:.875rem}
/* step numbers (a Checkout block setting): "1." inline before the title, no rail and no indent */
body .wc-block-checkout__form--with-step-numbers .wc-block-components-checkout-step--with-step-number{padding:0}
body .wc-block-checkout__form--with-step-numbers .wc-block-components-checkout-step--with-step-number .wc-block-components-checkout-step__title::before{position:static;margin:0;color:var(--hdb-m);transform:none;content:counter(checkout-step) ". ";content:counter(checkout-step) ". "/""}
body .wc-block-checkout__form--with-step-numbers .wc-block-components-checkout-step--with-step-number :is(.wc-block-components-checkout-step__content,.wc-block-components-checkout-step__description)::before{display:none}
body .wc-block-checkout__guest-checkout-notice{margin:.5rem 0 0;color:var(--hdb-m);font-size:.8125rem}

/* ---------- inputs: 1px field line, ink + ring on focus, red on error ---------- */
body .wc-block-components-form .wc-block-components-text-input :is(input[type],textarea),body .wc-blocks-components-select .wc-blocks-components-select__select,body .wc-block-components-textarea{border:1px solid var(--hdb-f);border-radius:var(--hdb-r);background:#fff;color:var(--hdb-i);box-shadow:none;transition:border-color .15s,box-shadow .15s}
body .wc-blocks-components-select .wc-blocks-components-select__container{border-radius:var(--hdb-r)}
body .wc-block-components-form .wc-block-components-text-input :is(input[type],textarea):focus,body .wc-blocks-components-select .wc-blocks-components-select__select:focus,body .wc-block-components-textarea:focus{border-width:1px;border-color:var(--hdb-i);box-shadow:none;outline:2px solid var(--hdb-i);outline-offset:2px}
body .wc-block-components-form .wc-block-components-text-input.has-error :is(input[type],textarea),body .has-error .wc-blocks-components-select .wc-blocks-components-select__select{border-color:#cc1818}
body .wc-block-components-form .wc-block-components-text-input label,body .wc-blocks-components-select .wc-blocks-components-select__label{color:var(--hdb-m)}
body .wc-block-components-validation-error{font-size:.8125rem}
body .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]{border-radius:.3rem;border-color:color-mix(in srgb,var(--hdb-m) 70%,#fff)}
body .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked{background:var(--hdb-i);border-color:var(--hdb-i)}
body .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:focus-visible{outline:2px solid var(--hdb-i);outline-offset:2px}
body .wc-block-components-checkbox .wc-block-components-checkbox__mark{fill:#fff}
body .wc-block-components-address-card{border-color:var(--hdb-l);border-radius:var(--hdb-r)}

/* ---------- shipping + payment options: rows share one 1px line; the selected row gets the ink line + tint, no nested boxes ---------- */
body .wc-block-checkout .wc-block-components-radio-control{display:grid;border:0;background:none}
body .wc-block-checkout .wc-block-components-radio-control::after,body .wc-block-checkout .wc-block-components-radio-control :is(.wc-block-components-radio-control__option,.wc-block-components-radio-control-accordion-option)::after{content:none}
body .wc-block-checkout .wc-block-components-radio-control>*{position:relative;margin:0 0 -1px;border:1px solid var(--hdb-l);border-radius:0;background:#fff;box-shadow:none}
body .wc-block-checkout .wc-block-components-radio-control>:first-child{border-start-start-radius:var(--hdb-r);border-start-end-radius:var(--hdb-r)}
body .wc-block-checkout .wc-block-components-radio-control>:last-child{margin-bottom:0;border-end-start-radius:var(--hdb-r);border-end-end-radius:var(--hdb-r)}
body .wc-block-checkout .wc-block-components-radio-control>:is(.wc-block-components-radio-control__option-checked,:has(>.wc-block-components-radio-control__option-checked)){z-index:1;border-color:var(--hdb-i);background:var(--hdb-s);box-shadow:none}
body .wc-block-checkout .wc-block-components-radio-control-accordion-option>.wc-block-components-radio-control__option{margin:0;border:0;border-radius:0;background:none;box-shadow:none}
body .wc-block-checkout .wc-block-components-radio-control__option{padding:1rem 1rem 1rem 3rem}
body .wc-block-checkout .wc-block-components-radio-control .wc-block-components-radio-control__input{left:1rem;width:1.125rem;height:1.125rem;border:1px solid color-mix(in srgb,var(--hdb-m) 70%,#fff);background:#fff}
body .wc-block-checkout .wc-block-components-radio-control .wc-block-components-radio-control__input:checked{border:5px solid var(--hdb-i)}
body .wc-block-checkout .wc-block-components-radio-control .wc-block-components-radio-control__input:checked::before{display:none}
body .wc-block-checkout .wc-block-components-radio-control .wc-block-components-radio-control__input:focus{outline:0}
body .wc-block-checkout .wc-block-components-radio-control .wc-block-components-radio-control__input:focus-visible{outline:2px solid var(--hdb-i);outline-offset:2px}
body .wc-block-checkout .wc-block-components-radio-control__label-group{gap:1rem}
body .wc-block-checkout .wc-block-components-radio-control__label-group .wc-block-components-radio-control__secondary-label{flex:none;font-weight:600;font-variant-numeric:tabular-nums}
body .wc-block-checkout .wc-block-components-radio-control__description{color:var(--hdb-m)}
body .wc-block-checkout .wc-block-components-radio-control-accordion-content{padding:0 1rem 1rem 3rem;color:var(--hdb-m);font-size:.875rem}
body .wc-block-checkout .wc-block-components-radio-control-accordion-content:has(>:only-child:empty){padding:0}

/* ---------- express pay + place order ---------- */
body .wc-block-components-express-payment{margin-bottom:1.5rem}
body .wc-block-components-express-payment-continue-rule{margin:1.5rem 0;color:var(--hdb-m);font-size:.8125rem;text-transform:uppercase;letter-spacing:.08em}
body .wc-block-checkout__actions{margin-top:.5rem}
body .wc-block-checkout__actions_row{flex-direction:column-reverse;align-items:stretch;gap:1rem}
body .wc-block-components-checkout-place-order-button,body .wc-block-cart__submit-button{min-height:3.5rem;width:100%;border:0;border-radius:var(--hdb-r);background:var(--hdb-i);color:#fff;font-size:1rem;font-weight:600;letter-spacing:.01em;cursor:pointer;transition:background .2s}
body .wc-block-components-checkout-place-order-button:hover,body .wc-block-cart__submit-button:hover{background:#34312e}
body :is(.wc-block-components-checkout-place-order-button,.wc-block-cart__submit-button,.wc-block-components-panel__button,.wc-block-components-totals-coupon__button):focus-visible{outline:2px solid var(--hdb-i);outline-offset:2px}
body .wc-block-components-checkout-return-to-cart-button{justify-content:center;color:var(--hdb-m);font-size:.875rem}
body .wc-block-checkout__terms{color:var(--hdb-m);font-size:.8125rem}

/* ---------- order summary: 64px thumbnails with a count badge ---------- */
body .wp-block-woocommerce-checkout-order-summary-block{border:0;border-radius:0;background:none}
body .wp-block-woocommerce-checkout-order-summary-block .checkout-order-summary-block-fill{border-color:var(--hdb-l);border-radius:var(--hdb-r);background:#fff}
body .wc-block-components-sidebar .wc-block-components-checkout-order-summary__title{margin:0;padding:0 0 1rem}
body .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title .wc-block-components-checkout-order-summary__title-text{margin:0;font-size:1.25rem;font-weight:600;letter-spacing:-.01em;line-height:1.3}
body .wc-block-components-sidebar :is(.wc-block-components-order-summary,.wc-block-components-panel,.wc-block-components-totals-coupon,.wc-block-components-totals-item){padding-inline:0}
body .wc-block-components-order-summary .wc-block-components-order-summary-item{padding:0 0 1.5rem;border:0}
body .wc-block-components-order-summary .wc-block-components-order-summary-item:last-child{padding-bottom:0}
body .wc-block-components-order-summary .wc-block-components-order-summary-item__image{width:4rem;margin:0;padding:0}
body .wc-block-components-order-summary .wc-block-components-order-summary-item__image>img{width:4rem;max-width:4rem;height:4rem;object-fit:cover;border:1px solid var(--hdb-l);border-radius:var(--hdb-r);background:#fff}
body .wc-block-components-order-summary .wc-block-components-order-summary-item__quantity{top:-.5rem;right:-.5rem;min-width:1.375rem;height:1.375rem;border:0;border-radius:999px;background:#6f6a63;color:#fff;font-size:.75rem;font-weight:600;box-shadow:none}
body .wc-block-components-order-summary .wc-block-components-order-summary-item__description{padding:0 1rem;gap:.25rem}
body .wc-block-components-order-summary .wc-block-components-order-summary-item__individual-prices{color:var(--hdb-m);font-size:.8125rem}
body .wc-block-components-order-summary .wc-block-components-order-summary-item__total-price{padding-top:0;font-variant-numeric:tabular-nums;font-weight:500}
body .wc-block-components-product-name{font-size:.9375rem;font-weight:500}

/* ---------- line details (cart + summary), as in the cart drawer: one "Label: value" row each, muted label, ink value ---------- */
/* the product's short description is catalogue copy: Shopify never repeats it in the cart or checkout */
body .wc-block-components-product-metadata__description{display:none}
body .wc-block-components-product-details.wc-block-components-product-details{display:grid;gap:.125rem;margin:.25rem 0 0;padding:0;list-style:none;color:var(--hdb-m);font-size:.8125rem;line-height:1.45}
body .wc-block-components-product-details>*{display:block;margin:0;min-width:0;overflow-wrap:anywhere}
body .wc-block-components-product-details>*>[aria-hidden=true]:last-child{display:none}
body .wc-block-components-product-details>:not(:has(>.wc-block-components-product-details__name)){margin-top:.25rem}
body .wc-block-components-product-details__name{color:var(--hdb-m);font-weight:400}
body .wc-block-components-product-details__value{color:var(--hdb-i)}
body .wc-block-components-product-details__value em{font-style:normal;color:var(--hdb-m)}
body :is(.wc-block-components-product-details a,.hdb-co-more){justify-self:start;margin:0;padding:.125rem 0;border:0;background:none;color:var(--hdb-m);font:inherit;font-size:.8125rem;text-decoration:underline;text-underline-offset:.2em;cursor:pointer}
body :is(.wc-block-components-product-details a,.hdb-co-more):hover{color:var(--hdb-i)}
body :is(.wc-block-components-product-details a,.hdb-co-more):focus-visible{outline:2px solid var(--hdb-i);outline-offset:2px;border-radius:2px}
body [data-hdb-more]{display:none}
/* item list capped at about four rows; the pill (checkout.js) floats at the bottom centre while rows are hidden below */
body .wc-block-components-order-summary{position:relative}
body .wc-block-components-order-summary .wc-block-components-order-summary__content{display:block;max-height:var(--hdb-checkout-items-max,22rem);margin:-1rem -.5rem 0;padding:1rem .5rem 0;overflow-y:auto;overscroll-behavior:contain}
body .hdb-checkout-more{position:absolute;bottom:.75rem;left:50%;transform:translateX(-50%);padding:.5rem 1rem;border:0;border-radius:999px;background:#3a3733;color:#fff;font:inherit;font-size:.8125rem;font-weight:500;white-space:nowrap;box-shadow:0 2px 8px rgba(0,0,0,.25);cursor:pointer}
body .hdb-checkout-more::after{content:" \2193"}
body .hdb-checkout-more:focus-visible{outline:2px solid var(--hdb-i);outline-offset:2px}

/* ---------- totals + coupon ---------- */
body .wc-block-components-totals-wrapper{padding:1rem 0;border-top:1px solid var(--hdb-l)}
body .wc-block-components-totals-item{padding-block:.25rem;font-size:.9375rem}
body .wc-block-components-totals-item__label{color:var(--hdb-m)}
body .wc-block-components-totals-footer-item{font-size:1.25rem;font-weight:600}
body .wc-block-components-totals-footer-item .wc-block-components-totals-item__label{color:var(--hdb-i)}
body .wc-block-components-totals-footer-item-tax-value,body .wc-block-components-totals-item__value{font-variant-numeric:tabular-nums}
body .wc-block-components-totals-coupon .wc-block-components-panel__button{font-size:.9375rem;font-weight:500}
body .wc-block-components-totals-coupon__form{gap:.75rem}
body .wc-block-components-totals-coupon__button{min-height:3.125rem;border-radius:var(--hdb-r);background:#e9e6e1;color:var(--hdb-i);font-weight:600}
body .wc-block-components-notice-banner{border-radius:var(--hdb-r)}

/* ---------- cart page ---------- */
body .wp-block-woocommerce-cart{max-width:none;margin:0}
body .wp-block-woocommerce-cart .wc-block-cart-items{border-color:var(--hdb-l)}
body .wp-block-woocommerce-cart .wc-block-cart-item__image img{border-radius:var(--hdb-r);background:var(--hdb-s)}
body .wp-block-woocommerce-cart .wc-block-components-product-name{color:var(--hdb-i);text-decoration:none}
body .wp-block-woocommerce-cart .wc-block-components-product-name:hover{text-decoration:underline;text-underline-offset:.2em}
body .wp-block-woocommerce-cart .wc-block-components-quantity-selector{border-radius:999px;border-color:var(--hdb-l)}
body .wp-block-woocommerce-cart .wc-block-components-sidebar{align-self:flex-start;padding:1.5rem;border-radius:1rem;background:var(--hdb-s)}
body .wp-block-woocommerce-cart .wc-block-cart__totals-title{font-size:1rem;font-weight:600;text-transform:none;letter-spacing:0}

/* ---------- one column below 1000px: summary first, as a bar (last, so it overrides the desktop rules above) ---------- */
@media (max-width:999px){
	body .wp-block-woocommerce-checkout .wc-block-components-sidebar-layout,body .wp-block-woocommerce-checkout.is-loading{grid-template-columns:minmax(0,1fr)}
	body .wp-block-woocommerce-checkout .wc-block-components-main,body .wp-block-woocommerce-checkout.is-loading>.wp-block-woocommerce-checkout-fields-block{grid-area:auto;padding:1.5rem 1.25rem 3rem}
	body .wp-block-woocommerce-checkout .wc-block-components-sidebar,body .wp-block-woocommerce-checkout.is-loading>.wp-block-woocommerce-checkout-totals-block{grid-area:auto;order:-1;padding:0 1.25rem;border-left:0;border-bottom:1px solid var(--hdb-l)}
	body .wp-block-woocommerce-checkout.is-loading>.wp-block-woocommerce-checkout-totals-block>div{margin:0}
	body .wp-block-woocommerce-checkout .wc-block-components-sidebar>*{position:static}
	body .wc-block-checkout__form{margin-inline:auto}
	body .wc-block-components-sidebar .wc-block-components-checkout-order-summary__title{padding:1rem 0;border:0}
	body .wc-block-components-sidebar .wc-block-components-checkout-order-summary__content.is-open{padding-bottom:1rem;border:0}
	body .wc-block-components-sidebar .wc-block-components-checkout-order-summary__title .wc-block-components-checkout-order-summary__title-text{font-size:1rem;font-weight:500}
}
/* Klaviyo SMS consent (checkout.js): the disclosure under the Handdn checkbox */
body .hdb-sms-disclosure{margin:.25rem 0 .75rem;color:var(--hdb-m);font-size:.8125rem;line-height:1.5}
body .hdb-sms-disclosure:empty{margin:0}
