/* Compact, even WooCommerce cards without clipping full product titles. */
body.jettools-theme ul.products {
	display: grid;
	gap: clamp(16px, 2vw, 24px);
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.jettools-theme ul.products::before,
body.jettools-theme ul.products::after {
	display: none;
}

body.jettools-theme ul.products > li.product {
	float: none;
	margin: 0;
	min-width: 0;
	width: auto;
}

body.jettools-theme ul.products li.product:not(.product-category) {
	background: #fff;
	border: 1px solid #cfd7dd;
	border-top: 4px solid #c8102e;
	border-radius: 6px;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	padding: 14px;
}

body.jettools-theme ul.products li.product:not(.product-category) > a.woocommerce-LoopProduct-link {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

body.jettools-theme ul.products li.product:not(.product-category) a img,
body.jettools-theme.single-product .woocommerce-product-gallery img {
	background: #fff !important;
	height: auto;
	max-height: 100%;
	mix-blend-mode: normal;
	object-fit: contain;
	width: 100%;
}

body.jettools-theme ul.products li.product:not(.product-category) a img {
	aspect-ratio: 4 / 3;
	border: 1px solid #e4e8eb;
	margin: 0 0 16px;
	padding: 12px;
}

body.jettools-theme.single-product .woocommerce-product-gallery__wrapper img {
	aspect-ratio: 4 / 3;
	border: 1px solid #e1e6ea;
	box-sizing: border-box;
	padding: clamp(10px, 2vw, 22px);
}

body.jettools-theme.single-product .flex-control-thumbs img {
	aspect-ratio: 1;
	object-fit: contain;
	padding: 5px;
}

body.jettools-theme ul.products li.product:not(.product-category) .woocommerce-loop-product__title {
	color: #17283a;
	display: block;
	font-size: clamp(15px, 1.25vw, 18px);
	line-height: 1.35;
	margin: 0;
	min-height: 4.05em;
	overflow: visible;
	overflow-wrap: anywhere;
	padding: 0 0 12px;
	white-space: normal;
	-webkit-box-orient: initial;
	-webkit-line-clamp: unset;
}

body.jettools-theme ul.products li.product:not(.product-category) .price {
	margin-top: auto;
}

body.jettools-theme ul.products li.product:not(.product-category) .button {
	align-items: center;
	display: inline-flex;
	justify-content: center;
	margin-top: 12px;
	min-height: 44px;
	width: 100%;
}

/* Long technical and safety fields stay complete but no longer dominate the page. */
.jettools-product-details > section.jtcr-is-collapsible {
	position: relative;
}

.jtcr-collapsible-body {
	position: relative;
}

.jtcr-is-collapsible:not(.jtcr-is-expanded) .jtcr-collapsible-body {
	max-height: 430px;
	overflow: hidden;
}

.jtcr-is-collapsible:not(.jtcr-is-expanded) .jtcr-collapsible-body::after {
	background: linear-gradient(180deg, rgba(255,255,255,0), #fff 86%);
	bottom: 0;
	content: "";
	height: 96px;
	left: 0;
	pointer-events: none;
	position: absolute;
	right: 0;
}

.jtcr-section-toggle {
	align-items: center;
	background: #14263a;
	border: 0;
	border-radius: 4px;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	font-weight: 800;
	justify-content: center;
	margin-top: 18px;
	min-height: 44px;
	padding: 10px 18px;
}

.jtcr-section-toggle:hover,
.jtcr-section-toggle:focus-visible {
	background: #c8102e;
}

@media (max-width: 1180px) {
	body.jettools-theme ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	body.jettools-theme ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 520px) {
	body.jettools-theme ul.products {
		grid-template-columns: 1fr;
	}

	body.jettools-theme ul.products li.product:not(.product-category) .woocommerce-loop-product__title {
		min-height: 0;
	}
}

@media print {
	.jtcr-is-collapsible .jtcr-collapsible-body {
		max-height: none;
		overflow: visible;
	}

	.jtcr-is-collapsible .jtcr-collapsible-body::after,
	.jtcr-section-toggle {
		display: none;
	}
}
