/* Loja, categorias e card de produto — Blanco Made (agente loja)
 *
 * 1–8: layout do arquivo, limitado a body.bm-arquivo (classe posta por inc/loja.php em loja,
 *      categorias, etiquetas e pesquisa de produtos).
 * 9–10: card de produto e paginação, genéricos para a marcação do WooCommerce (ul.products li.product),
 *      para os relacionados da página de produto usarem o mesmo card. O loop do Elementor na Início
 *      não usa esta marcação.
 * Tokens em loja.css (:root). `[class]` nos seletores do card só sobe a especificidade acima da do
 * woocommerce-layout/smallscreen.css (larguras e margens das colunas antigas, com float).
 * O smallscreen.css (≤ 768 px) usa `.woocommerce ul.products[class*=columns-] li.product` (0,4,2):
 * por isso o card leva `li.product[class]` (0,4,3); sem isso o card ficava com 48 % da célula (83 px a 390).
 * Foco: contorno roxo (o azul #40B8D8 só tem 2,3:1 sobre branco/creme, abaixo dos 3:1 do WCAG).
 */

/* =========================================================================
 * 1. Moldura do arquivo
 * ====================================================================== */
body.bm-arquivo main.site-main {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	background: var(--bm-creme);
}

body.bm-arquivo .bm-loja-largura {
	box-sizing: border-box;
	width: 100%;
	max-width: 1360px;
	margin-inline: auto;
	padding-inline: 32px;
}

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

/* =========================================================================
 * 2. Topo: migalhas, selo, título, texto
 * ====================================================================== */
