/**
 * Purchase flow pages (cart, checkout, account) with the classic WooCommerce shortcodes: replaces
 * woocommerce-general, which inc/woocommerce.php drops on these pages. Loads only there (body class
 * pa-shop-page). The only place where !important is allowed: it has to beat WooCommerce's and the
 * payment gateways' CSS. docs/superpowers/specs/2026-11-08-proces-compra-estils-disseny.md.
 */

/*
 * Everything below sits inside .pa-shop-page .woocommerce: the wrapper WooCommerce prints around
 * each shortcode. The header, the footer and the mini-cart are outside it and keep their own CSS.
 */

/* -------------------------------------------------------------------------------------------------
 * Secondary text (spec §5): text-muted on white; always text-default inside the cream cards, where
 * text-muted drops below 4.5:1. The cards set the variable (see «Targeta»).
 * ---------------------------------------------------------------------------------------------- */

.pa-shop-page {
	--pa-text-secondary: var(--wp--preset--color--text-muted);
}

/* -------------------------------------------------------------------------------------------------
 * Botons (spec §6). The base is core/button's (button.css, theme.json styles.elements.button):
 * Button / Primary without the arrow, the label centred with 24 on each side, so a button no list
 * names (shipping calculator, «Order again», downloads, saved cards) reads right. The variants go by
 * context, with selectors, not by class.
 * ---------------------------------------------------------------------------------------------- */

.pa-shop-page .woocommerce :is(.button, .woocommerce-button, .wc-block-components-button, input[type="submit"]) {
	align-items: center;
	background-color: var(--wp--preset--color--interactive);
	border: 0;
	border-radius: var(--wp--custom--radius--999);
	box-sizing: border-box;
	color: var(--wp--preset--color--text-inverse);
	cursor: pointer;
	display: inline-flex;
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--md);
	font-weight: var(--wp--custom--font-weight--semibold);
	gap: var(--wp--preset--spacing--8);
	justify-content: center;
	line-height: var(--wp--custom--line-height--normal);
	min-height: var(--wp--custom--size--control);
	padding-block: 0;
	padding-inline: var(--wp--preset--spacing--24);
	position: relative;
	text-align: center;
	text-decoration: none;
	transition: background-color var(--wp--custom--motion--duration--fast) var(--wp--custom--motion--ease--out), border-color var(--wp--custom--motion--duration--fast) var(--wp--custom--motion--ease--out), color var(--wp--custom--motion--duration--fast) var(--wp--custom--motion--ease--out);
}

.pa-shop-page .woocommerce :is(.button, .woocommerce-button, .wc-block-components-button, input[type="submit"]):hover:not(:disabled) {
	background-color: var(--wp--preset--color--interactive-hover);
	color: var(--wp--preset--color--text-inverse);
}

/*
 * Primary: the label at the start and the arrow at the right end, 24/72, as has-icon-arrow
 * (button.css). [id="place_order"] is also order-pay's button, which has no name; as an attribute it
 * keeps the rule at class weight.
 */
.pa-shop-page .woocommerce :is(.checkout-button, [name="woocommerce_checkout_place_order"], [id="place_order"], .woocommerce-form-login__submit, .woocommerce-form-register__submit, .button[name="save_account_details"], .button[name="save_address"], .woocommerce-ResetPassword .woocommerce-Button, .return-to-shop .button, .wc-block-components-notice-banner .button.wc-forward, .woocommerce-thankyou-order-failed-actions .button:first-child) {
	justify-content: flex-start;
	padding-inline: var(--wp--preset--spacing--24) var(--wp--preset--spacing--72);
	text-align: start;
}

.pa-shop-page .woocommerce :is(.checkout-button, [name="woocommerce_checkout_place_order"], [id="place_order"], .woocommerce-form-login__submit, .woocommerce-form-register__submit, .button[name="save_account_details"], .button[name="save_address"], .woocommerce-ResetPassword .woocommerce-Button, .return-to-shop .button, .wc-block-components-notice-banner .button.wc-forward, .woocommerce-thankyou-order-failed-actions .button:first-child)::after {
	content: "→";
	inset-inline-end: var(--wp--preset--spacing--24);
	position: absolute;
}

/*
 * «Explorar productos» (account without orders) is a link inside a notice. wc-blocks.css turns it into
 * a plain link with !important (.wc-block-components-notice-banner > .wc-block-components-notice-banner__content
 * .wc-forward: background, colour and padding): only !important brings the button back.
 */
.pa-shop-page .woocommerce .wc-block-components-notice-banner .button.wc-forward {
	background-color: var(--wp--preset--color--interactive) !important;
	color: var(--wp--preset--color--text-inverse) !important;
	opacity: 1;
	padding-block: 0 !important;
	padding-inline: var(--wp--preset--spacing--24) var(--wp--preset--spacing--72) !important;
	text-decoration: none;
}

.pa-shop-page .woocommerce .wc-block-components-notice-banner .button.wc-forward:hover {
	background-color: var(--wp--preset--color--interactive-hover) !important;
}

/*
 * Outline on a light background (Button / Outline). None carries the arrow: the label is centred with
 * the same padding on both sides (the arrow and its 72 stay on the Primary buttons).
 */
.pa-shop-page .woocommerce :is([name="update_cart"], [name="apply_coupon"], .woocommerce-orders-table__cell-order-actions .button:not(.cancel), .order-actions-button:not(.cancel), .woocommerce-thankyou-order-failed-actions .button:not(:first-child)) {
	background-color: transparent;
	border: var(--wp--custom--border-width--1) solid var(--wp--preset--color--text-default);
	color: var(--wp--preset--color--text-default);
	justify-content: center;
	padding-inline: var(--wp--preset--spacing--24);
	text-align: center;
}

.pa-shop-page .woocommerce :is([name="update_cart"], [name="apply_coupon"], .woocommerce-orders-table__cell-order-actions .button:not(.cancel), .order-actions-button:not(.cancel), .woocommerce-thankyou-order-failed-actions .button:not(:first-child)):hover:not(:disabled) {
	background-color: var(--wp--preset--color--interactive);
	border-color: var(--wp--preset--color--interactive);
	color: var(--wp--preset--color--text-inverse);
}

/*
 * The actions of the orders table and of the order details («Actions:» row), small (is-size-small).
 * woocommerce-blocktheme.css makes the first ones blocks
 * (.woocommerce-account .woocommerce-orders-table__cell.woocommerce-orders-table__cell-order-actions a).
 * «Cancel» is a Text link: it takes the height here and keeps the Text link's padding.
 */
.pa-shop-page .woocommerce :is(.woocommerce-orders-table__cell-order-actions a.button, a.order-actions-button) {
	display: inline-flex;
	justify-content: center;
	min-height: var(--wp--custom--size--control-small);
}

/* The Outline ones, 16 on each side: the Outline rule's selectors, after it. */
.pa-shop-page .woocommerce :is(.woocommerce-orders-table__cell-order-actions .button:not(.cancel), .order-actions-button:not(.cancel)) {
	padding-inline: var(--wp--preset--spacing--16);
}

/* Text link: underlined label, no box (Button / Text link). */
.pa-shop-page .woocommerce :is(.lost_password a, .woocommerce-orders-table__cell-order-actions .button.cancel, .order-actions-button.cancel, .woocommerce-Address-title .edit, .showcoupon, .showlogin, .pa-checkout-edit-cart a) {
	background-color: transparent;
	border: 0;
	color: var(--wp--preset--color--text-default);
	padding-inline: 0;
	text-decoration: underline;
	text-underline-offset: var(--wp--preset--spacing--4);
}

.pa-shop-page .woocommerce :is(.lost_password a, .woocommerce-orders-table__cell-order-actions .button.cancel, .order-actions-button.cancel, .woocommerce-Address-title .edit, .showcoupon, .showlogin, .pa-checkout-edit-cart a):hover {
	color: var(--wp--preset--color--interactive-hover);
}

/* -------------------------------------------------------------------------------------------------
 * Camps (spec §6): ProAge / Field (.pa-field in field.css). body. matches the specificity of
 * woocommerce-blocktheme.css (.woocommerce-page form .form-row input.input-text: size and padding).
 * The quantity input (.qty) has its own box (see «Quantitat»). WooCommerce paints valid fields green
 * only in woocommerce-general, which these pages do not load: they stay as they are.
 * ---------------------------------------------------------------------------------------------- */

body.pa-shop-page .woocommerce :is(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="hidden"], .qty), select, textarea) {
	background-color: var(--wp--preset--color--surface);
	border: var(--wp--custom--border-width--1) solid var(--wp--preset--color--border-default);
	border-radius: var(--wp--custom--radius--8);
	box-sizing: border-box;
	color: var(--wp--preset--color--text-default);
	font: inherit;
	min-height: var(--wp--custom--size--field);
	padding: var(--wp--preset--spacing--16);
}

