/* Atomware Toolkit – Hoeksfontein: species list ([atk_species_list]). Every class is prefixed atk-.
 * Card, search and group look from the approved mockup (mockups/species-list.html: .sl, .sl-search,
 * .grp-label, .dg). Site CI only: #000, #CC9933, #FFF (tints are rgba of those, no new hex).
 * Fonts: the Elementor kit (Primary = Playfair Display for headings and prices, Text = Montserrat).
 *
 * Theme hooks (set on :root, body or a wrapper):
 * --atk-accent (#CC9933)         active filter button, dark card hover border
 * --atk-text (#000)              text, hover border, search focus ring
 * --atk-card-bg (#fff), --atk-card-border (rgba(0,0,0,.12)), --atk-radius (0; keep 0-2px), --atk-sl-gap (16px)
 * --atk-sl-glow (gold tint behind the cut-outs), --atk-sl-serif, --atk-sl-sans
 * Columns come from the shortcode: --atk-sl-cols / --atk-sl-cols-tablet / --atk-sl-cols-mobile.
 */

.atk-sl {
	--atk-sl-serif: var(--e-global-typography-primary-font-family, "Playfair Display"), "Playfair Display", Georgia, serif;
	--atk-sl-sans: var(--e-global-typography-text-font-family, "Montserrat"), "Montserrat", system-ui, sans-serif;
	--atk-sl-line: rgba(0, 0, 0, 0.12);
	--atk-sl-ink-3: rgba(0, 0, 0, 0.6);
	--atk-sl-glow: rgba(204, 153, 51, 0.2); /* = #F5EBD6 on white (mockup --gold-tint-2) */
	font-family: var(--atk-sl-sans);
	color: var(--atk-text, #000);
	width: 100%;
	box-sizing: border-box;
}

.atk-sl *,
.atk-sl *::before,
.atk-sl *::after {
	box-sizing: border-box;
}

.atk-sl__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Toolbar */
.atk-sl__toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	margin: 0 0 24px;
}

.atk-sl--groups .atk-sl__toolbar {
	margin-bottom: 56px;
}

