/* article + class beats Gutenberg's `.is-layout-constrained > *` margin rule.
 * The explicit `.is-layout-constrained >` context also beats its
 * `> :last-child { margin-block-end: 0 }` rule, keeping the fixture's
 * 1.6em 0 margin on the frontend where the article is the last child. */
article.lca-product-card,
.is-layout-constrained > article.lca-product-card {
	padding: 16px;
	border: 1px solid #ddd;
	border-radius: 12px;
	margin: 1.6em 0;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.lca-product-card__main {
	display: flex;
	gap: 14px;
	align-items: center;
}

.lca-product-card__image {
	flex-shrink: 0;
}

.lca-product-card__image img {
	display: block;
	width: 112px;
	height: 112px;
	object-fit: cover;
	border-radius: 10px;
}

.lca-product-card__body {
	min-width: 0;
	flex: 1;
}

.lca-product-card__brand {
	margin: 0 0 4px;
	font-size: 12px;
	color: #777;
}

.lca-product-card__title {
	margin: 0 0 6px;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.45;
}

.lca-product-card__description {
	margin: 0;
	font-size: 14px;
	color: #555;
	line-height: 1.7;
}

.lca-product-card__links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.lca-product-card__link {
	display: inline-block;
	padding: 9px 15px;
	border-radius: 999px;
	font-size: 14px;
	color: #fff;
	text-decoration: none;
}

/* Cocoon theme's `.entry-content a` (0,1,1) beats the base rule (0,1,0) and
 * turns button text green. Scope LCA anchors (0,2,2) to win without
 * !important; this selector never matches ordinary article links. */
article.lca-product-card a.lca-product-card__link,
article.lca-product-card a.lca-product-card__link:visited,
article.lca-product-card a.lca-product-card__link:hover,
article.lca-product-card a.lca-product-card__link:focus,
article.lca-product-card a.lca-product-card__link:active {
	color: #fff;
	text-decoration: none;
}

.lca-product-card__link--official,
.lca-product-card__link--custom {
	font-weight: 600;
	background: #555;
}

.lca-product-card__link--amazon {
	font-weight: 700;
	background: #232f3e;
}

.lca-product-card__link--aliexpress {
	font-weight: 700;
	background: #ff6a00;
}

/* Narrow viewports only: keep the fixture layout on desktop, avoid overflow
 * when the fixed 112px image plus text cannot share one row. */
@media (max-width: 480px) {
	.lca-product-card__main {
		flex-wrap: wrap;
	}
}
