/* Basket and checkout (loop pass 1, review: they fell back to stock WooCommerce/Storefront: grey
   buttons, 300–400 headings, a centred title over an empty gap). Both are WooCommerce blocks; only
   type, buttons and spacing change. Payment widgets, radios, fields and totals logic are untouched. */

/* Title: left, 800, close to the content, like the search and 404 headings */
.woocommerce-cart .hentry .entry-header,
.woocommerce-checkout .hentry .entry-header { margin: 4px 0 20px; padding: 0; text-align: left; border: 0; }
.woocommerce-cart .hentry .entry-title,
.woocommerce-checkout .hentry .entry-title {
	margin: 0; text-align: left; font-weight: 800; letter-spacing: -.02em;
	font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1;
}
.woocommerce-cart .hentry, .woocommerce-checkout .hentry { margin-bottom: 0; padding-top: 0; }
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { margin-top: 0 !important; padding-top: 0 !important; }

/* Step and panel headings in the shared title style */
.wc-block-components-title.wc-block-components-title,
.wc-block-components-checkout-step__title,
.wc-block-cart__totals-title,
.wc-block-components-checkout-order-summary__title-text {
	font-family: var(--jc-font); font-weight: 800; letter-spacing: -.01em; color: var(--jc-ink);
}
.wc-block-cart .wc-block-cart__totals-title { font-size: 14px; text-transform: none; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-weight: 800; }
.wc-block-components-product-name { font-weight: 700; color: var(--jc-ink); text-decoration: none; }

/* The two actions that move the purchase on: the shared ink button, 52px, no underline */
.wc-block-cart__submit-button.wc-block-components-button,
.wc-block-components-checkout-place-order-button.wc-block-components-button {
	min-height: 52px; border: 0; border-radius: 8px;
	background: var(--jc-ink); color: #fff;
	font: 700 16px/1.2 var(--jc-font); text-decoration: none !important;
	transition: background-color .15s;
}
.wc-block-cart__submit-button.wc-block-components-button:hover,
.wc-block-components-checkout-place-order-button.wc-block-components-button:hover { background: #000; color: #fff; }
.wc-block-cart__submit-button .wc-block-components-button__text,
.wc-block-components-checkout-place-order-button .wc-block-components-button__text { text-decoration: none; }

/* Empty basket: heading in the title style, then the shop's search and aisles (inc/cart.php) */
.wc-block-cart__empty-cart__title { font-weight: 800; letter-spacing: -.02em; color: var(--jc-ink); }
.jc-cart-empty-more { text-align: left; }
.jc-cart-empty-more .jc-404__search { margin-inline: 0; }
.wp-block-woocommerce-empty-cart-block > .wp-block-separator { display: none; }

/* WooCommerce's block styles set these at higher specificity; scoped to the two pages so they win. */
body.woocommerce-checkout .wp-block-woocommerce-checkout h2,
body.woocommerce-cart .wp-block-woocommerce-cart h2,
body.woocommerce-checkout .wc-block-components-checkout-order-summary__title-text,
body.woocommerce-cart .wc-block-cart__totals-title { font-weight: 800; letter-spacing: -.01em; color: var(--jc-ink); }
body.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
body.woocommerce-checkout .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-weight: 800; }
/* Pass-1 verifier: WooCommerce's own rules still won here (button 48px, summary heading 500). */
body.woocommerce-cart .wp-block-woocommerce-cart .wc-block-cart__submit-button.wc-block-components-button { min-height: 52px; }
body.woocommerce-checkout .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__title,
body.woocommerce-checkout .wp-block-woocommerce-checkout .wc-block-components-checkout-order-summary__title * { font-weight: 800; }
/* The empty-basket heading sits under the left-aligned page title (pass-1 verifier P3). */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title { text-align: left; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.6rem); }
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title::before { display: none; }
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block > p:has(a) { text-align: left; }

/* Loop pass 2: basket controls as touch targets (44px on touch screens) and the shop's focus ring. */
body.woocommerce-cart .wc-block-components-quantity-selector { min-height: var(--jc-target); }
body.woocommerce-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button { min-width: var(--jc-target); min-height: var(--jc-target); }
body.woocommerce-cart .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input { min-height: var(--jc-target); }
body.woocommerce-cart .wc-block-cart-item__remove-link {
	display: inline-flex !important; align-items: center; justify-content: center;
	min-width: var(--jc-target); min-height: var(--jc-target); margin-left: 4px;
}
body.woocommerce-cart .wc-block-components-panel__button,
body.woocommerce-checkout .wc-block-components-panel__button { min-height: var(--jc-target); }
body.woocommerce-cart .wp-block-woocommerce-cart :is(a, button, input, select, [tabindex]):focus-visible,
body.woocommerce-checkout .wp-block-woocommerce-checkout :is(a, button, select, [tabindex]):focus-visible {
	outline: 3px solid var(--jc-focus) !important; outline-offset: 2px; box-shadow: none;
}

