/**
 * Product catalogue cards, single product extras and the request-a-quote list.
 * Uses the brand tokens defined in hcs-templates.css (loaded first).
 */

/* Screen-reader-only text (in case the Underscores rule isn't loaded) */
.hcs-pcard .screen-reader-text,
.hcs-rl .screen-reader-text,
.hcs-rl-header .screen-reader-text,
.hcs-rl-add .screen-reader-text,
.hcs-product-actions .screen-reader-text,
body > .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
 * Header counter
 * ----------------------------------------------------------------------- */
#inner-header .hcs-rl-header {
	order: 2;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border: 1px solid var(--hcs-line);
	border-radius: 8px;
	background: #fff;
	color: var(--hcs-navy) !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color .15s ease, color .15s ease;
}
#inner-header .hcs-rl-header:hover,
#inner-header .hcs-rl-header:focus-visible {
	border-color: var(--hcs-green);
	color: var(--hcs-green-dark) !important;
}
.hcs-rl-header-icon {
	flex: 0 0 auto;
	display: block;
}
.hcs-rl-header .hcs-rl-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 999px;
	background: var(--hcs-green);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}
.hcs-rl-header .hcs-rl-count[data-count="0"] {
	background: var(--hcs-line);
	color: var(--hcs-navy);
}

@media (max-width: 768px) {
	/* Icon + badge, pinned top-left opposite the hamburger, always visible */
	#inner-header .hcs-rl-header {
		position: absolute;
		top: 50%;
		left: 16px;
		transform: translateY(-50%);
		width: 38px;
		height: 38px;
		padding: 0;
		justify-content: center;
		border-color: #d4d8e0;
		border-radius: 6px;
		z-index: 2;
	}
	#inner-header.nav-open .hcs-rl-header {
		top: 18px;
		transform: none;
	}
	#inner-header .hcs-rl-header-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
	#inner-header .hcs-rl-header .hcs-rl-count {
		position: absolute;
		top: -8px;
		right: -8px;
		min-width: 20px;
		height: 20px;
		font-size: 11px;
	}
}

/* --------------------------------------------------------------------------
 * "Add to request list" buttons — shown only once JS confirms storage works
 * ----------------------------------------------------------------------- */
.hcs-rl-add {
	display: none !important;
}
.hcs-rl-ready .hcs-rl-add {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin: 0;
	border: 0;
	cursor: pointer;
	font-family: inherit;
}
.hcs-rl-add {
	padding: 10px 16px;
	font-size: 13px;
	letter-spacing: .4px;
	line-height: 1.2;
	min-height: 44px;
}
.hcs-rl-add:focus-visible,
.hcs-rl-remove:focus-visible,
.hcs-pcard a:focus-visible,
.hcs-rl-qty:focus-visible {
	outline: 3px solid var(--hcs-green);
	outline-offset: 2px;
}
.hcs-rl-add.is-added {
	background: #fff;
	color: var(--hcs-green-dark) !important;
	box-shadow: inset 0 0 0 2px var(--hcs-green);
}
.hcs-rl-add.is-added::before {
	content: "\2713";
	font-weight: 700;
}
.hcs-rl-add.is-added:hover {
	background: var(--hcs-bg-soft);
}
.hcs-rl-add--lg {
	padding: 13px 26px;
	font-size: 15px;
}

/* --------------------------------------------------------------------------
 * Product cards
 * ----------------------------------------------------------------------- */
.hcs-pgrid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 28px;
	padding: 8px 0 32px;
}
.hcs-products .hcs-pgrid {
	padding-top: 0;
}
.hcs-products .hcs-page-header + .hcs-wrap > .hcs-pgrid:first-child {
	padding-top: 24px;
}
.hcs-pcard {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--hcs-line);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	color: var(--hcs-ink);
	transition: box-shadow .18s ease, border-color .18s ease;
}
.hcs-pcard:hover {
	box-shadow: 0 14px 30px rgba(31, 42, 68, 0.12);
	border-color: #d2d7e0;
}
.hcs-pcard-media {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--hcs-bg-soft);
	overflow: hidden;
}
.hcs-pcard-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: transform .3s ease;
}
.hcs-pcard:hover .hcs-pcard-media img {
	transform: scale(1.04);
}
.hcs-pcard-body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 20px 20px;
}
.hcs-pcard-title {
	margin: 0;
	font-size: 18px;
	line-height: 1.3;
}
.hcs-pcard-title a,
.hcs-pcard-title a:visited {
	color: var(--hcs-navy);
	text-decoration: none;
}
.hcs-pcard-title a:hover {
	color: var(--hcs-green-dark);
	text-decoration: underline;
}
.hcs-pcard-part {
	margin: 0;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--hcs-navy);
	font-variant-numeric: tabular-nums;
}
.hcs-pcard-part span {
	font-weight: 400;
	color: var(--hcs-muted);
}
.hcs-pcard-spec {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--hcs-muted);
}
.hcs-pcard-actions {
	margin-top: auto;
	padding-top: 12px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 16px;
}
.hcs-pcard-datasheet,
.hcs-pcard-datasheet:visited {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-size: 14px;
	font-weight: 600;
	color: var(--hcs-green-dark);
	text-decoration: underline;
	text-underline-offset: 3px;
}
.hcs-pcard-datasheet::before {
	content: "";
	width: 14px;
	height: 16px;
	margin-right: 6px;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --------------------------------------------------------------------------
 * Single product extras
 * ----------------------------------------------------------------------- */
.hcs-product-specline {
	margin: -6px 0 20px;
	font-size: 17px;
	line-height: 1.5;
	color: var(--hcs-muted);
}
.hcs-spec-table {
	width: 100%;
	margin: 0 0 24px;
	border-collapse: collapse;
	font-size: 15px;
}
.hcs-spec-table th,
.hcs-spec-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--hcs-line);
	text-align: left;
	vertical-align: top;
}
.hcs-spec-table th {
	width: 42%;
	font-weight: 600;
	color: var(--hcs-navy);
	background: var(--hcs-bg-soft);
}
.hcs-product-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}
.hcs-product-actions .hcs-btn {
	margin-top: 0;
}
.hcs-btn.hcs-btn--outline,
.hcs-btn.hcs-btn--outline:link,
.hcs-btn.hcs-btn--outline:visited {
	background: #fff;
	color: var(--hcs-green-dark);
	box-shadow: inset 0 0 0 2px var(--hcs-green);
}
.hcs-btn.hcs-btn--outline:hover {
	background: var(--hcs-bg-soft);
	color: var(--hcs-green-dark) !important;
}
.hcs-product-related .hcs-section-title {
	margin-bottom: 20px;
}