body.bm-arquivo .bm-loja-topo {
	padding: 40px 0 32px;
	background: linear-gradient(135deg, #E8F6FB 0%, var(--bm-creme) 100%);
}

body.bm-arquivo .bm-loja-topo__migalhas {
	margin: 0 0 12px;
	padding: 0;
	font-family: var(--bm-font-texto), system-ui, sans-serif;
	font-size: 12px;
	line-height: 1.4;
	color: var(--bm-texto);
}
body.bm-arquivo .bm-loja-topo__migalhas a {
	color: var(--bm-texto);
	text-decoration: none;
}
body.bm-arquivo .bm-loja-topo__migalhas a:hover,
body.bm-arquivo .bm-loja-topo__migalhas a:focus-visible {
	color: var(--bm-roxo);
	text-decoration: underline;
}
body.bm-arquivo .bm-loja-topo__migalhas .bm-sep {
	margin: 0 6px;
	opacity: .6;
}

body.bm-arquivo .bm-loja-topo__selo {
	display: inline-block;
	margin: 0;
	padding: 4px 12px;
	border-radius: var(--bm-raio-pilula);
	background: #6EC6E6;
	color: #3A2F80;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 11px;
	font-weight: 600;
	line-height: 14px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

body.bm-arquivo .bm-loja-topo__titulo {
	margin: 12px 0 10px;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: clamp(30px, 2.2vw + 14px, 46px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.01em;
	color: var(--bm-roxo);
}
body.bm-arquivo .bm-loja-topo__titulo span {
	color: var(--bm-azul);
}

body.bm-arquivo .bm-loja-topo__texto {
	max-width: 560px;
	margin: 0;
	font-size: 14px;   /* Figma 31:614: 14/22 */
	line-height: 22px;
	color: var(--bm-texto);
}

/* Pesquisa: campo no topo, já preenchido (mesma marcação e aspeto do da 404: inc/paginas.php
 * bm_paginas_form_pesquisa(); o paginas.css não carrega aqui, por isso as regras repetem-se). */
body.bm-arquivo .bm-loja-topo__pesquisa {
	margin-top: 20px;
}
body.bm-arquivo .bm-404-pesquisa {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	max-width: 560px;
	box-sizing: border-box;
	margin: 0;
	padding: 6px 6px 6px 18px;
	border-radius: var(--bm-raio-pilula);
	background: #fff;
	box-shadow: var(--bm-sombra-alta), inset 0 0 0 1px var(--bm-borda);
	transition: box-shadow .2s ease;
}
body.bm-arquivo .bm-404-pesquisa:focus-within {
	box-shadow: var(--bm-sombra-alta), inset 0 0 0 2px var(--bm-roxo);
}
body.bm-arquivo .bm-404-pesquisa__icone {
	display: inline-flex;
	flex: none;
	color: var(--bm-roxo);
}
body.bm-arquivo input.bm-404-pesquisa__campo[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 4px;
	border: 0;
	border-radius: 0;
	outline: 0;
	background: transparent;
	box-shadow: none;
	font-family: var(--bm-font-texto), system-ui, sans-serif;
	font-size: 16px; /* 16 px evita o zoom automático do iPhone */
	color: var(--bm-titulo);
	-webkit-appearance: none;
	appearance: none;
}
body.bm-arquivo input.bm-404-pesquisa__campo::placeholder {
	color: #9A97AE;
	opacity: 1;
}
body.bm-arquivo input.bm-404-pesquisa__campo::-webkit-search-cancel-button {
	cursor: pointer;
}
body.bm-arquivo button.bm-404-pesquisa__botao {
	flex: none;
	min-height: 44px;
	margin: 0;
	padding: 0 22px;
	border: 0;
	border-radius: var(--bm-raio-pilula);
	background: var(--bm-roxo);
	color: #fff;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color .2s ease;
}
body.bm-arquivo button.bm-404-pesquisa__botao:hover,
body.bm-arquivo button.bm-404-pesquisa__botao:focus-visible {
	background: var(--bm-roxo-escuro);
	color: #fff;
}
body.bm-arquivo button.bm-404-pesquisa__botao:focus-visible {
	outline: 3px solid var(--bm-roxo);
	outline-offset: 2px;
}

/* =========================================================================
 * 3. Pílulas de categorias e coleções
 * ====================================================================== */
body.bm-arquivo .bm-loja-navegacao {
	padding-top: 24px;
}

body.bm-arquivo .bm-chips__lista {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
body.bm-arquivo .bm-chips__lista > li {
	margin: 0;
	padding: 0;
}

body.bm-arquivo .bm-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 38px;
	box-sizing: border-box;
	padding: 8px 18px;
	border-radius: var(--bm-raio-pilula);
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--bm-borda);
	color: var(--bm-titulo);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
body.bm-arquivo .bm-chip:hover {
	color: var(--bm-roxo);
	box-shadow: inset 0 0 0 1px var(--bm-roxo);
}
body.bm-arquivo .bm-chip:focus-visible {
	outline: 3px solid var(--bm-roxo);
	outline-offset: 2px;
}
body.bm-arquivo .bm-chip--colecao {
	background: var(--bm-azul-claro);
	box-shadow: none;
	color: var(--bm-roxo);
}
body.bm-arquivo .bm-chip--colecao::before {
	content: "✦";
	font-size: 11px;
	color: var(--bm-azul);
}
body.bm-arquivo .bm-chip.is-ativo,
body.bm-arquivo .bm-chip.is-ativo:hover {
	background: var(--bm-roxo);
	box-shadow: none;
	color: #fff;
}
body.bm-arquivo .bm-chip.is-ativo::before {
	color: #fff;
}

body.bm-arquivo .bm-chips__lista > .bm-chips__grupo {
	display: flex;
	align-items: center;
	align-self: stretch;
	margin-left: 8px;
	padding-left: 16px;
	border-left: 1px solid var(--bm-borda);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bm-texto);
	white-space: nowrap;
}

/* =========================================================================
 * 4. Corpo: barra lateral + resultados
 * ====================================================================== */
body.bm-arquivo .bm-loja-corpo {
	display: grid;
	grid-template-columns: 256px minmax(0, 1fr);
	gap: 32px;
	align-items: start;
	padding-top: 24px;
	padding-bottom: 72px;
}
body.bm-arquivo .bm-loja-lateral,
body.bm-arquivo .bm-loja-resultados {
	min-width: 0;
}

/* =========================================================================
 * 5. Painel "Filtrar" (details: aberto no computador, recolhido até 1024 px)
 * ====================================================================== */
body.bm-arquivo .bm-filtros {
	border-radius: var(--bm-raio-card);
	background: #fff;
	box-shadow: var(--bm-sombra-card);
}

body.bm-arquivo .bm-filtros__cabecalho {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	border-radius: inherit;
	list-style: none;
	cursor: pointer;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--bm-titulo);
}
body.bm-arquivo .bm-filtros__cabecalho::-webkit-details-marker {
	display: none;
}
body.bm-arquivo .bm-filtros__cabecalho::marker {
	content: "";
}
body.bm-arquivo .bm-filtros__cabecalho:focus-visible {
	outline: 3px solid var(--bm-roxo);
	outline-offset: 2px;
}
body.bm-arquivo .bm-filtros__titulo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}
body.bm-arquivo .bm-filtros__icone {
	flex: none;
	color: var(--bm-roxo);
}
body.bm-arquivo .bm-filtros__contador {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	box-sizing: border-box;
	padding: 0 6px;
	border-radius: var(--bm-raio-pilula);
	background: var(--bm-roxo);
	color: #fff;
	font-size: 12px;
	line-height: 1;
}
body.bm-arquivo .bm-filtros__seta {
	flex: none;
	color: var(--bm-texto);
	transition: transform .2s ease;
}
body.bm-arquivo .bm-filtros[open] .bm-filtros__seta {
	transform: rotate(180deg);
}

body.bm-arquivo .bm-filtros__corpo {
	display: grid;
	gap: 20px;
	padding: 4px 20px 22px;
}

