/* Shop + product category archives — contact/about page shell, not Astra’s Woo banner. */

.jw-shop-archive .ast-archive-entry-banner,
.jw-shop-archive .ast-archive-description,
.jw-shop-archive .woocommerce-products-header,
.jw-shop-archive .term-description,
.jw-shop-archive .woocommerce-taxonomy-archive-description,
.jw-shop-archive .woocommerce-breadcrumb,
.jw-shop-archive .ast-breadcrumbs-wrapper,
.jw-shop-archive nav.woocommerce-breadcrumb {
	display: none !important;
}

.jw-shop-archive #primary {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
	flex: 1 1 100%;
}

.jw-shop-archive .site-content > .ast-container,
.jw-shop-archive .site-content .ast-container {
	display: block;
	max-width: 100%;
	width: 100%;
	padding-left: 0;
	padding-right: 0;
	box-sizing: border-box;
}

.jw-shop-archive #main,
.jw-shop-archive .ast-woocommerce-container {
	width: 100%;
	max-width: 100%;
}

.jw-shop-archive .ast-woocommerce-container {
	box-sizing: border-box;
	padding: 0.85rem var(--jw-header-pad-x, clamp(0.75rem, 4vw, 2.25rem)) clamp(2.25rem, 4vw, 3rem);
}

/* Hero — same band as contact / about, tighter so tiles sit higher */
.jw-shop-hero {
	box-sizing: border-box;
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--jw-color-surface, #f8fafc);
	border-bottom: 1px solid rgba(26, 54, 93, 0.08);
}

.jw-shop-hero__inner {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: min(46rem, 100%);
	margin-left: auto;
	margin-right: auto;
	padding: clamp(1.1rem, 2.2vw, 1.5rem) var(--jw-header-pad-x, clamp(0.75rem, 4vw, 2.25rem));
	text-align: center;
}

.jw-shop-hero__kicker {
	margin: 0 0 0.3rem;
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--jw-color-primary-mid, #2c5282);
}

.jw-shop-hero__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.65rem, 3.4vw, 2.35rem);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -0.035em;
	color: var(--jw-color-heading, #0f172a);
	text-wrap: balance;
	font-family: inherit;
}

