/**
 * GigLad Learning Engine: premium Explore Courses catalogue (Batch 4).
 *
 * Loaded only on the premium catalogue (Learner\Catalogue): WooCommerce's shop page and product category
 * archives in premium mode. The page sits inside the theme's header and footer (the storefront's own), so
 * every rule is scoped to .gle-cat. Brand values are the repository's tokens (as gle-workspace.css and
 * gle-auth.css): navy #17153a, orange #c24e1b (white text 4.77:1), teal text #127a70, turquoise #5feced
 * (decoration only); Plus Jakarta Sans for headings and Inter for text, self-hosted (SIL OFL).
 *
 * @package GigLad\LearningEngine
 */

/* ---------------------------------------------------------------- fonts (self-hosted, SIL OFL) */
@font-face {
	font-family: "Plus Jakarta Sans";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/plus-jakarta-sans-latin-700-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Plus Jakarta Sans";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/plus-jakarta-sans-latin-600-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("../fonts/inter-latin-500-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/inter-latin-600-normal.woff2") format("woff2");
}

/* ---------------------------------------------------------------- tokens and base */
.gle-cat {
	--ct-navy: #17153a;
	--ct-orange: #c24e1b;
	--ct-orange-hover: #a3410f;
	--ct-teal-text: #127a70;
	--ct-turq: #5feced;
	--ct-ink: #17153a;
	--ct-text: #2b2a40;
	--ct-muted: #5b6478;
	--ct-line: #e3e6ee;
	--ct-field: #8a8592; /* 3.6:1 on white: visible field boundaries. */
	--ct-soft: #f6f7fb;
	--ct-heading: "Plus Jakarta Sans", "Segoe UI", -apple-system, blinkmacsystemfont, roboto, helvetica, arial, sans-serif;
	--ct-body: "Inter", -apple-system, blinkmacsystemfont, "Segoe UI", roboto, helvetica, arial, sans-serif;
	max-width: 1440px; /* 0.12.2: was 1240px; room for four compact cards beside the filters. */
	margin: 0 auto;
	padding: 24px 24px 64px;
	color: var(--ct-text);
	font-family: var(--ct-body);
	font-size: 16px;
	line-height: 1.5;
}

.gle-cat *,
.gle-cat *::before,
.gle-cat *::after {
	box-sizing: border-box;
}

.gle-cat .gle-ui-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

.gle-cat a {
	color: var(--ct-teal-text);
}

.gle-cat a:focus-visible,
.gle-cat button:focus-visible,
.gle-cat input:focus-visible,
.gle-cat select:focus-visible,
.gle-cat summary:focus-visible {
	outline: 3px solid var(--ct-teal-text);
	outline-offset: 2px;
}

.gle-cat .gle-ws-icon {
	flex: none;
	width: 20px;
	height: 20px;
}

