/*
 * Product frame + product card — shared by home page designs A and B (07/10).
 * Markup comes from the [ba_products] shortcode (inc/products.php).
 *
 * .ba-frame            square Écru frame, product photo inside with padding
 * .ba-frame.is-round   photo cropped in a circle
 * .ba-frame.is-arch    photo cropped in an arch
 * .ba-products         list of .ba-product cards (layout set by the page)
 */

/* The photo is absolutely placed: with aspect-ratio, an in-flow image would stretch the box. */
.ba-frame {
	--ba-frame-pad: 12%;
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	border-radius: var(--ba-radius-card);
	background: var(--ba-ecru);
}

.ba-frame img {
	position: absolute;
	top: var(--ba-frame-pad);
	left: var(--ba-frame-pad);
	display: block;
	width: calc(100% - 2 * var(--ba-frame-pad));
	height: calc(100% - 2 * var(--ba-frame-pad));
	object-fit: cover;
	border-radius: 4px;
}

.ba-frame.is-round img {
	border-radius: 50%;
}

.ba-frame.is-arch img {
	border-radius: 999px 999px var(--ba-radius-card) var(--ba-radius-card);
}

/* ul.: same weight as Kadence's `.single-content ul` indent, loaded after it. */
ul.ba-products {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ba-products > li {
	min-width: 0;
	margin: 0;
}

.ba-product__link {
	display: flex;
	flex-direction: column;
	gap: 14px;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

/* Beats Kadence's `.single-content h3` / `p` margins. */
.ba-product :is(.ba-product__label, .ba-product__name, .ba-product__price) {
	margin: 0;
}

.ba-product__name {
	font-family: var(--ba-font-heading);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.01em;
	color: var(--ba-encre);
}

/* Product names are typed in lower case in the shop: capitalise for display only. */
.ba-product__name::first-letter {
	text-transform: uppercase;
}

.ba-product__link:hover .ba-product__name,
.ba-product__link:focus-visible .ba-product__name {
	color: var(--ba-denim);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.ba-product__price {
	margin: 0;
	font-weight: 700;
	color: var(--ba-encre);
}

.ba-product__price del {
	font-weight: 400;
	color: var(--ba-texte-doux);
}

.ba-product__badge {
	position: absolute;
	top: 18px;
	left: 18px;
	padding: 3px 8px;
	border-radius: 4px;
	background: var(--ba-brique);
	color: var(--ba-blanc);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
