.jpo-school-finder {
	width: 100%;
	margin: 24px 0;
}

.jpo-school-finder__panel {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
	gap: 16px;
	align-items: end;
	padding: 20px;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.jpo-school-finder__field label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 700;
}

.jpo-school-finder__select {
	width: 100%;
	min-height: 44px;
	padding: 9px 12px;
	border: 1px solid #d6d6d6;
	border-radius: 8px;
	background: #ffffff;
}

.jpo-school-finder__button {
	min-height: 44px;
	padding: 10px 18px;
	border: 0;
	border-radius: 8px;
	background: #111111;
	color: #ffffff;
	font-weight: 700;
	cursor: pointer;
}

.jpo-school-finder__button:disabled,
.jpo-school-finder__select:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.jpo-school-finder__loading,
.jpo-school-finder__message {
	margin-top: 14px;
	font-size: 14px;
}

.jpo-school-finder__message:not(:empty) {
	padding: 12px 14px;
	border-radius: 8px;
	background: #f7f7f7;
}

.jpo-school-products-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin-top: 22px;
}

.jpo-school-product-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	overflow: hidden;
	background: #ffffff;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.jpo-school-product-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.jpo-school-product-card__image {
	display: block;
	aspect-ratio: 1 / 1;
	background: #f7f7f7;
	overflow: hidden;
}

.jpo-school-product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.jpo-school-product-card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 14px;
	flex: 1;
}

.jpo-school-product-card__title {
	margin: 0;
	font-size: 16px;
	line-height: 1.35;
}

.jpo-school-product-card__title a {
	text-decoration: none;
	color: inherit;
}

.jpo-school-product-card__price {
	font-weight: 700;
}

.jpo-school-product-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
}

.jpo-school-product-card__cart,
.jpo-school-product-card__view {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.jpo-school-product-card__cart {
	background: #111111;
	color: #ffffff;
}

.jpo-school-product-card__view {
	background: #f2f2f2;
	color: #111111;
}

.jpo-finder-notice {
	padding: 14px 16px;
	border-radius: 8px;
	background: #f7f7f7;
}

@media (max-width: 1024px) {
	.jpo-school-products-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.jpo-school-finder__panel {
		grid-template-columns: 1fr;
	}

	.jpo-school-products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.jpo-school-products-grid {
		grid-template-columns: 1fr;
	}
}

/* Category Sidebar Filters */
.jpo-category-filter {
	width: 100%;
	margin: 24px 0;
}

.jpo-category-filter__mobile-toggle {
	display: none;
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #d8d8d8;
	border-radius: 10px;
	background: #ffffff;
	color: #111111;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
}

.jpo-category-filter__layout {
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 24px;
	align-items: start;
}

.jpo-category-filter__sidebar {
	position: sticky;
	top: 24px;
	padding: 18px;
	border: 1px solid #e5e5e5;
	border-radius: 12px;
	background: #ffffff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.jpo-category-filter__heading {
	margin: 0 0 16px;
	font-size: 18px;
	line-height: 1.25;
}

.jpo-category-filter__group {
	padding: 16px 0;
	border-top: 1px solid #efefef;
}

.jpo-category-filter__group h4 {
	margin: 0 0 10px;
	font-size: 15px;
	font-weight: 800;
}

.jpo-category-filter__choices {
	display: grid;
	gap: 8px;
	max-height: none;
	overflow: visible;
	padding-right: 4px;
}

.jpo-category-filter__choice {
	display: flex;
	gap: 8px;
	align-items: center;
	font-size: 14px;
	line-height: 1.35;
	cursor: pointer;
}

.jpo-category-filter__choice input {
	margin: 0;
}

.jpo-category-filter__empty-option {
	margin: 0;
	font-size: 13px;
	color: #777777;
}

.jpo-category-filter__price-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.jpo-category-filter__price-row label span {
	display: block;
	margin-bottom: 5px;
	font-size: 12px;
	font-weight: 700;
	color: #555555;
}

.jpo-category-filter__price-row input,
.jpo-filter-stock-status {
	width: 100%;
	min-height: 40px;
	padding: 8px 10px;
	border: 1px solid #d6d6d6;
	border-radius: 8px;
	background: #ffffff;
}

.jpo-category-filter__actions {
	display: grid;
	gap: 8px;
	padding-top: 16px;
	border-top: 1px solid #efefef;
}

.jpo-category-filter__apply,
.jpo-category-filter__clear {
	width: 100%;
	min-height: 42px;
	padding: 10px 14px;
	border-radius: 8px;
	font-weight: 800;
	cursor: pointer;
}

.jpo-category-filter__apply {
	border: 0;
	background: #111111;
	color: #ffffff;
}

.jpo-category-filter__clear {
	border: 1px solid #d8d8d8;
	background: #ffffff;
	color: #111111;
}

.jpo-category-filter__loading,
.jpo-category-filter__message {
	margin-bottom: 14px;
	font-size: 14px;
}

.jpo-category-filter__message:not(:empty),
.jpo-category-filter__empty-results {
	padding: 12px 14px;
	border-radius: 8px;
	background: #f7f7f7;
}

.jpo-category-products-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.jpo-filter-product-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	overflow: hidden;
	background: #ffffff;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.jpo-filter-product-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.jpo-filter-product-card__image {
	display: block;
	aspect-ratio: 1 / 1;
	background: #f7f7f7;
	overflow: hidden;
}