body.bm-arquivo .bm-filtro {
	margin: 0;
	padding-top: 20px;
	border-top: 1px solid var(--bm-borda);
}
body.bm-arquivo .bm-filtro:first-child {
	padding-top: 0;
	border-top: 0;
}
body.bm-arquivo .bm-filtro__titulo {
	margin: 0 0 14px;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--bm-titulo);
}

/* ---------- Preço ---------- */
body.bm-arquivo .bm-preco {
	margin: 0;
}

/* Barra dupla: só aparece com JavaScript (classe bm-preco--js). */
body.bm-arquivo .bm-preco__slider {
	display: none;
	position: relative;
	height: 28px;
	margin: 0 0 14px;
}
body.bm-arquivo .bm-preco--js .bm-preco__slider {
	display: block;
}
body.bm-arquivo .bm-preco__trilho {
	position: absolute;
	top: 50%;
	right: 11px;
	left: 11px;
	height: 6px;
	margin-top: -3px;
	border-radius: var(--bm-raio-pilula);
	background: var(--bm-lilas);
}
body.bm-arquivo .bm-preco__faixa {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	border-radius: inherit;
	background: var(--bm-roxo);
}
body.bm-arquivo .bm-preco__range {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	pointer-events: none;
	-webkit-appearance: none;
	appearance: none;
}
body.bm-arquivo .bm-preco__range:focus {
	outline: none;
}
body.bm-arquivo .bm-preco__range::-webkit-slider-runnable-track {
	height: 6px;
	border: 0;
	background: transparent;
}
body.bm-arquivo .bm-preco__range::-moz-range-track {
	height: 6px;
	border: 0;
	background: transparent;
}
body.bm-arquivo .bm-preco__range::-webkit-slider-thumb {
	width: 22px;
	height: 22px;
	margin-top: -8px;
	box-sizing: border-box;
	border: 3px solid var(--bm-roxo);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(42, 33, 85, .25);
	cursor: grab;
	pointer-events: auto;
	-webkit-appearance: none;
	appearance: none;
}
body.bm-arquivo .bm-preco__range::-moz-range-thumb {
	width: 22px;
	height: 22px;
	box-sizing: border-box;
	border: 3px solid var(--bm-roxo);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 4px rgba(42, 33, 85, .25);
	cursor: grab;
	pointer-events: auto;
}

body.bm-arquivo .bm-preco__campos {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: end;
	gap: 8px;
}
body.bm-arquivo .bm-preco__campo label {
	display: block;
	margin: 0 0 6px;
	font-size: 12px;
	line-height: 1.2;
	color: var(--bm-texto);
}
body.bm-arquivo .bm-preco__caixa {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 12px;
	border: 1px solid var(--bm-borda);
	border-radius: 12px;
	background: #fff;
	transition: border-color .2s ease, box-shadow .2s ease;
}
body.bm-arquivo .bm-preco__caixa:focus-within {
	border-color: var(--bm-roxo);
	box-shadow: 0 0 0 1px var(--bm-roxo), 0 0 0 4px rgba(77, 62, 152, .15);
}
body.bm-arquivo .bm-preco__caixa input[type="number"] {
	width: 100%;
	min-width: 0;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	outline: none;
	font-family: var(--bm-font-texto), system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: var(--bm-titulo);
	-moz-appearance: textfield;
	appearance: textfield;
}
body.bm-arquivo .bm-preco__caixa input[type="number"]::-webkit-outer-spin-button,
body.bm-arquivo .bm-preco__caixa input[type="number"]::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}
body.bm-arquivo .bm-preco__caixa > span {
	font-size: 13px;
	color: var(--bm-texto);
}
body.bm-arquivo .bm-preco__traco {
	padding-bottom: 11px;
	color: var(--bm-texto);
}

