/* Book Promo AI - promo card grid. */

.bpa-grid {
	display: grid;
	grid-template-columns: repeat(var(--bpa-cols, 3), minmax(0, 1fr));
	gap: 1.75rem;
	margin: 2rem 0;
}

@media (max-width: 980px) {
	.bpa-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.bpa-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.bpa-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.bpa-cover {
	background: #f6f6f4;
	text-align: center;
	padding: 1.25rem;
}

/* Every cover sits in a fixed 2:3 frame (the standard book cover ratio),
   centered. object-fit: contain keeps odd-shaped covers fully visible. */
.bpa-cover img {
	display: block;
	margin: 0 auto;
	width: 100%;
	max-width: 320px;
	aspect-ratio: 2 / 3;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

/* Fallback cover when no image is set: the title on a color gradient. */
.bpa-cover-placeholder {
	margin: 0 auto;
	width: 100%;
	max-width: 320px;
	aspect-ratio: 2 / 3;
	border-radius: 8px;
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
	box-sizing: border-box;
	display: flex;
	align-items: flex-end;
	padding: 1.15rem;
	text-align: left;
	color: #fff;
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.3;
	overflow: hidden;
}

.bpa-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.15rem 1.5rem 1.5rem;
}

.bpa-title {
	font-size: 1.18rem;
	line-height: 1.35;
	margin: 0.25rem 0 0.65rem;
}

.bpa-teaser {
	font-size: 0.97rem;
	line-height: 1.65;
	color: #3d3d3d;
	margin: 0 0 1.15rem;
}

.bpa-formats {
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #777;
	margin: 0 0 1.15rem;
}

.bpa-btn {
	margin-top: auto;
	align-self: flex-start;
	display: inline-block;
	background: var(--bpa-btn-bg, #ffb400);
	color: var(--bpa-btn-color, #2b2100);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1;
	text-decoration: none;
	padding: 0.9rem 1.7rem;
	border-radius: 999px;
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
	transition: transform 0.15s ease, filter 0.15s ease;
}

.bpa-btn:hover,
.bpa-btn:focus {
	transform: translateY(-2px);
	filter: brightness(1.06);
	color: var(--bpa-btn-color, #2b2100);
}
