/* TCP Format Cards — centered grid, hover overlay + Buy Now */
.tcpfc {
	--tcpfc-cols: 4;
	--tcpfc-gap: 20px;
	--tcpfc-card-w: 200px;
	--tcpfc-radius: 10px;
	--tcpfc-border: #3a2a1a;
	--tcpfc-border-w: 1.5px;
	--tcpfc-bg: #f5f0e8;
	--tcpfc-footer-bg: #f5f0e8;
	--tcpfc-footer-color: #3a2a1a;
	--tcpfc-hover-overlay: rgba(139, 105, 68, 0.78);
	--tcpfc-footer-hover-bg: #5c4030;
	--tcpfc-footer-hover-color: #ffffff;
	--tcpfc-btn-bg: #ffffff;
	--tcpfc-btn-color: #3a2a1a;
	--tcpfc-btn-radius: 999px;
	--tcpfc-divider: #3a2a1a;
	--tcpfc-img-pad: 16px;
	--tcpfc-footer-h: 48px;

	width: 100%;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	background: transparent;
	box-sizing: border-box;
}

.tcpfc *,
.tcpfc *::before,
.tcpfc *::after {
	box-sizing: border-box;
}

.tcpfc-grid {
	/* Flex so 3 cards center in the middle (not stuck left in a 4-col grid) */
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: var(--tcpfc-gap);
	width: 100%;
	max-width: calc(
		(var(--tcpfc-cols) * var(--tcpfc-card-w)) +
		((var(--tcpfc-cols) - 1) * var(--tcpfc-gap))
	);
	margin-left: auto;
	margin-right: auto;
}

.tcpfc-card {
	display: flex;
	flex-direction: column;
	flex: 0 1 var(--tcpfc-card-w);
	width: var(--tcpfc-card-w);
	max-width: 100%;
	background: var(--tcpfc-bg);
	border: var(--tcpfc-border-w) solid var(--tcpfc-border);
	border-radius: var(--tcpfc-radius);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.tcpfc-card:hover {
	transform: translateY(-2px);
}

.tcpfc-media {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--tcpfc-img-pad);
	min-height: 180px;
	background: var(--tcpfc-bg);
	overflow: hidden;
}

.tcpfc-media img {
	display: block;
	max-width: 100%;
	max-height: 220px;
	width: auto;
	height: auto;
	object-fit: contain;
	position: relative;
	z-index: 1;
	transition: transform 0.25s ease;
}

.tcpfc-overlay {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--tcpfc-hover-overlay);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tcpfc-card:hover .tcpfc-overlay,
.tcpfc-card:focus-within .tcpfc-overlay {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.tcpfc-buy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 10px 22px;
	border: none;
	border-radius: var(--tcpfc-btn-radius);
	background: var(--tcpfc-btn-bg);
	color: var(--tcpfc-btn-color);
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
	transform: translateY(6px) scale(0.96);
	transition: transform 0.25s ease, filter 0.2s ease, background 0.2s ease, color 0.2s ease;
	cursor: pointer;
}

.tcpfc-card:hover .tcpfc-buy,
.tcpfc-card:focus-within .tcpfc-buy {
	transform: translateY(0) scale(1);
}

.tcpfc-buy:hover {
	filter: brightness(1.05);
}

.tcpfc-buy-icon {
	display: inline-flex;
	line-height: 0;
}

.tcpfc-buy-icon svg {
	width: 1em;
	height: 1em;
	display: block;
}

.tcpfc-footer {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: var(--tcpfc-footer-h);
	padding: 10px 12px;
	background: var(--tcpfc-footer-bg);
	border-top: var(--tcpfc-border-w) solid var(--tcpfc-divider);
	transition: background 0.25s ease, color 0.25s ease;
}

.tcpfc-label {
	margin: 0;
	text-align: center;
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: 1.05rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--tcpfc-footer-color);
	transition: color 0.25s ease;
}

.tcpfc-card:hover .tcpfc-footer,
.tcpfc-card:focus-within .tcpfc-footer {
	background: var(--tcpfc-footer-hover-bg);
}

.tcpfc-card:hover .tcpfc-label,
.tcpfc-card:focus-within .tcpfc-label {
	color: var(--tcpfc-footer-hover-color);
}

/* When card itself is the link, buy is visual only */
.tcpfc-card.is-link {
	cursor: pointer;
}

.tcpfc-card.is-link .tcpfc-buy {
	pointer-events: none;
}

@media (max-width: 767px) {
	.tcpfc-grid {
		max-width: 100%;
	}

	.tcpfc-card {
		flex: 1 1 100%;
		width: 100%;
		max-width: min(var(--tcpfc-card-w), 100%);
	}
}