body.bm-arquivo .bm-preco__acoes {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 16px;
}
body.bm-arquivo .bm-preco__aplicar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 10px 22px;
	border: 0;
	border-radius: var(--bm-raio-pilula);
	background: var(--bm-roxo);
	color: #fff;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	cursor: pointer;
	transition: background-color .2s ease;
}
body.bm-arquivo .bm-preco__aplicar:hover,
body.bm-arquivo .bm-preco__aplicar:focus {
	background: var(--bm-roxo-escuro);
	color: #fff;
}
body.bm-arquivo .bm-preco__aplicar:focus-visible {
	outline: 3px solid var(--bm-roxo);
	outline-offset: 2px;
}
body.bm-arquivo .bm-preco__limpar {
	font-size: 13px;
	font-weight: 600;
	color: var(--bm-roxo);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Categorias ---------- */
body.bm-arquivo .bm-cats,
body.bm-arquivo .bm-cats ul {
	margin: 0;
	padding: 0;
	list-style: none;
}
body.bm-arquivo .bm-cats li {
	margin: 0;
	padding: 0;
}
body.bm-arquivo .bm-cats ul {
	margin: 2px 0 6px 14px;
	padding-left: 8px;
	border-left: 2px solid var(--bm-borda);
}
body.bm-arquivo .bm-cats__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 10px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.3;
	color: var(--bm-titulo);
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}
body.bm-arquivo .bm-cats ul .bm-cats__link {
	padding: 6px 10px;
	font-size: 13px;
}
body.bm-arquivo .bm-cats__link:hover {
	background: var(--bm-creme);
	color: var(--bm-roxo);
}
body.bm-arquivo .bm-cats__link:focus-visible {
	outline: 2px solid var(--bm-roxo);
	outline-offset: 1px;
}
body.bm-arquivo .bm-cats__link.is-ramo {
	font-weight: 600;
}
body.bm-arquivo .bm-cats__link.is-ativo {
	background: var(--bm-lilas);
	color: var(--bm-roxo);
	font-weight: 700;
}
body.bm-arquivo .bm-cats__n {
	flex: none;
	min-width: 26px;
	box-sizing: border-box;
	padding: 2px 7px;
	border-radius: var(--bm-raio-pilula);
	background: var(--bm-creme);
	font-size: 11px;
	font-weight: 600;
	text-align: center;
	color: var(--bm-texto);
}
body.bm-arquivo .bm-cats__link.is-ativo .bm-cats__n {
	background: #fff;
	color: var(--bm-roxo);
}

/* =========================================================================
 * 6. Barra de resultados: contagem, ordenação, filtros ativos
 * ====================================================================== */
body.bm-arquivo .bm-loja-barra {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin: 0 0 20px;
}
body.bm-arquivo .bm-loja-barra .woocommerce-result-count {
	float: none;
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
	color: var(--bm-texto);
}
body.bm-arquivo .bm-loja-barra__ordem {
	display: flex;
	align-items: center;
	gap: 10px;
}
body.bm-arquivo .bm-loja-barra__rotulo {
	font-size: 13px;
	color: var(--bm-texto);
	white-space: nowrap;
}
body.bm-arquivo .bm-loja-barra .woocommerce-ordering {
	float: none;
	margin: 0;
}
body.bm-arquivo .bm-loja-barra select.orderby {
	width: auto;
	min-width: 220px;
	height: 40px;
	margin: 0;
	padding: 0 40px 0 16px;
	border: 1px solid var(--bm-borda);
	border-radius: 12px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B6785' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px 14px;
	box-shadow: none;
	font-family: var(--bm-font-texto), system-ui, sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--bm-titulo);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
body.bm-arquivo .bm-loja-barra select.orderby:hover {
	border-color: var(--bm-roxo);
}
body.bm-arquivo .bm-loja-barra select.orderby:focus {
	border-color: var(--bm-roxo);
	outline: none;
	box-shadow: 0 0 0 3px rgba(77, 62, 152, .15);
}

body.bm-arquivo .bm-loja-ativos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: -6px 0 20px;
	font-size: 13px;
}
body.bm-arquivo .bm-loja-ativos__rotulo {
	color: var(--bm-texto);
}
body.bm-arquivo .bm-loja-ativos__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	border-radius: var(--bm-raio-pilula);
	background: var(--bm-lilas);
	color: var(--bm-roxo);
	font-weight: 600;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}
body.bm-arquivo .bm-loja-ativos__chip:hover,
body.bm-arquivo .bm-loja-ativos__chip:focus-visible {
	background: var(--bm-roxo);
	color: #fff;
}
body.bm-arquivo .bm-loja-ativos__limpar {
	font-weight: 600;
	color: var(--bm-roxo);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* =========================================================================
 * 7. Estado vazio
 * ====================================================================== */
body.bm-arquivo .bm-loja-vazio {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 48px 24px;
	border-radius: var(--bm-raio-card);
	background: #fff;
	box-shadow: var(--bm-sombra-card);
	text-align: center;
}
body.bm-arquivo .bm-loja-vazio__icone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	margin-bottom: 6px;
	border-radius: 50%;
	background: var(--bm-azul-claro);
	color: var(--bm-roxo);
}
body.bm-arquivo .bm-loja-vazio__titulo {
	margin: 0;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--bm-roxo);
}
body.bm-arquivo .bm-loja-vazio__texto {
	max-width: 420px;
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--bm-texto);
}
body.bm-arquivo .bm-loja-vazio__acoes {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 10px;
}
body.bm-arquivo .bm-botao {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	box-sizing: border-box;
	padding: 12px 24px;
	border-radius: var(--bm-raio-pilula);
	background: var(--bm-roxo);
	color: #fff;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease;
}
body.bm-arquivo .bm-botao:hover,
body.bm-arquivo .bm-botao:focus-visible {
	background: var(--bm-roxo-escuro);
	color: #fff;
}
body.bm-arquivo .bm-botao--claro {
	background: #fff;
	box-shadow: inset 0 0 0 1.5px var(--bm-roxo);
	color: var(--bm-roxo);
}
body.bm-arquivo .bm-botao--claro:hover,
body.bm-arquivo .bm-botao--claro:focus-visible {
	background: var(--bm-lilas);
	color: var(--bm-roxo);
}