.jw-shop-hero__text {
	margin: 0;
	max-width: min(42rem, 100%);
	font-size: clamp(0.9375rem, 1vw + 0.75rem, 1.02rem);
	line-height: 1.55;
	font-weight: 400;
	color: var(--jw-color-body, #334155);
}

/* Category-only views: Filter/sort do nothing useful. */
.jw-cat-browse .ast-shop-toolbar-container,
.jw-cat-browse .woocommerce-result-count,
.jw-cat-browse .woocommerce-ordering {
	display: none !important;
}

.jw-shop-archive ul.products li.product .button,
.jw-shop-archive ul.products li.product .b2b-rfq-loop-btn {
	display: none !important;
}

.jw-cat-browse ul.products::before,
.jw-cat-browse ul.products::after,
.jw-shop-archive:not(.jw-cat-browse) ul.products::before,
.jw-shop-archive:not(.jw-cat-browse) ul.products::after {
	content: none !important;
	display: none !important;
}

/*
 * Category browse tiles only — compact, centred, not the product catalog grid.
 */
.jw-cat-browse .ast-woocommerce-container {
	padding-top: 0.75rem;
}

.jw-cat-browse ul.products {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: 1.1rem 1.25rem;
	max-width: 64rem;
	margin: 0 auto;
}

.jw-cat-browse ul.products li.product-category {
	flex: 0 1 16.5rem;
	width: 16.5rem !important;
	max-width: 16.5rem;
	float: none !important;
	margin: 0 !important;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(26, 54, 93, 0.06), 0 10px 28px rgba(26, 54, 93, 0.08);
	overflow: hidden;
	padding: 0;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
	.jw-cat-browse ul.products li.product-category:hover {
		transform: translateY(-4px);
		box-shadow: 0 6px 20px rgba(26, 54, 93, 0.16), 0 16px 40px rgba(26, 54, 93, 0.12);
	}
}

.jw-cat-browse ul.products li.product-category a {
	display: block;
	position: relative;
	text-decoration: none;
}

.jw-cat-browse ul.products li.product-category .astra-shop-thumbnail-wrap {
	margin: 0;
}

.jw-cat-browse ul.products li.product-category img {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	background: #f4f6f8;
	margin: 0;
	opacity: 1;
}

.jw-cat-browse ul.products li.product.product-category.astra-woo-hover-fade:hover img {
	opacity: 1;
}

.jw-cat-browse ul.products li.product.product-category .woocommerce-loop-category__title {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	box-sizing: border-box;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 0.85rem 0.9rem 0.95rem;
	min-height: 5.25rem;
	font-size: 0.875rem;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 0.04em;
	text-transform: uppercase !important;
	color: #fff;
	background-color: rgba(26, 54, 93, 0.82);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.jw-cat-browse .woocommerce ul.products li.product.product-category > a:hover .woocommerce-loop-category__title,
.jw-cat-browse ul.products li.product.product-category:hover .woocommerce-loop-category__title {
	color: #fff;
	background-color: rgba(26, 54, 93, 0.92);
}

.jw-cat-browse ul.products li.product.product-category .woocommerce-loop-category__title .count {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	background: transparent;
	opacity: 1;
	color: rgba(226, 232, 240, 0.95);
}

/*
 * Product catalog — dense grid; thumbs capped so full-bleed columns don’t
 * blow 1024px assets up to ~quarter-viewport tiles.
 */
.jw-shop-archive:not(.jw-cat-browse) ul.products {
	display: grid !important;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1rem 1rem;
	margin: 0;
}

.jw-shop-archive:not(.jw-cat-browse) ul.products li.product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	padding: 0;
	background: transparent;
	box-shadow: none;
	border-radius: 0;
}

.jw-shop-archive:not(.jw-cat-browse) ul.products li.product:not(.product-category) .astra-shop-thumbnail-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 0 0.5rem;
}

