/**
 * PLP — cabecera editorial (referencia Gymshark plp-section-header).
 */

.bb-shop-plp-page .bb-shop-main {
	padding-top: 0;
}

/* PLP: 2 columnas en móvil, 3 desde 768px (tablet y escritorio), 4 desde 1440px y 5 desde 2200px
   (con la tienda a todo el ancho, para que la tarjeta no pase de ~500px). Anula anchos legacy de WC. */
.bb-shop-plp-layout__main > ul.products {
	width: 100%;
}

@media (min-width: 768px) {
	.bb-shop-plp-layout__main > ul.products {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--bb-shop-grid-gap);
	}

	.bb-shop-plp-layout__main > ul.products li.product {
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
		float: none !important;
		clear: none !important;
	}
}

@media (min-width: 1440px) {
	.bb-shop-plp-layout__main > ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 2200px) {
	.bb-shop-plp-layout__main > ul.products {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

@media (min-width: 2800px) {
	.bb-shop-plp-layout__main > ul.products {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

/*
 * Fondo a todo el ancho sin 100vw (incluye la barra de scroll: daba 8px de scroll horizontal y
 * movía el texto hacia el borde). Sale del margen lateral de .bb-shop-main con un margen negativo y,
 * en pantallas más anchas que el shell, el fondo y la línea inferior se prolongan con border-image
 * (lo que pinta fuera de la caja no genera scroll).
 */
.bb-shop-plp-header {
	margin-inline: calc(-1 * var(--bb-shop-gutter));
	border-image: linear-gradient(to top, var(--bb-shop-border) 1px, var(--bb-color-surface-1) 1px) fill 0 / 0 / 0 100vmax;
}

.bb-shop-plp-header__inner {
	display: grid;
	gap: var(--bb-shop-space-3);
	align-items: center;
	box-sizing: border-box;
	max-width: var(--bb-shop-shell-max);
	margin-inline: auto;
	padding: var(--bb-shop-space-4) var(--bb-shop-gutter);
}

@media (min-width: 768px) {
	.bb-shop-plp-header__inner {
		max-width: var(--bb-shop-shell-max);
		padding-block: var(--bb-shop-space-5);
	}
}

@media (min-width: 992px) {
	.bb-shop-plp-header__inner {
		grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
		gap: var(--bb-shop-space-5);
		min-height: 296px;
	}

	/* Sin imagen de categoría: una columna, sin el alto reservado para la foto. */
	.bb-shop-plp-header--no-media .bb-shop-plp-header__inner {
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
	}

	.bb-shop-plp-header--no-media .bb-shop-plp-header__description {
		max-width: 60ch;
	}
}

.bb-shop-plp-header__copy {
	min-width: 0;
}

.bb-shop-plp-header__eyebrow {
	margin: 0 0 var(--bb-shop-space-1);
	font-family: var(--bb-font-heading);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.bb-shop-plp-header__eyebrow a {
	color: var(--bb-color-text-secondary);
	text-decoration: none;
}

.bb-shop-plp-header__eyebrow a:hover {
	color: var(--bb-color-action);
}

.bb-shop-plp-page .page-title,
.bb-shop-plp-header__title {
	margin: 0 0 var(--bb-shop-space-2);
	font-family: var(--bb-font-heading);
	font-size: clamp(1.75rem, 3.5vw, 2.75rem);
	font-weight: 700;
	line-height: 1.05;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--bb-color-text-primary);
}

.bb-shop-plp-header__count {
	margin: 0 0 var(--bb-shop-space-2);
	font-family: var(--bb-font-body);
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--bb-color-text-secondary);
}

.bb-shop-plp-header__description {
	font-family: var(--bb-font-body);
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--bb-color-text-secondary);
}

.bb-shop-plp-header__description p {
	margin: 0 0 0.65rem;
}

.bb-shop-plp-header__description p:last-child {
	margin-bottom: 0;
}

/* Recorte a 3 líneas en móvil y tablet (lo activa plp-shop.js solo si el texto no cabe). */
.bb-shop-plp-header__description.is-clamped:not(.is-expanded) {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}

.bb-shop-plp-header__description.is-clamped:not(.is-expanded) > * {
	display: inline;
	margin: 0;
}

.bb-shop-plp-header__description.is-clamped:not(.is-expanded) > *:not(:last-child)::after {
	content: " ";
}

.bb-shop-plp-header__more {
	display: inline-block;
	margin: var(--bb-shop-space-1) 0 0;
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--bb-font-body);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.55;
	color: var(--bb-color-text-primary);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.bb-shop-plp-header__more:hover {
	color: var(--bb-color-action);
}

.bb-shop-plp-header__more[hidden] {
	display: none;
}

.bb-shop-plp-header__media {
	min-width: 0;
	min-height: 200px;
	border-radius: var(--bb-shop-radius-card);
	overflow: hidden;
	background: var(--bb-color-surface-2);
}

@media (min-width: 992px) {
	.bb-shop-plp-header__media {
		min-height: 100%;
		height: 100%;
	}
}

.bb-shop-plp-header__image {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 200px;
	object-fit: cover;
}

@media (min-width: 992px) {
	.bb-shop-plp-header__image {
		min-height: 248px;
	}
}

/* Layout catálogo + barra lateral (desktop) */
.bb-shop-plp-layout {
	display: flex;
	flex-direction: column;
	gap: var(--bb-shop-space-3);
	margin-top: var(--bb-shop-space-4);
}

@media (min-width: 768px) {
	.bb-shop-plp-layout {
		margin-top: var(--bb-shop-space-5);
	}
}

.bb-shop-plp-layout__main {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
}

@media (min-width: 992px) {
	.bb-shop-plp-layout {
		flex-direction: row;
		align-items: flex-start;
		gap: var(--bb-shop-space-4);
	}

	.bb-shop-plp-layout__main {
		flex: 1 1 0;
		min-width: 0;
		width: auto;
	}

	.bb-shop-plp-filters {
		flex: 0 0 301px;
		width: 301px;
		max-width: 301px;
	}

	.bb-shop-plp-filters__sticky {
		display: flow-root;
		position: sticky;
		top: calc(var(--bb-shop-topbar-height) + var(--bb-shop-header-height) + 12px);
		max-height: calc(100vh - var(--bb-shop-topbar-height) - var(--bb-shop-header-height) - 24px);
		overflow: auto;
		padding-right: 4px;
		scrollbar-width: thin;
	}
}

.bb-shop-plp-filters {
	min-width: 0;
}

/* WC legacy: .woocommerce-ordering { float:right } rompe la sidebar y la hoja de orden */
.woocommerce .bb-shop-plp-filters .woocommerce-ordering,
.woocommerce-page .bb-shop-plp-filters .woocommerce-ordering,
.woocommerce .bb-shop-plp-sheet .woocommerce-ordering,
.woocommerce-page .bb-shop-plp-sheet .woocommerce-ordering,
.bb-shop-plp-filters__orderby-nav {
	display: block;
	float: none;
	clear: both;
	width: 100%;
	max-width: none;
	margin: 0;
}

.bb-shop-plp-filters__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--bb-shop-space-2);
	margin-bottom: var(--bb-shop-space-3);
	padding-bottom: var(--bb-shop-space-2);
	border-bottom: 1px solid var(--bb-shop-border);
}

