.woocommerce .site-main,
.woocommerce-page .site-main {
	margin-inline: auto;
	max-width: var(--bf-max-width);
	padding: var(--bf-space-10) var(--bf-page-gutter);
}

.woocommerce ul.products {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.woocommerce ul.products li.product {
	margin: 0 !important;
	width: auto !important;
}

.woocommerce ul.products li.product a img {
	margin-bottom: 1rem;
}

.woocommerce ul.products li.product .price {
	color: var(--bf-color-ink);
	font-weight: 700;
}

.woocommerce span.onsale {
	background: var(--bf-color-badge);
	border-radius: 0;
	color: #fff;
	line-height: 1;
	min-height: auto;
	padding: .6rem;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	background: var(--bf-color-brand);
	border-radius: 0;
	color: #000;
	font-weight: 800;
	text-transform: uppercase;
}

.single-product div.product {
	display: block;
}

.single-product div.product .summary {
	margin-top: 2rem;
	width: auto;
}

.woocommerce div.product .woocommerce-tabs {
	margin-top: 3rem;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
	border-bottom: 2px solid #000;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
	background: transparent;
	border: 0;
	border-radius: 0;
}

.woocommerce div.product .related {
	margin-top: 3rem;
}

@media (min-width: 768px) {
	.woocommerce ul.products {
		gap: 2rem;
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.single-product div.product {
		display: grid;
		gap: 3rem;
		grid-template-columns: 55% 45%;
	}

	.single-product div.product .summary {
		margin-top: 0;
	}

	.woocommerce div.product .woocommerce-tabs,
	.woocommerce div.product .related {
		grid-column: 1 / -1;
	}
}

/* ===========================================================================
   WooCommerce archives (shop + product-category) — .bf-woo-archive scope.
   Archive-only rules are prefixed `.woocommerce .bf-woo-archive` so they win
   against Woo core and the generic rules above by specificity alone.
   Mobile-first: base → 768px (3 cols) → 1024px (4 cols).
   =========================================================================== */

/* Breadcrumbs: nav.bf-breadcrumbs wrapping the WC breadcrumb. */
.woocommerce .bf-woo-archive nav.bf-breadcrumbs {
	color: var(--bf-color-body);
	font-size: .8125rem;
	line-height: 1.6;
	margin: 0 0 var(--bf-space-6);
	overflow-wrap: anywhere;
}

.woocommerce .bf-woo-archive nav.bf-breadcrumbs a {
	color: var(--bf-color-body);
	text-decoration: none;
}

.woocommerce .bf-woo-archive nav.bf-breadcrumbs a:hover {
	text-decoration: underline;
}

/* Archive header: page title + term description. The H1 keeps the brand
   heading treatment; card titles below deliberately do not. */
.woocommerce .bf-woo-archive .bf-woo-archive__header {
	margin: 0 0 var(--bf-space-6);
}

.woocommerce .bf-woo-archive .bf-woo-archive__header h1 {
	color: var(--bf-color-ink);
	font-size: var(--bf-font-h2);
	font-style: var(--bf-font-style-heading);
	font-weight: var(--bf-font-weight-heading);
	letter-spacing: var(--bf-ls-tight);
	line-height: 1.05;
	margin: 0;
	overflow-wrap: anywhere;
	text-transform: var(--bf-text-transform-heading);
}

.woocommerce .bf-woo-archive .bf-woo-archive__header .term-description {
	color: var(--bf-color-body);
	margin-top: var(--bf-space-3);
	max-width: 65ch;
}

/* Toolbar: result count + catalog ordering (WC before_shop_loop output).
   They are sibling elements without a wrapper, so the desktop row uses
   float + clear (see the 768px block below) instead of flexbox. */
.woocommerce .bf-woo-archive .woocommerce-result-count {
	color: var(--bf-color-body);
	font-size: .875rem;
	margin: 0 0 var(--bf-space-3);
}

.woocommerce .bf-woo-archive .woocommerce-ordering {
	margin: 0 0 var(--bf-space-6);
}

.woocommerce .bf-woo-archive .woocommerce-ordering form {
	margin: 0;
}

.woocommerce .bf-woo-archive .woocommerce-ordering select {
	background: var(--bf-color-paper);
	border: 1px solid var(--bf-color-body);
	border-radius: var(--bf-radius);
	color: var(--bf-color-ink);
	display: block;
	font-family: inherit;
	font-size: .875rem;
	line-height: 1.4;
	min-height: 44px;
	padding: var(--bf-space-2) var(--bf-space-3);
	width: 100%;
}

/* Product grid: 2 cols base, 3 at 768px, 4 at 1024px. */
.woocommerce .bf-woo-archive ul.products {
	display: grid;
	gap: var(--bf-space-4) var(--bf-space-3);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	list-style: none;
	margin: 0 0 var(--bf-space-8);
	padding: 0;
}

/* Cards (products and subcategory tiles): whole card is the link. */
.woocommerce .bf-woo-archive ul.products li.product,
.woocommerce .bf-woo-archive ul.products li.product-category {
	background: var(--bf-color-paper);
	border: var(--bf-border-thin);
	min-width: 0;
	padding: var(--bf-space-3);
	position: relative;
	transition: border-color var(--bf-duration-fast) var(--bf-easing-default), transform var(--bf-duration-fast) var(--bf-easing-default);
}

.woocommerce .bf-woo-archive ul.products li.product a.woocommerce-LoopProduct-link,
.woocommerce .bf-woo-archive ul.products li.product-category a {
	color: inherit;
	display: block;
	text-decoration: none;
}

/* Square product photos are contained, never cropped. */
.woocommerce .bf-woo-archive ul.products li.product img,
.woocommerce .bf-woo-archive ul.products li.product-category img {
	aspect-ratio: 1 / 1;
	background: var(--bf-color-paper);
	height: auto;
	margin: 0;
	object-fit: contain;
	width: 100%;
}

/* Subtle lift only for hover-capable pointers and motion-allowed users. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.woocommerce .bf-woo-archive ul.products li.product:hover,
	.woocommerce .bf-woo-archive ul.products li.product-category:hover {
		border-color: var(--bf-color-ink);
		transform: translateY(-2px);
	}
}

.woocommerce .bf-woo-archive ul.products li.product:focus-within,
.woocommerce .bf-woo-archive ul.products li.product-category:focus-within {
	border-color: var(--bf-color-ink);
}

/* Card titles: plain sentence text — explicitly overrides the global
   italic/uppercase brand heading treatment — clamped to 2 lines with a
   2-line min-height so card heights stay consistent. */
.woocommerce .bf-woo-archive .woocommerce-loop-product__title,
.woocommerce .bf-woo-archive .woocommerce-loop-category__title {
	-webkit-box-orient: vertical;
	color: var(--bf-color-ink);
	display: -webkit-box;
	font-family: var(--bf-font-primary);
	font-size: 1rem;
	font-style: normal;
	font-weight: var(--bf-font-weight-bold);
	-webkit-line-clamp: 2;
	line-height: 1.35;
	margin: var(--bf-space-3) 0 var(--bf-space-2);
	min-height: 2.7em;
	overflow-wrap: anywhere;
	text-transform: none;
}

.woocommerce .bf-woo-archive .woocommerce-loop-category__title .count {
	background: transparent;
	color: var(--bf-color-body);
	font-weight: 400;
}

/* Prices: ink sale/regular, struck regular dimmer, "IVA incluido" suffix
   smaller and lighter. */
.woocommerce .bf-woo-archive ul.products .price {
	color: var(--bf-color-ink);
	display: block;
	font-weight: var(--bf-font-weight-bold);
	margin: 0;
	overflow-wrap: anywhere;
}

.woocommerce .bf-woo-archive ul.products .price del {
	color: var(--bf-color-body);
	font-size: .85em;
	font-weight: 400;
	opacity: .7;
}

.woocommerce .bf-woo-archive ul.products .price ins {
	background: transparent;
	color: var(--bf-color-ink);
	font-weight: var(--bf-font-weight-bold);
	text-decoration: none;
}

.woocommerce .bf-woo-archive ul.products .price .woocommerce-price-suffix {
	color: var(--bf-color-body);
	font-size: .75em;
	font-weight: 400;
	line-height: 1.4;
}

/* Sale badge (real "-NN%" from Task 1 filter): absolute card corner.
   The .onsale--oos variant is styled for a future real-stock label; the
   neutral background is ready even while no PHP renders it yet. */
.woocommerce .bf-woo-archive ul.products span.onsale {
	background: var(--bf-color-badge);
	color: var(--bf-color-paper);
	font-size: .8125rem;
	font-weight: 800;
	left: var(--bf-space-2);
	line-height: 1;
	min-height: 0;
	padding: var(--bf-space-1) var(--bf-space-2);
	position: absolute;
	top: var(--bf-space-2);
	z-index: 1;
}

.woocommerce .bf-woo-archive ul.products span.onsale--oos {
	background: var(--bf-color-body);
}

/* Out of stock (bf-out-of-stock class from real WC stock data): muted image. */
.woocommerce .bf-woo-archive ul.products li.bf-out-of-stock img {
	filter: grayscale(30%);
	opacity: .6;
}

/* Notices and the empty state: boxed, centered message on the band color. */
.woocommerce .bf-woo-archive .woocommerce-error,
.woocommerce .bf-woo-archive .woocommerce-info,
.woocommerce .bf-woo-archive .woocommerce-message {
	background: var(--bf-color-band);
	border-top: var(--bf-border-strong);
	color: var(--bf-color-ink);
	list-style: none;
	margin: 0 0 var(--bf-space-5);
	padding: var(--bf-space-4) var(--bf-space-5);
	text-align: center;
}

.woocommerce .bf-woo-archive .woocommerce-error::before,
.woocommerce .bf-woo-archive .woocommerce-info::before,
.woocommerce .bf-woo-archive .woocommerce-message::before {
	display: none;
}

/* Pagination: centered wrapped row, 44px tap targets, brand current page. */
.woocommerce .bf-woo-archive nav.woocommerce-pagination {
	clear: both;
	width: 100%;
}

.woocommerce .bf-woo-archive nav.woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--bf-space-1);
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.woocommerce .bf-woo-archive nav.woocommerce-pagination ul li {
	border: 0;
	margin: 0;
}

.woocommerce .bf-woo-archive nav.woocommerce-pagination .page-numbers {
	align-items: center;
	border: 1px solid var(--bf-color-body);
	color: var(--bf-color-ink);
	display: inline-flex;
	font-size: .875rem;
	justify-content: center;
	min-height: 44px;
	min-width: 44px;
	padding: 0 var(--bf-space-3);
	text-decoration: none;
}

.woocommerce .bf-woo-archive nav.woocommerce-pagination a.page-numbers:hover {
	background: var(--bf-color-band);
	border-color: var(--bf-color-ink);
}

.woocommerce .bf-woo-archive nav.woocommerce-pagination .page-numbers.current {
	background: var(--bf-color-brand);
	border-color: var(--bf-color-ink);
	color: var(--bf-color-ink);
	font-weight: var(--bf-font-weight-bold);
}

.woocommerce .bf-woo-archive nav.woocommerce-pagination .page-numbers.dots {
	background: transparent;
	border-color: transparent;
	color: var(--bf-color-body);
}

/* Keyboard focus on every interactive element in the archive. */
.woocommerce .bf-woo-archive a:focus-visible,
.woocommerce .bf-woo-archive select:focus-visible {
	outline: var(--bf-focus-outline);
	outline-offset: var(--bf-focus-offset);
}

@media (min-width: 768px) {
	.woocommerce .bf-woo-archive ul.products {
		clear: both;
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.woocommerce .bf-woo-archive .woocommerce-result-count {
		align-items: center;
		display: flex;
		float: left;
		margin: 0;
		min-height: 44px;
		padding-inline-end: var(--bf-space-2);
	}

	.woocommerce .bf-woo-archive .woocommerce-ordering {
		float: right;
		margin: 0;
	}

	.woocommerce .bf-woo-archive .woocommerce-ordering select {
		width: auto;
	}
}

@media (min-width: 1024px) {
	.woocommerce .bf-woo-archive ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
