/*
 * Blanco Made — Carrinho, Finalizar compra, Encomenda recebida, Minha conta e Seguir encomenda.
 * Carregado só nessas páginas (functions.php). Tokens em loja.css (:root, var(--bm-*)).
 *
 * Notas de especificidade:
 * - Os CSS dos blocos do WooCommerce (cart.css, checkout.css, packages-style.css) são carregados
 *   DEPOIS deste ficheiro: em empate o WooCommerce ganha, por isso os seletores aqui têm sempre
 *   pelo menos mais um elemento (`body`) ou classe do que o seletor do WooCommerce.
 * - Os blocos usam container queries (largura do bloco, corte em 920px). Usamos o mesmo corte.
 * - Nada animado no carrinho e no checkout (só transições de cor).
 */

/* =========================================================================
 * 0. Moldura das páginas
 * ====================================================================== */

body {
	--bm-texto-corpo: var(--bm-texto-suave, #475569);
	--bm-texto-fraco: #7C7896;
	--bm-raio-grande: 24px;
	--bm-roxo-fundo: #F6F4FC;
	--bm-anel-foco: 0 0 0 3px rgba(77, 62, 152, .22);
	--bm-topo-fixo: 144px; /* cabeçalho fixo de 124 px (medido a 1440 e 1024) + 20 de folga, para os cartões "sticky" */
	--wc-separator-color: var(--bm-borda);
	background-color: var(--bm-creme);
}

body.woocommerce-page .site-main,
body.bm-seguir-encomenda .site-main {
	box-sizing: border-box;
	width: 100%;
	max-width: calc(1216px + 48px);
	margin-inline: auto;
	padding: 40px 24px 88px;
	color: var(--bm-texto-corpo);
}

body.woocommerce-page .page-header,
body.bm-seguir-encomenda .page-header {
	margin: 0 0 28px;
}

body.woocommerce-page .page-header .entry-title,
body.bm-seguir-encomenda .page-header .entry-title {
	max-width: none;
	margin: 0;
	padding-inline: 0; /* o Hello dá 10 px de lado: o título ficava desalinhado do conteúdo */
	font-size: clamp(30px, calc(2.4vw + 18px), 40px);
	font-weight: 700;
	line-height: 1.15;
	color: var(--bm-roxo);
}

body .page-content {
	font-size: 15px;
	line-height: 1.6;
}

body .page-content a {
	color: var(--bm-roxo);
	text-underline-offset: 3px;
}

body .page-content a:hover {
	color: var(--bm-roxo-escuro);
}

@media (max-width: 767px) {
	body.woocommerce-page .site-main,
	body.bm-seguir-encomenda .site-main {
		padding: 24px 16px 64px;
	}

	body.woocommerce-page .page-header,
	body.bm-seguir-encomenda .page-header {
		margin-bottom: 20px;
	}
}

/* =========================================================================
 * 1. Botões
 * ====================================================================== */

/* Botões dos blocos (Aplicar, Finalizar compra, Fazer encomenda…) */
body .wc-block-components-button:not(.is-link) {
	border: 0;
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: none;
}

html body:not(.bm-x) .wc-block-components-button:not(.is-link):focus {
	box-shadow: var(--bm-anel-foco);
	outline: none;
}

/* Botões clássicos (conta, encomenda recebida, seguir encomenda) */
body .woocommerce a.button,
body .woocommerce button.button,
body .woocommerce input.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	border: 0;
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none;
	box-shadow: none;
}

body .woocommerce a.button:focus-visible,
body .woocommerce button.button:focus-visible {
	box-shadow: var(--bm-anel-foco);
	outline: none;
}

/* Secundário: contorno roxo */
body .woocommerce a.button.bm-botao-secundario,
body .woocommerce a.button.view,
body .woocommerce .order-again a.button {
	background-color: #fff;
	color: var(--bm-roxo);
	box-shadow: inset 0 0 0 2px var(--bm-roxo);
}

body .woocommerce a.button.bm-botao-secundario:hover,
body .woocommerce a.button.view:hover,
body .woocommerce .order-again a.button:hover {
	background-color: var(--bm-lilas);
	color: var(--bm-roxo-escuro);
}

/* O reset do tema pinta os <button> de rosa no hover/foco: neutraliza nos blocos */
body .wp-block-woocommerce-cart button:not(.wc-block-components-button):hover,
body .wp-block-woocommerce-cart button:not(.wc-block-components-button):focus,
body .wp-block-woocommerce-checkout button:not(.wc-block-components-button):hover,
body .wp-block-woocommerce-checkout button:not(.wc-block-components-button):focus {
	background-color: transparent;
	color: inherit;
}

/* =========================================================================
 * 2. Campos dos blocos (etiqueta flutuante do WooCommerce, com o visual da marca)
 * ====================================================================== */

body .wc-block-components-text-input input:is([type=text], [type=email], [type=tel], [type=password], [type=number], [type=url], [type=date]),
body .wc-block-components-form .wc-block-components-text-input input:is([type=text], [type=email], [type=tel], [type=password], [type=number], [type=url], [type=date]) {
	height: 50px;
	padding: 16px 16px;
	border: 1px solid var(--bm-borda);
	border-radius: var(--bm-raio-campo);
	background-color: #fff;
	color: var(--bm-titulo);
	font-family: var(--bm-font-texto), system-ui, sans-serif;
	font-size: 16px;
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

body .wc-block-components-text-input.is-active input:is([type=text], [type=email], [type=tel], [type=password], [type=number], [type=url], [type=date]),
body .wc-block-components-form .wc-block-components-text-input.is-active input:is([type=text], [type=email], [type=tel], [type=password], [type=number], [type=url], [type=date]) {
	padding: 24px 16px 8px;
}

body .wc-block-components-text-input input:-webkit-autofill {
	padding: 24px 16px 8px;
}

body .wc-block-components-text-input input:is([type=text], [type=email], [type=tel], [type=password], [type=number], [type=url], [type=date]):focus,
body .wc-block-components-form .wc-block-components-text-input input:is([type=text], [type=email], [type=tel], [type=password], [type=number], [type=url], [type=date]):focus {
	border: 1px solid var(--bm-roxo);
	box-shadow: var(--bm-anel-foco);
	outline: none;
}

body .wc-block-components-text-input.is-active input:is([type=text], [type=email], [type=tel], [type=password], [type=number], [type=url], [type=date]):focus,
body .wc-block-components-form .wc-block-components-text-input.is-active input:is([type=text], [type=email], [type=tel], [type=password], [type=number], [type=url], [type=date]):focus {
	padding: 24px 16px 8px;
}

body .wc-block-components-text-input label,
body .wc-block-components-form .wc-block-components-text-input label {
	left: 17px;
	color: var(--bm-texto-fraco);
	font-size: 15px;
}

body .wc-block-components-text-input.has-error input,
body .wc-block-components-form .wc-block-components-text-input.has-error input:is([type=text], [type=email], [type=tel], [type=password], [type=number], [type=url], [type=date]) {
	border-color: var(--bm-erro);
}

body .wc-block-components-text-input.has-error label,
body .wc-block-components-form .wc-block-components-text-input.has-error label {
	color: var(--bm-erro);
}

body .wc-block-components-validation-error {
	color: var(--bm-erro);
	font-size: 13px;
}

/* País / distrito */
body .wc-blocks-components-select .wc-blocks-components-select__container {
	border-radius: var(--bm-raio-campo);
	background-color: #fff;
}

body .wc-blocks-components-select .wc-blocks-components-select__select {
	height: 50px;
	padding: 18px 40px 0 16px;
	border: 1px solid var(--bm-borda);
	border-radius: var(--bm-raio-campo);
	color: var(--bm-titulo);
	font-family: var(--bm-font-texto), system-ui, sans-serif;
	font-size: 16px;
}

body .wc-blocks-components-select .wc-blocks-components-select__select:focus {
	padding: 18px 40px 0 16px;
	border: 1px solid var(--bm-roxo);
	box-shadow: var(--bm-anel-foco);
	outline: none;
}

body .wc-blocks-components-select .wc-blocks-components-select__label {
	left: 17px;
	color: var(--bm-texto-fraco);
	font-size: 12px;
}

body .wc-blocks-components-select .wc-blocks-components-select__expand {
	right: 14px;
	fill: var(--bm-roxo);
}

/* Área de texto (nota da encomenda) */
body .wc-block-components-textarea {
	min-height: 96px;
	padding: 12px 16px;
	border: 1px solid var(--bm-borda);
	border-radius: var(--bm-raio-campo);
	color: var(--bm-titulo);
	font-size: 16px;
}

body .wc-block-components-textarea:focus {
	border: 1px solid var(--bm-roxo);
	box-shadow: var(--bm-anel-foco);
	outline: none;
}

/* Caixas de seleção */
body .wc-block-components-checkbox label {
	align-items: flex-start;
	padding: 11px 0;
	color: var(--bm-texto-corpo);
	font-size: 14px;
	line-height: 22px;
}

body .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox] {
	width: 22px;
	min-width: 22px;
	height: 22px;
	border: 1.5px solid #C9C3DD;
	border-radius: 7px;
	background-color: #fff;
}