.bb-shop-plp-filters__title {
	margin: 0;
	font-family: var(--bb-font-heading);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1.2;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--bb-color-text-primary);
}

.bb-shop-plp-filters__clear {
	flex-shrink: 0;
	font-family: var(--bb-font-body);
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--bb-color-text-secondary);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.bb-shop-plp-filters__clear:hover {
	color: var(--bb-color-action);
}

.bb-shop-plp-filters__section {
	margin-bottom: var(--bb-shop-space-3);
	padding-bottom: var(--bb-shop-space-3);
	border-bottom: 1px solid var(--bb-shop-border);
}

.bb-shop-plp-filters__section:last-child {
	border-bottom: none;
	padding-bottom: 0;
	margin-bottom: 0;
}

.bb-shop-plp-filters__section-title {
	margin: 0 0 var(--bb-shop-space-2);
	font-family: var(--bb-font-body);
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--bb-color-text-primary);
}

.bb-shop-plp-filters__ordering,
.bb-shop-plp-filters__section--sort {
	width: 100%;
}

.bb-shop-plp-filters__list--sort {
	gap: 0.25rem;
}

.bb-shop-plp-filters__item--sort .bb-shop-plp-filters__check {
	border-radius: 2px;
}

.bb-shop-plp-filters__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0.35rem;
	width: 100%;
}