.atk-sl__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Filter buttons (layout="grid"): subnav / eyebrow type. */
.atk-sl button.atk-sl__filter {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid var(--atk-text, #000);
	border-radius: var(--atk-radius, 0);
	background: #fff;
	color: var(--atk-text, #000);
	font-family: var(--atk-sl-sans);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.atk-sl button.atk-sl__filter:hover,
.atk-sl button.atk-sl__filter:focus {
	background: var(--atk-text, #000);
	color: #fff;
	border-color: var(--atk-text, #000);
}

.atk-sl button.atk-sl__filter.atk-is-active,
.atk-sl button.atk-sl__filter.atk-is-active:hover,
.atk-sl button.atk-sl__filter.atk-is-active:focus {
	background: var(--atk-accent, #CC9933);
	border-color: var(--atk-accent, #CC9933);
	color: var(--atk-text, #000);
}

.atk-sl button.atk-sl__filter:focus {
	outline: none;
}

.atk-sl button.atk-sl__filter:focus-visible {
	outline: 2px solid var(--atk-accent, #CC9933);
	outline-offset: 3px;
}

/* Search: full width, 52px, magnifier, 16px text (no iOS zoom). */
.atk-sl__tools {
	display: flex;
	flex: 1 1 260px;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

.atk-sl--grid .atk-sl__tools {
	flex: 0 1 360px;
}

/* [atk_species_search] (e.g. in the page head next to "Package Builder", as in the mockup). */
.atk-sl--search {
	width: 100%;
}

.atk-sl--search .atk-sl__tools {
	flex-wrap: nowrap;
}

.atk-sl--search a.atk-sl__button {
	flex: 0 0 auto;
}

.atk-sl__search-label {
	display: block;
	position: relative;
	flex: 1 1 260px;
	min-width: 0;
	margin: 0;
}

.atk-sl .atk-sl__search-label input.atk-sl__search[type="search"] {
	display: block;
	width: 100%;
	max-width: none;
	height: 52px;
	min-height: 52px;
	margin: 0;
	padding: 13px 16px 13px 46px;
	border: 1px solid rgba(0, 0, 0, 0.45);
	border-radius: 2px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E") no-repeat 16px 50%;
	background-size: 20px 20px;
	color: var(--atk-text, #000);
	font-family: var(--atk-sl-sans);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.4;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.atk-sl .atk-sl__search-label input.atk-sl__search[type="search"]::placeholder {
	color: var(--atk-sl-ink-3);
	opacity: 1;
}

.atk-sl .atk-sl__search-label input.atk-sl__search[type="search"]:focus {
	outline: none;
	border-color: var(--atk-text, #000);
	box-shadow: 0 0 0 1px var(--atk-text, #000);
}

.atk-sl a.atk-sl__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 0 28px;
	border: 1.5px solid #000;
	border-radius: 2px;
	background: #000;
	color: #fff;
	font-family: var(--atk-sl-sans);
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.atk-sl a.atk-sl__button:hover,
.atk-sl a.atk-sl__button:focus {
	background: #fff;
	color: #000;
}

.atk-sl__count {
	margin: 0;
	color: var(--atk-sl-ink-3);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Groups (layout="groups"): label + count on a rule, then the grid. */
.atk-sl__group + .atk-sl__group {
	margin-top: 88px;
}

.atk-sl__group[hidden] {
	display: none !important;
}

.atk-sl__group {
	scroll-margin-top: 148px;
}

.atk-sl__group-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 24px;
	margin: 0 0 28px;
	padding: 0 0 16px;
	border-bottom: 1px solid var(--atk-sl-line);
}

.atk-sl .atk-sl__group-title {
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: var(--atk-sl-serif);
	font-size: 30px;
	font-weight: 600;
	font-style: normal;
	line-height: 1.25;
	letter-spacing: -0.01em;
	text-transform: none;
}

.atk-sl__group-count {
	color: var(--atk-sl-ink-3);
	font-family: var(--atk-sl-sans);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	white-space: nowrap;
}

/* Dangerous Game: black cards; after other groups also a full-width black band. */
.atk-sl__group--dark {
	--atk-card-bg: #000;
	--atk-card-border: rgba(204, 153, 51, 0.28);
	--atk-sl-glow: rgba(204, 153, 51, 0.14);
	--atk-sl-line: rgba(255, 255, 255, 0.14);
	--atk-sl-ink-3: rgba(255, 255, 255, 0.62);
	color: #fff;
}

.atk-sl__group--band {
	position: relative;
	padding: 112px 0;
	background: #000;
	box-shadow: 0 0 0 100vmax #000;
	clip-path: inset(0 -100vmax);
}

.atk-sl__group + .atk-sl__group--band {
	margin-top: 112px;
}

/* Grid */
.atk-sl ul.atk-sl__grid {
	display: grid;
	grid-template-columns: repeat(var(--atk-sl-cols, 4), minmax(0, 1fr));
	gap: var(--atk-sl-gap, 16px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.atk-sl li.atk-sl__item {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.atk-sl li.atk-sl__item::before,
.atk-sl li.atk-sl__item::marker {
	content: none;
}

.atk-sl li.atk-sl__item[hidden] {
	display: none !important;
}

/* Card: the whole card is the link; centred; faint border, black on hover. */
.atk-sl a.atk-sl__card {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	height: 100%;
	padding: 18px 14px 16px;
	border: 1px solid var(--atk-card-border, var(--atk-sl-line));
	border-radius: var(--atk-radius, 0);
	background: var(--atk-card-bg, #fff);
	color: inherit;
	text-align: center;
	text-decoration: none;
	box-shadow: none;
	transition: border-color 0.2s ease;
}

.atk-sl__group--dark a.atk-sl__card {
	/* #0D0D0D from CI colours only: 5% white over black. */
	background-image: linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05));
}

.atk-sl a.atk-sl__card:hover,
.atk-sl a.atk-sl__card:focus {
	color: inherit;
	text-decoration: none;
	border-color: var(--atk-text, #000);
}

.atk-sl__group--dark a.atk-sl__card:hover,
.atk-sl__group--dark a.atk-sl__card:focus {
	border-color: var(--atk-accent, #CC9933);
}

.atk-sl a.atk-sl__card:focus {
	outline: none;
}

.atk-sl a.atk-sl__card:focus-visible {
	outline: 2px solid var(--atk-accent, #CC9933);
	outline-offset: 3px;
}

/* Square box reserved up front (no layout shift), gold glow behind the cut-out; contained, never cropped. */
.atk-sl__media {
	display: block;
	position: relative;
	flex: 0 0 auto;
	width: 100%;
	aspect-ratio: 1 / 1;
	margin: 0 0 10px;
	background: radial-gradient(closest-side, var(--atk-sl-glow), rgba(204, 153, 51, 0));
}

@supports not (aspect-ratio: 1 / 1) {
	.atk-sl__media {
		height: 0;
		padding-top: 100%;
	}
}

.atk-sl .atk-sl__img {
	position: absolute;
	top: 7%;
	left: 7%;
	display: block;
	width: 86%;
	height: 86%;
	max-width: none;
	margin: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	object-fit: contain;
}

.atk-sl__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: center;
	width: 100%;
	min-width: 0;
}

.atk-sl__title {
	display: block;
	margin: 0 0 6px;
	color: inherit;
	font-family: var(--atk-sl-sans);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.atk-sl__price {
	display: block;
	margin-top: auto;
	color: inherit;
	font-family: var(--atk-sl-serif);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	font-variant-numeric: lining-nums;
}

.atk-sl__price .amount,
.atk-sl__price bdi,
.atk-sl__price ins {
	color: inherit;
	font: inherit;
	text-decoration: none;
}

.atk-sl__price .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.atk-sl__price del {
	opacity: 0.6;
}

/* The arrow is a flex item: its leading space collapses, so space it here. */
.atk-sl .atk-sl__arrow {
	margin-left: 0.45em;
}

/* "More info →" instead of a price (request price, dangerous game, no price). */
.atk-sl .atk-sl__price--more {
	display: inline-flex;
	align-items: center;
	min-height: 22px;
	font-family: var(--atk-sl-sans);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	white-space: nowrap;
}

.atk-sl__empty {
	margin: 24px 0;
	color: rgba(0, 0, 0, 0.74);
	font-size: 16px;
}

.atk-sl__empty[hidden] {
	display: none;
}

/* Tablet (Elementor default breakpoint) */
@media (max-width: 1024px) {
	.atk-sl ul.atk-sl__grid {
		grid-template-columns: repeat(var(--atk-sl-cols-tablet, 3), minmax(0, 1fr));
	}

	.atk-sl__group--band {
		padding: 80px 0;
	}

	.atk-sl__group + .atk-sl__group--band {
		margin-top: 80px;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.atk-sl ul.atk-sl__grid {
		grid-template-columns: repeat(var(--atk-sl-cols-mobile, 2), minmax(0, 1fr));
	}

	.atk-sl--groups .atk-sl__toolbar {
		margin-bottom: 40px;
	}

	.atk-sl__tools,
	.atk-sl--grid .atk-sl__tools {
		flex: 1 1 100%;
		width: 100%;
	}

	.atk-sl a.atk-sl__button {
		width: 100%;
	}

	.atk-sl--search .atk-sl__tools {
		flex-wrap: wrap;
	}

	.atk-sl__filters {
		gap: 6px;
	}

	.atk-sl button.atk-sl__filter {
		flex: 0 0 auto;
		min-height: 40px;
		padding: 0 12px;
		font-size: 11px;
	}

	.atk-sl .atk-sl__group-title {
		font-size: 24px;
	}

	.atk-sl__group + .atk-sl__group {
		margin-top: 56px;
	}

	.atk-sl__group {
		scroll-margin-top: 120px;
	}

	.atk-sl__group--band {
		padding: 64px 0;
	}

	.atk-sl__group + .atk-sl__group--band {
		margin-top: 64px;
	}

	/* One column (columns_mobile="1"): list rows, 64px cut-out, name left, price right. */
	.atk-sl--rows ul.atk-sl__grid {
		gap: 8px;
	}

	.atk-sl--rows a.atk-sl__card {
		flex-direction: row;
		align-items: center;
		gap: 14px;
		min-height: 76px;
		padding: 6px 16px 6px 6px;
		text-align: left;
	}

	.atk-sl--rows .atk-sl__media {
		flex: 0 0 64px;
		width: 64px;
		margin: 0;
	}

	.atk-sl--rows .atk-sl__img {
		top: 4%;
		left: 4%;
		width: 92%;
		height: 92%;
	}

	.atk-sl--rows .atk-sl__body {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 14px;
	}

	.atk-sl--rows .atk-sl__title {
		flex: 1 1 auto;
		min-width: 0;
		margin: 0;
		letter-spacing: 0.04em;
	}

	.atk-sl--rows .atk-sl__price {
		flex: 0 0 auto;
		margin: 0;
		font-size: 17px;
		white-space: nowrap;
	}

	.atk-sl--rows .atk-sl__price--more {
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.atk-sl a.atk-sl__card,
	.atk-sl button.atk-sl__filter,
	.atk-sl a.atk-sl__button {
		transition: none;
	}
}