body.pa-shop-page .woocommerce :is(input:not([type="checkbox"], [type="radio"], [type="submit"], [type="hidden"], .qty), select, textarea):focus {
	border-color: var(--wp--preset--color--border-strong);
}

/* The cart coupon: woocommerce-blocktheme.css sets its size by id (.woocommerce-cart-form #coupon_code). */
.pa-shop-page .woocommerce-cart-form #coupon_code {
	font: inherit;
	padding: var(--wp--preset--spacing--16);
}

/* Room for the show-password button that woocommerce.js adds at the end of the field. */
body.pa-shop-page .woocommerce .password-input input {
	padding-inline-end: var(--wp--preset--spacing--48);
}

.pa-shop-page .woocommerce .form-row label:not(.woocommerce-form__label-for-checkbox) {
	font-size: var(--wp--preset--font-size--base);
	font-weight: var(--wp--custom--font-weight--medium);
	margin-block-end: var(--wp--preset--spacing--8);
}

/* A checkbox and its label in one row, regular weight («Remember me», «Ship to a different address?»). */
.pa-shop-page .woocommerce label.woocommerce-form__label-for-checkbox {
	align-items: center;
	display: flex;
	font-weight: var(--wp--custom--font-weight--regular);
	gap: var(--wp--preset--spacing--16);
	width: fit-content;
}

.pa-shop-page .woocommerce label.woocommerce-form__label-for-checkbox input {
	flex-shrink: 0;
	margin: 0;
}

.pa-shop-page .woocommerce .required {
	color: var(--pa-text-secondary);
}

/* Also in focus: WooCommerce focuses the field it rejects. */
body.pa-shop-page .woocommerce .woocommerce-invalid :is(input, select, textarea),
body.pa-shop-page .woocommerce .woocommerce-invalid :is(input, select, textarea):focus,
body.pa-shop-page .woocommerce input.has-error,
body.pa-shop-page .woocommerce input.has-error:focus,
.pa-shop-page .woocommerce .woocommerce-invalid .select2-container .select2-selection--single {
	border-color: var(--wp--preset--color--state-error);
}

/*
 * The message under a field: cart.js and checkout.js print the coupon error (.coupon-error-notice,
 * with .has-error on the field) and the checkout field errors (.checkout-inline-error-message) inline,
 * not as a notice. woocommerce-general styled them; here they take the form alert rule (field.css §6.1).
 * The failed payment notice of the order received page takes the same sign (see «Comanda»).
 */
.pa-shop-page .woocommerce :is(.coupon-error-notice, .checkout-inline-error-message) {
	color: var(--wp--preset--color--state-error);
	flex-basis: 100%;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--regular);
	line-height: var(--wp--custom--line-height--relaxed);
	margin-block: var(--wp--preset--spacing--8) 0;
	text-align: start;
}

.pa-shop-page .woocommerce :is(.coupon-error-notice, .checkout-inline-error-message, .woocommerce-thankyou-order-failed)::before {
	align-items: center;
	border: var(--wp--custom--border-width--1) solid currentcolor;
	border-radius: var(--wp--custom--radius--999);
	box-sizing: border-box;
	content: "!";
	display: inline-flex;
	font-size: var(--wp--preset--font-size--2-xs);
	font-weight: var(--wp--custom--font-weight--semibold);
	height: var(--wp--custom--size--alert-icon);
	justify-content: center;
	line-height: var(--wp--custom--line-height--none);
	margin-inline-end: var(--wp--preset--spacing--8);
	vertical-align: middle;
	width: var(--wp--custom--size--alert-icon);
}

/* -------------------------------------------------------------------------------------------------
 * Select2 (spec §6): country and state look like a field. select2.css and woocommerce-blocktheme.css
 * set the inner padding with five classes (.woocommerce-page form .form-row .select2-container ...).
 * The dropdown is appended to the body, outside .woocommerce: those rules go under body.pa-shop-page.
 * ---------------------------------------------------------------------------------------------- */

.pa-shop-page .woocommerce .select2-container .select2-selection--single {
	align-items: center;
	background-color: var(--wp--preset--color--surface);
	border: var(--wp--custom--border-width--1) solid var(--wp--preset--color--border-default);
	border-radius: var(--wp--custom--radius--8);
	display: flex;
	height: var(--wp--custom--size--field);
	margin: 0;
}

.pa-shop-page .woocommerce :is(.select2-container--focus, .select2-container--open) .select2-selection--single {
	border-color: var(--wp--preset--color--border-strong);
}

.pa-shop-page .woocommerce form .form-row .select2-container .select2-selection--single .select2-selection__rendered {
	color: var(--wp--preset--color--text-default);
	line-height: var(--wp--custom--line-height--normal);
	padding: 0 var(--wp--preset--spacing--48) 0 var(--wp--preset--spacing--16);
}

.pa-shop-page .woocommerce .select2-container .select2-selection--single .select2-selection__arrow {
	height: 100%;
	top: 0;
}

/* The arrow is a CSS triangle: top border closed, bottom border open. */
.pa-shop-page .woocommerce .select2-container .select2-selection--single .select2-selection__arrow b {
	border-block-color: var(--wp--preset--color--text-default);
}

/* woocommerce-blocktheme.css shrinks the field and its list (.woocommerce-page .select2-container). */
body.pa-shop-page .select2-container {
	font-size: inherit;
}

body.pa-shop-page .select2-dropdown {
	border: var(--wp--custom--border-width--1) solid var(--wp--preset--color--border-default);
	border-radius: var(--wp--custom--radius--8);
}

body.pa-shop-page .select2-container .select2-results__option--highlighted {
	background-color: var(--wp--preset--color--interactive-soft);
	color: var(--wp--preset--color--text-default);
}

/* selectWoo (WooCommerce's Select2) marks the chosen option with data-selected; aria-selected follows the highlight. */
body.pa-shop-page .select2-container .select2-results__option[data-selected="true"] {
	background-color: var(--wp--preset--color--interactive);
	color: var(--wp--preset--color--text-inverse);
}

/* -------------------------------------------------------------------------------------------------
 * Caselles i radios (spec §6): native, 20px, in the button colour.
 * ---------------------------------------------------------------------------------------------- */

.pa-shop-page .woocommerce :is(input[type="checkbox"], input[type="radio"]) {
	accent-color: var(--wp--preset--color--interactive);
	height: var(--wp--custom--size--checkbox);
	width: var(--wp--custom--size--checkbox);
}

/* -------------------------------------------------------------------------------------------------
 * Quantitat (spec §6): V2 / Quantity, 144 × 64, the number centred, no browser arrows, no − and +.
 * ---------------------------------------------------------------------------------------------- */

.pa-shop-page .woocommerce .quantity {
	align-items: center;
	background-color: var(--wp--preset--color--surface);
	border: var(--wp--custom--border-width--1) solid var(--wp--preset--color--border-default);
	border-radius: var(--wp--custom--radius--8);
	box-sizing: border-box;
	display: inline-flex;
	height: var(--wp--custom--size--field);
	width: var(--wp--custom--size--quantity);
}

/* A fixed quantity (sold individually, min = max) is a hidden input: no empty box. */
.pa-shop-page .woocommerce .quantity:has(> .qty[type="hidden"]) {
	display: none;
}

.pa-shop-page .woocommerce .quantity:focus-within {
	border-color: var(--wp--preset--color--border-strong);
}

.pa-shop-page .woocommerce .quantity .qty {
	appearance: textfield;
	background-color: transparent;
	border: 0;
	box-sizing: border-box;
	color: inherit;
	font: inherit;
	height: 100%;
	padding: 0;
	text-align: center;
	width: 100%;
}

.pa-shop-page .woocommerce .quantity .qty::-webkit-inner-spin-button,
.pa-shop-page .woocommerce .quantity .qty::-webkit-outer-spin-button {
	appearance: none;
	margin: 0;
}

/* -------------------------------------------------------------------------------------------------
 * Taules (spec §6): no outer border or background, lines between rows. table. matches
 * woocommerce-blocktheme.css (.woocommerce-page table.shop_table: width 70%, cells padding 1em).
 * ---------------------------------------------------------------------------------------------- */

.pa-shop-page .woocommerce table:is(.shop_table, .woocommerce-table) {
	border: 0;
	border-collapse: collapse;
	width: 100%;
}

.pa-shop-page .woocommerce table:is(.shop_table, .woocommerce-table) :is(th, td) {
	border: 0;
	border-block-end: var(--wp--custom--border-width--1) solid var(--wp--preset--color--border-default);
	padding: var(--wp--preset--spacing--16);
}

