/**
 * SP Category Grid - front-end styles.
 * Columns, gap, radius and colours are injected inline per grid instance.
 * Text inherits the theme font (no font-family declared on labels).
 */

.spcg-wrapper {
	width: 100%;
	margin: 0 auto;
}

.spcg-grid {
	display: grid;
	gap: var(--spcg-gap, 16px);
	width: 100%;
	/* grid-template-columns is set inline per instance/breakpoint */
}

/* Each card */
.spcg-card {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	border-radius: var(--spcg-radius, 14px);
	overflow: hidden;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-color: #f1f1f1;
	text-decoration: none !important;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.spcg-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

/* Gradient overlay so the white label is always readable */
.spcg-card-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient( to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.10) 45%, rgba(0, 0, 0, 0) 70% );
	z-index: 1;
}

/* Category label */
.spcg-card-label {
	position: absolute;
	left: 16px;
	bottom: 14px;
	right: 16px;
	z-index: 2;
	color: #ffffff;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.2;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
	text-decoration: none;
}

/* ---- NEW LAUNCHES tile ---- */
.spcg-card--new {
	background-color: var(--spcg-primary, #3C0008);
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.spcg-card--new.spcg-card--hasbg {
	background-size: cover;
	background-position: center;
}

.spcg-new-inner {
	position: relative;
	z-index: 2;
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.spcg-new-title {
	font-family: inherit;
	color: var(--spcg-accent, #F5F5DC);
	font-size: 30px;
	font-weight: 800;
	line-height: 1.05;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.spcg-new-sub {
	font-family: inherit;
	color: var(--spcg-accent, #F5F5DC);
	opacity: 0.92;
	font-size: 15px;
	font-weight: 500;
}

/* Slight dark overlay on NEW tile only when it has a background image */
.spcg-card--new.spcg-card--hasbg::before {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 1;
}

/* Responsive label sizing */
@media (max-width: 1024px) {
	.spcg-card-label { font-size: 16px; left: 12px; bottom: 12px; }
	.spcg-new-title { font-size: 24px; }
	.spcg-new-sub { font-size: 13px; }
	.spcg-new-inner { padding: 16px; }
}

@media (max-width: 600px) {
	.spcg-card-label { font-size: 14px; left: 10px; bottom: 10px; }
	.spcg-new-title { font-size: 20px; }
	.spcg-new-sub { font-size: 12px; }
	.spcg-new-inner { padding: 14px; }
}