.jpo-filter-product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.jpo-filter-product-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 14px;
}

.jpo-filter-product-card__title {
	margin: 0;
	font-size: 16px;
	line-height: 1.35;
}

.jpo-filter-product-card__title a {
	color: inherit;
	text-decoration: none;
}

.jpo-filter-product-card__price {
	font-weight: 700;
}

.jpo-filter-product-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
}

.jpo-filter-product-card .jpo-school-product-card__cart,
.jpo-filter-product-card__view {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 12px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
}

.jpo-filter-product-card .jpo-school-product-card__cart {
	background: #111111;
	color: #ffffff;
}

.jpo-filter-product-card__view {
	background: #f2f2f2;
	color: #111111;
}

@media (max-width: 1024px) {
	.jpo-category-filter__layout {
		grid-template-columns: 240px minmax(0, 1fr);
		gap: 18px;
	}

	.jpo-category-products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 768px) {
	.jpo-category-filter__mobile-toggle {
		display: block;
		margin-bottom: 12px;
	}

	.jpo-category-filter__layout {
		display: block;
	}

	.jpo-category-filter__sidebar {
		display: none;
		position: static;
		margin-bottom: 18px;
	}

	.jpo-category-filter.is-open .jpo-category-filter__sidebar {
		display: block;
	}

	.jpo-category-products-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.jpo-category-products-grid {
		grid-template-columns: 1fr;
	}
}


.jpo-school-product-card__required-colour {
	margin: 8px 0;
	font-size: 13px;
	line-height: 1.4;
}

.jpo-school-product-card__required-colour strong {
	display: inline-block;
	margin-left: 4px;
}

.jpo-uniform-colour-lock {
	margin: 0 0 18px;
	padding: 12px 14px;
	border-left: 4px solid currentColor;
	background: rgba(0, 0, 0, 0.04);
}

.variations select[data-jpo-locked="1"] {
	cursor: not-allowed;
}

/* Phase 6.6: School finder context/back button */
.jpo-back-to-uniform-list-wrap {
	margin: 0 0 16px;
}

.jpo-back-to-uniform-list {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border-radius: 999px;
	background: #111111;
	color: #ffffff !important;
	font-weight: 700;
	font-size: 14px;
	line-height: 1;
	text-decoration: none !important;
}

.jpo-back-to-uniform-list:hover,
.jpo-back-to-uniform-list:focus {
	background: #333333;
	color: #ffffff !important;
}

.jpo-back-to-uniform-list::before {
	content: '←';
	font-size: 16px;
	line-height: 1;
}

/* Phase 6.8: Breadcrumb link routing + return button polish */
.jpo-back-to-uniform-list-wrap {
	width: 100%;
	margin: 12px 0 22px;
	display: flex;
	justify-content: flex-start;
}

.jpo-back-to-uniform-list {
	min-height: 40px;
	padding: 12px 18px;
	border-radius: 999px;
	background: #111111;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
	letter-spacing: 0.01em;
}

.jpo-back-to-uniform-list:hover,
.jpo-back-to-uniform-list:focus {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.jpo-category-filter__active-category {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	background: #ffffff;
	font-size: 14px;
}

.jpo-category-filter__active-category a {
	margin-left: auto;
	font-weight: 700;
	color: #111111;
	text-decoration: underline;
}

@media (max-width: 768px) {
	.jpo-back-to-uniform-list-wrap {
		justify-content: stretch;
	}

	.jpo-back-to-uniform-list {
		width: 100%;
		justify-content: center;
	}

	.jpo-category-filter__active-category a {
		width: 100%;
		margin-left: 0;
	}
}

/* Phase 6.10: cleaner filter state and disabled empty type options */
.jpo-category-filter__choice.is-disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.jpo-category-filter__choice.is-disabled input {
	cursor: not-allowed;
}

.jpo-category-filter__results.is-loading {
	min-height: 140px;
	opacity: 0.55;
}

.jpo-category-filter__loading {
	display: inline-block;
	padding: 10px 14px;
	border-radius: 999px;
	background: #f7f7f7;
	font-weight: 700;
}

/* Phase 6.16: client filter removals + extended filter panels */
.jpo-category-filter__sidebar,
.jpo-category-filter__form,
.jpo-category-filter__group,
.jpo-category-filter__choices {
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
}

.jpo-category-filter__choices {
	display: grid !important;
	gap: 10px !important;
	padding-right: 0 !important;
}

.jpo-category-filter__group--product_type .jpo-category-filter__choices,
.jpo-category-filter__group--gender .jpo-category-filter__choices {
	min-height: auto !important;
}

.jpo-category-filter__sidebar {
	align-self: start !important;
}

@media (max-width: 767px) {
	.jpo-category-filter.is-open .jpo-category-filter__sidebar,
	.jpo-category-filter__sidebar,
	.jpo-category-filter__choices {
		height: auto !important;
		max-height: none !important;
		overflow: visible !important;
	}
}