.pa-shop-page .woocommerce table:is(.shop_table, .woocommerce-table) th {
	font-weight: var(--wp--custom--font-weight--medium);
	text-align: start;
}

/* Column headers: secondary text. Row headers (totals, order number) keep the text colour. */
.pa-shop-page .woocommerce table:is(.shop_table, .woocommerce-table) thead th {
	color: var(--pa-text-secondary);
	font-size: var(--wp--preset--font-size--sm);
	text-transform: uppercase;
}

.pa-shop-page .woocommerce table:is(.shop_table, .woocommerce-table) .product-name a {
	color: var(--wp--preset--color--text-default);
	font-size: var(--wp--preset--font-size--md);
	font-weight: var(--wp--custom--font-weight--medium);
	text-decoration: none;
}

.pa-shop-page .woocommerce table:is(.shop_table, .woocommerce-table) .product-name a:hover {
	color: var(--wp--preset--color--interactive-hover);
}

.pa-shop-page .woocommerce table:is(.shop_table, .woocommerce-table) .amount {
	font-size: var(--wp--preset--font-size--md);
	font-weight: var(--wp--custom--font-weight--semibold);
}

.pa-shop-page .woocommerce table:is(.shop_table, .woocommerce-table) .order-total .amount {
	font-size: var(--wp--custom--font-size--price);
}

/*
 * «(incluye 15,55 € IVA 10%)» after a total: only information, it does not change the price. A line
 * of its own under the total, at 13px (as the other informative notes) and in the secondary colour,
 * with the amount at the size of the text (it took the size of the total and read as a second price).
 */
.pa-shop-page .woocommerce table:is(.shop_table, .woocommerce-table) .includes_tax {
	color: var(--pa-text-secondary);
	display: block;
	font-size: var(--wp--preset--font-size--xs-plus);
	font-weight: var(--wp--custom--font-weight--regular);
	line-height: var(--wp--custom--line-height--label);
	margin-block-start: var(--wp--preset--spacing--4);
}

.pa-shop-page .woocommerce table:is(.shop_table, .woocommerce-table) .includes_tax .amount {
	font-size: inherit;
	font-weight: inherit;
}

/* woocommerce-smallscreen stacks the rows: each cell is labelled by its data-title. */
@media (max-width: 640px) {

	.pa-shop-page .woocommerce table.shop_table_responsive tr td::before,
	.pa-shop-page .woocommerce table.woocommerce-orders-table tbody th::before {
		color: var(--pa-text-secondary);
		font-size: var(--wp--preset--font-size--sm);
		font-weight: var(--wp--custom--font-weight--medium);
		text-transform: uppercase;
	}

	/* No zebra rows (woocommerce-smallscreen: table.shop_table_responsive tr:nth-child(2n) td). */
	.pa-shop-page .woocommerce table.shop_table_responsive tr:nth-child(2n) td {
		background-color: transparent;
	}
}

/* -------------------------------------------------------------------------------------------------
 * Miniatures (spec §6): 96px on a cream square, as the product card. The cream goes on the link and
 * the photo multiplies over it (an image's own background would be painted over by its white).
 * td. matches woocommerce-blocktheme.css (.woocommerce-cart-form .product-thumbnail a img: 117px).
 * ---------------------------------------------------------------------------------------------- */

.pa-shop-page .woocommerce td.product-thumbnail a {
	background-color: var(--wp--preset--color--surface-alt);
	border-radius: var(--wp--custom--radius--8);
	display: block;
	width: var(--wp--custom--size--thumb);
}

.pa-shop-page .woocommerce td.product-thumbnail img {
	aspect-ratio: 1;
	border-radius: var(--wp--custom--radius--8);
	display: block;
	height: auto;
	mix-blend-mode: multiply;
	object-fit: contain;
	width: var(--wp--custom--size--thumb);
}

/* -------------------------------------------------------------------------------------------------
 * Targeta (spec §6): one rule for the cream boxes of every screen (cart totals, checkout summary,
 * login and register, addresses, order received summary); each screen adds its selector here.
 * Secondary text inside is text-default (§5). The padding drops to 24 on phones.
 * ---------------------------------------------------------------------------------------------- */

.pa-shop-page {
	--pa-card-padding: var(--wp--preset--spacing--32);
}

@media (max-width: 640px) { /* = woocommerce_style_smallscreen_breakpoint (inc/woocommerce.php) */

	.pa-shop-page {
		--pa-card-padding: var(--wp--preset--spacing--24);
	}
}

.pa-shop-page .woocommerce :is(.cart_totals, .woocommerce-checkout-review-order, .u-columns > .u-column1, .u-columns > .u-column2, .woocommerce-order-overview, .wc-bacs-bank-details, .woocommerce > .woocommerce-form-login, .woocommerce > .checkout_coupon, .woocommerce-customer-details .col2-set > :is(.col-1, .col-2)) {
	--pa-text-secondary: var(--wp--preset--color--text-default);
	background-color: var(--wp--preset--color--surface-alt);
	border-radius: var(--wp--custom--radius--8);
	box-sizing: border-box;
	padding: var(--pa-card-padding);
}

/* Links inside read in the text colour, as the Figma Text link (link-default is 3.4:1 on the cream). :where keeps the rule weak. */
.pa-shop-page .woocommerce :where(.cart_totals, .woocommerce-checkout-review-order, .u-columns > .u-column1, .u-columns > .u-column2, .woocommerce-order-overview, .wc-bacs-bank-details, .woocommerce > .woocommerce-form-login, .woocommerce > .checkout_coupon, .woocommerce-customer-details .col2-set > :is(.col-1, .col-2)) a:not(.button) {
	color: var(--wp--preset--color--text-default);
}

/* -------------------------------------------------------------------------------------------------
 * Marc (spec §7.1): the title and the shortcode take the wide width of the content, as the user asked
 * for. woocommerce-blocktheme.css caps both at 1000px on the three pages (.woocommerce-cart main
 * .woocommerce, .woocommerce-cart .wp-block-post-title); without it the constrained layout would
 * cap them at contentSize.
 * ---------------------------------------------------------------------------------------------- */

main.pa-shop-page > .wp-block-post-title,
.pa-shop-page .entry-content > .woocommerce {
	max-width: var(--wp--style--global--wide-size);
}

/* -------------------------------------------------------------------------------------------------
 * Carret (spec §7.2). WooCommerce prints the cross-sells inside .cart-collaterals, next to the totals:
 * the shortcode wrapper is the grid and .cart-collaterals dissolves into it, so its children are cells.
 * One column (notices, table, totals, cross-sells); from 1024 the table and the totals card side by
 * side. body.woocommerce-cart wraps main.pa-shop-page. The empty cart has no form and keeps its flow.
 * ---------------------------------------------------------------------------------------------- */

.woocommerce-cart .pa-shop-page .woocommerce:has(> .woocommerce-cart-form) {
	display: grid;
	gap: var(--wp--preset--spacing--32);
	grid-template-columns: minmax(0, 1fr);
}

.woocommerce-cart .pa-shop-page .woocommerce .cart-collaterals {
	display: contents;
}

/* woocommerce-layout clears the floats with pseudo-elements: in a grid they would be empty cells. */
.woocommerce-cart .pa-shop-page .woocommerce :is(.cart-collaterals, ul.products)::before,
.woocommerce-cart .pa-shop-page .woocommerce :is(.cart-collaterals, ul.products)::after {
	content: none;
}

/* The wrapper is always printed: empty, it would be a row with a gap. */
.woocommerce-cart .pa-shop-page .woocommerce .woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce-cart .pa-shop-page .woocommerce :is(.woocommerce-notices-wrapper, .cross-sells) {
	grid-column: 1 / -1;
}

/* After the totals on every width (DOM order puts the cross-sells first). */
.woocommerce-cart .pa-shop-page .woocommerce .cross-sells {
	order: 1;
}

/* woocommerce-layout floats both halves at 48%. */
.pa-shop-page .woocommerce .cart-collaterals :is(.cart_totals, .cross-sells) {
	float: none;
	width: auto;
}

@media (min-width: 1024px) {

	.woocommerce-cart .pa-shop-page .woocommerce:has(> .woocommerce-cart-form) {
		grid-template-columns: minmax(0, 1fr) var(--wp--custom--size--card);
	}

	.woocommerce-cart .pa-shop-page .woocommerce .woocommerce-cart-form {
		grid-column: 1;
	}

	.woocommerce-cart .pa-shop-page .woocommerce .cart_totals {
		align-self: start;
		grid-column: 2;
	}
}

/* Table: WooCommerce's column order (remove, thumbnail, name, price, quantity, subtotal). */
.pa-shop-page .woocommerce .woocommerce-cart-form table.cart :is(th, td) {
	vertical-align: middle;
}