.jw-shop-archive:not(.jw-cat-browse) ul.products li.product:not(.product-category) img {
	width: 100%;
	max-width: 9.5rem;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	margin: 0 auto;
	background: var(--jw-color-surface, #f8fafc);
	border-radius: 8px;
}

.jw-shop-archive:not(.jw-cat-browse) ul.products li.product .woocommerce-loop-product__title {
	font-size: 0.9rem;
	font-weight: var(--jw-fw-semibold, 600);
	line-height: 1.35;
	color: var(--jw-color-heading, #0f172a);
}

.jw-shop-archive:not(.jw-cat-browse) ul.products li.product .price {
	font-size: 0.8125rem;
	color: var(--jw-color-heading, #0f172a);
}

/*
 * Mixed category archives (subcategories + products): centre larger category
 * tiles as a nav strip, then keep products on a separate dense grid row.
 */
.jw-cat-mixed ul.products {
	display: flex !important;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: 1.1rem 1.25rem;
}

.jw-cat-mixed ul.products > li.jw-subcat-break {
	flex: 0 0 100%;
	width: 100% !important;
	max-width: 100%;
	height: 0;
	margin: 0 0 0.35rem !important;
	padding: 0 !important;
	border: 0;
	overflow: hidden;
	list-style: none;
	pointer-events: none;
}

.jw-cat-mixed ul.products li.product.product-category {
	flex: 0 1 16.5rem;
	width: 16.5rem !important;
	max-width: 16.5rem;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(26, 54, 93, 0.06), 0 10px 28px rgba(26, 54, 93, 0.08);
	overflow: hidden;
	padding: 0;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
	.jw-cat-mixed ul.products li.product.product-category:hover {
		transform: translateY(-4px);
		box-shadow: 0 6px 20px rgba(26, 54, 93, 0.16), 0 16px 40px rgba(26, 54, 93, 0.12);
	}
}

.jw-cat-mixed ul.products li.product.product-category a {
	display: block;
	position: relative;
	text-decoration: none;
}

.jw-cat-mixed ul.products li.product.product-category img {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	background: #f4f6f8;
	margin: 0;
	border-radius: 0;
	opacity: 1;
}

.jw-cat-mixed ul.products li.product.product-category .woocommerce-loop-category__title {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	box-sizing: border-box;
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 0.85rem 0.9rem 0.95rem;
	min-height: 5.25rem;
	font-size: 0.875rem;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 0.04em;
	text-transform: uppercase !important;
	color: #fff;
	background-color: rgba(26, 54, 93, 0.82);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.jw-cat-mixed ul.products li.product.product-category > a:hover .woocommerce-loop-category__title {
	color: #fff;
	background-color: rgba(26, 54, 93, 0.92);
}

.jw-cat-mixed ul.products li.product.product-category .woocommerce-loop-category__title .count {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	background: transparent;
	opacity: 1;
	color: rgba(226, 232, 240, 0.95);
}

.jw-cat-mixed ul.products li.product:not(.product-category):not(.jw-subcat-break) {
	flex: 0 0 calc((100% - 4 * 1rem) / 5);
	width: calc((100% - 4 * 1rem) / 5) !important;
	max-width: calc((100% - 4 * 1rem) / 5);
}

.jw-cat-mixed ul.products li.product:not(.product-category):not(.jw-subcat-break) .astra-shop-thumbnail-wrap {
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 0 0.5rem;
}

.jw-cat-mixed ul.products li.product:not(.product-category):not(.jw-subcat-break) img {
	width: 100%;
	max-width: 9.5rem;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	margin: 0 auto;
	background: var(--jw-color-surface, #f8fafc);
	border-radius: 8px;
}

@media (max-width: 1100px) {
	.jw-shop-archive:not(.jw-cat-browse):not(.jw-cat-mixed) ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.jw-cat-mixed ul.products li.product:not(.product-category):not(.jw-subcat-break) {
		flex-basis: calc((100% - 3 * 1rem) / 4);
		width: calc((100% - 3 * 1rem) / 4) !important;
		max-width: calc((100% - 3 * 1rem) / 4);
	}
}

@media (max-width: 780px) {
	.jw-shop-archive:not(.jw-cat-browse):not(.jw-cat-mixed) ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.jw-cat-mixed ul.products li.product:not(.product-category):not(.jw-subcat-break) {
		flex-basis: calc((100% - 2 * 1rem) / 3);
		width: calc((100% - 2 * 1rem) / 3) !important;
		max-width: calc((100% - 2 * 1rem) / 3);
	}
}

@media (max-width: 640px) {
	.jw-shop-archive:not(.jw-cat-browse):not(.jw-cat-mixed) ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.jw-cat-browse ul.products li.product-category,
	.jw-cat-mixed ul.products li.product.product-category {
		flex-basis: calc((100% - 1.1rem) / 2);
		width: calc((100% - 1.1rem) / 2) !important;
		max-width: calc((100% - 1.1rem) / 2);
	}

	.jw-cat-mixed ul.products li.product:not(.product-category):not(.jw-subcat-break) {
		flex-basis: calc((100% - 1rem) / 2);
		width: calc((100% - 1rem) / 2) !important;
		max-width: calc((100% - 1rem) / 2);
	}

	.jw-shop-archive:not(.jw-cat-browse) ul.products li.product:not(.product-category) img,
	.jw-cat-mixed ul.products li.product:not(.product-category):not(.jw-subcat-break) img {
		max-width: 7.5rem;
	}
}

.jw-shop-archive .ast-shop-toolbar-container {
	margin-bottom: 1rem;
}

.astra-off-canvas-sidebar .ast-filter-wrap .widget {
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--jw-color-border, #e5e7eb);
}

.astra-off-canvas-sidebar .ast-filter-wrap .widget:last-child {
	border-bottom: 0;
	margin-bottom: 0;
	padding-bottom: 0;
}

.astra-off-canvas-sidebar .widget .widget-title {
	font-size: 0.9375rem;
	font-weight: var(--jw-fw-display, 600);
	margin-bottom: 0.65rem;
}