/* --------------------------------------------------------------------------
 * "View request list" band
 * ----------------------------------------------------------------------- */
.hcs-rl-band {
	background: var(--hcs-bg-soft);
	border-top: 1px solid var(--hcs-line);
	padding: 28px 0;
}
.hcs-rl-band .hcs-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px 24px;
}
.hcs-rl-band-text {
	margin: 0;
	font-size: 17px;
	color: var(--hcs-navy);
	font-weight: 600;
}
.hcs-rl-band .hcs-btn {
	margin-top: 0;
}

/* --------------------------------------------------------------------------
 * Request list page
 * ----------------------------------------------------------------------- */
.hcs-rl-page .hcs-rl-heading:focus {
	outline: none;
}
.hcs-rl {
	padding: 16px 0 40px;
}
.hcs-rl-notice {
	margin: 0 0 20px;
	padding: 16px 20px;
	border: 1px solid var(--hcs-line);
	border-left: 4px solid var(--hcs-navy);
	border-radius: 8px;
	background: var(--hcs-bg-soft);
	line-height: 1.55;
}
.hcs-rl-notice--ok {
	border-left-color: var(--hcs-green);
}
.hcs-rl-notice--ok strong {
	display: block;
	color: var(--hcs-green-dark);
}
.hcs-rl-notice:focus {
	outline: 3px solid var(--hcs-green);
	outline-offset: 2px;
}
.hcs-rl-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15.5px;
}
.hcs-rl-table[hidden],
.hcs-rl-empty[hidden],
.hcs-rl-notice[hidden] {
	display: none;
}
.hcs-rl-table th,
.hcs-rl-table td {
	padding: 12px;
	border-bottom: 1px solid var(--hcs-line);
	text-align: left;
	vertical-align: middle;
}
.hcs-rl-table thead th {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: var(--hcs-muted);
	border-bottom-width: 2px;
}
.hcs-rl-name a,
.hcs-rl-name a:visited {
	color: var(--hcs-navy);
	font-weight: 600;
}
.hcs-rl-part {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.hcs-rl-qty {
	width: 88px;
	min-height: 44px;
	padding: 8px 10px;
	border: 1px solid #cfd4dd;
	border-radius: 6px;
	font: inherit;
	color: var(--hcs-navy);
	background: #fff;
}
.hcs-rl-removecell {
	text-align: right !important;
	width: 1%;
}
.hcs-rl-remove {
	min-height: 44px;
	padding: 8px 14px;
	border: 1px solid var(--hcs-line);
	border-radius: 6px;
	background: #fff;
	color: #9b1c1c;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}
.hcs-rl-remove:hover {
	border-color: #9b1c1c;
	background: #fdf2f2;
}
.hcs-rl-empty {
	padding: 32px 24px;
	border: 1px dashed #cfd4dd;
	border-radius: 10px;
	text-align: center;
}
.hcs-rl-empty p {
	margin: 0;
	font-size: 17px;
	color: var(--hcs-ink);
}
.hcs-rl-form {
	padding: 8px 0 64px;
}

/* Stack the table into cards on small screens */
@media (max-width: 600px) {
	.hcs-rl-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}
	.hcs-rl-table,
	.hcs-rl-table tbody,
	.hcs-rl-table tr,
	.hcs-rl-table td {
		display: block;
		width: 100%;
	}
	.hcs-rl-table tr {
		display: grid;
		grid-template-columns: 1fr auto;
		gap: 8px 12px;
		padding: 14px 0;
		border-bottom: 1px solid var(--hcs-line);
	}
	.hcs-rl-table td {
		padding: 0;
		border: 0;
	}
	.hcs-rl-name {
		grid-column: 1 / -1;
	}
	.hcs-rl-part::before,
	.hcs-rl-qtycell::before {
		content: attr(data-label) ": ";
		color: var(--hcs-muted);
		font-size: 13px;
	}
	.hcs-rl-part {
		grid-column: 1 / -1;
	}
	.hcs-rl-qtycell {
		display: flex !important;
		align-items: center;
		gap: 8px;
	}
	.hcs-rl-removecell {
		width: auto !important;
	}
	.hcs-rl-band .hcs-wrap {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}
}