body .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked {
	border-color: var(--bm-roxo);
	background-color: var(--bm-roxo);
}

body .wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:focus {
	outline: 2px solid var(--bm-roxo);
	outline-offset: 2px;
}

body .wc-block-components-checkbox .wc-block-components-checkbox__mark {
	margin-top: 3.5px;
	margin-left: 3.5px;
	fill: #fff;
}

/* Opções de envio e de pagamento: cada opção é um cartão */
body .wc-block-components-radio-control {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

body .wc-block-components-radio-control--highlight-checked::after,
body .wc-block-components-radio-control .wc-block-components-radio-control__option::after,
body .wc-block-components-radio-control div.wc-block-components-radio-control-accordion-option::after {
	display: none;
}

body .wc-block-components-radio-control .wc-block-components-radio-control__option {
	min-height: 56px;
	padding: 16px 16px 16px 52px;
	border: 1px solid var(--bm-borda);
	border-radius: 16px;
	background-color: #fff;
	box-shadow: none;
	box-sizing: border-box;
}

body .wc-block-components-radio-control .wc-block-components-radio-control__option.wc-block-components-radio-control__option--checked-option-highlighted,
body .wc-block-components-radio-control .wc-block-components-radio-control__option.wc-block-components-radio-control__option-checked {
	border-color: var(--bm-roxo);
	background-color: var(--bm-roxo-fundo);
	box-shadow: inset 0 0 0 1px var(--bm-roxo);
}

body .wc-block-components-radio-control .wc-block-components-radio-control__option:has(.wc-block-components-radio-control__input:checked) {
	border-color: var(--bm-roxo);
	background-color: var(--bm-roxo-fundo);
	box-shadow: inset 0 0 0 1px var(--bm-roxo);
}

/* Pagamentos (acordeão): o cartão é o invólucro */
body .wc-block-components-radio-control .wc-block-components-radio-control-accordion-option {
	overflow: hidden;
	border: 1px solid var(--bm-borda);
	border-radius: 16px;
	background-color: #fff;
}

body .wc-block-components-radio-control .wc-block-components-radio-control-accordion-option.wc-block-components-radio-control-accordion-option--checked-option-highlighted {
	border-color: var(--bm-roxo);
	box-shadow: inset 0 0 0 1px var(--bm-roxo);
}

body .wc-block-components-radio-control .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option {
	border: 0;
	border-radius: 0;
	background-color: transparent;
	box-shadow: none;
}

/* regra à parte: um seletor :has() não suportado não deve anular a regra de cima */
body .wc-block-components-radio-control .wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option:has(.wc-block-components-radio-control__input:checked) {
	border: 0;
	background-color: transparent;
	box-shadow: none;
}

body .wc-block-components-radio-control .wc-block-components-radio-control-accordion-content {
	padding: 0 16px 16px 52px;
}

body .wc-block-components-radio-control .wc-block-components-radio-control__input {
	left: 16px;
	width: 22px;
	height: 22px;
	border: 1.5px solid #C9C3DD;
}

body .wc-block-components-radio-control .wc-block-components-radio-control__input:checked {
	border: 1.5px solid var(--bm-roxo);
}

body .wc-block-components-radio-control .wc-block-components-radio-control__input:checked::before {
	width: 10px;
	height: 10px;
	background-color: var(--bm-roxo);
}

body .wc-block-components-radio-control .wc-block-components-radio-control__input:focus {
	outline: 2px solid var(--bm-roxo);
	outline-offset: 2px;
}

body .wc-block-components-radio-control .wc-block-components-radio-control__label {
	color: var(--bm-titulo);
	font-weight: 600;
}

body .wc-block-components-radio-control .wc-block-components-radio-control__secondary-label {
	color: var(--bm-roxo);
	font-weight: 700;
}

body .wc-block-components-radio-control .wc-block-components-radio-control__description,
body .wc-block-components-radio-control .wc-block-components-radio-control__secondary-description {
	color: var(--bm-texto-fraco);
	font-size: 13px;
}

/* =========================================================================
 * 3. Base dos blocos de carrinho e checkout
 * ====================================================================== */

/* O tema pai dá margem negativa de 80px ao .alignwide (cortava o bloco no telemóvel) */
body .wp-block-woocommerce-cart.alignwide,
body .wp-block-woocommerce-checkout.alignwide {
	max-width: none;
	margin-inline: 0;
}

body .wp-block-woocommerce-cart,
body .wp-block-woocommerce-checkout {
	color: var(--bm-texto-corpo);
	font-size: 15px;
}

body .wp-block-woocommerce-checkout.wc-block-checkout {
	padding-top: 0;
}

body .wc-block-components-sidebar-layout.wc-block-cart,
body .wc-block-components-sidebar-layout.wc-block-checkout {
	column-gap: 32px;
	margin-bottom: 0;
}

/* Avisos dos blocos */
body .wc-block-components-notice-banner {
	gap: 12px;
	padding: 14px 16px !important;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.5;
}

body .wc-block-components-notice-banner > svg {
	width: 24px;
	height: 24px;
}

/* Totais (carrinho e resumo do checkout) */
body .wc-block-components-totals-wrapper {
	padding: 14px 0;
}

body .wc-block-components-totals-item {
	color: var(--bm-texto-corpo);
	font-size: 15px;
	line-height: 1.4;
}

body .wc-block-components-totals-item .wc-block-components-totals-item__value {
	color: var(--bm-titulo);
	font-weight: 600;
}

body .wc-block-components-totals-item .wc-block-components-totals-item__description {
	color: var(--bm-texto-fraco);
	font-size: 13px;
}

body .wc-block-components-totals-footer-item .wc-block-components-totals-item__label {
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 18px;
	font-weight: 600;
}

body .wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	color: var(--bm-roxo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 22px;
	font-weight: 700;
}

body .wc-block-components-totals-discount .wc-block-components-totals-item__value {
	color: var(--bm-sucesso);
}

body .wc-block-components-totals-shipping a,
body .wc-block-components-totals-shipping .wc-block-components-totals-shipping__change-address__link {
	color: var(--bm-roxo);
	font-weight: 600;
}

/* Linha "IVA (isento, art. 53.º do CIVA) 0,00 €" (script em inc/carrinho.php), logo abaixo do Total */
body .wc-block-components-totals-wrapper.slot-wrapper:has(.bm-iva) {
	border-top: 0;
}

body .wc-block-components-totals-wrapper.slot-wrapper .wc-block-components-order-meta > .bm-iva {
	padding: 0 0 14px;
}

body .bm-iva .wc-block-components-totals-item__label,
body .bm-iva .wc-block-components-totals-item__value {
	color: var(--bm-texto-corpo);
	font-size: 14px;
	font-weight: 500;
}

/* Cupão: painel "Adicionar cupões" */
body .wc-block-components-totals-coupon .wc-block-components-panel__button {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin: 0;
	padding-top: 6px;
	padding-bottom: 6px;
	color: var(--bm-roxo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 15px;
	font-weight: 600;
}

body .wc-block-components-totals-coupon .wc-block-components-panel__button::before {
	content: "%";
	display: inline-flex;
	flex: 0 0 30px;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background-color: var(--bm-azul-claro);
	color: var(--bm-roxo);
	font-size: 14px;
	font-weight: 700;
}

body .wc-block-components-totals-coupon .wc-block-components-panel__button[aria-expanded=true] {
	margin-bottom: 12px;
}

body .wc-block-components-totals-coupon .wc-block-components-panel__button > .wc-block-components-panel__button-icon {
	fill: var(--bm-roxo);
}

body .wc-block-components-totals-coupon__form {
	flex-wrap: nowrap;
	gap: 8px;
}

html body .wc-block-components-totals-coupon__form .wc-block-components-totals-coupon__button.wc-block-components-button {
	flex: 0 0 auto;
	min-height: 50px;
	padding: 0 22px;
}

/* Cupões aplicados */
body .wc-block-components-totals-discount__coupon-list .wc-block-components-chip {
	gap: 6px;
	padding: 4px 4px 4px 12px;
	border: 0;
	border-radius: var(--bm-raio-pilula);
	background-color: var(--bm-lilas);
	color: var(--bm-roxo);
	font-size: 13px;
	font-weight: 600;
}

body .wc-block-components-totals-discount__coupon-list .wc-block-components-chip .wc-block-components-chip__text {
	font-size: 14px;
	line-height: 1.2;
}

body .wc-block-components-totals-discount__coupon-list .wc-block-components-chip .wc-block-components-chip__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-color: #fff;
}

body .wc-block-components-totals-discount__coupon-list .wc-block-components-chip .wc-block-components-chip__remove-icon {
	fill: var(--bm-roxo);
}

/* Preços e etiquetas de produto dentro dos blocos */
body .wp-block-woocommerce-cart del,
body .wp-block-woocommerce-checkout del {
	color: var(--bm-texto-fraco);
	opacity: .8;
}

body .wp-block-woocommerce-cart ins,
body .wp-block-woocommerce-checkout ins {
	color: var(--bm-roxo);
	text-decoration: none;
}

body .wp-block-woocommerce-cart .wc-block-components-product-badge,
body .wp-block-woocommerce-checkout .wc-block-components-product-badge,
body .wp-block-woocommerce-cart .wc-block-components-sale-badge {
	display: inline-block;
	padding: 3px 10px;
	border: 0;
	border-radius: var(--bm-raio-pilula);
	background-color: #FFF3D1;
	color: #7A5300;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.4;
	text-transform: none;
}

body .wp-block-woocommerce-cart .wc-block-components-sale-badge {
	background-color: var(--bm-rosa);
	color: var(--bm-titulo);
}

/* =========================================================================
 * 4. Carrinho (bloco)
 * ====================================================================== */

/* Cartão dos artigos: a tabela vira uma lista de linhas em grelha (desktop e telemóvel) */
body .wc-block-cart table.wc-block-cart-items {
	display: block;
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 4px 24px;
	border: 0;
	border-radius: var(--bm-raio-grande);
	/* o WooCommerce força "background: none !important" na tabela */
	background: #fff !important;
	box-shadow: var(--bm-sombra-card);
}

body .wc-block-cart table.wc-block-cart-items thead {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

body .wc-block-cart table.wc-block-cart-items tbody {
	display: block;
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr) auto;
	grid-template-areas: "foto info total";
	column-gap: 20px;
	align-items: start;
	padding: 20px 0;
	border: 0;
	border-bottom: 1px solid var(--bm-borda);
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row:last-child,
body .wc-block-cart table.wc-block-cart-items:not(.wc-block-mini-cart-items):not(:last-child) .wc-block-cart-items__row:last-child {
	border-bottom: 0;
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row.is-disabled {
	opacity: .6;
}

body .wc-block-cart table.wc-block-cart-items td {
	display: block;
	padding: 0;
	border: 0;
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
	grid-area: foto;
	padding: 0;
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product {
	grid-area: info;
	justify-self: stretch;
	min-width: 0;
	padding: 0;
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
	grid-area: total;
	display: flex;
	justify-content: flex-end;
	padding: 0;
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 17px;
	font-weight: 600;
	white-space: nowrap;
}

/* Foto: cantos de 16px sobre fundo azul-claro */
body .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image a {
	display: block;
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 16px;
	background-color: var(--bm-azul-claro);
}

/* Nome, preço, variação */
body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
	display: inline-block;
	margin: 0 0 4px;
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row a.wc-block-components-product-name:hover {
	color: var(--bm-roxo);
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices {
	margin: 0 0 4px;
	color: var(--bm-texto-corpo);
	font-size: 14px;
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata {
	gap: 2px;
	margin: 0;
	color: var(--bm-texto-fraco);
	font-size: 13px;
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-details__name {
	color: var(--bm-texto-corpo);
	font-weight: 600;
}

/* Quantidade (pílula) + remover (discreto) */
body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 12px;
	padding: 0;
}

body .wc-block-cart .wc-block-components-quantity-selector {
	display: inline-flex;
	align-items: stretch;
	box-sizing: border-box;
	width: 132px;
	min-width: 0;
	height: 44px;
	overflow: hidden;
	border: 1px solid var(--bm-borda);
	border-radius: var(--bm-raio-pilula);
	background-color: #fff;
}

body .wc-block-cart .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	flex: 1 1 auto;
	width: 40px;
	min-width: 0;
	height: 100%;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--bm-titulo);
	font-family: var(--bm-font-texto), system-ui, sans-serif;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	box-shadow: none;
}

body .wc-block-cart .wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input:focus {
	background-color: var(--bm-roxo-fundo);
	box-shadow: none;
	outline: none;
}

body .wc-block-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
	display: inline-flex;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	width: 44px;
	min-width: 44px;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--bm-roxo);
	font-size: 20px;
	font-weight: 500;
	line-height: 1;
	opacity: 1;
	transition: background-color .15s ease;
}

body .wc-block-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover:not(:disabled) {
	background-color: var(--bm-lilas);
	color: var(--bm-roxo-escuro);
}

body .wc-block-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus {
	background-color: transparent;
	color: var(--bm-roxo);
	box-shadow: none;
	outline: none;
}

body .wc-block-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:focus-visible {
	box-shadow: inset 0 0 0 2px var(--bm-roxo);
}

body .wc-block-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:disabled {
	color: #C9C3DD;
	opacity: 1;
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border-radius: 50%;
	background: transparent;
	color: #A7A3BC;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:hover,
body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link:focus-visible {
	background-color: #FBECEA;
	color: var(--bm-erro);
}

body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity .wc-block-cart-item__remove-link svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
}

/* Cartão dos totais */
body .wc-block-cart .wc-block-cart__sidebar {
	box-sizing: border-box;
	padding: 24px;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
}

body .wc-block-cart .wc-block-cart__sidebar .wc-block-cart__totals-title {
	display: block;
	margin: 0;
	padding: 0 0 14px; /* afasta o título da linha do cupão */
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

body .wc-block-cart .wc-block-cart__submit {
	margin: 16px 0 0;
}

html body .wc-block-cart a.wc-block-cart__submit-button.wc-block-components-button {
	width: 100%;
	min-height: 56px;
	padding: 16px 24px;
	font-size: 16px;
}

body .wc-block-cart .wc-block-cart__payment-options {
	padding-top: 16px;
	text-align: center;
}

body .wc-block-cart .wc-block-cart__payment-options:empty {
	padding: 0;
}

/* Barra fixa do botão no telemóvel (o fundo vem do body = creme) */
body .wc-block-cart .wc-block-cart__submit-container--sticky {
	padding: 12px 16px;
}

/* Desktop: duas colunas, totais fixos ao deslizar */
@container (min-width: 920px) {
	body .wc-block-cart .wc-block-components-sidebar {
		flex: 0 0 380px;
		width: 380px;
	}

	body .wc-block-cart .wc-block-cart__sidebar {
		position: sticky;
		top: var(--bm-topo-fixo);
		align-self: flex-start;
	}
}

/* Telemóvel/tablet: foto à esquerda, total por baixo à direita */
@container (max-width: 919px) {
	body .wc-block-cart table.wc-block-cart-items {
		padding: 4px 16px;
	}

	body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
		grid-template-columns: 80px minmax(0, 1fr);
		grid-template-areas:
			"foto info"
			"foto total";
		column-gap: 14px;
		padding: 16px 0;
	}

	body .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
		margin-top: 8px;
	}

	body .wc-block-cart .wc-block-cart__sidebar {
		margin: 16px 0 0;
		padding: 20px 16px;
	}
}

/* Produtos sugeridos (cross-sells), se o bloco for acrescentado */
body .wp-block-woocommerce-cart .wp-block-woocommerce-cart-cross-sells-block {
	margin-top: 32px;
}

body .wp-block-woocommerce-cart .wp-block-woocommerce-cart-cross-sells-block .wp-block-heading {
	margin: 0 0 16px;
	color: var(--bm-roxo);
	font-size: 24px;
	font-weight: 700;
}

body .wp-block-woocommerce-cart .wp-block-woocommerce-cart-cross-sells-products-block {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}

body .wp-block-woocommerce-cart .wp-block-woocommerce-cart-cross-sells-block .cross-sells-product:nth-child(n) {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: auto;
	margin: 0;
	padding: 12px 12px 16px;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
	text-align: left;
}

body .wp-block-woocommerce-cart .wp-block-woocommerce-cart-cross-sells-block .cross-sells-product > div {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

body .wp-block-woocommerce-cart .wp-block-woocommerce-cart-cross-sells-block .cross-sells-product img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 16px;
	background-color: var(--bm-azul-claro);
}

body .wp-block-woocommerce-cart .wp-block-woocommerce-cart-cross-sells-block .cross-sells-product .wc-block-components-product-name {
	color: var(--bm-roxo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

body .wp-block-woocommerce-cart .wp-block-woocommerce-cart-cross-sells-block .cross-sells-product .wc-block-components-product-price {
	color: var(--bm-titulo);
	font-weight: 700;
}

body .wp-block-woocommerce-cart .wp-block-woocommerce-cart-cross-sells-block .cross-sells-product .wc-block-components-product-button {
	margin-top: auto;
}

html body .wp-block-woocommerce-cart .cross-sells-product .wc-block-components-product-button__button.wc-block-components-button {
	width: 100%;
	min-height: 44px;
	margin-top: 12px;
	padding: 10px 16px;
	font-size: 14px;
}

@container (max-width: 599px) {
	body .wp-block-woocommerce-cart .wp-block-woocommerce-cart-cross-sells-products-block {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
}

/* =========================================================================
 * 5. Carrinho vazio (texto e botão em inc/carrinho.php)
 * ====================================================================== */

body .wp-block-woocommerce-empty-cart-block {
	padding-top: 8px;
	text-align: center;
}

body .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title {
	margin: 0 0 8px;
	padding: 24px 0 0; /* espaço do ícone dentro do título (margem no ::before colapsava e descentrava o ícone) */
	/* círculo branco por trás do ícone do carrinho */
	background: radial-gradient(circle 54px at 50% 54px, #fff 97%, transparent 100%) no-repeat;
	color: var(--bm-roxo);
	font-size: clamp(24px, calc(1.6vw + 16px), 30px);
	font-weight: 700;
	line-height: 1.2;
}

body .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
	width: 60px;
	height: 60px;
	margin: 0 auto 40px;
	background-color: var(--bm-roxo);
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
}

body .wp-block-woocommerce-empty-cart-block .bm-carrinho-vazio__texto {
	max-width: 460px;
	margin: 0 auto 24px;
	color: var(--bm-texto-corpo);
	font-size: 16px;
}

body .wp-block-woocommerce-empty-cart-block .bm-carrinho-vazio__acao {
	margin: 0 0 8px;
}

body .wp-block-woocommerce-empty-cart-block a.bm-carrinho-vazio__botao {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	padding: 14px 36px;
	border: 0;
	border-radius: var(--bm-raio-pilula);
	background-color: var(--bm-roxo);
	color: #fff;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .2s ease;
}

body .wp-block-woocommerce-empty-cart-block a.bm-carrinho-vazio__botao:hover {
	background-color: var(--bm-roxo-escuro);
	color: #fff;
}

body .wp-block-woocommerce-empty-cart-block a.bm-carrinho-vazio__botao:focus-visible {
	box-shadow: var(--bm-anel-foco);
	outline: none;
}

body .wp-block-woocommerce-empty-cart-block hr.wp-block-separator {
	margin: 40px auto 24px;
	border: 0;
	background: none;
	color: var(--bm-roxo);
}

/* "Novo na loja": o separador "· · ·" sai (inc/carrinho.php), por isso o espaço passa para o título */
body .wp-block-woocommerce-empty-cart-block > h2:not(.wc-block-cart__empty-cart__title) {
	margin: 56px 0 24px;
	color: var(--bm-roxo);
	font-size: 24px;
	font-weight: 700;
}

/* "Novo na loja" com o card da loja (inc/carrinho.php troca o bloco "Novos produtos" pelo
 * shortcode [products]; o card e a grelha vêm do arquivo.css, carregado também no carrinho).
 * Como na 404: 4 numa linha até 900 px e 2 × 2 entre 768 e 899 (o arquivo.css passa a 3 colunas
 * a ≤ 1024 e deixaria um card sozinho). */
body .wp-block-woocommerce-empty-cart-block .bm-carrinho-vazio__produtos {
	text-align: left;
}
body .wp-block-woocommerce-empty-cart-block .bm-carrinho-vazio__produtos ul.products[class] {
	margin: 0;
}
@media (min-width: 900px) and (max-width: 1024px) {
	body .wp-block-woocommerce-empty-cart-block .bm-carrinho-vazio__produtos ul.products[class] {
		--bm-colunas: 4;
	}
}
@media (min-width: 768px) and (max-width: 899px) {
	body .wp-block-woocommerce-empty-cart-block .bm-carrinho-vazio__produtos ul.products[class] {
		--bm-colunas: 2;
	}
}
@media (max-width: 767px) {
	body .wp-block-woocommerce-empty-cart-block > h2:not(.wc-block-cart__empty-cart__title) {
		margin: 40px 0 16px;
	}
}

/* Reserva: grelha do bloco "Novos produtos", se o PHP acima não a trocar.
 * Cartões brancos sobre o creme, como na Home
 * (o WooCommerce passa a grelha a "display:block" até 480px com .wc-block-grid.has-4-columns) */
body .wp-block-woocommerce-empty-cart-block .wc-block-grid .wc-block-grid__products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body .wp-block-woocommerce-empty-cart-block .wc-block-grid .wc-block-grid__product {
	display: flex;
	flex: none;
	flex-direction: column;
	box-sizing: border-box;
	max-width: none;
	margin: 0;
	padding: 10px 10px 14px;
	border: 0;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
	text-align: left;
}

body .wp-block-woocommerce-empty-cart-block .wc-block-grid__product .wc-block-grid__product-link {
	display: flex;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}

body .wp-block-woocommerce-empty-cart-block .wc-block-grid__product .wc-block-grid__product-image {
	display: block;
	margin: 0 0 12px;
	overflow: hidden;
	border-radius: 16px;
	background-color: var(--bm-azul-claro);
	aspect-ratio: 1 / 1;
}

body .wp-block-woocommerce-empty-cart-block .wc-block-grid__product .wc-block-grid__product-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
}

body .wp-block-woocommerce-empty-cart-block .wc-block-grid__product .wc-block-grid__product-title {
	margin: 0 0 6px;
	color: var(--bm-roxo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
}

body .wp-block-woocommerce-empty-cart-block .wc-block-grid__product .wc-block-grid__product-price {
	margin: 0 0 12px;
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 16px;
	font-weight: 700;
}

body .wp-block-woocommerce-empty-cart-block .wc-block-grid__product .wc-block-grid__product-add-to-cart {
	margin: auto 0 0;
}

body .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	box-sizing: border-box;
	padding: 10px 16px;
	border: 0;
	border-radius: var(--bm-raio-pilula);
	background-color: var(--bm-roxo);
	color: #fff;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

body .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link:hover {
	background-color: var(--bm-roxo-escuro);
	color: #fff;
}

body .wp-block-woocommerce-empty-cart-block .wc-block-grid__product .added_to_cart {
	display: block;
	margin-top: 8px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
}

@media (min-width: 768px) {
	body .wp-block-woocommerce-empty-cart-block .wc-block-grid .wc-block-grid__products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 20px;
	}

	body .wp-block-woocommerce-empty-cart-block .wc-block-grid .wc-block-grid__product {
		padding: 12px 12px 16px;
	}
}

/* =========================================================================
 * 6. Finalizar compra (bloco): secções numeradas em cartões
 * ====================================================================== */

body .wc-block-checkout__form {
	counter-reset: bm-passo;
}

body .wc-block-components-form .wc-block-components-checkout-step {
	margin: 0 0 16px;
	padding: 28px 32px 32px;
	border: 0;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
}

body .wc-block-components-checkout-step .wc-block-components-checkout-step__heading-container {
	gap: 6px;
	margin-bottom: 20px;
}

body .wc-block-components-checkout-step .wc-block-components-checkout-step__heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0;
}

/* Só as secções com título contam para o número (a nota da encomenda não tem título) */
body .wc-block-components-checkout-step__title.wc-block-components-title {
	counter-increment: bm-passo;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

/* Número da secção (1 Contacto, 2 Entrega, …, Pagamento) */
body .wc-block-components-checkout-step .wc-block-components-checkout-step__title.wc-block-components-title::before {
	content: counter(bm-passo);
	position: static;
	display: inline-flex;
	flex: 0 0 32px;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--bm-roxo);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	transform: none;
	counter-increment: none;
}

/* Linhas verticais das etapas numeradas do WooCommerce (não usadas aqui) */
body .wc-block-components-checkout-step .wc-block-components-checkout-step__content::before,
body .wc-block-components-checkout-step .wc-block-components-checkout-step__description::before {
	display: none;
}

body .wc-block-components-checkout-step .wc-block-components-checkout-step__description {
	margin: 0 0 0 44px;
	color: var(--bm-texto-fraco);
	font-size: 14px;
}

body .wc-block-components-checkout-step .wc-block-components-checkout-step__heading-content {
	margin-left: auto;
	font-size: 14px;
}

body .wp-block-woocommerce-checkout .wc-block-checkout__login-prompt {
	float: none;
	margin: 0;
	color: var(--bm-roxo);
	font-weight: 600;
}

/* Morada: "+ Adicionar apartamento…", cartão de morada guardada, mesma morada para faturação */
body .wc-block-components-address-form__address_2-toggle,
body .wc-block-components-address-form__address_2-toggle:hover,
body .wc-block-components-address-form__address_2-toggle:focus {
	min-height: 44px;
	padding: 10px 0;
	border: 0;
	background: transparent;
	color: var(--bm-roxo);
	font-size: 14px;
	font-weight: 600;
}

body .wc-block-components-address-card {
	padding: 16px 20px;
	border: 1px solid var(--bm-borda);
	border-radius: 16px;
	background-color: var(--bm-roxo-fundo);
	color: var(--bm-texto-corpo);
}

body .wc-block-components-address-card .wc-block-components-address-card__edit,
body .wc-block-components-address-card .wc-block-components-address-card__edit:hover,
body .wc-block-components-address-card .wc-block-components-address-card__edit:focus {
	min-height: 44px;
	padding: 0 4px;
	background: transparent;
	color: var(--bm-roxo);
	font-weight: 600;
}

body .wc-block-checkout__use-address-for-billing {
	margin-top: 8px;
}

/* NIF (plugin "NIF Português"): mesma largura e altura dos outros campos */
body .wp-block-woocommerce-ptwoo-nif .wc-block-components-text-input {
	width: 100%;
	margin-top: 0;
}

/* Ainda sem morada: caixa lilás clara em vez do cinzento do WooCommerce */
body .wc-block-checkout__shipping-option .wc-block-components-shipping-rates-control__no-shipping-address-message {
	padding: 18px 20px;
	border-radius: 16px;
	background-color: var(--bm-roxo-fundo);
	color: var(--bm-texto-corpo);
}

/* Sem opções de envio / sem métodos de pagamento: aviso simpático em vez de vermelho */
body .wc-block-components-shipping-rates-control__no-results-notice.wc-block-components-notice-banner,
body .wc-block-checkout__no-payment-methods-notice.wc-block-components-notice-banner {
	margin: 0;
	border: 1px solid var(--bm-lilas);
	border-left: 4px solid var(--bm-roxo);
	background-color: var(--bm-roxo-fundo);
	color: var(--bm-titulo);
	box-shadow: none;
}

body .wc-block-components-shipping-rates-control__no-results-notice.wc-block-components-notice-banner > svg,
body .wc-block-checkout__no-payment-methods-notice.wc-block-components-notice-banner > svg {
	background-color: var(--bm-roxo);
	fill: #fff;
	transform: none;
}

/* Nota da encomenda: o passo (sem título) é o cartão; a caixa de dentro fica lisa */
body .wc-block-components-form .wc-block-checkout__order-notes.wc-block-components-checkout-step {
	padding: 10px 32px;
}

body .wc-block-checkout__order-notes .wc-block-checkout__add-note {
	margin: 0;
	padding: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

body .wc-block-checkout__add-note .wc-block-components-textarea {
	margin-bottom: 12px;
}

/* Termos */
body .wc-block-checkout__terms,
body .wc-block-checkout__terms.wc-block-checkout__terms--with-separator {
	margin: 8px 4px 20px;
	padding-top: 0;
	border-top: 0;
	color: var(--bm-texto-corpo);
	font-size: 13px;
	line-height: 1.6;
}

body .wc-block-checkout__terms a {
	color: var(--bm-roxo);
	font-weight: 600;
}

/* Botão final: pílula roxa a toda a largura */
body .wc-block-checkout__actions {
	margin: 0 0 24px;
}

body .wc-block-checkout__actions .wc-block-checkout__actions_row {
	flex-direction: column-reverse;
	align-items: stretch;
	gap: 12px;
}

html body .wc-block-checkout__actions button.wc-block-components-checkout-place-order-button.wc-block-components-button {
	width: 100%;
	min-height: 56px;
	padding: 14px 24px;
	font-size: 17px;
}

body .wc-block-checkout__actions .wc-block-components-checkout-return-to-cart-button {
	display: inline-flex;
	align-items: center;
	align-self: center;
	min-height: 44px;
	color: var(--bm-roxo);
	font-weight: 600;
}

/* Pagamento expresso (Apple/Google Pay, quando houver) */
body .wc-block-components-express-payment.wc-block-components-express-payment--checkout {
	margin-bottom: 4px;
	padding: 20px 24px 24px;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
}

body .wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container {
	position: static;
	display: block;
	margin: 0 0 14px;
	text-align: center;
}

body .wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container::before,
body .wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container::after {
	display: none;
}

body .wc-block-components-express-payment--checkout .wc-block-components-express-payment__title {
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 16px;
	font-weight: 600;
	transform: none;
}

body .wc-block-components-express-payment--checkout .wc-block-components-express-payment__content {
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

body .wc-block-components-express-payment .wc-block-components-express-payment__event-buttons > li,
body .wc-block-components-express-payment .wc-block-components-express-payment__event-buttons > div {
	border-radius: 12px;
}

body .wc-block-components-express-payment-continue-rule {
	margin: 16px 0 20px;
	color: var(--bm-texto-fraco);
}

/* Contacto: criar conta, aviso de compra sem conta */
body .wp-block-woocommerce-checkout .wc-block-checkout__guest-checkout-notice {
	color: var(--bm-texto-fraco);
}

/* Layout do checkout */
@container (min-width: 920px) {
	body .wc-block-checkout .wc-block-components-sidebar {
		flex: 0 0 400px;
		width: 400px;
	}

	body .wc-block-checkout .wc-block-checkout__sidebar {
		top: var(--bm-topo-fixo);
	}
}

@container (max-width: 599px) {
	body .wc-block-components-form .wc-block-components-checkout-step {
		padding: 20px 16px 24px;
	}

	body .wc-block-components-checkout-step__title.wc-block-components-title {
		font-size: 18px;
	}

	body .wc-block-components-checkout-step .wc-block-components-checkout-step__description {
		margin-left: 0;
	}

	body .wc-block-components-form .wc-block-checkout__order-notes.wc-block-components-checkout-step {
		padding: 8px 16px;
	}

	body .wc-block-components-express-payment.wc-block-components-express-payment--checkout {
		padding: 16px;
	}
}

/* =========================================================================
 * 7. Resumo da encomenda (checkout): cartão à direita, recolhível no telemóvel
 * ====================================================================== */

body .wp-block-woocommerce-checkout-order-summary-block {
	padding: 8px 24px 12px;
	border: 0;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
	font-size: 14px;
}

body .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title {
	gap: 12px;
	margin: 12px 0 4px;
	padding: 0;
	border: 0;
}

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;
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

body .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title .wc-block-components-checkout-order-summary__title-price {
	color: var(--bm-roxo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 18px;
	font-weight: 700;
}

/* a seta só aparece no telemóvel/tablet (onde o resumo abre e fecha): ver @container mais abaixo */
body .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title .wc-block-components-checkout-order-summary__title-icon {
	fill: var(--bm-roxo);
}

body .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__content.is-open {
	border-bottom: 0;
}

/* Cópia do resumo que o WooCommerce mostra antes do botão final no telemóvel */
body .wp-block-woocommerce-checkout-order-summary-block.checkout-order-summary-block-fill-wrapper {
	margin: 0 0 16px;
	padding-bottom: 12px;
}

body .wp-block-woocommerce-checkout-order-summary-block .checkout-order-summary-block-fill {
	border: 0;
	border-radius: 0;
}

/* Totais dentro dos cartões: sem recuos laterais (o cartão já tem margem interior) */
body .wc-block-components-sidebar .wc-block-components-totals-item,
body .wc-block-components-sidebar .wc-block-components-totals-coupon,
body .wc-block-components-sidebar .wc-block-components-panel,
body .wc-block-components-sidebar .slot-wrapper .wc-block-components-panel,
body .wp-block-woocommerce-checkout-order-summary-block .checkout-order-summary-block-fill .wc-block-components-totals-item,
body .wp-block-woocommerce-checkout-order-summary-block .checkout-order-summary-block-fill .wc-block-components-totals-coupon {
	padding-right: 0;
	padding-left: 0;
}

/* Artigos do resumo: foto 64px arredondada, quantidade em bolinha roxa */
body .wc-block-components-order-summary .wc-block-components-order-summary-item {
	align-items: flex-start;
}

body .wc-block-components-order-summary .wc-block-components-order-summary-item__image {
	flex: 0 0 64px;
	width: 64px;
	margin-top: 8px;
	padding-bottom: 12px;
}

body .wc-block-components-order-summary .wc-block-components-order-summary-item__image > img {
	width: 64px;
	max-width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 14px;
	background-color: var(--bm-azul-claro);
}

body .wc-block-components-order-summary .wc-block-components-order-summary-item__quantity {
	min-width: 24px;
	min-height: 24px;
	box-sizing: border-box;
	border: 2px solid #fff;
	background-color: var(--bm-roxo);
	font-weight: 700;
}

body .wc-block-components-order-summary .wc-block-components-order-summary-item__quantity span {
	color: #fff;
}

body .wc-block-components-order-summary .wc-block-components-order-summary-item__description {
	padding: 8px 8px 12px 16px;
}

body .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-product-name {
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 15px;
	font-weight: 600;
}

body .wc-block-components-order-summary .wc-block-components-order-summary-item__individual-prices,
body .wc-block-components-order-summary .wc-block-components-order-summary-item .wc-block-components-product-metadata {
	color: var(--bm-texto-fraco);
	font-size: 13px;
}

body .wc-block-components-order-summary .wc-block-components-order-summary-item__total-price {
	padding-top: 8px;
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 15px;
	font-weight: 600;
}

/* Telemóvel: o título é o botão que abre/fecha o resumo */
@container (max-width: 919px) {
	body .wp-block-woocommerce-checkout-order-summary-block {
		padding: 4px 20px;
	}

	body .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title {
		min-height: 52px;
		margin: 0;
		padding: 8px 0;
		border: 0;
	}

	body .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title .wc-block-components-checkout-order-summary__title-text {
		font-size: 18px;
	}

	body .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__title .wc-block-components-checkout-order-summary__title-icon {
		display: inline-flex;
	}

	body .wp-block-woocommerce-checkout-order-summary-block .wc-block-components-checkout-order-summary__content.is-open {
		padding-bottom: 8px;
	}
}

/* =========================================================================
 * 8. Encomenda recebida (agradecimento)
 * ====================================================================== */

body.woocommerce-order-received .page-header {
	max-width: 880px;
	margin-inline: auto;
}

body .woocommerce .woocommerce-order {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: 880px;
	margin: 0 auto;
}

body .woocommerce .woocommerce-order > * {
	margin-top: 0;
	margin-bottom: 0;
}

body .woocommerce .woocommerce-order .woocommerce-thankyou-order-received {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 28px 32px 28px 108px;
	border: 0;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
	color: var(--bm-texto-corpo);
	font-size: 16px;
}

body .woocommerce .woocommerce-order .woocommerce-thankyou-order-received::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 32px;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--bm-verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E8B57' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 28px no-repeat;
	transform: translateY(-50%);
}

body .woocommerce-thankyou-order-received .bm-obrigado__titulo {
	color: var(--bm-roxo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
}

/* Resumo: n.º, data, e-mail, total, pagamento */
body .woocommerce ul.woocommerce-order-overview {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	margin: 0;
	padding: 8px;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
	list-style: none;
}

body .woocommerce ul.woocommerce-order-overview::before,
body .woocommerce ul.woocommerce-order-overview::after {
	content: none;
	display: none;
}

body .woocommerce ul.woocommerce-order-overview li {
	float: none;
	margin: 0;
	padding: 14px 18px;
	border: 0;
	color: var(--bm-texto-fraco);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .06em;
	text-transform: uppercase;
}

body .woocommerce ul.woocommerce-order-overview li strong {
	display: block;
	margin-top: 6px;
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	overflow-wrap: anywhere;
}

body .woocommerce ul.woocommerce-order-overview li strong .includes_tax,
body .woocommerce table.order_details .includes_tax {
	display: block;
	margin-top: 2px;
	color: var(--bm-texto-fraco);
	font-family: var(--bm-font-texto), system-ui, sans-serif;
	font-size: 12px;
	font-weight: 500;
}

/* Encomenda falhada */
body .woocommerce .woocommerce-order .woocommerce-thankyou-order-failed {
	padding: 20px 24px;
	border-left: 4px solid var(--bm-erro);
	border-radius: 16px;
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
	color: var(--bm-titulo);
}

body .woocommerce .woocommerce-order .woocommerce-thankyou-order-failed-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* E agora? (próximos passos) */
body .bm-proximos-passos {
	padding: 28px 32px;
	border-radius: var(--bm-raio-grande);
	background-color: var(--bm-azul-claro);
}

body .bm-proximos-passos .bm-proximos-passos__titulo {
	margin: 0 0 16px;
	color: var(--bm-roxo);
	font-size: 22px;
	font-weight: 700;
}

body .bm-proximos-passos .bm-proximos-passos__lista {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: bm-proximo;
}

body .bm-proximos-passos .bm-proximos-passos__passo {
	position: relative;
	margin: 0 0 16px;
	padding-left: 52px;
	counter-increment: bm-proximo;
}

body .bm-proximos-passos .bm-proximos-passos__passo::before {
	content: counter(bm-proximo);
	position: absolute;
	top: 0;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background-color: #fff;
	color: var(--bm-roxo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-weight: 700;
}

body .bm-proximos-passos .bm-proximos-passos__passo strong {
	display: block;
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 16px;
	font-weight: 600;
}

body .bm-proximos-passos .bm-proximos-passos__passo span {
	display: block;
	color: var(--bm-texto-corpo);
	font-size: 14px;
}

body .bm-proximos-passos .bm-proximos-passos__acoes {
	margin: 20px 0 0;
}

@media (max-width: 599px) {
	body .woocommerce .woocommerce-order .woocommerce-thankyou-order-received {
		padding: 92px 20px 24px;
		text-align: center;
	}

	body .woocommerce .woocommerce-order .woocommerce-thankyou-order-received::before {
		top: 24px;
		left: 50%;
		transform: translateX(-50%);
	}

	body .woocommerce ul.woocommerce-order-overview {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	body .woocommerce ul.woocommerce-order-overview li {
		padding: 12px;
	}

	body .bm-proximos-passos {
		padding: 24px 20px;
	}

	body .bm-proximos-passos .bm-proximos-passos__acoes .button {
		width: 100%;
	}
}

/* =========================================================================
 * 9. Detalhes da encomenda e moradas (agradecimento, ver encomenda, seguir encomenda)
 * ====================================================================== */

body .woocommerce .woocommerce-order-details,
body .woocommerce .woocommerce-customer-details {
	margin: 0;
	padding: 28px 32px;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
}

body .woocommerce .woocommerce-order-details .woocommerce-order-details__title,
body .woocommerce .woocommerce-customer-details .woocommerce-column__title {
	margin: 0 0 12px;
	color: var(--bm-titulo);
	font-size: 20px;
	font-weight: 600;
}

body .woocommerce table.shop_table.order_details {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: collapse;
	border-radius: 0;
	font-size: 14px;
}

body .woocommerce table.shop_table.order_details th,
body .woocommerce table.shop_table.order_details td {
	padding: 12px 0;
	border: 0;
	border-top: 1px solid var(--bm-borda);
	background: transparent;
	line-height: 1.5;
	vertical-align: top;
}

body .woocommerce table.shop_table.order_details thead th {
	padding-top: 0;
	border-top: 0;
	color: var(--bm-texto-fraco);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .05em;
	text-transform: uppercase;
}

body .woocommerce table.shop_table.order_details .product-total,
body .woocommerce table.shop_table.order_details tfoot td {
	color: var(--bm-titulo);
	font-weight: 600;
	text-align: right;
}

body .woocommerce table.shop_table.order_details .product-name a {
	color: var(--bm-roxo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

body .woocommerce table.shop_table.order_details .product-name .product-quantity {
	color: var(--bm-texto-fraco);
	font-weight: 600;
}

body .woocommerce table.shop_table.order_details .wc-item-meta {
	margin: 4px 0 0;
	padding: 0;
	color: var(--bm-texto-fraco);
	font-size: 13px;
	list-style: none;
}

body .woocommerce table.shop_table.order_details .wc-item-meta p {
	display: inline;
	margin: 0;
}

body .woocommerce table.shop_table.order_details tfoot th {
	color: var(--bm-texto-corpo);
	font-weight: 500;
	text-align: left;
}

body .woocommerce table.shop_table.order_details tfoot tr:last-child th,
body .woocommerce table.shop_table.order_details tfoot tr:last-child td {
	color: var(--bm-roxo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 18px;
	font-weight: 700;
}

body .woocommerce .woocommerce-order-details .order-again {
	margin: 20px 0 0;
}

/* Moradas: duas caixas */
body .woocommerce .woocommerce-customer-details .addresses.col2-set {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin: 0;
}

body .woocommerce .woocommerce-customer-details .addresses.col2-set::before,
body .woocommerce .woocommerce-customer-details .addresses.col2-set::after {
	content: none;
	display: none;
}

body .woocommerce .woocommerce-customer-details .addresses .woocommerce-column {
	float: none;
	width: auto;
	margin: 0;
}

body .woocommerce .woocommerce-customer-details address {
	box-sizing: border-box;
	width: 100%;
	padding: 16px 20px;
	border: 0;
	border-radius: 16px;
	background-color: var(--bm-creme);
	color: var(--bm-texto-corpo);
	font-style: normal;
	line-height: 1.7;
}

body .woocommerce .woocommerce-customer-details address p {
	margin: 4px 0 0;
}

@media (min-width: 600px) {
	body .woocommerce .woocommerce-customer-details .addresses.col2-set {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 599px) {
	body .woocommerce .woocommerce-order-details,
	body .woocommerce .woocommerce-customer-details {
		padding: 22px 18px;
	}
}

/* Notas da encomenda (atualizações) */
body .woocommerce ol.notes,
body .woocommerce ol.woocommerce-OrderUpdates {
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

body .woocommerce ol.notes li,
body .woocommerce ol.woocommerce-OrderUpdates li {
	margin: 0 0 10px;
	padding: 14px 18px;
	border-radius: 16px;
	background-color: var(--bm-creme);
}

body .woocommerce ol.notes .meta {
	margin: 0 0 4px;
	color: var(--bm-texto-fraco);
	font-size: 12px;
	font-weight: 600;
}

body .woocommerce ol.notes .description p {
	margin: 0;
}

/* =========================================================================
 * 10. Minha conta — entrar / registar / recuperar senha
 * ====================================================================== */

body .woocommerce form .form-row {
	margin: 0 0 16px;
	padding: 0;
}

body .woocommerce form .form-row label {
	display: block;
	margin: 0 0 6px;
	color: var(--bm-titulo);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

body .woocommerce form .form-row .required {
	color: var(--bm-erro);
	text-decoration: none;
}

body .woocommerce form .form-row input.input-text,
body .woocommerce form .form-row select {
	min-height: 50px;
	font-size: 16px;
}

body .woocommerce form .form-row input.input-text:focus,
body .woocommerce form .form-row textarea:focus {
	border-color: var(--bm-roxo);
	box-shadow: var(--bm-anel-foco);
	outline: none;
}

body .woocommerce form .form-row .woocommerce-form__label-for-checkbox,
body .woocommerce form .woocommerce-form-login__rememberme {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	margin: 0;
	color: var(--bm-texto-corpo);
	font-weight: 500;
}

body .woocommerce form input[type=checkbox] {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--bm-roxo);
}

body .woocommerce form .form-row span em,
body .woocommerce .woocommerce-privacy-policy-text {
	color: var(--bm-texto-fraco);
	font-size: 13px;
}

/* Entrar + Registar lado a lado */
body.woocommerce-account #customer_login {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

body.woocommerce-account #customer_login::before,
body.woocommerce-account #customer_login::after {
	content: none;
	display: none;
}

body.woocommerce-account #customer_login .u-column1,
body.woocommerce-account #customer_login .u-column2 {
	float: none;
	width: auto;
	margin: 0;
	padding: 32px;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
}

body.woocommerce-account #customer_login h2 {
	margin: 0 0 4px;
	color: var(--bm-roxo);
	font-size: 24px;
	font-weight: 700;
}

body.woocommerce-account #customer_login form.woocommerce-form {
	margin: 16px 0 0;
	padding: 0;
	border: 0;
	border-radius: 0;
}

body.woocommerce-account #customer_login form.woocommerce-form-login > p.form-row:not(.woocommerce-form-row),
body.woocommerce-account #customer_login form.woocommerce-form-register > p.form-row:last-of-type {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
	margin-top: 4px;
}

body.woocommerce-account #customer_login .woocommerce-form-login__submit,
body.woocommerce-account #customer_login .woocommerce-form-register__submit {
	width: 100%;
	min-height: 56px;
	margin: 0;
	font-size: 16px;
}

body.woocommerce-account .woocommerce .lost_password {
	margin: 12px 0 0;
	text-align: center;
}

body.woocommerce-account .woocommerce .lost_password a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-weight: 600;
}

/* Só "Entrar" (se o registo for desligado), recuperar e redefinir senha: cartão centrado */
body.woocommerce-account:not(.logged-in) .page-content > .woocommerce > form.woocommerce-form-login,
body.woocommerce-account .woocommerce form.lost_reset_password {
	box-sizing: border-box;
	max-width: 520px;
	margin: 0 auto;
	padding: 32px;
	border: 0;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
}

body.woocommerce-account:not(.logged-in) .page-content > .woocommerce > h2 {
	text-align: center;
}

body.woocommerce-account .woocommerce form.lost_reset_password .form-row-first,
body.woocommerce-account .woocommerce form.lost_reset_password .form-row-last {
	float: none;
	width: 100%;
}

body.woocommerce-account .woocommerce form.lost_reset_password button.button {
	width: 100%;
	min-height: 56px;
}

body.woocommerce-lost-password .page-content > .woocommerce > p,
body.woocommerce-lost-password .page-content > .woocommerce > .woocommerce-notices-wrapper {
	max-width: 520px;
	margin-inline: auto;
}

@media (min-width: 768px) {
	body.woocommerce-account #customer_login {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 24px;
	}
}

@media (max-width: 599px) {
	body.woocommerce-account #customer_login .u-column1,
	body.woocommerce-account #customer_login .u-column2,
	body.woocommerce-account:not(.logged-in) .page-content > .woocommerce > form.woocommerce-form-login,
	body.woocommerce-account .woocommerce form.lost_reset_password {
		padding: 24px 20px;
	}
}

/* =========================================================================
 * 11. Minha conta — navegação (pílulas verticais) e conteúdo (cartão)
 * ====================================================================== */

body.woocommerce-account.logged-in .page-content > .woocommerce::before,
body.woocommerce-account.logged-in .page-content > .woocommerce::after {
	content: none;
	display: none;
}

body.woocommerce-account .woocommerce-notices-wrapper:empty {
	display: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation {
	float: none;
	width: auto;
	margin: 0 0 16px;
	padding: 12px;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
}

body.woocommerce-account .woocommerce-MyAccount-navigation ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li {
	margin: 0;
	padding: 0;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a {
	display: flex;
	align-items: center;
	box-sizing: border-box;
	min-height: 46px;
	padding: 10px 16px;
	border-radius: var(--bm-raio-pilula);
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
	background-color: var(--bm-roxo-fundo);
	color: var(--bm-roxo);
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
	background-color: var(--bm-roxo);
	color: #fff;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li a:focus-visible {
	box-shadow: var(--bm-anel-foco);
	outline: none;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a {
	color: var(--bm-texto-corpo);
	font-weight: 500;
}

body.woocommerce-account .woocommerce-MyAccount-content {
	float: none;
	box-sizing: border-box;
	width: auto;
	min-width: 0;
	padding: 32px;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
}

body.woocommerce-account .woocommerce-MyAccount-content > :first-child {
	margin-top: 0;
}

body.woocommerce-account .woocommerce-MyAccount-content > :last-child {
	margin-bottom: 0;
}

body.woocommerce-dashboard .woocommerce-MyAccount-content > p:first-of-type {
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 20px;
}

body.woocommerce-account .woocommerce-MyAccount-content mark {
	padding: 0;
	background: transparent;
	color: var(--bm-titulo);
	font-weight: 700;
}

body.woocommerce-account .woocommerce-MyAccount-content mark.order-status,
body.bm-seguir-encomenda .order-info mark.order-status {
	display: inline-block;
	padding: 2px 12px;
	border-radius: var(--bm-raio-pilula);
	background-color: var(--bm-lilas);
	color: var(--bm-roxo);
}

/* Dentro do cartão de conteúdo, os detalhes da encomenda não levam outro cartão */
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-order-details,
body.woocommerce-account .woocommerce-MyAccount-content .woocommerce-customer-details {
	margin: 24px 0 0;
	padding: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

body.woocommerce-account .woocommerce-MyAccount-content h2 {
	color: var(--bm-titulo);
	font-size: 20px;
	font-weight: 600;
}

@media (min-width: 900px) {
	body.woocommerce-account.logged-in .page-content > .woocommerce {
		display: grid;
		grid-template-columns: 260px minmax(0, 1fr);
		gap: 32px;
		align-items: start;
	}

	body.woocommerce-account.logged-in .page-content > .woocommerce > * {
		grid-column: 1 / -1;
	}

	body.woocommerce-account.logged-in .page-content > .woocommerce > .woocommerce-MyAccount-navigation {
		position: sticky;
		top: var(--bm-topo-fixo);
		grid-column: 1;
		margin: 0;
	}

	body.woocommerce-account.logged-in .page-content > .woocommerce > .woocommerce-MyAccount-content {
		grid-column: 2;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation ul {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout {
		margin-top: 8px;
		padding-top: 8px;
		border-top: 1px solid var(--bm-borda);
	}
}

@media (max-width: 599px) {
	body.woocommerce-account .woocommerce-MyAccount-content {
		padding: 24px 18px;
	}

	body.woocommerce-account .woocommerce-MyAccount-navigation li a {
		padding: 10px 14px;
		font-size: 14px;
	}
}

/* =========================================================================
 * 12. Minha conta — encomendas, moradas, formulários
 * ====================================================================== */

/* Tabela de encomendas (desktop) */
body.woocommerce-account .woocommerce table.shop_table.woocommerce-orders-table {
	width: 100%;
	margin: 0;
	overflow: visible;
	border: 0;
	border-collapse: collapse;
	border-radius: 0;
	font-size: 14px;
}

body.woocommerce-account .woocommerce table.shop_table.woocommerce-orders-table th,
body.woocommerce-account .woocommerce table.shop_table.woocommerce-orders-table td {
	padding: 14px 12px;
	border: 0;
	border-top: 1px solid var(--bm-borda);
	background: transparent;
	color: var(--bm-texto-corpo);
	line-height: 1.4;
	vertical-align: middle;
}

body.woocommerce-account .woocommerce table.shop_table.woocommerce-orders-table thead th {
	border-top: 0;
	color: var(--bm-texto-fraco);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .05em;
	text-transform: uppercase;
}

body.woocommerce-account .woocommerce table.shop_table.woocommerce-orders-table tr > :first-child {
	padding-left: 0;
}

body.woocommerce-account .woocommerce table.shop_table.woocommerce-orders-table tr > :last-child {
	padding-right: 0;
	text-align: right;
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-number a {
	color: var(--bm-roxo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-status {
	color: var(--bm-roxo);
	font-weight: 600;
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__row--status-completed .woocommerce-orders-table__cell-order-status {
	color: var(--bm-sucesso);
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__row--status-cancelled .woocommerce-orders-table__cell-order-status,
body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__row--status-failed .woocommerce-orders-table__cell-order-status {
	color: var(--bm-erro);
}

body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button {
	min-height: 44px;
	margin: 4px 0 4px 6px;
	padding: 8px 18px;
	font-size: 14px;
}

/* Telemóvel: cada encomenda é um cartão (o WooCommerce já empilha a tabela até 768px) */
@media (max-width: 768px) {
	body.woocommerce-account .woocommerce table.shop_table_responsive.woocommerce-orders-table tbody tr {
		display: block;
		margin: 0 0 12px;
		padding: 4px 16px;
		border: 1px solid var(--bm-borda);
		border-radius: 18px;
		background-color: #fff;
	}

	body.woocommerce-account .woocommerce table.shop_table_responsive.woocommerce-orders-table tbody tr td,
	body.woocommerce-account .woocommerce table.shop_table_responsive.woocommerce-orders-table tbody tr th {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		padding: 10px 0;
		border-top: 1px solid var(--bm-borda);
		background: transparent;
		text-align: right !important;
	}

	body.woocommerce-account .woocommerce table.shop_table_responsive.woocommerce-orders-table tbody tr > :first-child {
		border-top: 0;
	}

	body.woocommerce-account .woocommerce table.shop_table_responsive.woocommerce-orders-table tbody tr td::before,
	body.woocommerce-account .woocommerce table.shop_table_responsive.woocommerce-orders-table tbody tr th::before {
		content: attr(data-title);
		float: none;
		color: var(--bm-texto-fraco);
		font-size: 12px;
		font-weight: 600;
		letter-spacing: .04em;
		text-align: left;
		text-transform: uppercase;
	}

	body.woocommerce-account .woocommerce table.shop_table_responsive.woocommerce-orders-table tbody tr td.woocommerce-orders-table__cell-order-actions {
		flex-wrap: wrap;
		justify-content: flex-end;
		gap: 8px;
	}

	body.woocommerce-account .woocommerce table.shop_table_responsive.woocommerce-orders-table tbody tr td.woocommerce-orders-table__cell-order-actions::before {
		display: none;
	}

	body.woocommerce-account .woocommerce table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions .button {
		flex: 1 1 auto;
		margin: 0;
	}
}

/* Moradas: duas caixas */
body.woocommerce-account .woocommerce .woocommerce-Addresses.col2-set {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin-top: 16px;
}

body.woocommerce-account .woocommerce .woocommerce-Addresses.col2-set::before,
body.woocommerce-account .woocommerce .woocommerce-Addresses.col2-set::after {
	content: none;
	display: none;
}

body.woocommerce-account .woocommerce .woocommerce-Addresses .woocommerce-Address {
	float: none;
	width: auto;
	margin: 0;
	padding: 22px 24px;
	border-radius: 20px;
	background-color: var(--bm-creme);
}

/* Título por cima do botão nas duas caixas (lado a lado, um partia e o outro não) */
body.woocommerce-account .woocommerce .woocommerce-Address .woocommerce-Address-title {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 12px;
}

body.woocommerce-account .woocommerce .woocommerce-Address .woocommerce-Address-title::before,
body.woocommerce-account .woocommerce .woocommerce-Address .woocommerce-Address-title::after {
	content: none;
	display: none;
}

body.woocommerce-account .woocommerce .woocommerce-Address .woocommerce-Address-title h2 {
	float: none;
	margin: 0;
	font-size: 18px;
}

body.woocommerce-account .woocommerce .woocommerce-Address .woocommerce-Address-title .edit {
	display: inline-flex;
	float: none;
	align-items: center;
	min-height: 44px;
	padding: 0 18px;
	border-radius: var(--bm-raio-pilula);
	background-color: #fff;
	color: var(--bm-roxo);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

body.woocommerce-account .woocommerce .woocommerce-Address .woocommerce-Address-title .edit:hover {
	background-color: var(--bm-lilas);
}

body.woocommerce-account .woocommerce .woocommerce-Address address {
	color: var(--bm-texto-corpo);
	font-style: normal;
	line-height: 1.7;
}

@media (min-width: 600px) {
	body.woocommerce-account .woocommerce .woocommerce-Addresses.col2-set {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Formulários: detalhes da conta e editar morada */
body.woocommerce-account .woocommerce-MyAccount-content fieldset {
	margin: 24px 0 16px;
	padding: 20px 20px 4px;
	border: 1px solid var(--bm-borda);
	border-radius: 20px;
}

body.woocommerce-account .woocommerce-MyAccount-content fieldset legend {
	padding: 0 8px;
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 17px;
	font-weight: 600;
}

body.woocommerce-account .woocommerce-MyAccount-content form .button {
	min-height: 56px;
	padding-inline: 32px;
}

/* Seletor de país/distrito (selectWoo) */
body .woocommerce .select2-container--default .select2-selection--single {
	height: 50px;
	border: 1px solid var(--bm-borda);
	border-radius: var(--bm-raio-campo);
}

body .woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered {
	padding-left: 16px;
	color: var(--bm-titulo);
	line-height: 48px;
}

body .woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow {
	right: 10px;
	height: 48px;
}

body .select2-container--default .select2-results__option--highlighted[aria-selected],
body .select2-container--default .select2-results__option--highlighted[data-selected] {
	background-color: var(--bm-roxo);
}

body .select2-dropdown {
	overflow: hidden;
	border-color: var(--bm-borda);
	border-radius: var(--bm-raio-campo);
}

@media (max-width: 599px) {
	body .woocommerce form .form-row-first,
	body .woocommerce form .form-row-last {
		float: none;
		width: 100%;
	}
}

/* =========================================================================
 * 13. Seguir encomenda (/seguir-encomenda/): cartão centrado
 * ====================================================================== */

body.bm-seguir-encomenda .page-header,
body.bm-seguir-encomenda .page-content {
	max-width: 640px;
	margin-inline: auto;
}

body.bm-seguir-encomenda .page-header {
	text-align: center;
}

body.bm-seguir-encomenda .page-content > p {
	margin: 0 0 24px;
	color: var(--bm-texto-corpo);
	font-size: 16px;
	text-align: center;
}

body.bm-seguir-encomenda .page-content > .woocommerce + p,
body.bm-seguir-encomenda .page-content > p:last-child {
	margin: 24px 0 0;
	font-size: 14px;
}

body .woocommerce form.woocommerce-form-track-order {
	margin: 0;
	padding: 32px;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
}

/* O texto de introdução do WooCommerce repete o parágrafo da página: só aparece se a página não tiver um */
body.bm-seguir-encomenda .page-content > p + .woocommerce .woocommerce-form-track-order > p:first-child {
	display: none;
}

body .woocommerce form.woocommerce-form-track-order .form-row-first,
body .woocommerce form.woocommerce-form-track-order .form-row-last {
	float: none;
	width: 100%;
}

body .woocommerce form.woocommerce-form-track-order .clear {
	display: none;
}

body .woocommerce form.woocommerce-form-track-order .form-row:last-of-type {
	margin: 8px 0 0;
}

body .woocommerce form.woocommerce-form-track-order button.button {
	width: 100%;
	min-height: 56px;
	font-size: 16px;
}

/* Resultado: estado da encomenda */
body.bm-seguir-encomenda .woocommerce > p.order-info {
	margin: 0 0 20px;
	padding: 20px 24px;
	border-radius: var(--bm-raio-grande);
	background-color: #fff;
	box-shadow: var(--bm-sombra-card);
	color: var(--bm-texto-corpo);
	font-size: 16px;
}

body.bm-seguir-encomenda .woocommerce > p.order-info mark {
	background: transparent;
	color: var(--bm-titulo);
	font-weight: 700;
}

body.bm-seguir-encomenda .woocommerce > h2 {
	margin: 0 0 12px;
	font-size: 20px;
	font-weight: 600;
}

body.bm-seguir-encomenda .woocommerce .woocommerce-order-details {
	margin: 0 0 20px;
}

@media (max-width: 599px) {
	body .woocommerce form.woocommerce-form-track-order {
		padding: 24px 20px;
	}
}

/* Ações da encomenda (Pagar / Cancelar): "Cancelar" é a ação secundária. */
body .woocommerce :is(.order-actions-button, a.button).cancel {
	background: #fff !important;
	color: var(--bm-roxo) !important;
	box-shadow: inset 0 0 0 2px var(--bm-roxo) !important;
}
body .woocommerce :is(.order-actions-button, a.button).cancel:hover { background: var(--bm-lilas) !important; }

/* ---------- "Faltam X € para portes grátis" (inc/extras.php) ---------- */
body .bm-portes-aviso {
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: 16px;
	background: var(--bm-lilas, #EDE9FB);
	color: var(--bm-titulo, #2A2155);
}
body .bm-portes-aviso[hidden] { display: none; }
body .bm-portes-aviso__texto {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}
body .bm-portes-aviso__barra {
	height: 8px;
	overflow: hidden;
	border-radius: 999px;
	background: rgba(74, 61, 153, .15);
}
body .bm-portes-aviso__barra > span {
	display: block;
	height: 100%;
	border-radius: inherit;
	background: var(--bm-roxo, #4A3D99);
	transition: width .3s ease;
}
body .bm-portes-aviso.is-gratis .bm-portes-aviso__barra > span { background: #1F8A4C; }
