I am trying to create this layout with display: grid, but I am not sure if it is even possible...
I created two column layouts to have a B item horizontally aligned with an A item (green line). The A item is a child of a component that has one or two lines of text before.
I know that would be possible if I would have the text and A and B items in one container as siblings. But is there any other elegant solution that would be supported in all major browsers?
UPADTE:
HTML Can be edited, but need to keep <section>s separated.

.card {
border: 1px solid #E2E3E3;
border-radius: 4px;
background-color: #FFF;
padding: .5rem;
}
.checkout-form {
padding: 1.5rem;
background-color: #f9f9f9;
display: grid;
grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
gap: 1rem;
}
<form class="checkout-form">
<div class="checkout-form__main">
<section>
<section>
<p>Products info</p>
<article class="card">
Content A
</article>
</section>
<section>
<p>Customer info</p>
<article class="card">
Content X
</article>
</section>
</section>
</div>
<div class="checkout-form__cost">
<section class="card">
Price summary
</section>
</div>
</form>
margin-topto "Price summary"