/*
 * Visitor-facing shop styles.
 *
 * Deliberately scoped to .rap-shop-block and free of colour opinions the theme
 * already owns, so the block sits inside an existing page instead of fighting
 * it. The grid mirrors the administrator preview James approved.
 */

.rap-shop-block,
.rap-shop-block * {
	box-sizing: border-box;
}

.rap-shop-block {
	margin: 0 auto;
	max-width: 100%;
}

.rap-shop-block-notice {
	background: #fcf0c3;
	border: 1px solid #dba617;
	border-radius: 6px;
	font-size: 14px;
	margin: 0 0 20px;
	padding: 12px 16px;
}

.rap-shop-block-header {
	margin: 0 auto 20px;
	max-width: 720px;
	text-align: center;
}

.rap-shop-block-heading {
	line-height: 1.15;
	margin: 0 0 10px;
}

.rap-shop-block-intro {
	margin: 0;
}

.rap-shop-block-disclosure {
	background: rgba(0, 0, 0, 0.03);
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 6px;
	font-size: 0.85em;
	margin: 0 0 28px;
	padding: 12px 16px;
	text-align: center;
}

.rap-shop-block-group {
	margin: 0 0 34px;
}

.rap-shop-block-group-title {
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	margin: 0 0 18px;
	padding-bottom: 10px;
}

/*
 * auto-fill, not auto-fit: a category with three products must not stretch its
 * cards wider than a category with six. Consistent card width across every
 * group is what makes the grid read as one shop.
 */
.rap-shop-block-grid {
	display: grid;
	gap: 18px;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.rap-shop-block-card {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 8px;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
}

.rap-shop-block-media {
	align-items: center;
	background: #f6f7f7;
	display: flex;
	height: 210px;
	justify-content: center;
	padding: 16px;
}

.rap-shop-block-media img {
	height: 100%;
	max-width: 100%;
	object-fit: contain;
	width: 100%;
}

.rap-shop-block-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 18px;
}

.rap-shop-block-badge {
	align-self: flex-start;
	background: #e6eee0;
	border-radius: 999px;
	color: #34422f;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	margin-bottom: 8px;
	padding: 4px 9px;
	text-transform: uppercase;
}

.rap-shop-block-name {
	font-size: 1.05em;
	line-height: 1.3;
	margin: 0 0 8px;
}

.rap-shop-block-copy {
	font-size: 0.95em;
	line-height: 1.55;
	margin: 0 0 16px;
}

.rap-shop-block-cta {
	align-self: flex-start;
	background: #34422f;
	border-radius: 4px;
	color: #fff;
	display: inline-block;
	font-size: 0.9em;
	font-weight: 600;
	margin-top: auto;
	padding: 10px 16px;
	text-decoration: none;
}

.rap-shop-block-cta:hover,
.rap-shop-block-cta:focus {
	background: #22301e;
	color: #fff;
	text-decoration: none;
}

.rap-shop-block-cta:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.rap-shop-block-grid {
		grid-template-columns: 1fr;
	}

	.rap-shop-block-media {
		height: 240px;
	}

	.rap-shop-block-group {
		margin-bottom: 28px;
	}
}
