/**
 * Certificate badge ("produkt z atestem PZH").
 *
 * Drawn as a decorative ::after on the image wrappers that BeTheme / WooCommerce
 * already render as position:relative:
 *   - loops  -> .image_frame.product-loop-thumb  (the 1:1 product thumbnail box)
 *   - single -> .woocommerce-product-gallery      (the main product image box)
 *
 * The seal sits in the BOTTOM-RIGHT corner — deliberately away from the
 * top-left "W promocji" badge and the top-right zoom / hover icons, so it
 * never overlaps another label. pointer-events:none keeps clicks flowing
 * through to the image / zoom trigger underneath.
 *
 * Artwork: assets/badge.webp — the official PZH "Produkt z atestem" seal
 * (600x600 source, resized to 300x300, transparent background).
 */

/* Single product page ONLY (client 2026-07-23): no seal on archive/loop
   cards. Drawn as a CSS background, so it is never an <img>, never part of
   the product gallery and never reaches structured data or image search. */
.wds-has-atest .woocommerce-product-gallery .flex-viewport,
.wds-has-atest .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__wrapper {
    /* Defensive: all are already relative in this theme. */
    position: relative;
}

.wds-has-atest .woocommerce-product-gallery .flex-viewport::after,
.wds-has-atest .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__wrapper::after {
    content: "";
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 26%;
    max-width: 92px;
    min-width: 56px;
    aspect-ratio: 1 / 1;
    background: url("../badge.webp") center / contain no-repeat;
    pointer-events: none;
    z-index: 5;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.18));
}

/* The single-product image is much larger — give the seal more presence
   and a touch more breathing room from the edge. Anchored to the main-image
   viewport, NOT the whole gallery: with bottom thumbnails the gallery box
   ends under the thumb strip, and the seal used to land there looking like
   an extra thumbnail. */
.wds-has-atest .woocommerce-product-gallery .flex-viewport::after,
.wds-has-atest .woocommerce-product-gallery:not(:has(.flex-viewport)) .woocommerce-product-gallery__wrapper::after {
    right: 14px;
    bottom: 14px;
    width: 16%;
    max-width: 120px;
    min-width: 80px;
}
