/* REBUILD-0091 Product Category 90 -> 95 bounded composition pass.
 * Every selector is Category-owned so the shared archive, Shop lane and
 * Footer/Utility contracts remain unchanged. */

body.tax-product_cat .dscr-category {
	background:
		linear-gradient(180deg, rgb(255 255 255 / 58%), transparent 14rem),
		var(--wp--preset--color--surface-soft);
}

body.tax-product_cat .dscr-category > .dscr-shop__title {
	margin: 0 0 var(--wp--preset--spacing--10) !important;
	color: var(--wp--preset--color--contrast);
	font-size: clamp(1.25rem, 3.2vw, 2.25rem);
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
}

body.tax-product_cat .dscr-category__description {
	max-width: 48rem;
	margin: 0 auto var(--wp--preset--spacing--30) !important;
	color: var(--wp--preset--color--muted);
	font-size: clamp(0.8125rem, 1.5vw, 1rem);
	line-height: 1.55;
	text-align: center;
}

body.tax-product_cat .dscr-category__description > :first-child {
	margin-top: 0;
}

body.tax-product_cat .dscr-category__description > :last-child {
	margin-bottom: 0;
}

body.tax-product_cat .dscr-category .dscr-shop-promo {
	width: 100%;
	min-width: 0;
	border-color: color-mix(in srgb, var(--wp--preset--color--border) 82%, transparent);
	border-radius: 0.5rem;
	box-shadow: 0 0.75rem 2rem rgb(23 35 61 / 5%);
}

body.tax-product_cat .dscr-category .dscr-shop-promo__copy {
	min-width: 0;
	flex: 1 1 auto;
}

body.tax-product_cat .dscr-category .dscr-shop-promo__actions,
body.tax-product_cat .dscr-category .dscr-shop-promo__trigger,
body.tax-product_cat .dscr-category .dscr-shop-promo__trigger .wp-element-button {
	flex: 0 0 auto;
}

body.tax-product_cat .dscr-category .dscr-shop-promo__trigger .wp-element-button {
	white-space: nowrap;
}

body.tax-product_cat .dscr-category .dscr-shop__listing {
	overflow: hidden;
	border-radius: clamp(1.25rem, 2vw, 1.75rem);
}

body.tax-product_cat .dscr-category .dscr-shop__controls {
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--border) 78%, transparent);
	border-radius: 0.625rem;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 72%);
}

body.tax-product_cat .dscr-category .dscr-shop__products .wc-block-product-template,
body.tax-product_cat .dscr-category .dscr-shop__products .wp-block-post-template {
	align-items: stretch;
}

body.tax-product_cat .dscr-category .dscr-shop__products .wc-block-product,
body.tax-product_cat .dscr-category .dscr-shop__products .wp-block-post {
	height: 100%;
	padding-bottom: 0.25rem;
	box-sizing: border-box;
}

body.tax-product_cat .dscr-category .dscr-shop__products .wp-block-woocommerce-product-image,
body.tax-product_cat .dscr-category .dscr-shop__products .wp-block-post-featured-image {
	box-shadow: inset 0 0 0 1px rgb(40 40 40 / 4%);
}

body.tax-product_cat .dscr-category .dscr-shop__pagination-wrap .wp-block-query-pagination {
	width: max-content;
	max-width: 100%;
	margin: var(--wp--preset--spacing--40) auto 0 !important;
	padding: 0.25rem;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--border) 82%, transparent);
	border-radius: 999px;
	background: var(--wp--preset--color--surface-soft);
	box-sizing: border-box;
}

body.tax-product_cat .dscr-category .dscr-shop__pagination-wrap .page-numbers,
body.tax-product_cat .dscr-category .dscr-shop__pagination-wrap .wp-block-query-pagination > a {
	border-radius: 999px;
}

body.tax-product_cat .dscr-category .dscr-shop__products .wp-block-woocommerce-product-collection-no-results {
	width: 100%;
	max-width: none !important;
	min-height: 12rem;
	margin-inline: 0 !important;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 72%);
}

@media (max-width: 1023px) {
	body.tax-product_cat {
		height: 100svh;
		min-height: 100svh;
		padding-bottom: 0 !important;
		overflow: hidden;
	}

	body.tax-product_cat .wp-site-blocks {
		display: grid;
		grid-template-rows: auto minmax(0, 1fr) var(--wp--custom--footer--utility-reserve);
		height: 100svh;
		min-height: 0;
		overflow: hidden;
	}

	body.tax-product_cat .dscr-category {
		--dscr-category-utility-clearance: calc(var(--wp--custom--footer--utility-reserve) + var(--wp--preset--spacing--30));

		width: min(100%, var(--wp--custom--header--compact-max-width));
		height: auto;
		min-height: 0;
		padding-bottom: var(--dscr-category-utility-clearance);
		box-sizing: border-box;
		overflow-x: hidden;
		overflow-y: auto;
		overscroll-behavior-y: contain;
		scroll-padding-block: var(--wp--preset--spacing--30);
	}

	body.tax-product_cat .dscr-category > .dscr-shop__title {
		font-size: clamp(1.125rem, 4.8vw, 1.375rem);
		line-height: 1.25;
	}

	body.tax-product_cat .dscr-category__description {
		max-width: 38rem;
		margin-bottom: var(--wp--preset--spacing--20) !important;
		font-size: 0.8125rem;
	}

	body.tax-product_cat .dscr-category .dscr-shop__products .wc-block-product,
	body.tax-product_cat .dscr-category .dscr-shop__products .wp-block-post,
	body.tax-product_cat .dscr-category .dscr-shop__pagination-wrap,
	body.tax-product_cat .dscr-category__back {
		scroll-margin-block-end: var(--dscr-category-utility-clearance);
	}

	body.tax-product_cat .dscr-footer__utility {
		position: static;
		inset: auto;
		width: min(100%, var(--wp--custom--footer--utility-compact-max));
		height: var(--wp--custom--footer--utility-reserve);
		min-height: var(--wp--custom--footer--utility-reserve);
		margin-inline: auto !important;
		transform: none;
		border-top: 1px solid rgb(40 40 40 / 10%);
		box-shadow: 0 -0.5rem 1.5rem rgb(23 35 61 / 8%);
	}

	body.tax-product_cat footer.wp-block-template-part,
	body.tax-product_cat footer.wp-block-template-part > .dscr-footer {
		height: var(--wp--custom--footer--utility-reserve);
		min-height: var(--wp--custom--footer--utility-reserve);
		margin: 0 !important;
	}

	body.tax-product_cat footer.wp-block-template-part {
		position: relative;
		background: var(--wp--preset--color--base);
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	body.tax-product_cat .dscr-category > .dscr-shop__title {
		font-size: 1.375rem;
		line-height: 1.25;
	}

	body.tax-product_cat .dscr-category__description {
		font-size: 0.875rem;
	}

	body.tax-product_cat .dscr-category .dscr-shop__products .wc-block-product-template,
	body.tax-product_cat .dscr-category .dscr-shop__products .wp-block-post-template {
		row-gap: var(--wp--preset--spacing--30);
	}
}

@media (min-width: 1024px) {
	body.tax-product_cat .dscr-category .dscr-shop__products .wc-block-product,
	body.tax-product_cat .dscr-category .dscr-shop__products .wp-block-post {
		min-height: 0;
	}
}