/* Pass 3: checkout radios/checkboxes get the shop's focus ring (audit B4; focus style only, no
   payment setting); basket/checkout content on the title's edge (review A2: 7px out). */
body.woocommerce-checkout .wp-block-woocommerce-checkout input:is([type="radio"], [type="checkbox"]):focus-visible {
	outline: 3px solid var(--jc-focus) !important; outline-offset: 2px;
}
body.woocommerce-cart .wp-block-woocommerce-cart.alignwide,
body.woocommerce-checkout .wp-block-woocommerce-checkout.alignwide { margin-left: 0; margin-right: 0; }
/* Pass-3 verifier: the alignwide override above lost to the block layout; pin both sides to the content edge. */
body.woocommerce-cart .entry-content > .wp-block-woocommerce-cart,
body.woocommerce-checkout .entry-content > .wp-block-woocommerce-checkout { margin-left: 0 !important; margin-right: 0 !important; width: auto; max-width: none; }

/* Quieter basket and checkout (0.7.26, user: "too white", hard on the eyes after the aisles). The wall tone
   from the homepage and store page is the ground; the order sits on flat white panels; borders drop from
   near-black to the control grey, ink only where it means something (focus, the chosen option, the one
   button that moves the order on). Presentation only: fields, radios, payment methods and totals work as
   before; nothing here changes what they do or say. */