/* Foco visível no teclado (a troca de cor de fundo sozinha não chega) */
body.bm-arquivo .bm-botao:focus-visible,
body.bm-arquivo .bm-loja-ativos__chip:focus-visible,
body.bm-arquivo .bm-loja-ativos__limpar:focus-visible,
body.bm-arquivo .bm-preco__limpar:focus-visible,
body.bm-arquivo .bm-loja-topo__migalhas a:focus-visible,
body.bm-arquivo .bm-loja-barra select.orderby:focus-visible {
	outline: 3px solid var(--bm-roxo);
	outline-offset: 2px;
}

/* =========================================================================
 * 8. Grelha de produtos (genérica: loja, categorias, pesquisa, relacionados)
 * ====================================================================== */
body ul.products[class] {
	--bm-colunas: 4;
	display: grid;
	grid-template-columns: repeat(var(--bm-colunas), minmax(0, 1fr));
	gap: 24px;
	margin: 0 0 40px;
	padding: 0;
	list-style: none;
}
/* clearfix antigo do WooCommerce viraria célula da grelha */
body ul.products[class]::before,
body ul.products[class]::after {
	content: none;
	display: none;
}
body ul.products.columns-1 { --bm-colunas: 1; }
body ul.products.columns-2 { --bm-colunas: 2; }
body ul.products.columns-3 { --bm-colunas: 3; }
body ul.products.columns-4 { --bm-colunas: 4; }
body ul.products.columns-5 { --bm-colunas: 5; }
body ul.products.columns-6 { --bm-colunas: 6; }

/* =========================================================================
 * 9. Card de produto (spec da Início: 20 px, raio 24, imagem raio 16 em #E3F6FA)
 * ====================================================================== */
body ul.products[class] li.product[class] {
	--bm-card-cinza: #64748B;
	/* Figma da Início usa #94A3B8 (2,6:1 sobre branco, falha o AA em 11–12 px): mesmo tom, mais escuro (4,8:1) */
	--bm-card-riscado: #64748B;
	--bm-card-linha: #F1F5F9;
	--bm-ic-carrinho: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='20' r='1.5'/%3E%3Ccircle cx='18' cy='20' r='1.5'/%3E%3Cpath d='M2.5 3h2.6l2.4 11.2a1.6 1.6 0 0 0 1.6 1.3h8.4a1.6 1.6 0 0 0 1.6-1.2L21 7H6'/%3E%3C/svg%3E");
	--bm-ic-seta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
	position: relative;
	display: flex;
	flex-direction: column;
	float: none;
	width: auto;
	min-width: 0;
	margin: 0;
	padding: 20px;
	box-sizing: border-box;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 0 0 1px rgba(77, 62, 152, .06);
	text-align: left;
	transition: transform .25s ease, box-shadow .25s ease;
}
body ul.products[class] li.product:hover {
	transform: translateY(-4px);
	box-shadow: var(--bm-sombra-alta), 0 0 0 1px rgba(77, 62, 152, .08);
}

/* Link do produto: cobre o card todo (o botão fica por cima, z-index 2). */
body ul.products[class] li.product a.woocommerce-loop-product__link {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	color: inherit;
	text-decoration: none;
}
body ul.products[class] li.product a.woocommerce-loop-product__link::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 1;
	border-radius: inherit;
}
body ul.products[class] li.product a.woocommerce-loop-product__link:focus-visible {
	outline: none;
}
body ul.products[class] li.product a.woocommerce-loop-product__link:focus-visible::after {
	outline: 3px solid var(--bm-roxo);
	outline-offset: 3px;
}

/* Imagem */
body ul.products[class] li.product .bm-card__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / 1;
	border-radius: 16px;
	background: var(--bm-azul-claro);
}
body ul.products[class] li.product .bm-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: cover;
	transition: transform .4s ease;
}
body ul.products[class] li.product:hover .bm-card__media img {
	transform: scale(1.04);
}