.gle-cat ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------------------------------------------------------------- hero */
.gle-cat-hero {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(240px, 380px);
	gap: 24px;
	align-items: center;
	margin: 0 0 24px;
	padding: 36px 40px 36px 48px;
	overflow: hidden;
	border-radius: 20px;
	background:
		radial-gradient(60% 90% at 100% 0%, rgba(95, 236, 237, 0.16) 0%, rgba(95, 236, 237, 0) 70%),
		linear-gradient(115deg, #fff8f3 0%, #fff1e6 55%, #ffe6d4 100%);
}

.gle-cat-hero__eyebrow {
	margin: 0 0 10px;
	color: var(--ct-muted);
	font-family: var(--ct-heading);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.gle-cat-hero__title {
	max-width: 20ch;
	margin: 0 0 12px;
	color: var(--ct-ink);
	font-family: var(--ct-heading);
	font-size: clamp(1.75rem, 3.2vw, 2.6rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.015em;
}

.gle-cat-hero__lead {
	max-width: 56ch;
	margin: 0;
	color: var(--ct-muted);
	font-size: 17px;
}

.gle-cat-hero__art {
	display: block;
	width: 100%;
	height: auto;
}

.gle-cat-notices {
	margin: 0 0 20px;
}

/* ---------------------------------------------------------------- category chips */
.gle-cat-chips {
	margin: 0 0 28px;
}

.gle-cat-chips__list {
	display: flex;
	gap: 10px;
	overflow-x: auto;
	padding: 2px 2px 6px;
	scrollbar-width: thin;
}

.gle-cat-chip {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-width: 150px;
	min-height: 64px;
	padding: 10px 18px 10px 12px;
	border: 1px solid var(--ct-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(23, 21, 58, 0.04);
	color: var(--ct-ink);
	text-decoration: none;
	white-space: nowrap;
}

.gle-cat .gle-cat-chip {
	color: var(--ct-ink);
}

.gle-cat-chip__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 11px;
	background: #eef1fb;
	color: var(--ct-navy);
}

.gle-cat-chip__icon .gle-ws-icon {
	width: 22px;
	height: 22px;
}

.gle-cat-chip__text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.gle-cat .gle-cat-chip.is-current .gle-cat-chip__icon {
	background: rgba(255, 255, 255, 0.12);
	color: var(--ct-turq);
}

.gle-cat .gle-cat-chip:hover {
	box-shadow: 0 4px 14px rgba(23, 21, 58, 0.08);
}

.gle-cat-chip__name {
	font-family: var(--ct-heading);
	font-size: 14px;
	font-weight: 600;
}

.gle-cat-chip__count {
	color: var(--ct-muted);
	font-size: 13px;
}

.gle-cat .gle-cat-chip:hover {
	border-color: var(--ct-navy);
}

.gle-cat .gle-cat-chip.is-current {
	border-color: var(--ct-navy);
	background: var(--ct-navy);
	color: #fff;
}

.gle-cat-chip.is-current .gle-cat-chip__count {
	color: rgba(255, 255, 255, 0.82);
}

/* ---------------------------------------------------------------- layout */
.gle-cat-layout {
	display: grid;
	grid-template-columns: 232px minmax(0, 1fr);
	gap: 28px;
	align-items: start;
}

.gle-cat-side {
	position: sticky;
	top: 24px;
	padding: 20px;
	border: 1px solid var(--ct-line);
	border-radius: 16px;
	background: #fff;
}

.gle-cat-side__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 0 0 16px;
}

.gle-cat-side__title {
	margin: 0;
	color: var(--ct-ink);
	font-family: var(--ct-heading);
	font-size: 20px;
	font-weight: 700;
}

.gle-cat-clear {
	font-size: 14px;
	font-weight: 600;
}

/* ---------------------------------------------------------------- filters */
.gle-cat-filters__group {
	margin: 20px 0 0;
	padding: 20px 0 0;
	border-top: 1px solid var(--ct-line);
}

.gle-cat-filters__label {
	display: block;
	margin: 0 0 8px;
	color: var(--ct-ink);
	font-family: var(--ct-heading);
	font-size: 15px;
	font-weight: 700;
}

.gle-cat-filters__list li + li {
	margin-top: 2px;
}

.gle-cat .gle-cat-filters__link {
	display: flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 4px 8px;
	border-radius: 8px;
	color: var(--ct-text);
	font-size: 15px;
	text-decoration: none;
}

.gle-cat .gle-cat-filters__link:hover {
	background: var(--ct-soft);
}

.gle-cat .gle-cat-filters__link.is-current {
	background: #e8f6f4;
	color: var(--ct-navy);
	font-weight: 600;
}

.gle-cat-filters__count {
	color: var(--ct-muted);
	font-size: 14px;
}

.gle-cat-search__row {
	display: flex;
	align-items: stretch;
}

.gle-cat .gle-cat-search__input {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	margin: 0;
	padding: 8px 12px;
	border: 1px solid var(--ct-field);
	border-right: 0;
	border-radius: 10px 0 0 10px;
	background: #fff;
	color: var(--ct-ink);
	font: inherit;
	font-size: 16px;
}

.gle-cat .gle-cat-search__go {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	min-height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--ct-navy);
	border-radius: 0 10px 10px 0;
	background: var(--ct-navy);
	color: #fff;
	cursor: pointer;
}

/* ---------------------------------------------------------------- results bar */
.gle-cat-tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	margin: 0 0 18px;
}