body.woocommerce-cart .site-content,
body.woocommerce-checkout .site-content,
body.woocommerce-cart .storefront-breadcrumb,
body.woocommerce-checkout .storefront-breadcrumb { background: var(--jc-wall, #f2efe9); }
body.woocommerce-cart .site-main,
body.woocommerce-checkout .site-main { margin-bottom: 0; padding-bottom: clamp(40px, 6vw, 72px); }

/* Panels: items and form on the left, totals and summary on the right */
body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar,
body.woocommerce-checkout .wc-block-checkout__main,
body.woocommerce-checkout .wc-block-checkout__sidebar {
	background: var(--jc-paper);
	border: 1px solid var(--jc-line);
	border-radius: 12px;
	padding: clamp(16px, 2.4vw, 32px) !important;
	box-sizing: border-box;
}
body.woocommerce-checkout .wc-block-checkout__sidebar .wc-block-components-checkout-order-summary__content,
body.woocommerce-checkout .wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-block { border: 0; }
body.woocommerce-checkout .wp-block-woocommerce-checkout-order-summary-block { border: 0 !important; border-radius: 0; }
@media (min-width: 700px) {
	body.woocommerce-cart .wc-block-cart__sidebar,
	body.woocommerce-checkout .wc-block-checkout__sidebar { align-self: flex-start; }
}
@media (max-width: 699px) {
	/* phones: panels run edge to edge so the form keeps its width */
	body.woocommerce-cart :is(.wc-block-cart__main, .wc-block-cart__sidebar),
	body.woocommerce-checkout :is(.wc-block-checkout__main, .wc-block-checkout__sidebar) {
		width: calc(100% + 2 * var(--jc-gutter)) !important; max-width: none;
		margin-left: calc(-1 * var(--jc-gutter)); margin-right: calc(-1 * var(--jc-gutter));
		border-radius: 0; border-left: 0; border-right: 0;
	}
	body.woocommerce-cart .wc-block-cart__sidebar { margin-top: 12px; }
	body.woocommerce-checkout .wc-block-checkout__sidebar { margin-bottom: 12px; }   /* phones: the summary toggle comes first */
}

/* Lines and fields: control grey at rest, ink on hover/focus */
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-text-input input,
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-textarea,
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-blocks-components-select .wc-blocks-components-select__select,
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-combobox .wc-block-components-combobox-control input,
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-quantity-selector {
	border-color: var(--jc-control-line) !important;
	border-radius: 8px !important;
	box-shadow: none;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-text-input input:hover,
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-blocks-components-select .wc-blocks-components-select__select:hover { border-color: var(--jc-muted) !important; }
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-text-input input:focus,
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-textarea:focus,
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-blocks-components-select .wc-blocks-components-select__select:focus,
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-combobox .wc-block-components-combobox-control input:focus {
	border-color: var(--jc-ink) !important;
	box-shadow: 0 0 0 1px var(--jc-ink) !important;
	outline: 3px solid var(--jc-focus); outline-offset: 2px;
}
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-text-input label,
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-blocks-components-select__label { color: var(--jc-muted); }

/* Option lists (delivery method, shipping options, payment methods): the chosen one carries the ink edge,
   the rest a grey line; a faint wash behind the chosen one instead of a heavy black box. */
body.woocommerce-checkout .wc-block-components-radio-control--highlight-checked,
body.woocommerce-checkout .wc-block-components-radio-control-accordion-option,
body.woocommerce-checkout .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option { border-radius: 8px; }
body.woocommerce-checkout .wc-block-components-radio-control--highlight-checked::after { border-color: var(--jc-control-line) !important; border-width: 1px !important; border-radius: 8px; }
body.woocommerce-checkout .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option--checked-option-highlighted,
body.woocommerce-checkout .wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option--checked-option-highlighted {
	box-shadow: inset 0 0 0 1.5px var(--jc-ink) !important; border-radius: 8px; background: #fafaf8;
}
body.woocommerce-checkout .wc-block-checkout__shipping-method-container { background: var(--jc-wash); border-radius: 10px; padding: 4px; }
body.woocommerce-checkout .wc-block-checkout__shipping-method-option { border-radius: 8px; border-color: transparent !important; color: var(--jc-ink-2); }
body.woocommerce-checkout .wc-block-checkout__shipping-method-option--selected { background: var(--jc-paper); border: 1px solid var(--jc-control-line) !important; box-shadow: 0 1px 2px rgb(18 19 22 / .06); color: var(--jc-ink); }
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox] { border-color: var(--jc-control-line); border-radius: 4px; }

/* Calmer type: names unchanged, just not shouted; one total, sized as a total */
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-product-name { text-decoration: none; color: var(--jc-ink); font-weight: 700; }
body:is(.woocommerce-cart, .woocommerce-checkout) a.wc-block-components-product-name:hover { text-decoration: underline; text-underline-offset: 3px; }
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-product-metadata { color: var(--jc-muted); }
body.woocommerce-cart .wc-block-cart-items th,
body.woocommerce-cart .wc-block-cart-items__header { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--jc-muted); }
body.woocommerce-cart .wc-block-cart-items td, body.woocommerce-cart .wc-block-cart-items th { border-color: var(--jc-line) !important; }
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-wrapper { border-color: var(--jc-line) !important; }
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item .wc-block-components-totals-item__label { font-size: 18px; }
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { font-size: 22px; font-variant-numeric: tabular-nums; }
body.woocommerce-checkout .wc-block-components-checkout-step__title { font-size: clamp(1.15rem, 1rem + .4vw, 1.35rem); }
body.woocommerce-checkout .wc-block-checkout__terms { color: var(--jc-muted); border-color: var(--jc-line) !important; }
/* WooCommerce widens the items table past its column (phones: 374px in a 358px box), which pushed the
   price onto the panel's edge. */
body.woocommerce-cart .wc-block-cart__main .wc-block-cart-items { width: 100% !important; table-layout: fixed; }
body.woocommerce-cart .wc-block-cart__main .wc-block-cart-items__row { min-width: 0; grid-template-columns: 72px minmax(0, 1fr) auto; }
/* Staging/live WooCommerce pads its block wrapper (22.65px a side), so the panels sat in from the title. */
body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-checkout .wp-block-woocommerce-checkout { padding-left: 0 !important; padding-right: 0 !important; }
/* "Ocenjeni skupni znesek" is long: label wraps on its own side, the amount stays on its line. */
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 12px; }
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item .wc-block-components-totals-item__label { flex: 1 1 auto; min-width: 0; font-size: 17px; }
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { flex: none; white-space: nowrap; }
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item .wc-block-components-totals-item__label { flex: 0 1 auto; font-size: 16px; line-height: 1.25; }
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { margin-left: auto; font-size: 20px; }
/* An empty description div (width 100%) squeezed the label into three lines in a nowrap row. */
body:is(.woocommerce-cart, .woocommerce-checkout) .wc-block-components-totals-footer-item .wc-block-components-totals-item__description:empty { display: none; }
