/* Book card. Colours and fonts are variables: override them in your theme if needed. */
.book-card {
	--bc-accent: #8a3b1e;
	--bc-accent-dark: #5c2511;
    --color-button-bg: #810023;
	--bc-ink: #1d1b18;
	--bc-muted: #5f5a52;
	--bc-bg: #fbf8f3;
	--bc-line: #e2dacb;
	--bc-serif: ff-scala, "Georgia Fallback", Georgia, serif;

	container-type: inline-size; /* responds to the width of the post column, not the screen */
	margin: 2em 0;
}

.book-card__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	box-sizing: border-box;
	padding: 24px;
    border-radius:5px;
	background: var(--bc-bg);
	border: 1px solid var(--bc-line);
	color: var(--bc-ink);
}

/* The cover keeps its own proportions: no cropping, no forced aspect ratio. */
.book-card__cover {
	flex: none;
	display: flex;
	justify-content: center;
	width: 128px;
}

.book-card__cover img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 192px; /* stops very tall covers dominating the card */
	margin: 0;
	object-fit: contain;
	box-shadow: 0 6px 16px rgba(29, 27, 24, 0.25); /* on the image, so it hugs the cover */
}


.book-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	min-width: 0;
}

.book-card__body p {
	margin: 0;
}

.book-card__label {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--bc-accent);
}

.book-card__title {
	font-family: var(--bc-serif);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
	color: var(--bc-ink);
}

.book-card__subtitle {
    font-family: var(--bc-serif);
    font-style: italic;
	font-size: 16px;
	line-height: 1.3;
	color: var(--bc-muted);
}

.book-card__credits {
	font-size: 14px;
	color: var(--bc-muted);
}

.book-card__desc {
	font-size: 14px;
	line-height: 1.5;
}

.book-card__isbn {
	font-size: 13px;
	color: var(--bc-muted);
}

.book-card__price {
    font-family: var(--bc-serif);
	font-size: 16px;
	font-weight: 600;
	color: var(--bc-ink);
}

.book-card__price del {
	font-weight: 400;
	color: var(--bc-muted);
}

.book-card__price ins {
	background: none;
	text-decoration: none;
}

.book-card__stock {
	font-size: 14px;
	color: var(--bc-muted);
}

.book-card__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	margin-top: 8px;
}

.book-card a.book-card__button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 44px;
	padding: 12px 20px;
	/*background: var(--bc-accent);*/
    background: var(--color-button-bg);
	border-radius: 4px;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.book-card a.book-card__button:hover {
	/*background: var(--bc-accent-dark);*/
    background: var(--color-button-bg);
    opacity: 0.7;
	color: #fff;
}

.book-card a.book-card__link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--bc-accent);
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.book-card a.book-card__link:hover {
	color: var(--bc-accent-dark);
}

.book-card a:focus-visible {
	outline: 2px solid var(--bc-accent);
	outline-offset: 3px;
}

/* Narrow column (phones, or narrow post layouts): stack and centre. */
@container (max-width: 480px) {
	.book-card__inner {
		flex-direction: column;
		padding: 20px;
		text-align: center;
	}

	.book-card__cover {
		width: 140px;
	}

	.book-card__body {
		align-items: center;
		width: 100%;
	}

	.book-card__actions {
		flex-direction: column;
		width: 100%;
		gap: 0;
	}

	.book-card a.book-card__button {
		width: 100%;
	}
}