/* A word without breaks (a code, a URL) wraps instead of pushing the column out. */
.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.product-name {
	overflow-wrap: anywhere;
}

/* woocommerce-blocktheme.css: 120px. The «×» and the thumbnail need little room around them. */
.pa-shop-page .woocommerce .woocommerce-cart-form .product-thumbnail {
	padding-inline: var(--wp--preset--spacing--8);
	width: var(--wp--custom--size--thumb);
}

.pa-shop-page .woocommerce .woocommerce-cart-form table.cart .product-remove {
	padding-inline: 0 var(--wp--preset--spacing--8);
}

.pa-shop-page .woocommerce .woocommerce-cart-form .product-remove a.remove {
	background: none;
	border: 0;
	align-items: center;
	box-sizing: border-box;
	color: var(--wp--preset--color--text-muted);
	display: inline-flex;
	font-size: var(--wp--preset--font-size--lg-plus);
	justify-content: center;
	line-height: var(--wp--custom--line-height--none);
	/* A 40px hit area around the glyph; the negative margin keeps its footprint at 1em. */
	margin: calc((1em - var(--wp--custom--size--control-small)) / 2);
	min-height: var(--wp--custom--size--control-small);
	min-width: var(--wp--custom--size--control-small);
	text-decoration: none;
	transition: color var(--wp--custom--motion--duration--fast) var(--wp--custom--motion--ease--out);
}

.pa-shop-page .woocommerce .woocommerce-cart-form .product-remove a.remove:hover {
	color: var(--wp--preset--color--state-error);
}

