From 0791e7c8bc1bf9dd79111e93b5ecb294d17d30ba Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 26 Aug 2026 23:34:25 +0000 Subject: [PATCH] Fix shop/related/wishlist grids not equalizing card heights MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ProductCard already has a h-full + flex-1 spacer specifically to keep every card in a row the same height regardless of content (title wrap, subline wrap, low-stock line) — but all three grids using it set items-start on the grid container, which overrides the default stretch and silently defeats that. A product whose subline wraps to 2 lines made its card taller than its row siblings instead of them matching. Dropping items-start (default items-stretch) fixes all three call sites. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01J1Hu5bZ1kZUgKhab6yNwCt --- app/cart/components/RelatedProducts.tsx | 4 +++- app/konto/merkliste/components/MerklisteGrid.tsx | 4 +++- app/shop/components/ProductGrid.tsx | 8 +++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/app/cart/components/RelatedProducts.tsx b/app/cart/components/RelatedProducts.tsx index 5811ac5..0ad199c 100644 --- a/app/cart/components/RelatedProducts.tsx +++ b/app/cart/components/RelatedProducts.tsx @@ -129,7 +129,9 @@ export function RelatedProducts({ (opacity: 0) — invisible. Not worth chasing a fix for a scroll-reveal nicety on a list that mutates; a static grid renders correctly with no animation risk. */} -
+ {/* No items-start — see ProductGrid.tsx's own comment on why that + silently defeats ProductCard's h-full equal-height design. */} +
{displayProducts.map((product, i) => ( + // No items-start — see ProductGrid.tsx's own comment on why that + // silently defeats ProductCard's h-full equal-height design. + {visibleEntries.map(({ item, product }) => ( p.id).join(",")} - className="grid items-start grid-cols-1 sm:grid-cols-2 lg:grid-cols-12 gap-6 sm:gap-[var(--layout-grid-gap)] w-full" + className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-12 gap-6 sm:gap-[var(--layout-grid-gap)] w-full" > {products.map((product) => (