diff --git a/app/cart/components/RelatedProducts.tsx b/app/cart/components/RelatedProducts.tsx index 0ad199c..906498e 100644 --- a/app/cart/components/RelatedProducts.tsx +++ b/app/cart/components/RelatedProducts.tsx @@ -129,9 +129,13 @@ 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. */} -
{product.categories.join(", ")}
- )} - {/* line-clamp-1 on the name and a reserved+clamped 2-line slot - for the subline — without these, a longer name or a subline - that wraps to 2 lines pushes THAT card's price row down - relative to its row siblings; the flex-1 spacer near the - button only re-aligns the button, not the price above it. */} - {product.href ? ( - -
-
{product.subline}
-- {discount !== null && ( - {formatPrice(product.compareAtPrice!)} - )} - {formatPrice(product.price)} - {!kleinunternehmer && inkl. {taxRate}% MwSt.} -
- {belowPrice} - {/* Always rendered, text conditional — reserved height keeps every - card in a row equal height regardless of low-stock status. An - earlier version omitted this for fully-out-of-stock products - (this line can never apply there), on the theory that it was - dead space — but NotifyMeForm's single-row redesign (see its - own comment) now matches AddToCartInlineButton's button height - exactly, which made THIS line the only remaining source of a - mismatch: omitting it made the sold-out card shorter than its - siblings instead of taller. Keeping it unconditional is what - actually gets an exact match now. */} -{anyLowStock ? "Nur noch wenige verfügbar" : null}
- {/* flex-1 spacer — pins every card's button to the same Y - regardless of whether the title/category line wraps. */} - +{product.categories.join(", ")}
+ )} + {product.href ? ( + +
+
{product.subline}
} ++ {discount !== null && ( + {formatPrice(product.compareAtPrice!)} + )} + {formatPrice(product.price)} + {!kleinunternehmer && inkl. {taxRate}% MwSt.} +
+ +{anyLowStock ? "Nur noch wenige verfügbar" : null}
+ + {/* self-end pins the button to the bottom of this row even though + the row itself is minmax(0,1fr) (see grid-auto-rows) and can be + taller than the button — replaces the old flex-1 spacer. */} +