.gle-cat-count {
	margin: 0;
	color: var(--ct-muted);
	font-family: var(--ct-body);
	font-size: 15px;
	font-weight: 500;
}

.gle-cat-sort {
	display: flex;
	align-items: center;
	gap: 8px;
}

.gle-cat-sort__label {
	color: var(--ct-muted);
	font-size: 14px;
	white-space: nowrap;
}

.gle-cat .gle-cat-sort__select {
	min-height: 44px;
	margin: 0;
	padding: 6px 36px 6px 12px;
	border: 1px solid var(--ct-field);
	border-radius: 10px;
	background-color: #fff;
	color: var(--ct-ink);
	font: inherit;
	font-size: 15px;
}

.gle-cat .gle-cat-sort__go {
	min-height: 44px;
	margin: 0;
	padding: 6px 16px;
	border: 1px solid var(--ct-navy);
	border-radius: 10px;
	background: #fff;
	color: var(--ct-navy);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.gle-cat-drawer {
	display: none;
}

/* ---------------------------------------------------------------- course grid and cards */
.gle-cat-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr)); /* 0.12.2: four per row on desktop (3 below 1200px, see below). */
	gap: 20px;
}

.gle-cat-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--ct-line);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(23, 21, 58, 0.06);
	transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.gle-cat-card:hover,
.gle-cat-card:focus-within {
	border-color: #cfd4e2;
	box-shadow: 0 10px 24px rgba(23, 21, 58, 0.1);
	transform: translateY(-2px);
}

/* The course artwork is landscape (16:9); it is shown whole (contain), never cropped, on a soft backdrop. */
.gle-cat-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--ct-soft);
}

.gle-cat-card__media img,
.gle-cat .gle-cat-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.gle-cat-card__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: var(--ct-turq);
}

.gle-cat-card__placeholder .gle-ws-icon {
	width: 44px;
	height: 44px;
}

.gle-cat-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--ct-orange);
	color: #fff;
	font-size: 12px;
	font-weight: 600;
}

.gle-cat-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 14px 16px 16px;
}

.gle-cat-card__title {
	margin: 0 0 6px;
	font-family: var(--ct-heading);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
}

.gle-cat .gle-cat-card__title a {
	color: var(--ct-ink);
	text-decoration: none;
}

.gle-cat .gle-cat-card__title a:hover {
	text-decoration: underline;
}

.gle-cat-card__rating {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0 0 8px;
	color: var(--ct-muted);
	font-size: 14px;
}

.gle-cat-card__star {
	color: #b45309; /* Amber with 4.5:1 on white. */
}

.gle-cat-card__score {
	color: var(--ct-ink);
	font-weight: 600;
}

.gle-cat-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 10px;
}

.gle-cat-card__price {
	margin: 0;
	color: var(--ct-ink);
	font-family: var(--ct-heading);
	font-size: 18px;
	font-weight: 700;
}

.gle-cat-card__price del {
	margin-right: 4px;
	color: var(--ct-muted);
	font-size: 14px;
	font-weight: 500;
}

.gle-cat-card__price ins {
	text-decoration: none;
}

.gle-cat .gle-cat-card__cart {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--ct-line);
	border-radius: 10px;
	background: #fff;
	color: var(--ct-navy);
}

.gle-cat .gle-cat-card__cart:hover {
	border-color: var(--ct-navy);
	background: var(--ct-soft);
}

