/*
 * Long Island Printer Sales — transplanted Signs & Printing Catalog Discovery System
 * Version: 2.0.0
 *
 * A progressive-enhancement catalog layer for the WooCommerce Shop archive.
 * Desktop: persistent contextual filter rail.
 * Tablet/mobile: accessible filter drawer.
 */

body.gij-native-catalog {
	--sp-archive-red: var(--gij-blue, #d50000);
	--sp-archive-black: #050505;
	--sp-archive-ink: #111111;
	--sp-archive-copy: #454545;
	--sp-archive-muted: #6f6f6f;
	--sp-archive-line: #dedede;
	--sp-archive-panel: #f4f4f2;
	--sp-archive-white: #ffffff;
}

body.gij-native-catalog main#content,
body.gij-native-catalog main.site-main {
	width: calc(100% - 48px);
	max-width: 1380px;
	padding-top: 44px;
}

body.gij-native-catalog .woocommerce-breadcrumb {
	margin-bottom: 18px;
}

body.gij-native-catalog .woocommerce-products-header__title,
body.gij-native-catalog main#content > h1 {
	margin-bottom: 30px;
}

/* Discovery header */
.sp-shop-discovery {
	position: relative;
	margin: 0 0 30px;
	overflow: hidden;
	border: 1px solid #1f1f1f;
	background:
		linear-gradient(115deg, rgba(213, 0, 0, 0.14), transparent 42%),
		linear-gradient(135deg, #050505 0%, #141414 62%, #050505 100%);
	color: var(--sp-archive-white);
}

.sp-shop-discovery::after {
	position: absolute;
	top: -110px;
	right: -80px;
	width: 360px;
	height: 360px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 50%;
	box-shadow:
		0 0 0 44px rgba(255, 255, 255, 0.025),
		0 0 0 92px rgba(255, 255, 255, 0.018);
	content: "";
	pointer-events: none;
}

.sp-shop-discovery__intro {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
	gap: 40px;
	align-items: end;
	padding: 40px 42px 34px;
}

.sp-shop-discovery__eyebrow {
	display: block;
	margin-bottom: 12px;
	color: #ff5a5a;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

body.gij-native-catalog .sp-shop-discovery h2 {
	max-width: 760px;
	margin: 0;
	color: var(--sp-archive-white);
	font-size: clamp(34px, 4.2vw, 58px);
	font-weight: 800;
	letter-spacing: -0.045em;
	line-height: 1.02;
}

.sp-shop-discovery__copy {
	max-width: 520px;
	margin: 0;
	color: #d8d8d8;
	font-size: 15px;
	line-height: 1.7;
}

.sp-shop-category-jump {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.sp-shop-category-jump__link {
	display: flex;
	min-height: 76px;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 18px 22px;
	border-right: 1px solid rgba(255, 255, 255, 0.15);
	color: var(--sp-archive-white) !important;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.25;
	text-decoration: none !important;
	transition: background 0.18s ease, color 0.18s ease;
}

.sp-shop-category-jump__link:last-child {
	border-right: 0;
}

.sp-shop-category-jump__link:hover,
.sp-shop-category-jump__link:focus-visible,
.sp-shop-category-jump__link.is-active {
	background: var(--sp-archive-white);
	color: var(--sp-archive-ink) !important;
}

.sp-shop-category-jump__count {
	display: inline-flex;
	min-width: 30px;
	height: 30px;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	border: 1px solid currentColor;
	border-radius: 50%;
	font-size: 11px;
}

/* Toolbar, result summary, and active filters */
.sp-shop-results-head {
	display: grid;
	grid-template-columns: auto minmax(220px, 1fr) auto;
	gap: 14px;
	align-items: center;
	margin-bottom: 18px;
	padding: 14px;
	border: 1px solid var(--sp-archive-line);
	background: var(--sp-archive-white);
}

.sp-shop-filter-toggle {
	display: none !important;
}

.sp-shop-result-summary {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--sp-archive-muted);
	font-size: 13px;
	font-weight: 700;
}

.sp-shop-result-summary strong {
	color: var(--sp-archive-ink);
	font-size: 16px;
}

.sp-shop-sort {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
}

.sp-shop-sort label {
	white-space: nowrap;
}

body.gij-native-catalog .sp-shop-sort select {
	min-width: 210px;
	min-height: 46px;
}

.sp-shop-sort__submit {
	min-height: 46px !important;
}

.sp-shop-enhanced .sp-shop-sort__submit {
	display: none !important;
}

.sp-shop-active {
	display: flex;
	min-height: 0;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	margin: 0 0 18px;
}

.sp-shop-active[hidden] {
	display: none;
}

.sp-shop-active__label {
	margin-right: 2px;
	color: var(--sp-archive-muted);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.sp-shop-chip {
	display: inline-flex;
	min-height: 36px;
	align-items: center;
	gap: 8px;
	padding: 7px 11px;
	border: 1px solid #cfcfcf;
	border-radius: 999px;
	background: var(--sp-archive-white);
	color: var(--sp-archive-ink);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.sp-shop-chip:hover,
.sp-shop-chip:focus-visible {
	border-color: var(--sp-archive-black);
	background: var(--sp-archive-panel);
}

.sp-shop-chip__remove {
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
}

.sp-shop-clear-all {
	min-height: 36px;
	padding: 0 10px;
	border: 0;
	background: transparent;
	color: var(--sp-archive-red);
	font-size: 12px;
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Catalog layout */
.sp-shop-catalog-layout {
	display: grid;
	grid-template-columns: 276px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.sp-shop-filters {
	position: sticky;
	border: 1px solid var(--sp-archive-line);
	background: var(--sp-archive-white);
}

.sp-shop-filters__head {
	position: sticky;
	top: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 20px;
	border-bottom: 1px solid var(--sp-archive-line);
	background: var(--sp-archive-black);
	color: var(--sp-archive-white);
}

body.gij-native-catalog .sp-shop-filters__head h2 {
	margin: 0;
	color: var(--sp-archive-white);
	font-size: 17px;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.sp-shop-filters__close {
	display: none;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.4);
	background: transparent;
	color: var(--sp-archive-white);
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.sp-shop-filter-form {
	margin: 0;
}

.sp-shop-filter-group {
	margin: 0;
	padding: 24px 20px 22px;
	border: 0;
	border-bottom: 1px solid var(--sp-archive-line);
}

.sp-shop-filter-group:last-of-type {
	border-bottom: 0;
}

.sp-shop-filter-group legend {
	display: block;
	float: left;
	width: 100%;
	margin: 0 0 15px;
	padding: 2px 0 0;
	color: var(--sp-archive-ink);
	font-size: 11px;
	font-weight: 800;
	line-height: 1.35;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.sp-shop-filter-group legend + * {
	clear: both;
}

.sp-shop-filters {
	scrollbar-color: var(--sp-archive-black) #ededed;
	scrollbar-width: thin;
}

.sp-shop-filters::-webkit-scrollbar {
	width: 10px;
}

.sp-shop-filters::-webkit-scrollbar-track {
	border-left: 1px solid var(--sp-archive-line);
	background: #ededed;
}

.sp-shop-filters::-webkit-scrollbar-thumb {
	border: 2px solid #ededed;
	border-radius: 999px;
	background: var(--sp-archive-black);
}

.sp-shop-filters::-webkit-scrollbar-thumb:hover {
	background: var(--sp-archive-red);
}

.sp-shop-search {
	position: relative;
}

body.gij-native-catalog .sp-shop-search input {
	width: 100%;
	min-height: 46px;
	padding-right: 44px;
}

.sp-shop-search button {
	position: absolute;
	top: 0;
	right: 0;
	display: inline-flex;
	width: 44px;
	height: 46px;
	align-items: center;
	justify-content: center;
	border: 0;
	background: transparent;
	color: var(--sp-archive-ink);
	cursor: pointer;
}

.sp-shop-filter-options {
	display: grid;
	gap: 11px;
}

.sp-shop-check {
	display: grid;
	grid-template-columns: 18px minmax(0, 1fr) auto;
	gap: 9px;
	align-items: center;
	margin: 0;
	color: var(--sp-archive-copy);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0;
	cursor: pointer;
}

.sp-shop-check input {
	width: 18px;
	height: 18px;
	min-height: 0 !important;
	margin: 0;
	padding: 0 !important;
	accent-color: var(--sp-archive-red);
}

.sp-shop-check__count {
	color: #8b8b8b;
	font-size: 11px;
}

.sp-shop-price-inputs {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	gap: 8px;
	align-items: center;
}

.sp-shop-price-field {
	position: relative;
}

.sp-shop-price-field span {
	position: absolute;
	top: 50%;
	left: 12px;
	color: #777;
	font-size: 13px;
	transform: translateY(-50%);
}

body.gij-native-catalog .sp-shop-price-field input {
	width: 100%;
	min-height: 44px;
	padding-left: 26px;
}

.sp-shop-price-presets {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 10px;
}

.sp-shop-price-preset {
	min-height: 32px;
	padding: 5px 8px;
	border: 1px solid #d4d4d4;
	background: #fafafa;
	color: var(--sp-archive-ink);
	font-size: 10px;
	font-weight: 700;
	cursor: pointer;
}

.sp-shop-price-preset:hover,
.sp-shop-price-preset:focus-visible,
.sp-shop-price-preset.is-active {
	border-color: var(--sp-archive-black);
	background: var(--sp-archive-black);
	color: var(--sp-archive-white);
}

.sp-shop-filter-actions {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
	padding: 16px 20px 20px;
}

.sp-shop-filter-reset {
	min-height: 44px;
	border: 1px solid var(--sp-archive-black);
	background: var(--sp-archive-white);
	color: var(--sp-archive-ink);
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
}

body.gij-native-catalog .sp-shop-filter-reset {
	background: var(--sp-archive-white) !important;
	color: var(--sp-archive-ink) !important;
}

body.gij-native-catalog .sp-shop-filter-reset:hover,
body.gij-native-catalog .sp-shop-filter-reset:focus-visible {
	background: var(--sp-archive-black) !important;
	color: var(--sp-archive-white) !important;
}

.sp-shop-results-column {
	min-width: 0;
}

@media (min-width: 901px) {
	.sp-shop-filters {
		top: 96px;
		max-height: calc(100vh - 120px);
		overflow-y: auto;
		overscroll-behavior: contain;
		scroll-padding-block: 16px;
		scrollbar-gutter: stable;
		box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
	}

	body.admin-bar .sp-shop-filters {
		top: 128px;
		max-height: calc(100vh - 152px);
	}
}

body.gij-native-catalog ul.products {
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

body.gij-native-catalog ul.products li.product {
	position: relative;
	height: auto;
	min-height: 0;
}

body.gij-native-catalog ul.products li.product[hidden] {
	display: none !important;
}

.sp-product-eyebrow {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin: 0;
	padding: 17px 20px 0;
	color: var(--sp-archive-muted);
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.09em;
	line-height: 1.3;
	text-transform: uppercase;
}

.sp-product-eyebrow__mode {
	color: var(--sp-archive-red);
}

body.gij-native-catalog ul.products li.product .woocommerce-loop-product__title {
	min-height: 68px;
	padding: 10px 20px 8px;
	font-size: 18px;
}

body.gij-native-catalog ul.products li.product .price {
	padding: 0 20px 17px;
}

body.gij-native-catalog ul.products li.product .button {
	width: calc(100% - 40px);
	min-height: 48px;
	margin: auto 20px 20px;
	padding: 12px 16px;
	line-height: 1.2;
	text-align: center;
}

.sp-shop-empty {
	margin: 22px 0 0;
	padding: 44px 28px;
	border: 1px solid var(--sp-archive-line);
	background: var(--sp-archive-panel);
	text-align: center;
}

.sp-shop-empty[hidden] {
	display: none;
}

body.gij-native-catalog .sp-shop-empty h2 {
	margin: 0 0 10px;
	font-size: 28px;
	font-weight: 800;
}

.sp-shop-empty p {
	margin: 0 0 20px;
	color: var(--sp-archive-muted);
}

.sp-shop-filter-overlay {
	display: none;
}

/* Correct button centering across every WooCommerce archive. */
body.woocommerce ul.products li.product .button,
body.woocommerce-page ul.products li.product .button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	text-align: center !important;
	white-space: normal;
}

/* Correct the dark-on-dark footer regression created by global Woo headings. */
body.woocommerce .sp-site-footer h2,
body.woocommerce .sp-site-footer h3,
body.woocommerce .sp-site-footer h4,
body.woocommerce-page .sp-site-footer h2,
body.woocommerce-page .sp-site-footer h3,
body.woocommerce-page .sp-site-footer h4,
body.woocommerce .sp-footer-cta-copy h2,
body.woocommerce-page .sp-footer-cta-copy h2 {
	color: #ffffff !important;
}

body.woocommerce .sp-footer-cta-copy p,
body.woocommerce-page .sp-footer-cta-copy p {
	color: #e4e4e4 !important;
}

body.woocommerce .sp-site-footer a,
body.woocommerce-page .sp-site-footer a {
	color: #f2f2f2;
}

body.gij-native-catalog :where(
	.sp-shop-category-jump__link,
	.sp-shop-filter-toggle,
	.sp-shop-filters__close,
	.sp-shop-chip,
	.sp-shop-clear-all,
	.sp-shop-filter-reset,
	.sp-shop-price-preset,
	.sp-shop-search button
):focus-visible {
	outline: 3px solid var(--sp-archive-red);
	outline-offset: 3px;
}

@media (max-width: 1120px) {
	.sp-shop-discovery__intro {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.sp-shop-category-jump {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sp-shop-category-jump__link:nth-child(2) {
		border-right: 0;
	}

	.sp-shop-category-jump__link:nth-child(-n + 2) {
		border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	}

	body.gij-native-catalog ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 900px) {
	body.gij-native-catalog main#content,
	body.gij-native-catalog main.site-main {
		width: calc(100% - 32px);
	}

	.sp-shop-results-head {
		grid-template-columns: auto minmax(0, 1fr) auto;
		position: sticky;
		top: 86px;
		z-index: 20;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	}

	.sp-shop-filter-toggle {
		display: inline-flex !important;
		min-height: 46px !important;
		gap: 8px;
	}

	.sp-shop-catalog-layout {
		display: block;
	}

	.sp-shop-filters {
		position: fixed;
		top: 0;
		right: 0;
		z-index: 100002;
		width: min(390px, 92vw);
		height: 100vh;
		height: 100dvh;
		overflow-y: auto;
		box-shadow: -24px 0 60px rgba(0, 0, 0, 0.24);
		transform: translateX(105%);
		transition: transform 0.24s ease;
	}

	.sp-filter-open .sp-shop-filters {
		transform: translateX(0);
	}

	.sp-shop-filters__head {
		position: sticky;
		top: 0;
		z-index: 2;
	}

	.sp-shop-filters__close {
		display: inline-flex;
	}

	.sp-shop-filter-overlay {
		position: fixed;
		inset: 0;
		z-index: 100001;
		display: block;
		border: 0;
		background: rgba(0, 0, 0, 0.58);
		opacity: 0;
		pointer-events: none;
		transition: opacity 0.2s ease;
	}

	.sp-filter-open .sp-shop-filter-overlay {
		opacity: 1;
		pointer-events: auto;
	}

	.sp-filter-open {
		overflow: hidden;
	}
}

@media (max-width: 680px) {
	body.gij-native-catalog main#content,
	body.gij-native-catalog main.site-main {
		width: calc(100% - 24px);
		padding-top: 30px;
	}

	.sp-shop-discovery__intro {
		padding: 30px 24px 26px;
	}

	body.gij-native-catalog .sp-shop-discovery h2 {
		font-size: 36px;
	}

	.sp-shop-discovery__copy {
		font-size: 14px;
	}

	.sp-shop-category-jump {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x proximity;
	}

	.sp-shop-category-jump__link {
		min-width: 225px;
		border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
		border-bottom: 0 !important;
		scroll-snap-align: start;
	}

	.sp-shop-results-head {
		top: 78px;
		grid-template-columns: 1fr 1fr;
		padding: 10px;
	}

	.sp-shop-filter-toggle {
		width: 100%;
	}

	.sp-shop-result-summary {
		grid-column: 1 / -1;
		grid-row: 2;
		padding: 2px 3px 0;
	}

	.sp-shop-sort {
		width: 100%;
	}

	.sp-shop-sort label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	body.gij-native-catalog .sp-shop-sort select {
		width: 100%;
		min-width: 0;
	}

	.sp-shop-active {
		flex-wrap: nowrap;
		overflow-x: auto;
		padding-bottom: 4px;
	}

	.sp-shop-active__label,
	.sp-shop-clear-all,
	.sp-shop-chip {
		flex: 0 0 auto;
	}

	body.gij-native-catalog ul.products li.product,
	body.gij-native-catalog ul.products li.product > a.woocommerce-LoopProduct-link {
		height: auto;
		min-height: 0;
	}

	body.gij-native-catalog ul.products li.product > a.woocommerce-LoopProduct-link {
		flex: 0 0 auto;
	}

	body.gij-native-catalog ul.products li.product a img {
		box-sizing: border-box;
		width: 100%;
		max-width: 100%;
		height: auto !important;
		aspect-ratio: auto;
		flex: 0 0 auto;
	}

	body.gij-native-catalog ul.products {
		grid-template-columns: 1fr;
	}

	body.gij-native-catalog ul.products li.product .woocommerce-loop-product__title {
		min-height: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sp-shop-filters,
	.sp-shop-filter-overlay,
	body.gij-native-catalog ul.products li.product {
		transition: none !important;
	}
}

/* Adaptation keeps HQ's catalog layout while removing decorative furniture. */
.sp-shop-discovery { background: #111; }
.sp-shop-discovery::after { content: none; }
.sp-shop-discovery__eyebrow { color: #fff; }
.sp-shop-category-jump { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.sp-shop-category-jump__count { border: 0; border-radius: 0; min-width: 20px; }
.sp-product-eyebrow { gap: 8px; flex-wrap: wrap; }
.sp-product-eyebrow__mode { margin-left: 0; }
.sp-shop-filter-actions { display: flex; flex-direction: column; gap: 12px; }
body.gij-native-catalog .sp-shop-apply { width: 100%; min-height: 46px; }
.sp-shop-enhanced .sp-shop-apply { display: none !important; }
.sp-shop-filter-reset { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; }
.sp-shop-server-note { margin: 0 0 18px; color: var(--sp-archive-muted); font-size: 13px; line-height: 1.6; }
.sp-shop-filter-group .sp-shop-filter-options { max-height: 310px; overflow-y: auto; }
.sp-shop-search input { min-width: 0; }
.sp-shop-filters[aria-hidden="true"] { visibility: hidden; }
.sp-shop-enhanced .sp-shop-sort__submit { display: none !important; }
.gij-native-catalog-reset { margin: 20px 0 0 !important; }
@media (min-width: 901px) {
	.sp-shop-filters[aria-hidden="true"] { visibility: visible; }
	.sp-shop-results-head { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 900px) {
	html:not(.gij-catalog-ready) .sp-shop-filter-toggle,
	html:not(.gij-catalog-ready) .sp-shop-filters__close,
	html:not(.gij-catalog-ready) .sp-shop-filter-overlay { display: none !important; }
	html:not(.gij-catalog-ready) .sp-shop-filters {
		position: static; width: 100%; height: auto; max-height: none; margin: 0 0 24px;
		transform: none; box-shadow: none; visibility: visible;
	}
	html:not(.gij-catalog-ready) .sp-shop-results-head { position: static; grid-template-columns: 1fr auto; }
	html:not(.gij-catalog-ready) .sp-shop-filters__head { position: static; }
	.sp-shop-category-jump { display: flex; overflow-x: auto; }
	.sp-shop-category-jump__link { min-width: 190px; border-right: 1px solid rgba(255,255,255,.15) !important; border-bottom: 0 !important; }
}
@media (max-width: 680px) {
	html:not(.sp-shop-enhanced) .sp-shop-sort { grid-column: 1 / -1; grid-row: 3; }
	html:not(.sp-shop-enhanced) .sp-shop-sort select { flex: 1; }
	html:not(.gij-catalog-ready) .sp-shop-result-summary { grid-column: 1 / -1; grid-row: 1; }
}


/* The GoInkJet theme supplies the visual brand; retain accessible source controls. */
.sp-shop-search button { width: 64px; font-size: 12px; }
body.gij-native-catalog .sp-shop-search input { padding-right: 68px; }