/* Selos: coleção à esquerda, estado (promoção/esgotado) à direita */
body ul.products[class] li.product .bm-card__selos {
	position: absolute;
	top: 10px;
	right: 10px;
	left: 10px;
	display: flex;
	align-items: flex-start;
	gap: 6px;
	pointer-events: none;
}
body ul.products[class] li.product .bm-card__selo,
body ul.products[class] li.product .bm-card__estado {
	display: inline-block;
	min-width: 0;
	max-width: 100%;
	box-sizing: border-box;
	padding: 4px 12px;
	overflow: hidden;
	border-radius: var(--bm-raio-pilula);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 12px;   /* mínimo de 12 px no texto dos cards */
	font-weight: 400;
	line-height: 16px;
	color: #fff;
	text-overflow: ellipsis;
	white-space: nowrap;
}
/* Fundo azul do Figma (#40B8D8) com texto escuro: branco dava 2,3:1 (falha o AA); #2A2155 dá 6,3:1 */
body ul.products[class] li.product .bm-card__selo {
	background: var(--bm-azul);
	color: var(--bm-titulo);
}
body ul.products[class] li.product .bm-card__selo--nao-me-chateies {
	background: var(--bm-roxo);
	color: #fff;
}
body ul.products[class] li.product .bm-card__selo--natal {
	background: #23704A;
	color: #fff;
}
body ul.products[class] li.product .bm-card__estado {
	flex: none;
	margin-left: auto;
	background: var(--bm-amarelo);
	color: var(--bm-titulo);
	font-weight: 600;
}
body ul.products[class] li.product .bm-card__estado--esgotado {
	background: rgba(42, 33, 85, .85);
	color: #fff;
}