/* Between 1024 and 1439 the table shares the row with the card: no unit price, small thumbnail. */
@media (min-width: 1024px) {

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart :is(th, td).product-price {
		display: none;
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart :is(th, td):not(.product-remove, .product-thumbnail, .actions) {
		padding-inline: var(--wp--preset--spacing--8);
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form .product-thumbnail,
	.pa-shop-page .woocommerce .woocommerce-cart-form td.product-thumbnail :is(a, img) {
		width: var(--wp--custom--size--thumb-small);
	}
}

@media (min-width: 1440px) {

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart :is(th, td).product-price {
		display: table-cell;
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart :is(th, td):not(.product-remove, .product-thumbnail, .actions) {
		padding-inline: var(--wp--preset--spacing--16);
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form .product-thumbnail,
	.pa-shop-page .woocommerce .woocommerce-cart-form td.product-thumbnail :is(a, img) {
		width: var(--wp--custom--size--thumb);
	}
}

/*
 * The coupon and «Update cart» row. A td that is not a table-cell loses its colspan, so the row is
 * laid out with woocommerce-layout's floats: the coupon at the start, the update button at the end,
 * moved down to the centre of the 64px field.
 */
.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.actions {
	border-block-end: 0;
	padding-block: var(--wp--preset--spacing--24) 0;
	padding-inline: 0;
}

.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.actions .coupon {
	align-items: center;
	gap: var(--wp--preset--spacing--16);
}

.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.actions .coupon :is(.input-text, .button) {
	margin: 0;
	width: auto;
}

/* The coupon error wraps to the width of the field and its button, without widening the row. */
.pa-shop-page .woocommerce .woocommerce-cart-form td.actions .coupon-error-notice {
	contain: inline-size;
}

/* woocommerce-blocktheme.css sets its size by id. */
.pa-shop-page .woocommerce .woocommerce-cart-form #coupon_code {
	margin: 0;
	width: auto;
}

.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.actions > [name="update_cart"] {
	float: inline-end;
	margin-block-start: calc((var(--wp--custom--size--field) - var(--wp--custom--size--control)) / 2);
}

/* Totals card (the «Targeta» rule paints it). The checkout summary table shares its table rules. */
.pa-shop-page .woocommerce .cart_totals h2 {
	font-size: var(--wp--preset--font-size--lg);
	font-weight: var(--wp--custom--font-weight--medium);
	line-height: var(--wp--custom--line-height--normal);
	margin-block: 0 var(--wp--preset--spacing--8);
}

.pa-shop-page .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table) :is(th, td) {
	padding-inline: 0;
	vertical-align: baseline;
}

.pa-shop-page .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table) td {
	text-align: end;
}

/* The shipping methods start with a radio: no text baseline to share with the row header. */
.pa-shop-page .woocommerce :is(.cart_totals table.shop_table, table.woocommerce-checkout-review-order-table) .woocommerce-shipping-totals :is(th, td) {
	vertical-align: top;
}

.pa-shop-page .woocommerce .cart_totals table.shop_table tr:last-child :is(th, td) {
	border-block-end: 0;
}

.pa-shop-page .woocommerce :is(.cart_totals, .woocommerce-checkout-review-order-table) .woocommerce-shipping-methods {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pa-shop-page .woocommerce :is(.cart_totals, .woocommerce-checkout-review-order-table) .woocommerce-shipping-methods li {
	align-items: flex-start;
	display: flex;
	gap: var(--wp--preset--spacing--8);
	justify-content: flex-end;
}

.pa-shop-page .woocommerce :is(.cart_totals, .woocommerce-checkout-review-order-table) .woocommerce-shipping-methods li + li {
	margin-block-start: var(--wp--preset--spacing--8);
}

/* The radio centred on the first line of the label: font: inherit gives it the label's line height (1lh). */
.pa-shop-page .woocommerce :is(.cart_totals, .woocommerce-checkout-review-order-table) .woocommerce-shipping-methods input {
	font: inherit;
	margin: calc((1lh - var(--wp--custom--size--checkbox)) / 2) 0 0;
}

/* A label that wraps keeps its lines next to the radio. */
.pa-shop-page .woocommerce :is(.cart_totals, .woocommerce-checkout-review-order-table) .woocommerce-shipping-methods label {
	text-align: start;
}

.pa-shop-page .woocommerce .cart_totals .woocommerce-shipping-destination {
	font-size: var(--wp--preset--font-size--sm);
	margin-block: var(--wp--preset--spacing--8) 0;
}

.pa-shop-page .woocommerce .cart_totals .shipping-calculator-button {
	color: var(--wp--preset--color--text-default);
	font-size: var(--wp--preset--font-size--sm);
	text-decoration: underline;
	text-underline-offset: var(--wp--preset--spacing--4);
}

.pa-shop-page .woocommerce .cart_totals .shipping-calculator-form {
	text-align: start;
}

.pa-shop-page .woocommerce .cart_totals .wc-proceed-to-checkout {
	margin-block-start: var(--wp--preset--spacing--24);
	padding: 0;
}

.pa-shop-page .woocommerce .cart_totals .checkout-button {
	display: flex;
	margin: 0;
	width: 100%;
}

/*
 * Cross-sells: a minimal classic product card with the look of .pa-product-card (product-card.css is
 * written for the block markup). The cream square is the link's ::before: the photo multiplies over it.
 */
.pa-shop-page .woocommerce .cross-sells {
	margin-block-start: var(--wp--preset--spacing--16); /* + the grid's 32 gap = 48 */
}

.pa-shop-page .woocommerce .cross-sells > h2 {
	font-size: var(--wp--preset--font-size--xl);
	font-weight: var(--wp--custom--font-weight--regular);
	line-height: var(--wp--custom--line-height--snug);
	margin-block: 0 var(--wp--preset--spacing--32);
}

.pa-shop-page .woocommerce .cross-sells ul.products {
	display: grid;
	gap: var(--wp--preset--spacing--32);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.pa-shop-page .woocommerce .cross-sells ul.products li.product {
	display: flex;
	flex-direction: column;
	float: none;
	gap: var(--wp--preset--spacing--8);
	margin: 0;
	min-width: 0;
	width: auto;
}

.pa-shop-page .woocommerce .cross-sells .woocommerce-loop-product__link {
	color: var(--wp--preset--color--text-default);
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: var(--wp--preset--spacing--8);
	position: relative;
	text-decoration: none;
}

.pa-shop-page .woocommerce .cross-sells .woocommerce-loop-product__link::before {
	aspect-ratio: 1;
	background-color: var(--wp--preset--color--surface-alt);
	border-radius: var(--wp--custom--radius--40);
	content: "";
	inset-block-start: 0;
	inset-inline: 0;
	position: absolute;
}

.pa-shop-page .woocommerce .cross-sells .woocommerce-loop-product__link img {
	aspect-ratio: 1;
	border-radius: var(--wp--custom--radius--40);
	box-sizing: border-box;
	display: block;
	height: auto;
	margin-block-end: var(--wp--preset--spacing--8);
	mix-blend-mode: multiply;
	object-fit: contain;
	padding: var(--wp--preset--spacing--24);
	position: relative;
	width: 100%;
}

.pa-shop-page .woocommerce .cross-sells .onsale {
	background-color: var(--wp--preset--color--interactive);
	border-radius: var(--wp--custom--radius--999);
	color: var(--wp--preset--color--text-inverse);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: var(--wp--custom--font-weight--semibold);
	inset-block-start: var(--wp--preset--spacing--16);
	inset-inline-start: var(--wp--preset--spacing--16);
	line-height: var(--wp--custom--line-height--normal);
	padding: var(--wp--preset--spacing--4) var(--wp--preset--spacing--12);
	position: absolute;
	z-index: 1;
}

.pa-shop-page .woocommerce .cross-sells ul.products li.product .woocommerce-loop-product__title {
	font-size: var(--wp--preset--font-size--lg);
	font-weight: var(--wp--custom--font-weight--medium);
	line-height: var(--wp--custom--line-height--normal);
	margin: 0;
	padding: 0;
}

.pa-shop-page .woocommerce .cross-sells .price {
	font-size: var(--wp--custom--font-size--price);
	font-weight: var(--wp--custom--font-weight--semibold);
	line-height: var(--wp--custom--line-height--normal);
}

.pa-shop-page .woocommerce .cross-sells .price del {
	color: var(--wp--preset--color--text-muted);
	font-size: var(--wp--preset--font-size--md);
	font-weight: var(--wp--custom--font-weight--regular);
	margin-inline-end: var(--wp--preset--spacing--8);
}

.pa-shop-page .woocommerce .cross-sells .price ins {
	text-decoration: none;
}

/* Button / Cart (button.css): outline, centred label. Also the external products' «Buy» link. */
.pa-shop-page .woocommerce .cross-sells li.product .button {
	align-self: flex-start;
	background-color: transparent;
	border: var(--wp--custom--border-width--1) solid var(--wp--preset--color--text-default);
	color: var(--wp--preset--color--text-default);
	justify-content: center;
	margin-block-start: var(--wp--preset--spacing--8);
	max-width: 100%;
	min-width: min(var(--wp--custom--size--cart-button), 100%);
	padding-inline: var(--wp--preset--spacing--24);
	text-align: center;
}

.pa-shop-page .woocommerce .cross-sells li.product .button:hover {
	background-color: var(--wp--preset--color--interactive);
	border-color: var(--wp--preset--color--interactive);
	color: var(--wp--preset--color--text-inverse);
}

/* «View cart», printed after an AJAX add: Text link. */
.pa-shop-page .woocommerce .cross-sells .added_to_cart {
	color: var(--wp--preset--color--text-default);
	margin: 0;
	text-decoration: underline;
	text-underline-offset: var(--wp--preset--spacing--4);
}

@media (min-width: 1024px) {

	.pa-shop-page .woocommerce .cross-sells ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1440px) {

	.pa-shop-page .woocommerce .cross-sells ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Empty cart: the is-info notice (notice.css) and «Return to shop» Primary. */
.pa-shop-page .woocommerce .return-to-shop {
	margin-block: var(--wp--preset--spacing--24) 0;
}

/*
 * Up to 640, woocommerce-smallscreen stacks the rows. Each product row becomes a card: the thumbnail
 * on the left across the rows, the name beside it, the «×» at the top right, then the quantity and
 * subtotal lines. The unit price goes, as between 1024 and 1439. Buttons take the full width.
 */
@media (max-width: 640px) { /* = woocommerce_style_smallscreen_breakpoint (inc/woocommerce.php): change both together */

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart tr.cart_item {
		border-block-end: var(--wp--custom--border-width--1) solid var(--wp--preset--color--border-default);
		column-gap: var(--wp--preset--spacing--16);
		display: grid;
		grid-template-columns: var(--wp--custom--size--thumb) minmax(0, 1fr) auto;
		padding-block: var(--wp--preset--spacing--24);
		row-gap: var(--wp--preset--spacing--8);
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart tr.cart_item td {
		border: 0;
		padding: 0;
	}

	/* woocommerce-smallscreen hides it (.woocommerce table.cart .product-thumbnail). */
	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.product-thumbnail {
		display: block;
		grid-column: 1;
		grid-row: 1 / span 3;
		width: auto;
	}

	/* woocommerce-smallscreen right-aligns every cell with !important. */
	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.product-name {
		grid-column: 2;
		grid-row: 1;
		text-align: start !important;
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.product-remove {
		grid-column: 3;
		grid-row: 1;
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.product-price {
		display: none;
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td:is(.product-quantity, .product-subtotal) {
		align-items: center;
		display: flex;
		gap: var(--wp--preset--spacing--16);
		grid-column: 2 / -1;
		justify-content: space-between;
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td:is(.product-thumbnail, .product-name)::before {
		content: none;
	}

	/* A fixed quantity has no box (see «Quantitat»): the line would be a lone «Quantity:» label. */
	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.product-quantity:has(> .quantity > .qty[type="hidden"]) {
		display: none;
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.actions {
		padding-block-start: var(--wp--preset--spacing--24);
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.actions .coupon {
		padding: 0;
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.actions .coupon :is(.input-text, .button),
	.pa-shop-page .woocommerce .woocommerce-cart-form #coupon_code {
		flex: 1 1 100%;
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.actions .button {
		display: flex;
		float: none;
		margin-block-start: var(--wp--preset--spacing--16);
		width: 100%;
	}

	.pa-shop-page .woocommerce .woocommerce-cart-form table.cart td.actions .coupon .button {
		margin-block-start: 0;
	}

	.pa-shop-page .woocommerce .return-to-shop .button {
		display: flex;
		width: 100%;
	}
}

/* -------------------------------------------------------------------------------------------------
 * Checkout (spec §7.3). form.checkout holds #customer_details (.col2-set: billing in .col-1, shipping
 * and the order notes in .col-2), #order_review_heading, #order_review (the summary card) and
 * .pa-checkout-payment (the payment methods and «Place order», which the theme moves out of the card:
 * inc/woocommerce.php). One column; from 1024 the form and the payment on the left and the summary on
 * the right, sticky. The login and coupon forms come before form.checkout, each after its is-info
 * toggle (notice.css).
 * ---------------------------------------------------------------------------------------------- */

.pa-shop-page .woocommerce > :is(.woocommerce-form-login, .checkout_coupon) {
	margin-block: 0 var(--wp--preset--spacing--32);
}

.pa-shop-page .woocommerce > .woocommerce-form-login > p:first-child {
	margin-block-start: 0;
}

/* Field rows 16 apart; the paragraphs' own top margin would add to it. Also the account's forms. */
.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) .form-row,
.pa-shop-page .woocommerce > .woocommerce-form-login .form-row,
.pa-shop-page .woocommerce :is(#customer_login, .woocommerce-ResetPassword, .woocommerce-MyAccount-content form) .form-row {
	margin-block: 0 var(--wp--preset--spacing--16);
}

.pa-shop-page .woocommerce > .woocommerce-form-login .lost_password {
	margin-block-end: 0;
}

.pa-shop-page .woocommerce > .checkout_coupon .form-row {
	margin-block: 0;
}

/* The button beside the 64px field, centred on it (woocommerce-layout floats the two halves). */
.pa-shop-page .woocommerce > .checkout_coupon [name="apply_coupon"] {
	margin-block-start: calc((var(--wp--custom--size--field) - var(--wp--custom--size--control)) / 2);
}

/* After the toggles' 16 (their margins collapse with this one). */
.pa-shop-page .woocommerce form.checkout {
	margin-block-start: var(--wp--preset--spacing--32);
}

/* The error notices that checkout.js prepends to the form: 32 above (the form's) and below. */
.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) > .woocommerce-NoticeGroup {
	margin-block-end: var(--wp--preset--spacing--32);
}

.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) > .woocommerce-NoticeGroup .wc-block-components-notice-banner:first-child {
	margin-block-start: 0;
}

.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) > .woocommerce-NoticeGroup .wc-block-components-notice-banner:last-child {
	margin-block-end: 0;
}

/* woocommerce-layout puts billing and shipping side by side at 48%: here always stacked. */
.pa-shop-page .woocommerce #customer_details :is(.col-1, .col-2) {
	float: none;
	width: auto;
}

.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) h3 {
	font-size: var(--wp--preset--font-size--lg-plus);
	font-weight: var(--wp--custom--font-weight--medium);
	line-height: var(--wp--custom--line-height--normal);
	margin-block: var(--wp--preset--spacing--48) var(--wp--preset--spacing--24);
}

.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) .woocommerce-billing-fields > h3:first-child {
	margin-block-start: 0;
}

/* «Ship to a different address?»: the checkbox label (see «Camps») at the size of the title. */
.pa-shop-page .woocommerce #ship-to-different-address label {
	font-size: inherit;
}

@media (min-width: 1024px) {

	/*
	 * Rows: the error notices that checkout.js prepends to the form, then the form beside the title and
	 * the summary, then the payment. The summary spans the rest of the form and the payment, so the
	 * card can stick in it down to «Place order». No row gap: anything else a plugin prints into the
	 * form goes to an empty row at the end.
	 */
	.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) {
		--pa-checkout-sticky-top: calc(var(--wp-admin--admin-bar--position-offset, 0px) + var(--pa-sticky-offset, 0px) + var(--wp--preset--spacing--24));
		column-gap: var(--wp--preset--spacing--32);
		display: grid;
		grid-template-columns: minmax(0, 1fr) var(--wp--custom--size--card);
		grid-template-rows: auto auto 1fr auto;
	}

	.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) > .woocommerce-NoticeGroup {
		grid-column: 1 / -1;
		grid-row: 1;
	}

	.pa-shop-page .woocommerce :is(form.checkout > #customer_details, form.pa-order-pay > .pa-order-pay__details) {
		grid-column: 1;
		grid-row: 2 / span 2;
	}

	.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) > #order_review_heading {
		grid-column: 2;
		grid-row: 2;
		margin-block-start: 0;
	}

	/*
	 * Never a scroll inside (2026-11-12). With many products the card can be taller than the screen:
	 * then it sticks by its top and its end meets the end of the payment, so the total sits beside
	 * «Place order».
	 */
	.pa-shop-page .woocommerce :is(form.checkout > #order_review, form.pa-order-pay > .pa-order-pay__review) {
		align-self: start;
		grid-column: 2;
		grid-row: 3 / span 2;
		position: sticky;
		top: var(--pa-checkout-sticky-top);
		transition: top var(--wp--custom--motion--duration--base) var(--wp--custom--motion--ease--out);
	}

	.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) > .pa-checkout-payment {
		grid-column: 1;
		grid-row: 4;
	}
}

