/**
 * Psy Core — /explore/{type}/ listing page
 * Brand palette: #E54ADA pink · #050033 blue-dark · #0C0548 indigo
 *                #1A0F5C indigo-edge · #B8B3D9 lavender · #F2F2F2 white
 */
.psy-explore {
	--psy-pink: #E54ADA;
	--psy-blue-dark: #050033;
	--psy-indigo: #0C0548;
	--psy-indigo-edge: #1A0F5C;
	--psy-lavender: #B8B3D9;
	--psy-white: #F2F2F2;

	position: relative;
	color: var(--psy-white);
	font-family: 'Open Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	background: var(--psy-blue-dark);
	min-height: 100vh;
	padding-bottom: 60px;
	overflow-x: clip;
	isolation: isolate;
}

.psy-explore::before {
	content: '';
	position: fixed;
	inset: 0;
	background-image: var(--psy-explore-bg);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
	opacity: 0.85;
	pointer-events: none;
	z-index: 0;
}

.psy-explore::after {
	content: '';
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at 50% 0%, rgba(229, 74, 218, 0.10) 0%, transparent 55%),
		linear-gradient(to bottom, transparent 0%, rgba(5, 0, 51, 0.6) 60%, var(--psy-blue-dark) 100%);
	pointer-events: none;
	z-index: 0;
}

.psy-explore > * {
	position: relative;
	z-index: 1;
}

/* Boxed inner 1440 — 50px desktop / 20px mobile padding. */
.psy-explore__hero,
.psy-explore__layout {
	max-width: 1440px;
	margin: 0 auto;
	padding: 0 50px;
}

/* Hero */
.psy-explore__hero {
	padding-top: 80px;
}

.psy-explore__crumb {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: 'Open Sans', system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
}

.psy-explore__crumb a {
	color: var(--psy-pink);
	text-decoration: none;
}

.psy-explore__crumb a:hover {
	opacity: 0.8;
}

.psy-explore__crumb-mid {
	color: var(--psy-lavender) !important;
}

.psy-explore__crumb-current {
	color: var(--psy-white);
}

.psy-explore__crumb span[aria-hidden] {
	color: var(--psy-lavender);
}

/* Hero title — Yacote display, no glow. Lower clamp floor for mobile so
 * long category labels like "Psychedelic Art" never spill past the viewport. */
.psy-explore__title {
	font-family: 'Yacota Display Sans', 'Yacote', system-ui, sans-serif;
	font-weight: 400;
	font-size: clamp(36px, 9vw, 86.4px);
	line-height: 1;
	letter-spacing: -0.11em;
	margin: 14px 0 24px;
	color: var(--psy-white);
	max-width: 100%;
	overflow-wrap: break-word;
	word-break: normal;
	text-transform: uppercase;
	text-shadow: none;
}

/* Category pills (main row) — desktop shows the pill list, mobile swaps
 * it for a native dropdown so the filter doesn't push the artist grid off
 * the screen. */