.bb-shop-plp-filters__item a {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.35rem 0;
	font-family: var(--bb-font-body);
	font-size: 0.8125rem;
	line-height: 1.35;
	color: var(--bb-color-text-primary);
	text-decoration: none;
}

.bb-shop-plp-filters__item a:hover {
	color: var(--bb-color-action);
}

.bb-shop-plp-filters__check {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	border: 1px solid var(--bb-shop-border-strong);
	border-radius: 2px;
	background: var(--bb-color-bg);
	position: relative;
}

.bb-shop-plp-filters__item.is-active .bb-shop-plp-filters__check {
	background: var(--bb-color-text-primary);
	border-color: var(--bb-color-text-primary);
}

.bb-shop-plp-filters__item.is-active .bb-shop-plp-filters__check::after {
	content: '';
	position: absolute;
	left: 5px;
	top: 2px;
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.bb-shop-plp-filters__label {
	flex: 1;
	min-width: 0;
}

.bb-shop-plp-filters__count {
	flex-shrink: 0;
	color: var(--bb-color-text-muted);
	font-size: 0.75rem;
}

/* Talla — rejilla 3×2 (paridad botones PDP) */
.bb-shop-plp-filters__size-grid.bb-shop-pdp__option-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
}

.bb-shop-plp-filters__size-grid .bb-shop-pdp__option-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-width: 0;
	min-height: 2.75rem;
	padding: 0 0.65rem;
	font-family: var(--bb-font-body);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1;
	color: var(--bb-color-text-primary);
	text-decoration: none;
	background: var(--bb-color-bg);
	border: 1px solid var(--bb-shop-border-strong);
	border-radius: 2px;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.bb-shop-plp-filters__size-grid .bb-shop-pdp__option-btn:hover {
	border-color: var(--bb-color-text-primary);
	color: var(--bb-color-text-primary);
}

.bb-shop-plp-filters__size-grid .bb-shop-pdp__option-btn.is-selected {
	border-color: var(--bb-color-text-primary);
	background: var(--bb-color-text-primary);
	color: #fff;
}

/* Solo «Ordenar» (filtros apagados, tema 0.4.167): desplegable encima del listado, a la derecha. */
.bb-shop-plp-sortbar {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.75rem;
	margin: 0 0 var(--bb-shop-space-3);
}

.bb-shop-plp-sortbar__label {
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--bb-color-text-secondary);
}

.bb-shop-plp-sortbar__select {
	appearance: none;
	min-height: 40px;
	padding: 0 2.75rem 0 1rem;
	font-family: var(--bb-font-body);
	font-size: 0.875rem;
	color: var(--bb-color-text-primary);
	border: 1px solid var(--bb-shop-border-strong);
	border-radius: 9999px;
	background-color: var(--bb-color-bg);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%230e0e0e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	cursor: pointer;
}

.bb-shop-plp-sortbar__select:focus-visible {
	outline: 2px solid var(--bb-color-text-primary);
	outline-offset: 2px;
}

.bb-shop-plp-sortbar__submit {
	min-height: 40px;
	padding: 0 1rem;
	border: 1px solid var(--bb-color-text-primary);
	border-radius: 9999px;
	background: var(--bb-color-text-primary);
	color: #fff;
	font-family: var(--bb-font-heading);
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	cursor: pointer;
}

/* Con JS se aplica al cambiar: sin botón. En móvil y tablet con JS, la barra fija ya tiene «Ordenar». */
.bb-shop-has-js .bb-shop-plp-sortbar__submit {
	display: none;
}