@media (min-width: 1440px) {

	.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) {
		grid-template-columns: minmax(0, 1fr) var(--wp--custom--size--shop-aside);
	}
}

/* «Edit cart» (inc/woocommerce.php): the first line of the card, at the end; the table's 16 below. */
.pa-shop-page .woocommerce .pa-checkout-edit-cart {
	font-size: var(--wp--preset--font-size--sm);
	margin: 0;
	text-align: end;
}

/*
 * Summary table: the cart totals rules (see «Carret»), with the product names at the start. A long
 * name would take the whole width and squeeze the shipping methods into a narrow column: half each.
 */
.pa-shop-page .woocommerce table.woocommerce-checkout-review-order-table td.product-name {
	text-align: start;
	width: 50%;
}

.pa-shop-page .woocommerce table.woocommerce-checkout-review-order-table .woocommerce-shipping-methods .amount {
	white-space: nowrap;
}

.pa-shop-page .woocommerce table.woocommerce-checkout-review-order-table thead th:last-child {
	text-align: end;
}

.pa-shop-page .woocommerce table.woocommerce-checkout-review-order-table tfoot tr:last-child :is(th, td) {
	border-block-end: 0;
}

/* «× 2» after the product name (checkout, order-pay, order details). */
.pa-shop-page .woocommerce strong.product-quantity {
	font-weight: var(--wp--custom--font-weight--regular);
}

/*
 * Payment methods (also order-pay), on the page background: no card. The radio is hidden when there
 * is only one method (checkout.js). In the checkout the title gives the space above.
 */
.pa-shop-page .woocommerce #payment {
	margin-block-start: var(--wp--preset--spacing--24);
}

.pa-shop-page .woocommerce .pa-checkout-payment__title + #payment {
	margin-block-start: 0;
}

.pa-shop-page .woocommerce .wc_payment_methods {
	list-style: none;
	margin: 0;
	padding: 0;
}

.pa-shop-page .woocommerce li.wc_payment_method {
	align-items: center;
	border-block-end: var(--wp--custom--border-width--1) solid var(--wp--preset--color--border-default);
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--16);
	padding-block: var(--wp--preset--spacing--16);
}

.pa-shop-page .woocommerce li.wc_payment_method > input {
	margin: 0;
}

.pa-shop-page .woocommerce li.wc_payment_method > label {
	align-items: center;
	display: flex;
	flex: 1;
	flex-wrap: wrap;
	font-size: var(--wp--preset--font-size--md);
	font-weight: var(--wp--custom--font-weight--medium);
	gap: var(--wp--preset--spacing--16);
	margin: 0;
}

/* The gateways' icons, 24px high. */
.pa-shop-page .woocommerce li.wc_payment_method > label img {
	float: none;
	height: var(--wp--preset--font-size--lg-plus);
	margin: 0;
	max-height: none;
	width: auto;
}

.pa-shop-page .woocommerce .payment_box {
	background-color: var(--wp--preset--color--surface-alt);
	border-radius: var(--wp--custom--radius--8);
	box-sizing: border-box;
	flex-basis: 100%;
	font-size: var(--wp--preset--font-size--sm);
	margin: 0;
	padding: var(--wp--preset--spacing--16);
}

/* woocommerce-general's speech-bubble triangle, which some gateways draw again. */
.pa-shop-page .woocommerce .payment_box::before {
	display: none;
}

.pa-shop-page .woocommerce .payment_box > :first-child {
	margin-block-start: 0;
}

.pa-shop-page .woocommerce .payment_box > :last-child {
	margin-block-end: 0;
}

.pa-shop-page .woocommerce #payment > .form-row {
	margin: var(--wp--preset--spacing--24) 0 0;
	padding: 0;
}

.pa-shop-page .woocommerce :is(.woocommerce-privacy-policy-text, .woocommerce-terms-and-conditions-wrapper) {
	color: var(--pa-text-secondary);
	font-size: var(--wp--preset--font-size--sm);
}

.pa-shop-page .woocommerce .woocommerce-terms-and-conditions-wrapper {
	margin-block-end: var(--wp--preset--spacing--24);
}

.pa-shop-page .woocommerce .woocommerce-privacy-policy-text p {
	margin: 0;
}

/*
 * woocommerce-layout floats it right (.woocommerce #payment #place_order): two ids to beat. The whole
 * width on phones and tablets; beside the summary, the button's own width, as in the other forms.
 */
.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) #payment #place_order {
	display: flex;
	float: none;
	margin: 0;
	width: 100%;
}

@media (min-width: 1024px) {

	.pa-shop-page .woocommerce :is(form.checkout, form.pa-order-pay) #payment #place_order {
		width: auto;
	}
}

/* blockUI keeps WooCommerce's veil; the cursor says the order is on its way. */
.pa-shop-page .woocommerce :is(form.checkout, form#order_review).processing {
	cursor: progress;
}

/*
 * order-pay with the ProAge connector (inc/order-pay/form-pay.php): form.pa-order-pay holds
 * .pa-order-pay__details (billing and shipping), #order_review_heading, .pa-order-pay__review (the
 * summary card) and .pa-checkout-payment, laid out by the checkout's rules above. checkout.js only
 * toggles the shipping address inside form.checkout: here the checkbox does it by itself.
 */
.pa-shop-page .woocommerce form.pa-order-pay:not(:has(#ship-to-different-address-checkbox:checked)) .shipping_address {
	display: none;
}

/* The authorization's number, the first line of the card; the table's 16 below. */
.pa-shop-page .woocommerce .pa-order-pay__number {
	font-size: var(--wp--preset--font-size--sm);
	margin: 0;
}

/*
 * order-pay without the connector (WooCommerce's template): form#order_review on its own, the order
 * table at the container width and the payment methods and the button at the start, up to the
 * measure.
 */
.pa-shop-page .woocommerce > form#order_review:not(.pa-order-pay) #payment {
	max-width: var(--wp--custom--size--measure);
}

.pa-shop-page .woocommerce > form#order_review:not(.pa-order-pay) #payment #place_order {
	float: none;
	margin: 0;
}

/* -------------------------------------------------------------------------------------------------
 * Comanda (spec §7.4): order received, also with a failed payment. WooCommerce prints the notices as
 * paragraphs, not banners: they repeat notice.css's box here. The order details table and the
 * addresses are the same on the account's order view.
 * ---------------------------------------------------------------------------------------------- */

.pa-shop-page .woocommerce :is(.woocommerce-thankyou-order-received, .woocommerce-thankyou-order-failed) {
	align-items: center;
	background-color: var(--wp--preset--color--surface);
	border: var(--wp--custom--border-width--1) solid currentcolor;
	border-radius: var(--wp--custom--radius--8);
	box-sizing: border-box;
	color: var(--wp--preset--color--text-default);
	display: flex;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--regular);
	gap: var(--wp--preset--spacing--12);
	line-height: var(--wp--custom--line-height--relaxed);
	margin-block: 0 var(--wp--preset--spacing--32);
	padding: var(--wp--preset--spacing--16);
}

