/* BBH Dynamic WooCommerce Product Choices — front-end card grid. */

.bbhgfwc-grid {
	display: grid;
	grid-template-columns: repeat(var(--bbhgfwc-columns, 4), 1fr);
	gap: 20px;
	margin: 0;
	padding: 0;
}

@media (max-width: 782px) {
	.bbhgfwc-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.bbhgfwc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	text-align: center;
}

.bbhgfwc-card .bbhgfwc-img img {
	transition: box-shadow 0.15s ease;
}

.bbhgfwc-card:hover .bbhgfwc-img img {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.bbhgfwc-card.bbhgfwc-selected .bbhgfwc-img img {
	border: 4px solid #333;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 3px 6px, rgba(0, 0, 0, 0.23) 0px 3px 6px;
    transition: all 0.3s ease;
}

.bbhgfwc-card.bbhgfwc-hidden {
	display: none;
}

/* Visually hidden but still focusable/checkable radio input. */
.bbhgfwc-input {
	display: none !important;
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.bbhgfwc-input:focus-visible + .bbhgfwc-img {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.bbhgfwc-img {
	display: block;
}

.bbhgfwc-img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 4px;
	background: #f3f3f3;
}

.bbhgfwc-label {
	display: block;
	margin-top: 6px;
	font-size: 14px;
	line-height: 1.25;
}

.bbhgfwc-loadmore {
	display: inline-block;
	margin-top: 16px;
	cursor: pointer;
}

.bbhgfwc-empty,
.bbhgfwc-editor-note {
	margin: 0;
	color: #666;
	font-style: italic;
}

/* While a live re-query is in flight. */
.bbhgfwc.bbhgfwc-loading {
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.15s ease;
}