@media (max-width: 991.98px) {
	.bb-shop-has-js .bb-shop-plp-sortbar {
		display: none;
	}

	.bb-shop-plp-sortbar {
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	/* Sin «Filtrar», el número de productos va a la derecha. */
	.bb-shop-plp-layout--sort-only .bb-shop-plp-toolbar__count {
		grid-column: 3;
		justify-self: end;
	}
}

/* El orderby suelto sobre el grid ya no se usa en PLP */
.bb-shop-plp-layout__main > .woocommerce-ordering {
	display: none !important;
}

/* ==========================================================================
   Móvil y tablet (< 992px, con JS): barra «Ordenar · N productos · Filtrar», hoja de orden y
   panel de filtros (template-parts/plp-toolbar.php, assets/js/plp-shop.js). Sin JS, los filtros se
   ven en línea encima del listado; desde 992px, barra lateral.
   ========================================================================== */

/* Piezas que solo existen en el panel */
.bb-shop-plp-toolbar,
.bb-shop-plp-sheet,
.bb-shop-plp-filters-dialog__backdrop,
.bb-shop-plp-filters__close,
.bb-shop-plp-filters__footer,
.bb-shop-plp-filters__title-short {
	display: none;
}

@media (min-width: 992px) {
	/* El envoltorio del panel no pinta caja: la barra lateral sigue siendo hija del layout. */
	.bb-shop-plp-filters-dialog,
	.bb-shop-plp-filters-dialog[hidden] {
		display: contents;
	}

	.bb-shop-plp-sheet,
	.bb-shop-plp-sheet:not([hidden]) {
		display: none;
	}
}

@media (max-width: 991.98px) {
	.bb-shop-has-js .bb-shop-plp-header__count {
		display: none;
	}

	.bb-shop-has-js .bb-shop-plp-layout {
		margin-top: 0;
	}

	/* ---------- Barra fija ---------- */

	.bb-shop-has-js .bb-shop-plp-toolbar {
		position: sticky;
		top: calc(var(--bb-shop-header-height) + 1px);
		z-index: 90;
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
		align-items: center;
		min-height: 48px;
		margin-inline: calc(-1 * var(--bb-shop-gutter));
		padding-inline: var(--bb-shop-gutter);
		background: var(--bb-color-bg);
		border-bottom: 1px solid var(--bb-shop-border);
	}

	.bb-shop-plp-toolbar__btn {
		display: inline-flex;
		align-items: center;
		gap: 0.375rem;
		min-height: 44px;
		padding: 0;
		border: 0;
		background: none;
		font-family: var(--bb-font-heading);
		font-size: 0.875rem;
		font-weight: 600;
		letter-spacing: 0.02em;
		text-transform: uppercase;
		color: var(--bb-color-text-primary);
		cursor: pointer;
	}

	.bb-shop-plp-toolbar__btn--sort {
		justify-self: start;
	}

	.bb-shop-plp-toolbar__btn--filter {
		justify-self: end;
	}

	.bb-shop-plp-toolbar__btn:hover {
		color: var(--bb-color-action);
	}

	.bb-shop-plp-toolbar__btn:focus-visible {
		outline: 2px solid var(--bb-color-text-primary);
		outline-offset: 2px;
	}

	.bb-shop-plp-toolbar__badge {
		color: var(--bb-color-action);
	}

	.bb-shop-plp-toolbar__count {
		margin: 0;
		font-family: var(--bb-font-body);
		font-size: 0.8125rem;
		color: var(--bb-color-text-secondary);
		white-space: nowrap;
	}

	/* ---------- Hoja de orden (desde abajo) ---------- */

	.bb-shop-has-js .bb-shop-plp-sheet:not([hidden]) {
		display: block;
	}

	.bb-shop-plp-sheet__panel {
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		max-height: 85vh;
		max-height: 85dvh;
		display: flex;
		flex-direction: column;
		background: var(--bb-color-bg);
		border-radius: 12px 12px 0 0;
		box-shadow: 0 -8px 32px rgba(14, 14, 14, 0.12);
		transform: translateY(100%);
		transition: transform 0.26s cubic-bezier(0.2, 0.7, 0.2, 1);
	}

	.bb-shop-plp-sheet.is-open .bb-shop-plp-sheet__panel {
		transform: translateY(0);
	}

	.bb-shop-plp-sheet__head,
	.bb-shop-has-js .bb-shop-plp-filters__head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--bb-shop-space-2);
		flex-shrink: 0;
		min-height: 56px;
		margin: 0;
		padding: 0 var(--bb-shop-space-1) 0 var(--bb-shop-gutter);
		border-bottom: 1px solid var(--bb-shop-border);
	}

	.bb-shop-plp-sheet__title,
	.bb-shop-has-js .bb-shop-plp-filters__title {
		margin: 0;
		font-family: var(--bb-font-heading);
		font-size: 1rem;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		color: var(--bb-color-text-primary);
	}

	.bb-shop-plp-sheet__body {
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: var(--bb-shop-space-1) var(--bb-shop-gutter) calc(var(--bb-shop-space-3) + env(safe-area-inset-bottom, 0px));
	}

	.bb-shop-plp-sheet .bb-shop-plp-filters__list--sort {
		gap: 0;
	}

	.bb-shop-plp-sheet .bb-shop-plp-filters__item a {
		min-height: 48px;
		padding: 0;
		font-size: 0.9375rem;
	}

	.bb-shop-plp-sheet .bb-shop-plp-filters__check {
		width: 20px;
		height: 20px;
		border-radius: 50%;
	}

	.bb-shop-plp-sheet .bb-shop-plp-filters__item.is-active .bb-shop-plp-filters__check::after {
		left: 5px;
		top: 5px;
		width: 8px;
		height: 8px;
		border: 0;
		border-radius: 50%;
		background: #fff;
		transform: none;
	}

	/* ---------- Panel de filtros ---------- */

	.bb-shop-has-js .bb-shop-plp-filters-dialog {
		position: fixed;
		inset: var(--wp-admin--admin-bar--height, 0px) 0 0 0;
		z-index: 1000;
		visibility: hidden;
		pointer-events: none;
		transition: visibility 0s linear 0.26s;
	}

	.bb-shop-has-js .bb-shop-plp-filters-dialog[hidden] {
		display: none;
	}

	.bb-shop-has-js .bb-shop-plp-filters-dialog.is-open {
		visibility: visible;
		pointer-events: auto;
		transition: none;
	}

	.bb-shop-has-js .bb-shop-plp-filters-dialog__backdrop {
		display: block;
		position: absolute;
		inset: 0;
		background: rgba(14, 14, 14, 0.5);
		opacity: 0;
		transition: opacity 0.24s ease;
	}

	.bb-shop-has-js .bb-shop-plp-filters-dialog.is-open .bb-shop-plp-filters-dialog__backdrop {
		opacity: 1;
	}

	.bb-shop-has-js .bb-shop-plp-filters {
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		background: var(--bb-color-bg);
		box-shadow: -8px 0 32px rgba(14, 14, 14, 0.12);
		transform: translateX(100%);
		transition: transform 0.26s cubic-bezier(0.2, 0.7, 0.2, 1);
	}

	.bb-shop-has-js .bb-shop-plp-filters-dialog.is-open .bb-shop-plp-filters {
		transform: translateX(0);
	}

	.bb-shop-plp-filters-dialog--instant,
	.bb-shop-plp-filters-dialog--instant * {
		transition: none !important;
	}

	.bb-shop-has-js .bb-shop-plp-filters__sticky {
		display: flex;
		flex-direction: column;
		height: 100%;
	}

	.bb-shop-has-js .bb-shop-plp-filters__title-full {
		display: none;
	}

	.bb-shop-has-js .bb-shop-plp-filters__title-short {
		display: inline;
	}

	.bb-shop-has-js .bb-shop-plp-filters__clear {
		margin-left: auto;
		font-size: 0.8125rem;
	}

	.bb-shop-has-js .bb-shop-plp-filters__close {
		display: inline-flex;
		flex-shrink: 0;
	}

	.bb-shop-has-js .bb-shop-plp-filters__body {
		flex: 1;
		min-height: 0;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 0 var(--bb-shop-gutter);
	}

	/* El orden tiene su propia hoja: en el panel solo quedan los filtros. */
	.bb-shop-has-js .bb-shop-plp-filters__section--sort {
		display: none;
	}

	.bb-shop-has-js .bb-shop-plp-filters__section,
	.bb-shop-has-js .bb-shop-plp-filters__section:last-child {
		margin: 0;
		padding: 0;
		border-bottom: 1px solid var(--bb-shop-border);
	}

	.bb-shop-has-js .bb-shop-plp-filters__section-title {
		margin: 0;
	}

	.bb-shop-plp-filters__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--bb-shop-space-2);
		width: 100%;
		min-height: 56px;
		padding: 0;
		border: 0;
		background: none;
		font-family: var(--bb-font-body);
		font-size: 1rem;
		font-weight: 600;
		text-align: left;
		color: var(--bb-color-text-primary);
		cursor: pointer;
	}

	.bb-shop-plp-filters__toggle:focus-visible {
		outline: 2px solid var(--bb-color-text-primary);
		outline-offset: -2px;
	}

	.bb-shop-plp-filters__toggle-icon {
		flex-shrink: 0;
		transition: transform 0.2s ease;
	}

	.bb-shop-plp-filters__toggle[aria-expanded='true'] .bb-shop-plp-filters__toggle-icon {
		transform: rotate(180deg);
	}

	.bb-shop-has-js .bb-shop-plp-filters__section-title + * {
		padding-bottom: var(--bb-shop-space-2);
	}

	.bb-shop-has-js .bb-shop-plp-filters__section-title + [hidden] {
		display: none;
	}

	.bb-shop-has-js .bb-shop-plp-filters__item a {
		min-height: 44px;
		padding: 0;
		font-size: 0.9375rem;
	}

	.bb-shop-has-js .bb-shop-plp-filters__footer {
		display: block;
		flex-shrink: 0;
		padding: var(--bb-shop-space-2) var(--bb-shop-gutter) calc(var(--bb-shop-space-2) + env(safe-area-inset-bottom, 0px));
		border-top: 1px solid var(--bb-shop-border);
		background: var(--bb-color-bg);
	}

	.bb-shop-plp-filters__apply {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 100%;
		min-height: 52px;
		padding: 0 var(--bb-shop-space-3);
		border: 0;
		border-radius: 2px;
		background: var(--bb-color-text-primary);
		font-family: var(--bb-font-heading);
		font-size: 0.9375rem;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		color: #fff;
		cursor: pointer;
	}

	.bb-shop-plp-filters__apply:hover {
		background: var(--bb-color-action);
	}

	.bb-shop-plp-filters__apply:focus-visible {
		outline: 2px solid var(--bb-color-text-primary);
		outline-offset: 2px;
	}
}