.psy-explore__cats {
	list-style: none;
	margin: 0 0 14px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.psy-explore__cats-select { display: none; }

@media (max-width: 720px) {
	.psy-explore__cats { display: none; }
	.psy-explore__cats-select {
		display: block;
		margin: 0 0 18px;
	}
	.psy-explore__cats-select select {
		width: 100%;
		padding: 12px 38px 12px 16px;
		border-radius: 999px;
		border: 1px solid var(--psy-pink, #ff43c8);
		background: rgba(12, 5, 72, 0.55);
		color: #fff;
		font-family: inherit;
		font-size: 14px;
		font-weight: 700;
		letter-spacing: 0.04em;
		text-transform: uppercase;
		appearance: none;
		-webkit-appearance: none;
		-moz-appearance: none;
		background-image:
			linear-gradient(45deg, transparent 50%, #ff7be0 50%),
			linear-gradient(135deg, #ff7be0 50%, transparent 50%);
		background-position:
			calc(100% - 18px) calc(50% - 2px),
			calc(100% - 13px) calc(50% - 2px);
		background-size: 5px 5px;
		background-repeat: no-repeat;
	}
	.psy-explore__cats-select select:focus-visible {
		outline: 2px solid #ff43c8;
		outline-offset: 2px;
	}
}

.psy-explore__cat {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	padding: 9px 18px !important;
	border-radius: 999px !important;
	border: 1px solid var(--psy-pink) !important;
	background: rgba(12, 5, 72, 0.55) !important;
	color: var(--psy-white) !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	letter-spacing: 0.05em !important;
	text-decoration: none !important;
	box-shadow: none !important;
	line-height: 1 !important;
	font-family: inherit !important;
	transition: background 0.15s ease, color 0.15s ease;
}

.psy-explore__cat:hover,
.psy-explore__cat.is-active {
	background: var(--psy-pink) !important;
	color: var(--psy-blue-dark) !important;
}

.psy-explore__cat-icon {
	display: inline-flex;
	align-items: center;
}

.psy-explore__cat-icon img {
	width: 18px;
	height: 18px;
	object-fit: contain;
}

/* Genre scroller — top-row track + nav arrows below */
.psy-explore__scroller {
	margin: 4px 0 32px;
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.psy-explore__scroller-track {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	width: 100%;
}

.psy-explore__scroller-track::-webkit-scrollbar {
	display: none;
	height: 0;
	width: 0;
}

.psy-explore__pill {
	display: inline-flex !important;
	align-items: center;
	padding: 7px 16px !important;
	border-radius: 999px !important;
	border: 1px solid var(--psy-pink) !important;
	background: rgba(12, 5, 72, 0.6) !important;
	color: var(--psy-white) !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	letter-spacing: 0.06em !important;
	cursor: pointer !important;
	white-space: nowrap !important;
	flex-shrink: 0;
	box-shadow: none !important;
	outline: 0 !important;
	line-height: 1 !important;
	font-family: inherit !important;
	pointer-events: auto !important;
	position: relative;
	z-index: 1;
	transition: background 0.15s ease, color 0.15s ease;
}

.psy-explore__pill:hover,
.psy-explore__pill.is-active {
	background: var(--psy-pink) !important;
	color: var(--psy-blue-dark) !important;
}

.psy-explore__scroller-nav {
	display: none;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}

.psy-explore__scroller-nav.is-visible {
	display: flex;
}

.psy-explore__scroll-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 30px;
	border-radius: 999px !important;
	border: 1px solid var(--psy-pink) !important;
	background: transparent;
	color: var(--psy-white);
	cursor: pointer;
	padding: 0;
	box-shadow: none !important;
	transition: background 0.15s ease, color 0.15s ease;
	z-index: 2;
}

.psy-explore__scroll-btn:hover {
	background: var(--psy-pink);
	color: var(--psy-blue-dark);
}

.psy-explore__scroll-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	pointer-events: none;
}

.psy-explore__scroll-btn svg {
	display: block !important;
	width: 22px !important;
	height: 22px !important;
}

/* Layout */
.psy-explore__layout {
	display: grid;
	grid-template-columns: 288px 1fr;
	gap: 24px;
	align-items: flex-start;
}

/* Sidebar — Figma: indigo bg, 1A0F5C 1px border, radius 16, padding 24 */
.psy-explore__sidebar {
	background: var(--psy-indigo);
	border: 1px solid var(--psy-indigo-edge);
	border-radius: 16px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.psy-explore__sidebar-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--psy-white);
}

.psy-explore__field {
	margin: 0;
}

.psy-explore__field label,
.psy-explore__field-label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	color: var(--psy-white);
	margin-bottom: 8px;
}

.psy-explore__field select {
	width: 100%;
	background-color: var(--psy-indigo);
	border: 1px solid var(--psy-indigo-edge);
	border-radius: 12px;
	color: var(--psy-white);
	padding: 12px 40px 12px 16px;
	font-size: 14px;
	font-family: inherit;
	appearance: none;
	background-image: url("https://psytranceartist.com/wp-content/uploads/2026/06/freccia.png");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 12px auto;
	cursor: pointer;
}

.psy-explore__field select:focus {
	outline: none;
	border-color: var(--psy-pink);
}

/* Genre filter — toggle pills (checkbox visually hidden, label styled as chip) */
.psy-explore__checks {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.psy-explore__check {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid var(--psy-indigo-edge);
	background: transparent;
	color: var(--psy-white);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.psy-explore__check:hover {
	border-color: var(--psy-pink);
}

.psy-explore__check input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.psy-explore__check:has(input:checked) {
	background: var(--psy-pink);
	border-color: var(--psy-pink);
	color: var(--psy-blue-dark);
}

.psy-explore__check input:focus-visible + span {
	outline: 2px solid var(--psy-pink);
	outline-offset: 4px;
	border-radius: 999px;
}

/* Main */
.psy-explore__main {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.psy-explore__main-head {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.psy-explore__count {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.psy-explore__sort {
	width: 100%;
	background-color: var(--psy-indigo);
	border: 1px solid var(--psy-indigo-edge);
	border-radius: 12px;
	color: var(--psy-white);
	padding: 14px 44px 14px 18px;
	font-size: 14px;
	font-family: inherit;
	cursor: pointer;
	appearance: none;
	background-image: url("https://psytranceartist.com/wp-content/uploads/2026/06/freccia.png");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 12px auto;
}

/* Grid — 3 cols per Figma */
.psy-explore__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.psy-explore__grid.is-loading {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.15s ease;
}

/* Card — mirrors homepage `.psy-home__artist-card` exactly */
.psy-explore__card {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	background: var(--psy-indigo);
	border: 1px solid var(--psy-indigo-edge);
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.psy-explore__card:hover {
	transform: translateY(-3px);
	border-color: rgba(229, 74, 218, 0.55);
	box-shadow: 0 12px 28px rgba(229, 74, 218, 0.18);
}

.psy-explore__card-media {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background-color: var(--psy-indigo-edge);
}

.psy-explore__card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.psy-explore__card-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #2A1675 0%, #6C2BFF 100%);
}

.psy-explore__card-body {
	padding: 18px 18px 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.psy-explore__card-title {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--psy-white);
	line-height: 1.2;
}

.psy-explore__card-sub {
	margin: 0;
	font-size: 13px;
	color: var(--psy-pink);
	font-style: italic;
}

.psy-explore__card-loc {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 2px 0 0;
	font-size: 13px;
	color: var(--psy-lavender);
}

.psy-explore__card-loc svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

.psy-explore__card-cta {
	display: inline-block;
	margin-top: 14px;
	padding: 10px 22px;
	border-radius: 999px;
	border: 1px solid var(--psy-pink);
	background: transparent;
	color: var(--psy-pink);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-align: center;
	text-decoration: none;
	transition: background 160ms ease, color 160ms ease;
}

.psy-explore__card-cta:hover {
	background: var(--psy-pink);
	color: var(--psy-white);
	outline: none;
}

.psy-explore__card-cta:focus-visible {
	background: var(--psy-pink);
	color: var(--psy-white);
	outline: 2px solid var(--psy-pink);
	outline-offset: 3px;
}

/* Empty + pager */
.psy-explore__empty {
	padding: 32px;
	text-align: center;
	color: var(--psy-lavender);
	background: rgba(12, 5, 72, 0.6);
	border-radius: 12px;
}

.psy-explore__loadmore {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 24px;
}

.psy-explore__loadmore[hidden] {
	display: none;
}

.psy-explore__loadmore-btn {
	background: transparent;
	border: 1px solid var(--psy-pink);
	color: var(--psy-white);
	border-radius: 999px;
	padding: 12px 32px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease;
}

.psy-explore__loadmore-btn:not(:disabled):hover {
	background: rgba(229, 74, 218, 0.15);
}

.psy-explore__loadmore-btn:not(:disabled):active {
	transform: translateY(1px);
}

.psy-explore__loadmore-btn:disabled,
.psy-explore__loadmore-btn.is-loading {
	opacity: 0.5;
	cursor: wait;
}

/* Error */
.psy-explore__error {
	max-width: 720px;
	margin: 60px auto;
	padding: 32px;
	text-align: center;
	background: rgba(12, 5, 72, 0.85);
	border: 1px solid var(--psy-pink);
	border-radius: 14px;
}

/* Filters trigger + modal — desktop keeps the sidebar inline; below 1024 px
 * the sidebar becomes a slide-in panel triggered by a "Filters" button so the
 * artist grid claims the full viewport width. */
.psy-explore__filters-trigger { display: none; }
.psy-explore__sidebar-backdrop { display: none; }
.psy-explore__sidebar-close { display: none; }

/* Responsive */
@media ( max-width: 1024px ) {
	.psy-explore__layout {
		grid-template-columns: 1fr;
		/* `.psy-explore > * { position: relative; z-index: 1 }` makes the
		 * layout a stacking context, which traps the fixed-position sidebar
		 * (z-index 9000) below the backdrop (z-index 8500 in the parent's
		 * context). Reset to static on mobile so the sidebar can escape and
		 * render above the backdrop. The main column re-asserts its own
		 * lift below so the artist cards still paint above the `::before`
		 * background overlay (which has z-index 0). */
		position: static;
		z-index: auto;
	}

	.psy-explore__main {
		position: relative;
		z-index: 1;
	}

	.psy-explore__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.psy-explore__filters-trigger {
		display: inline-flex;
		align-items: center;
		gap: 8px;
		padding: 10px 22px;
		margin: 0 20px 18px;
		border-radius: 999px;
		border: 1px solid var(--psy-pink, #ff43c8);
		background: rgba(12, 5, 72, 0.55);
		color: #fff;
		font-family: inherit;
		font-size: 13px;
		font-weight: 700;
		letter-spacing: 0.05em;
		text-transform: uppercase;
		cursor: pointer;
	}
	.psy-explore__filters-trigger:hover { background: rgba(229, 74, 218, 0.18); }

	/* The sidebar becomes the modal panel: fixed, off-screen until [open].
	 * Background must be fully opaque so the blurred backdrop doesn't bleed
	 * through the panel content (it was reading as "blurred" before). */
	.psy-explore__sidebar {
		position: fixed;
		top: 0;
		bottom: 0;
		right: 0;
		left: auto;
		width: min(360px, 92vw);
		height: 100vh;
		max-height: 100vh;
		z-index: 9000;
		transform: translateX(100%);
		transition: transform 0.25s ease;
		overflow-y: auto;
		border-radius: 0;
		border: 0;
		border-left: 1px solid rgba(255, 255, 255, 0.12);
		box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6);
		/* Leave room for the site theme header that overlaps the top of the
		 * viewport so the modal title/close button never duck under it. */
		padding: calc(150px + env(safe-area-inset-top, 0px)) 22px 60px;
		background: #0C0548;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior: contain;
	}

	.psy-explore__sidebar-close {
		top: calc(120px + env(safe-area-inset-top, 0px));
	}
	.psy-explore__sidebar[open],
	.psy-explore__sidebar.is-open { transform: translateX(0); }

	.psy-explore__sidebar-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(5, 0, 35, 0.6);
		backdrop-filter: blur(4px);
		-webkit-backdrop-filter: blur(4px);
		z-index: 8500;
	}
	.psy-explore__sidebar-backdrop[hidden] { display: none; }

	.psy-explore__sidebar-close {
		display: inline-flex;
		position: absolute;
		top: 12px;
		right: 14px;
		width: 36px;
		height: 36px;
		align-items: center;
		justify-content: center;
		border: 0;
		background: transparent;
		color: var(--psy-text-mute, rgba(255, 255, 255, 0.7));
		font-size: 24px;
		line-height: 1;
		cursor: pointer;
	}
	.psy-explore__sidebar-close:hover { color: #fff; }

	body.psy-explore-filters-open { overflow: hidden; }
}

@media ( max-width: 768px ) {
	.psy-explore__hero,
	.psy-explore__layout {
		padding: 0 20px;
	}

	.psy-explore__hero {
		padding-top: 32px;
	}
}

@media ( max-width: 600px ) {
	.psy-explore__grid {
		grid-template-columns: 1fr;
	}
}
