/* Product cards: a tall (portrait) photo must shrink to fit the square image box.
   The box is a grid with an auto-sized row, so a 933x1400 photo made the row grow past the box and the image
   painted over the product name and price. A fixed (minmax(0,1fr)) track keeps every photo inside the box. */
.sc-card-media > a {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
}
.sc-card-media > a > img,
.sc-card-media > a > picture,
.sc-card-media > a > b {
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    max-height: 100%;
}

/* Product page section tabs ("Product details / Specifications / Delivery & returns / Verified reviews").
   The tab bar and the section anchors used fixed offsets (96-104px, or none) that no longer match the sticky
   header, so the bar slid half under the header and "Delivery & returns" / "Verified reviews" scrolled to a spot
   where their headings were hidden. The offset now follows the real header height (--site-header-h, set by a
   small script on the product page; the values below are the fallback). */
html body .product-detail-navigation {
    top: calc(var(--site-header-h, 135px) + 2px) !important;
}
html body #product-details,
html body #specifications,
html body #delivery-returns,
html body #verified-reviews {
    scroll-margin-top: calc(var(--site-header-h, 135px) + 72px) !important;
}
@media (max-width: 760px) {
    html body .product-detail-navigation { top: calc(var(--site-header-h, 65px) + 2px) !important; }
    html body #product-details,
    html body #specifications,
    html body #delivery-returns,
    html body #verified-reviews { scroll-margin-top: calc(var(--site-header-h, 65px) + 64px) !important; }
}