/* Tablet: el panel de filtros entra por la derecha con ancho de cajón y la hoja de orden se centra. */
@media (min-width: 768px) and (max-width: 991.98px) {
	.bb-shop-has-js .bb-shop-plp-filters {
		width: 420px;
	}

	.bb-shop-plp-sheet__panel {
		left: 50%;
		right: auto;
		width: 480px;
		margin-left: -240px;
	}
}

/* ---------- Paginación (sin JS o si falla la carga) ---------- */

.bb-shop-plp-page .woocommerce-pagination {
	margin-top: var(--bb-shop-space-5);
}

.bb-shop-plp-page .woocommerce-pagination[hidden] {
	display: none;
}

.bb-shop-plp-page .woocommerce-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--bb-shop-space-1);
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.bb-shop-plp-page .woocommerce-pagination ul.page-numbers li {
	margin: 0;
	border: 0;
}

.bb-shop-plp-page .woocommerce-pagination .page-numbers a,
.bb-shop-plp-page .woocommerce-pagination .page-numbers span.page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 44px;
	height: 44px;
	padding: 0 var(--bb-shop-space-1);
	border: 1px solid var(--bb-color-surface-3);
	border-radius: 2px;
	background: var(--bb-color-bg);
	font-family: var(--bb-font-heading);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1;
	color: var(--bb-color-text-primary);
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.bb-shop-plp-page .woocommerce-pagination .page-numbers a:hover {
	border-color: var(--bb-color-text-primary);
	color: var(--bb-color-action);
}

