/* Flache Kennzeichnungen unten links im Produktbild. */
.woocommerce ul.products li.product .product-card-image {
    position: relative;
    display: block;
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: var(--homeofgrizzlys-product-card-ratio);
    margin-bottom: 16px;
    overflow: hidden;
    container-type: inline-size;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link .product-card-image > img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}
.woocommerce div.product div.images .woocommerce-product-gallery__image,
.woocommerce div.product div.images .woocommerce-product-gallery__image--placeholder {
    position: relative;
}
.product-badges {
    position: absolute;
    z-index: 2;
    bottom: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    max-width: calc(100% - 24px);
    pointer-events: none;
}
.product-badges__labels {
    display: flex;
    align-items: center;
    gap: 6px;
}
.product-badge {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 12px;
    border: 0;
    border-radius: 0;
    color: #fff;
    font-family: 'Exo 2', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    line-height: 18px;
    text-transform: uppercase;
    white-space: nowrap;
}
.product-badge--new { background: var(--homeofgrizzlys-green, #006737); }
.product-badge--sale { background: #c81825; }
.product-badge--personalizable { background: #000; }
/* Der lange Text passt auch in schmale Produktkarten ohne Umbruch. */
.product-card-image .product-badge--personalizable {
    padding-inline: clamp(6px, 3cqi, 12px);
    font-size: clamp(10px, 8cqi, 14px);
}
/* Der Galerie-Verlauf liegt unter den Badges innerhalb des jeweiligen Slides. */
.woocommerce div.product div.images .product-gallery-frame:has(.product-badges)::after {
    display: none;
}
.woocommerce div.product div.images .product-gallery-frame .woocommerce-product-gallery__image:has(.product-badges)::after {
    content: '';
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    left: 0;
    height: 72px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .5));
    pointer-events: none;
}
.woocommerce div.product div.images .product-gallery-frame .woocommerce-product-gallery__image:has(.product-badges--personalizable)::after {
    height: 106px;
}
/* Die mittige Bildauswahl behält unten ihre Bedienfläche; Badges stehen darüber. */
.woocommerce div.product div.images .product-gallery-frame .product-badges {
    bottom: 60px;
}
@media (max-width: 900px) {
    .product-badges {
        bottom: 8px;
        left: 8px;
        max-width: calc(100% - 16px);
    }
}