/* As is-success: the green does not read as text on white, it marks the border only. */
.pa-shop-page .woocommerce .woocommerce-thankyou-order-received {
	border-color: var(--wp--preset--color--state-success);
}

/* As is-error, with the "!" sign of the inline errors (see «Camps»). */
.pa-shop-page .woocommerce .woocommerce-thankyou-order-failed {
	color: var(--wp--preset--color--state-error);
}

.pa-shop-page .woocommerce .woocommerce-thankyou-order-failed::before {
	flex-shrink: 0;
	margin-inline-end: 0;
}

/* «Pay» Primary and «My account» Outline (see «Botons»). */
.pa-shop-page .woocommerce .woocommerce-thankyou-order-failed-actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--16);
	margin: 0;
}

/*
 * «Pay» and «Cancel» in the order details' «Actions:» row, and the account's orders table actions:
 * WooCommerce prints them with no space. The table's also lose woocommerce-blocktheme.css's 1em below.
 */
.pa-shop-page .woocommerce :is(a.order-actions-button, .woocommerce-orders-table__cell-order-actions a.button) {
	margin-block: var(--wp--preset--spacing--4);
	margin-inline: 0 var(--wp--preset--spacing--16);
}

.pa-shop-page .woocommerce :is(a.order-actions-button, .woocommerce-orders-table__cell-order-actions a.button):last-child {
	margin-inline-end: 0;
}

/* Order number, date, email, total and method; the bank details of a transfer take the same card. A long email or IBAN wraps. */
.pa-shop-page .woocommerce ul:is(.woocommerce-order-overview, .wc-bacs-bank-details) {
	display: grid;
	gap: var(--wp--preset--spacing--24);
	grid-template-columns: repeat(auto-fit, minmax(min(var(--wp--custom--size--tile), 100%), 1fr));
	list-style: none;
	margin: 0;
}

.pa-shop-page .woocommerce ul:is(.woocommerce-order-overview, .wc-bacs-bank-details) li {
	border: 0;
	display: block;
	float: none;
	font-size: var(--wp--preset--font-size--sm);
	margin: 0;
	padding: 0;
	text-transform: uppercase;
}

.pa-shop-page .woocommerce ul:is(.woocommerce-order-overview, .wc-bacs-bank-details) li strong {
	display: block;
	font-size: var(--wp--preset--font-size--md);
	font-weight: var(--wp--custom--font-weight--medium);
	margin-block-start: var(--wp--preset--spacing--4);
	overflow-wrap: anywhere;
	text-transform: none;
}

.pa-shop-page .woocommerce :is(.woocommerce-order-details, .woocommerce-customer-details, .woocommerce-bacs-bank-details) {
	margin-block: var(--wp--preset--spacing--48) 0;
}

.pa-shop-page .woocommerce :is(.woocommerce-order-details__title, .wc-bacs-bank-details-heading, .woocommerce-customer-details > .woocommerce-column__title) {
	font-size: var(--wp--preset--font-size--lg-plus);
	font-weight: var(--wp--custom--font-weight--medium);
	line-height: var(--wp--custom--line-height--normal);
	margin-block: 0 var(--wp--preset--spacing--24);
}

/* The account holder above each bank account of a transfer. */
.pa-shop-page .woocommerce .wc-bacs-bank-details-account-name {
	font-size: var(--wp--preset--font-size--md);
	font-weight: var(--wp--custom--font-weight--medium);
	line-height: var(--wp--custom--line-height--normal);
	margin-block: 0 var(--wp--preset--spacing--16);
}

/* Billing and shipping: two cards from 1024, stacked below. */
.pa-shop-page .woocommerce .woocommerce-customer-details .col2-set {
	display: grid;
	gap: var(--wp--preset--spacing--32);
	grid-template-columns: minmax(0, 1fr);
}

/* woocommerce-layout clears the floats with pseudo-elements: in a grid they would be empty cells. */
.pa-shop-page .woocommerce .woocommerce-customer-details .col2-set::before,
.pa-shop-page .woocommerce .woocommerce-customer-details .col2-set::after {
	content: none;
}

.pa-shop-page .woocommerce .woocommerce-customer-details .col2-set > :is(.col-1, .col-2) {
	float: none;
	width: auto;
}

.pa-shop-page .woocommerce .woocommerce-customer-details .col2-set .woocommerce-column__title {
	font-size: var(--wp--preset--font-size--lg);
	font-weight: var(--wp--custom--font-weight--medium);
	line-height: var(--wp--custom--line-height--normal);
	margin-block: 0 var(--wp--preset--spacing--16);
}

/* woocommerce-blocktheme.css boxes it at 70% with a border. A long email wraps. */
.pa-shop-page .woocommerce .woocommerce-customer-details address {
	border: 0;
	font-style: normal;
	line-height: var(--wp--custom--line-height--relaxed);
	margin: 0;
	overflow-wrap: anywhere;
	padding: 0;
	width: auto;
}

.pa-shop-page .woocommerce .woocommerce-customer-details address p {
	margin: var(--wp--preset--spacing--8) 0 0;
}