.bb-shop-plp-page .woocommerce-pagination .page-numbers span.current {
	border-color: var(--bb-color-text-primary);
	background: var(--bb-color-text-primary);
	color: #fff;
}

.bb-shop-plp-page .woocommerce-pagination .page-numbers span.dots {
	min-width: 24px;
	border-color: transparent;
	background: none;
	color: var(--bb-color-text-secondary);
}

/* ---------- Carga bajo demanda ---------- */

.bb-shop-plp-more {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--bb-shop-space-2);
	margin: var(--bb-shop-space-5) auto 0;
	max-width: 320px;
	text-align: center;
}

.bb-shop-plp-more[hidden],
.bb-shop-plp-more [hidden] {
	display: none;
}

.bb-shop-plp-more__status {
	margin: 0;
	font-family: var(--bb-font-body);
	font-size: 0.875rem;
	color: var(--bb-color-text-secondary);
}

.bb-shop-plp-more__bar {
	width: 100%;
	height: 3px;
	border-radius: 2px;
	background: var(--bb-color-surface-3);
	overflow: hidden;
}

.bb-shop-plp-more__bar span {
	display: block;
	height: 100%;
	background: var(--bb-color-text-primary);
	transition: width 0.3s ease;
}

.bb-shop-plp-more__loading {
	display: inline-flex;
	align-items: center;
	gap: var(--bb-shop-space-1);
	margin: 0;
	font-family: var(--bb-font-body);
	font-size: 0.875rem;
	color: var(--bb-color-text-secondary);
}