/* Estrelas (só com avaliações) */
body ul.products[class] li.product .bm-card__estrelas {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 12px;
}
body ul.products[class] li.product .bm-card__estrelas .star-rating {
	float: none;
	margin: 0;
	font-size: 12px;
	color: var(--bm-estrela, #FBBF24);
}
body ul.products[class] li.product .bm-card__estrelas .star-rating::before {
	color: #E5E7EB;
}
body ul.products[class] li.product .bm-card__estrelas .star-rating span::before {
	color: var(--bm-estrela, #FBBF24);
}
body ul.products[class] li.product .bm-card__avaliacoes {
	font-size: 11px;
	line-height: 16px;
	color: var(--bm-card-riscado);
}

/* Título, resumo */
body ul.products[class] li.product .woocommerce-loop-product__title {
	display: -webkit-box;
	margin: 12px 0 0;
	padding: 0;
	overflow: hidden;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 24px;
	color: var(--bm-roxo);
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}
body ul.products[class] li.product .bm-card__estrelas + .woocommerce-loop-product__title {
	margin-top: 4px;
}
body ul.products[class] li.product .bm-card__resumo {
	margin: 4px 0 0;
	overflow: hidden;
	font-family: var(--bm-font-texto), system-ui, sans-serif;
	font-size: 12px;
	font-weight: 500;
	line-height: 16px;
	color: var(--bm-card-cinza);
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Rodapé: preço + botão */
body ul.products[class] li.product .bm-card__rodape {
	/* Preço sempre por cima do botão (antes ia ao lado quando cabia: "8,90 €" ao lado, "10,00 €" por cima)
	 * e rodapé encostado ao fundo do card, para preços e botões ficarem à mesma altura na linha. */
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	gap: 8px;
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--bm-card-linha);
}
body ul.products[class] li.product .price {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-width: 0;
	margin: 0;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 24px;
	color: var(--bm-titulo);
}
body ul.products[class] li.product .price del {
	display: block;
	opacity: 1;
	font-family: var(--bm-font-texto), system-ui, sans-serif;
	font-size: 12px;
	font-weight: 400;
	line-height: 16px;
	color: var(--bm-card-riscado);
	text-decoration: line-through;
}
body ul.products[class] li.product .price ins {
	display: block;
	background: none;
	font-weight: 700;
	text-decoration: none;
}
body ul.products[class] li.product .price .bm-desde {
	font-family: var(--bm-font-texto), system-ui, sans-serif;
	font-size: 11px;
	font-weight: 500;
	line-height: 14px;
	color: var(--bm-card-cinza);
}

body ul.products[class] li.product .button {
	position: relative;
	z-index: 2;
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 36px;
	box-sizing: border-box;
	margin: 0;
	padding: 8px 16px;
	border: 0;
	border-radius: var(--bm-raio-pilula);
	background: var(--bm-roxo);
	box-shadow: none;
	color: #fff;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color .2s ease;
}
body ul.products[class] li.product .button::before {
	content: "";
	flex: none;
	width: 15px;
	height: 15px;
	background-color: currentColor;
	-webkit-mask: var(--bm-ic-seta) center / contain no-repeat;
	mask: var(--bm-ic-seta) center / contain no-repeat;
}
body ul.products[class] li.product .button.product_type_simple.add_to_cart_button::before,
body ul.products[class] li.product .button.bm-btn-carrinho::before {
	-webkit-mask-image: var(--bm-ic-carrinho);
	mask-image: var(--bm-ic-carrinho);
}
body ul.products[class] li.product .button:hover,
body ul.products[class] li.product .button:focus-visible {
	background: var(--bm-roxo-escuro);
	color: #fff;
}
body ul.products[class] li.product .button:focus-visible {
	outline: 3px solid var(--bm-roxo);
	outline-offset: 2px;
}
body ul.products[class] li.product .button.loading {
	opacity: .7;
	padding-right: 34px;
}
body ul.products[class] li.product .button.loading::after {
	top: 50%;
	right: 12px;
	margin-top: -.5em;
	line-height: 1;
}
body ul.products[class] li.product .button.added::after {
	margin-left: 2px;
}
/* "Ver carrinho" que o WooCommerce junta depois de adicionar por AJAX */
body ul.products[class] li.product .added_to_cart {
	position: relative;
	z-index: 2;
	flex-basis: 100%;
	padding: 0;
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 13px;
	font-weight: 600;
	text-align: right;
	color: var(--bm-roxo);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* =========================================================================
 * 10. Paginação (pílulas roxas)
 * ====================================================================== */
body nav.woocommerce-pagination {
	margin: 8px 0 0;
	text-align: center;
}
body nav.woocommerce-pagination ul.page-numbers {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	border: 0;
	white-space: normal;
}
body nav.woocommerce-pagination[class] ul.page-numbers::before,
body nav.woocommerce-pagination[class] ul.page-numbers::after {
	content: none;
	display: none;
}
body nav.woocommerce-pagination ul.page-numbers li {
	display: block;
	float: none;
	margin: 0;
	padding: 0;
	overflow: visible;
	border: 0;
}
body nav.woocommerce-pagination ul.page-numbers li .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	box-sizing: border-box;
	padding: 0 14px;
	border-radius: var(--bm-raio-pilula);
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--bm-borda);
	font-family: var(--bm-font-titulo), system-ui, sans-serif;
	font-size: 15px;
	font-weight: 600;
	line-height: 1;
	color: var(--bm-titulo);
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
body nav.woocommerce-pagination ul.page-numbers li a.page-numbers:hover,
body nav.woocommerce-pagination ul.page-numbers li a.page-numbers:focus-visible {
	background: #fff;
	box-shadow: inset 0 0 0 1px var(--bm-roxo);
	color: var(--bm-roxo);
}
body nav.woocommerce-pagination ul.page-numbers li a.page-numbers:focus-visible {
	outline: 3px solid var(--bm-roxo);
	outline-offset: 2px;
}
body nav.woocommerce-pagination ul.page-numbers li span.page-numbers.current {
	background: var(--bm-roxo);
	box-shadow: none;
	color: #fff;
}
body nav.woocommerce-pagination ul.page-numbers li span.page-numbers.dots {
	min-width: 24px;
	padding: 0;
	background: transparent;
	box-shadow: none;
}

/* =========================================================================
 * 11. Responsivo
 * ====================================================================== */

/* Computador estreito: barra lateral mais estreita, 3 colunas ao lado dela */
@media (min-width: 1025px) and (max-width: 1199px) {
	body.bm-arquivo .bm-loja-corpo {
		grid-template-columns: 232px minmax(0, 1fr);
		gap: 24px;
	}
	body.bm-arquivo .bm-loja-resultados ul.products[class] {
		--bm-colunas: 3;
	}
}

/* Computador: painel "Filtrar" sempre aberto, sem seta */
@media (min-width: 1025px) {
	body.bm-arquivo .bm-filtros__cabecalho {
		padding-bottom: 12px;
		cursor: default;
	}
	body.bm-arquivo .bm-filtros__seta {
		display: none;
	}
}

/* Tablet (≤ 1024): painel de filtros por cima, 3 colunas */
@media (max-width: 1024px) {
	body.bm-arquivo .bm-loja-largura {
		padding-inline: 24px;
	}
	body.bm-arquivo .bm-loja-corpo {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
		padding-top: 20px;
		padding-bottom: 56px;
	}
	body.bm-arquivo .bm-filtros__cabecalho {
		padding: 14px 20px;
	}
	body ul.products.columns-4,
	body ul.products.columns-5,
	body ul.products.columns-6 {
		--bm-colunas: 3;
	}
	body ul.products[class] {
		gap: 20px;
	}
}

/* Telemóvel (≤ 767): 2 colunas, pílulas a deslizar, card compacto */
@media (max-width: 767px) {
	body.bm-arquivo .bm-loja-largura {
		padding-inline: 16px;
	}
	body.bm-arquivo .bm-loja-topo {
		padding: 24px 0 24px;
	}
	body.bm-arquivo .bm-loja-topo__texto {
		font-size: 14px;
	}
	body.bm-arquivo .bm-loja-navegacao {
		padding-top: 16px;
	}
	body.bm-arquivo .bm-chips__lista {
		flex-wrap: nowrap;
		margin-inline: -16px;
		padding: 6px 16px 8px;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		/* o encaixe (e o scroll até à pílula ativa, inc/loja.php) deixa 16 px de margem à esquerda */
		scroll-padding-inline: 16px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	body.bm-arquivo .bm-chips__lista::-webkit-scrollbar {
		display: none;
	}
	body.bm-arquivo .bm-chips__lista > li {
		flex: none;
		scroll-snap-align: start;
	}
	body.bm-arquivo .bm-chip {
		min-height: 44px;  /* alvo de toque de 44 px */
		padding: 10px 16px;
		font-size: 14px;
	}

	/* 16 px nos campos evita o zoom automático do iPhone */
	body.bm-arquivo .bm-preco__caixa input[type="number"],
	body.bm-arquivo .bm-loja-barra select.orderby {
		font-size: 16px;
	}
	body.bm-arquivo .bm-loja-barra {
		gap: 10px 16px;
		margin-bottom: 16px;
	}
	body.bm-arquivo .bm-loja-barra__ordem {
		flex: 1 1 100%;
	}
	body.bm-arquivo .bm-loja-barra .woocommerce-ordering {
		flex: 1 1 auto;
	}
	body.bm-arquivo .bm-loja-barra select.orderby {
		width: 100%;
		min-width: 0;
	}

	body ul.products[class] {
		--bm-colunas: 2;
		gap: 12px;
	}
	body ul.products.columns-1 {
		--bm-colunas: 1;
	}
	body ul.products[class] li.product[class] {
		padding: 10px;
		border-radius: 18px;
	}
	body ul.products[class] li.product:hover {
		transform: none;
	}
	body ul.products[class] li.product .bm-card__media {
		border-radius: 12px;
	}
	/* 6 px de margem e de padding: "Apaixonados por Meow" a 12 px cabe inteiro a 390 (139 de 141 px) */
	body ul.products[class] li.product .bm-card__selos {
		top: 6px;
		right: 6px;
		left: 6px;
		gap: 4px;
	}
	body ul.products[class] li.product .bm-card__selo,
	body ul.products[class] li.product .bm-card__estado {
		padding: 2px 6px;
		font-size: 12px;   /* mínimo de 12 px (era 10) */
		line-height: 16px;
	}
	/* Até 3 linhas no telemóvel: nomes como "Vela aromática – Conjunto Árvores de Natal" cortavam a 2 */
	body ul.products[class] li.product .woocommerce-loop-product__title {
		margin-top: 10px;
		font-size: 14px;
		line-height: 20px;
		-webkit-line-clamp: 3;
		line-clamp: 3;
	}
	/* 12 px (era 11) e até 2 linhas: "130 g · Aroma baunilha e caramelo" e "350 ml · 1 cor disponível"
	 * não cabem numa linha de 153 px */
	body ul.products[class] li.product .bm-card__resumo {
		display: -webkit-box;
		font-size: 12px;
		white-space: normal;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
	}
	body ul.products[class] li.product .bm-card__rodape {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		margin-top: 12px;
		padding-top: 10px;
	}
	body ul.products[class] li.product .price {
		font-size: 16px;
		line-height: 22px;
	}
	body ul.products[class] li.product .button {
		width: 100%;
		min-height: 40px;
		padding: 8px 10px;
		font-size: 13px;
	}
	body ul.products[class] li.product .added_to_cart {
		text-align: center;
	}

	body nav.woocommerce-pagination ul.page-numbers li .page-numbers {
		min-width: 40px;
		height: 40px;
		padding: 0 12px;
	}
	body.bm-arquivo .bm-loja-vazio {
		padding: 36px 18px;
	}
}

/* Pesquisa no telemóvel (como na 404): botão mais estreito e, abaixo de 480 px, sem a lupa no campo
 * (o botão já diz "Pesquisar") para o texto de exemplo caber */
@media (max-width: 767px) {
	body.bm-arquivo .bm-loja-topo__pesquisa {
		margin-top: 16px;
	}
	body.bm-arquivo .bm-404-pesquisa {
		padding-left: 14px;
	}
	body.bm-arquivo button.bm-404-pesquisa__botao {
		padding: 0 16px;
	}
}
@media (max-width: 479px) {
	body.bm-arquivo .bm-404-pesquisa__icone {
		display: none;
	}
}

/* Ecrãs muito estreitos (< 360): 1 coluna */
@media (max-width: 359px) {
	body ul.products[class] {
		--bm-colunas: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	body ul.products[class] li.product:hover,
	body ul.products[class] li.product:hover .bm-card__media img {
		transform: none;
	}
}

/* Espaço mínimo entre o conteúdo do card e o rodapé (o rodapé usa margin-top: auto) */
body ul.products[class] li.product > :has(+ .bm-card__rodape) {
	margin-bottom: 20px;
}
@media (max-width: 767px) {
	body ul.products[class] li.product > :has(+ .bm-card__rodape) {
		margin-bottom: 12px;
	}
}