@media (min-width: 1024px) {

	.pa-shop-page .woocommerce .woocommerce-customer-details .col2-set {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/*
 * Up to 640 (woocommerce-smallscreen): the halves of every form stacked (first and last name in the
 * checkout and the account, the coupon: two surnames do not fit in half a phone, 2026-11-12), every
 * button at the full width, the order summary in one column.
 */
@media (max-width: 640px) { /* = woocommerce_style_smallscreen_breakpoint (inc/woocommerce.php): change both together */

	.pa-shop-page .woocommerce form :is(.form-row-first, .form-row-last) {
		float: none;
		width: auto;
	}

	.pa-shop-page .woocommerce > .checkout_coupon .form-row-first {
		margin-block-end: var(--wp--preset--spacing--16);
	}

	.pa-shop-page .woocommerce > :is(.woocommerce-form-login, .checkout_coupon) .button,
	.pa-shop-page .woocommerce > form#order_review:not(.pa-order-pay) #payment #place_order,
	.pa-shop-page .woocommerce .woocommerce-thankyou-order-failed-actions .button {
		display: flex;
		margin-block-start: 0;
		width: 100%;
	}

	.pa-shop-page .woocommerce ul:is(.woocommerce-order-overview, .wc-bacs-bank-details) {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* -------------------------------------------------------------------------------------------------
 * Compte (spec §7.5). Logged out: #customer_login (login and register cards) or the lost password
 * form. Logged in: the navigation and the content; the navigation is a column from 1440 and a row of
 * chips above the content below (the orders table would not fit beside it). The order view takes the
 * «Comanda» rules; the address cards and the login cards take the «Targeta» rule (.u-columns).
 * ---------------------------------------------------------------------------------------------- */

/* Entrada i registre: two cards of the same height from 1024, stacked below. */
.pa-shop-page .woocommerce #customer_login {
	display: grid;
	gap: var(--wp--preset--spacing--32);
	grid-template-columns: minmax(0, 1fr);
}

/* woocommerce-layout clears the floats with pseudo-elements: in a grid they would be empty cells. */
.pa-shop-page .woocommerce :is(#customer_login, .woocommerce-Addresses)::before,
.pa-shop-page .woocommerce :is(#customer_login, .woocommerce-Addresses)::after {
	content: none;
}

/* woocommerce-layout floats both halves at 48%. */
.pa-shop-page .woocommerce :is(#customer_login, .woocommerce-Addresses) > :is(.col-1, .col-2) {
	float: none;
	width: auto;
}

.pa-shop-page .woocommerce #customer_login h2 {
	font-size: var(--wp--preset--font-size--lg-plus);
	font-weight: var(--wp--custom--font-weight--medium);
	line-height: var(--wp--custom--line-height--normal);
	margin-block: 0 var(--wp--preset--spacing--24);
}

/* «Remember me» shares its paragraph with «Log in»: the button goes on the next line. */
.pa-shop-page .woocommerce .woocommerce-form-login__rememberme {
	margin-block-end: var(--wp--preset--spacing--24);
}

.pa-shop-page .woocommerce #customer_login .lost_password {
	margin-block: var(--wp--preset--spacing--16) 0;
}

.pa-shop-page .woocommerce .woocommerce-form-register > p:not(.form-row),
.pa-shop-page .woocommerce .woocommerce-form-register .woocommerce-privacy-policy-text {
	margin-block: 0 var(--wp--preset--spacing--24);
}

@media (min-width: 1024px) {

	.pa-shop-page .woocommerce #customer_login {
		align-items: stretch;
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Contrasenya perduda (also the new password form of the reset link): at the start, up to the measure. */
.pa-shop-page .woocommerce .woocommerce-ResetPassword {
	max-width: var(--wp--custom--size--measure);
}

.pa-shop-page .woocommerce .woocommerce-ResetPassword > p:first-child {
	margin-block-start: 0;
}

/* woocommerce-layout puts the field at 47% (.woocommerce form .form-row-first). */
.pa-shop-page .woocommerce .woocommerce-ResetPassword :is(.form-row-first, .form-row-last) {
	float: none;
	width: auto;
}

/*
 * Navigation, below 1440: a row of compact chips (chip.css, .pa-chip--compact) that scrolls sideways,
 * 40px high for the hit area. The padding keeps the focus ring (base.css, 4px outside) out of the
 * scroll container's clip; the negative margin keeps the chips aligned with the content.
 */
.pa-shop-page .woocommerce :is(.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content) {
	float: none;
	width: auto;
}

.pa-shop-page .woocommerce .woocommerce-MyAccount-navigation {
	margin-block-end: var(--wp--preset--spacing--32);
}

.pa-shop-page .woocommerce .woocommerce-MyAccount-navigation ul {
	display: flex;
	gap: var(--wp--preset--spacing--16);
	list-style: none;
	margin: 0 calc(-1 * var(--wp--preset--spacing--4));
	overflow-x: auto;
	padding: var(--wp--preset--spacing--4);
	scrollbar-width: none;
}

.pa-shop-page .woocommerce .woocommerce-MyAccount-navigation li {
	flex-shrink: 0;
	padding: 0;
}

.pa-shop-page .woocommerce .woocommerce-MyAccount-navigation li a {
	align-items: center;
	background-color: var(--wp--preset--color--surface-alt);
	border-radius: var(--wp--custom--radius--999);
	box-sizing: border-box;
	color: var(--wp--preset--color--text-default);
	display: inline-flex;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: var(--wp--custom--font-weight--medium);
	line-height: var(--wp--custom--line-height--normal);
	min-height: var(--wp--custom--size--control-small);
	padding-inline: var(--wp--preset--spacing--16);
	text-decoration: none;
	transition: background-color var(--wp--custom--motion--duration--fast) var(--wp--custom--motion--ease--out), color var(--wp--custom--motion--duration--fast) var(--wp--custom--motion--ease--out);
	white-space: nowrap;
}

/* woocommerce-blocktheme.css underlines the hovered and the active link. */
.pa-shop-page .woocommerce .woocommerce-MyAccount-navigation li a:hover {
	background-color: var(--wp--preset--color--interactive-soft);
	text-decoration: none;
}

.pa-shop-page .woocommerce .woocommerce-MyAccount-navigation li.is-active a {
	background-color: var(--wp--preset--color--interactive-selected);
	color: var(--wp--preset--color--text-inverse);
	text-decoration: none;
}

/* From 1440: the navigation in a 376px column on the left, one link per line. */
@media (min-width: 1440px) {

	.pa-shop-page .woocommerce:has(> .woocommerce-MyAccount-navigation) {
		align-items: start;
		display: grid;
		gap: var(--wp--preset--spacing--32);
		grid-template-columns: var(--wp--custom--size--card) minmax(0, 1fr);
	}

	.pa-shop-page .woocommerce .woocommerce-MyAccount-navigation {
		margin-block-end: 0;
	}

	.pa-shop-page .woocommerce .woocommerce-MyAccount-navigation ul {
		display: block;
		margin: 0;
		overflow: visible;
		padding: 0;
	}

	.pa-shop-page .woocommerce .woocommerce-MyAccount-navigation li a {
		background-color: transparent;
		border-block-end: var(--wp--custom--border-width--1) solid var(--wp--preset--color--border-default);
		border-radius: 0;
		display: block;
		font-size: var(--wp--preset--font-size--md);
		min-height: 0;
		padding-block: var(--wp--preset--spacing--16);
		padding-inline: 0;
		white-space: normal;
	}

	.pa-shop-page .woocommerce .woocommerce-MyAccount-navigation li a:hover {
		background-color: transparent;
		color: var(--wp--preset--color--interactive-hover);
	}

	.pa-shop-page .woocommerce .woocommerce-MyAccount-navigation li.is-active a {
		background-color: var(--wp--preset--color--interactive-soft);
		border-radius: var(--wp--custom--radius--8);
		color: var(--wp--preset--color--text-default);
		font-weight: var(--wp--custom--font-weight--semibold);
		padding-inline: var(--wp--preset--spacing--16);
	}
}

/*
 * The content's first block sits on the top of the row, after the notices wrapper (usually empty).
 * woocommerce-blocktheme.css already does it for a first paragraph; wc-blocks.css puts 16 above a banner.
 */
.pa-shop-page .woocommerce .woocommerce-MyAccount-content > .woocommerce-notices-wrapper:empty + *,
.pa-shop-page .woocommerce .woocommerce-MyAccount-content > .woocommerce-notices-wrapper > :first-child {
	margin-block-start: 0;
}

/* Adreces: two cards from 1024, stacked below. */
.pa-shop-page .woocommerce .woocommerce-Addresses {
	display: grid;
	gap: var(--wp--preset--spacing--32);
	grid-template-columns: minmax(0, 1fr);
	margin-block-start: var(--wp--preset--spacing--32);
}

.pa-shop-page .woocommerce .woocommerce-Address-title {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--8) var(--wp--preset--spacing--16);
	justify-content: space-between;
	margin-block-end: var(--wp--preset--spacing--16);
}

.pa-shop-page .woocommerce .woocommerce-Address-title h2 {
	font-size: var(--wp--preset--font-size--lg);
	font-weight: var(--wp--custom--font-weight--medium);
	line-height: var(--wp--custom--line-height--normal);
	margin: 0;
}

/* woocommerce-blocktheme.css makes it a block with a bottom margin (.woocommerce-account .addresses .title .edit). */
.pa-shop-page .woocommerce .woocommerce-Address-title .edit {
	display: inline;
	margin: 0;
}

.pa-shop-page .woocommerce .woocommerce-Address address {
	font-size: var(--wp--preset--font-size--base);
	font-style: normal;
	line-height: var(--wp--custom--line-height--relaxed);
}

@media (min-width: 1024px) {

	.pa-shop-page .woocommerce .woocommerce-Addresses {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Edició d'adreça: the title as the checkout's section titles. */
.pa-shop-page .woocommerce .woocommerce-MyAccount-content form > h2 {
	font-size: var(--wp--preset--font-size--lg-plus);
	font-weight: var(--wp--custom--font-weight--medium);
	line-height: var(--wp--custom--line-height--normal);
	margin-block: 0 var(--wp--preset--spacing--24);
}

/*
 * Dades del compte: «Password change» as a section of the form, 48 below the fields. The 48 goes on
 * the fieldset: a fieldset's legend ignores its top margin.
 */
.pa-shop-page .woocommerce .woocommerce-EditAccountForm fieldset {
	border: 0;
	margin: var(--wp--preset--spacing--48) 0 0;
	min-width: 0;
	padding: 0;
}

.pa-shop-page .woocommerce .woocommerce-EditAccountForm legend {
	font-size: var(--wp--preset--font-size--lg);
	font-weight: var(--wp--custom--font-weight--medium);
	line-height: var(--wp--custom--line-height--normal);
	margin-block-end: var(--wp--preset--spacing--24);
	padding: 0;
}

/* «This will be how your name will be displayed…»: a field hint, upright. */
.pa-shop-page .woocommerce .woocommerce-EditAccountForm #account_display_name_description {
	color: var(--pa-text-secondary);
	display: block;
	font-size: var(--wp--preset--font-size--sm);
	margin-block-start: var(--wp--preset--spacing--8);
}

.pa-shop-page .woocommerce .woocommerce-EditAccountForm #account_display_name_description em {
	font-style: normal;
}

/*
 * Up to 640 (woocommerce-smallscreen): the forms' buttons at the full width. woocommerce-smallscreen
 * hides the row headers (table.shop_table_responsive tbody th), which in the orders table are the order
 * numbers: they come back as the first line of each order, labelled as the cells (see «Taules»).
 */
@media (max-width: 640px) { /* = woocommerce_style_smallscreen_breakpoint (inc/woocommerce.php): change both together */

	.pa-shop-page .woocommerce table.woocommerce-orders-table tbody th {
		display: block;
		text-align: end;
	}

	.pa-shop-page .woocommerce table.woocommerce-orders-table tbody th::before {
		content: attr(data-title) ": ";
		float: inline-start;
	}

	.pa-shop-page .woocommerce :is(.woocommerce-form-login__submit, .woocommerce-form-register__submit, .woocommerce-ResetPassword .woocommerce-Button, .button[name="save_address"], .button[name="save_account_details"]) {
		display: flex;
		width: 100%;
	}
}