.bb-shop-plp-more__spinner {
	width: 16px;
	height: 16px;
	border: 2px solid var(--bb-color-surface-3);
	border-top-color: var(--bb-color-text-primary);
	border-radius: 50%;
	animation: bb-shop-plp-spin 0.8s linear infinite;
}

@keyframes bb-shop-plp-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.bb-shop-plp-more__spinner {
		animation-duration: 2s;
	}
}

.bb-shop-plp-more__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 52px;
	margin-top: var(--bb-shop-space-1);
	padding: 0 var(--bb-shop-space-3);
	border: 1px solid var(--bb-color-text-primary);
	border-radius: 2px;
	background: var(--bb-color-bg);
	font-family: var(--bb-font-heading);
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bb-color-text-primary);
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.bb-shop-plp-more__button:hover {
	background: var(--bb-color-text-primary);
	color: #fff;
}

@media (max-width: 479.98px) {
	.bb-shop-plp-page .woocommerce-pagination ul.page-numbers {
		gap: 4px;
	}

	.bb-shop-plp-page .woocommerce-pagination .page-numbers a,
	.bb-shop-plp-page .woocommerce-pagination .page-numbers span.page-numbers {
		min-width: 40px;
		height: 40px;
	}

	.bb-shop-plp-page .woocommerce-pagination .page-numbers span.dots {
		min-width: 16px;
	}
}

/* Ropa por temáticas (tema 0.4.143, inc/plp-ropa.php): bloques con título y la rejilla de la PLP
   (2 columnas en móvil, 3 desde 768px, 4 desde 1440px, 5 desde 2200px), sin barra de filtros. */
.bb-shop-plp-themes {
	display: flex;
	flex-direction: column;
	gap: var(--bb-shop-space-5);
	margin: var(--bb-shop-space-4) 0 var(--bb-shop-space-5);
}

@media (min-width: 768px) {
	.bb-shop-plp-themes {
		margin-top: var(--bb-shop-space-5);
	}
}

.bb-shop-plp-themes__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--bb-shop-space-2);
	margin-bottom: var(--bb-shop-space-3);
}

.bb-shop-plp-themes__title {
	margin: 0;
}

.bb-shop-plp-themes__more {
	flex: none;
	font-size: 0.8125rem;
	font-weight: 500;
	text-decoration: none;
	color: var(--bb-color-text-primary);
}

.bb-shop-plp-themes__more:hover {
	color: var(--bb-color-action);
}

.bb-shop-plp-themes__section > ul.products {
	width: 100%;
	margin: 0;
}

@media (min-width: 768px) {
	.bb-shop-plp-themes__section > ul.products {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: var(--bb-shop-grid-gap);
	}

	.bb-shop-plp-themes__section > ul.products li.product {
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
		float: none !important;
		clear: none !important;
	}
}

@media (min-width: 1440px) {
	.bb-shop-plp-themes__section > ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 2200px) {
	.bb-shop-plp-themes__section > ul.products {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}