.gle-cat .gle-cat-card__go {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 6px 14px;
	border: 1px solid var(--ct-navy);
	border-radius: 10px;
	color: var(--ct-navy);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.gle-cat .gle-cat-card__go.is-owned {
	background: var(--ct-navy);
	color: #fff;
}

/* ---------------------------------------------------------------- empty state and pagination */
.gle-cat-empty {
	padding: 48px 24px;
	border: 1px dashed var(--ct-field);
	border-radius: 16px;
	background: var(--ct-soft);
	text-align: center;
}

.gle-cat-empty__title {
	margin: 0 0 8px;
	color: var(--ct-ink);
	font-family: var(--ct-heading);
	font-size: 18px;
	font-weight: 700;
}

.gle-cat-pages {
	margin: 32px 0 0;
}

.gle-cat-pages__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.gle-cat .gle-cat-pages__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--ct-line);
	border-radius: 10px;
	color: var(--ct-ink);
	font-weight: 600;
	text-decoration: none;
}

.gle-cat .gle-cat-pages__link.is-current {
	border-color: var(--ct-navy);
	background: var(--ct-navy);
	color: #fff;
}

/* ---------------------------------------------------------------- narrower screens */
@media (max-width: 1199px) {
	.gle-cat-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (prefers-reduced-motion: reduce) {
	.gle-cat-card,
	.gle-cat-card:hover,
	.gle-cat-card:focus-within {
		transition: none;
		transform: none;
	}
}

/* ---------------------------------------------------------------- tablets and phones */
@media (max-width: 899px) {
	.gle-cat-grid {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
		gap: 16px;
	}

	.gle-cat {
		padding: 16px 16px 48px;
	}

	.gle-cat-hero {
		grid-template-columns: minmax(0, 1fr);
		padding: 24px 20px;
	}

	.gle-cat-hero__title {
		font-size: 26px;
	}

	.gle-cat-hero__lead {
		font-size: 16px;
	}

	.gle-cat .gle-cat-filters__link {
		min-height: 44px; /* Touch target. */
		font-size: 16px;
	}

	.gle-cat-hero__art {
		display: none;
	}

	.gle-cat-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.gle-cat-side {
		display: none;
	}

	.gle-cat-drawer {
		display: block;
		flex: 1 1 100%;
		border: 1px solid var(--ct-line);
		border-radius: 12px;
		background: #fff;
	}

	.gle-cat-drawer__toggle {
		display: flex;
		align-items: center;
		gap: 10px;
		min-height: 48px;
		padding: 0 16px;
		color: var(--ct-ink);
		font-family: var(--ct-heading);
		font-size: 15px;
		font-weight: 600;
		cursor: pointer;
		list-style: none;
	}

	.gle-cat-drawer__toggle::-webkit-details-marker {
		display: none;
	}

	.gle-cat-drawer__body {
		padding: 0 16px 16px;
	}

	.gle-cat-drawer__body .gle-cat-clear {
		display: inline-block;
		margin-top: 12px;
	}
}

@media (max-width: 599px) {
	.gle-cat-chip {
		min-width: 0;
		min-height: 56px;
		padding: 8px 14px 8px 8px;
	}

	.gle-cat-chip__icon {
		width: 34px;
		height: 34px;
	}

	.gle-cat-hero__eyebrow {
		font-size: 12px;
	}

	.gle-cat-hero__title {
		font-size: 24px;
	}

	.gle-cat-hero__lead {
		font-size: 15px;
		line-height: 1.55;
	}

	.gle-cat-tools {
		align-items: stretch;
	}

	.gle-cat-sort {
		flex: 1 1 100%;
	}

	.gle-cat .gle-cat-sort__select {
		flex: 1;
	}

	/* Phones (reference 01, right): a horizontal card, image left. */
	.gle-cat-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 14px;
	}

	.gle-cat-card {
		flex-direction: row;
	}

	.gle-cat-card__media {
		flex: none;
		align-self: center;
		width: 128px;
		margin: 10px 0 10px 10px;
		border-radius: 10px;
		aspect-ratio: 16 / 9;
	}

	.gle-cat-card__body {
		padding: 12px 14px;
	}

	.gle-cat-card__title {
		font-size: 16px;
		line-height: 1.35;
	}

	.gle-cat-card__rating {
		font-size: 13px;
	}

	.gle-cat-card__price {
		font-size: 18px;
	}

	.gle-cat-card__badge {
		top: 8px;
		left: 8px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gle-cat * {
		transition: none !important;
		animation: none !important;
	}
}
