/* Results take over the page below the header. Modals stay above this (Bootstrap 1055). */
html.kd-is-open,
html.kd-is-open body {
	overflow: hidden;
}

.kd-is {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1040;
	overflow-y: auto;
	background: #fff;
	padding: 0 max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px));
	border-top: 1px solid #d9dde1;
}

/* An author display rule beats the browser's [hidden], so this one is load-bearing. */
.kd-is[hidden],
.kd-is__more[hidden],
.kd-is__x[hidden] {
	display: none !important;
}

.kd-is__bar {
	position: sticky;
	top: 0;
	z-index: 1;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	max-width: 1320px;
	margin: 0 auto;
	padding: 12px 0;
	background: #fff;
}

.kd-is__count {
	margin: 0;
	font-weight: 600;
}

.kd-is__close {
	flex: none;
	padding: 5px 14px;
	color: #1b8fe0;
	background: #fff;
	border: 1px solid #1b8fe0;
	border-radius: 16px;
	cursor: pointer;
}

.kd-is__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 18px;
	max-width: 1320px;
	margin: 0 auto;
}

.kd-is__card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding-bottom: 12px;
	text-align: center;
	border: 1px solid #e4e6e8;
}

.kd-is__link,
.kd-is__link:hover {
	display: block;
	color: inherit;
	text-decoration: none;
}

.kd-is__img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: #e4e6e8;
}

.kd-is__title {
	display: block;
	padding: 10px 10px 2px;
	font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.kd-is__type,
.kd-is__ref {
	margin: 2px 10px 0;
	font-size: 14px;
}

.kd-is__price {
	margin: 6px 10px 8px;
}

.kd-is__card .request-a-quote-btn {
	margin: auto 12px 0;
}

/* Add to Cart is a quiet link here too, matching the category cards. */
.kd-is__card .kd-is__cart,
.kd-is__card .kd-is__cart:hover {
	align-self: center;
	margin-top: 6px;
	padding: 2px 4px;
	color: #1b8fe0;
	background: none;
	border: 0;
	box-shadow: none;
	font-size: 13px;
	font-weight: 600;
	text-transform: none;
	text-decoration: underline;
}

.kd-is__more {
	display: block;
	margin: 22px auto 0;
	padding: 8px 22px;
	color: #fff;
	background: #1b8fe0;
	border: 0;
	border-radius: 18px;
	cursor: pointer;
}

/* Two to a row on phones, matching the category proposal. */
@media (max-width: 575px) {
	.kd-is__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 10px;
	}

	.kd-is__title {
		padding: 8px 6px 2px;
		font-size: 14px;
	}

	.kd-is__type,
	.kd-is__ref {
		margin-left: 6px;
		margin-right: 6px;
		font-size: 12.5px;
	}
}

/* The × inside the search box while results are open, modelled on
   cncmachines.com: its own slot at the right end, a divider line, a thin-line
   ×. Above the panel (1040), below Bootstrap modals (1055). Height and position
   are set in place() from the box itself. */
.kd-is__x {
	position: fixed;
	z-index: 1041;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	margin: 0;
	padding: 0;
	color: #424242;
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}

.kd-is__x::before {
	content: "";
	position: absolute;
	top: 8px;
	bottom: 8px;
	left: 0;
	border-left: 1px solid rgba(0, 0, 0, 0.35);
}

.kd-is__x svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
}

.kd-is__x:hover,
.kd-is__x:focus-visible {
	color: #1b8fe0;
}

/* Keeps typed text from running under the ×. */
input.search-field.kd-is-has-x {
	padding-right: 58px !important;
}
