/* --- Woo Product Badge Styles --- */

/* Wrapper for multiple badges */
.wpb-badges-wrapper {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 9999; /* raised above neighboring cards */
}

/* Each badge */
.wpb-badge {
    display: inline-block;
    position: relative;
    width: 36px;
    height: 36px;
    cursor: pointer;
    outline: none;
}

.wpb-badge img {
    width: 100%;
    height: 100%;
    display: block;        /* removes inline gaps */
    object-fit: cover;     /* ensures image fills container, keeps shape */
    border-radius: inherit; /* inherit from inline PHP */
    box-shadow: 0 0 3px rgba(0,0,0,0.25);
}

/* Tooltip appears below the badge regardless of badge size */
.wpb-badge[title]:hover::after,
.wpb-badge[title]:focus::after {
    content: attr(title);
    position: absolute;
    top: calc(100% + 6px); /* below the badge */
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 3px 6px;      /* dynamic settings override */
    font-size: 12px;       /* dynamic settings override */
    border-radius: 4px;
    z-index: 10000;
    pointer-events: none;  /* tooltips don’t block clicks */
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* --- Fix clipping issues in archives and widgets --- */
.woocommerce ul.products,
.woocommerce ul.products li.product,
li.product.ast-article-single,
.astra-shop-thumbnail-wrap,
.uael-woo-products-thumbnail-wrap,
.woocommerce-loop-product__link,
.woocommerce-LoopProduct-link {
    overflow: visible !important;
}

/* Raise hovered product above siblings (so tooltips are always visible) */
.woocommerce ul.products li.product:hover {
    position: relative;
    z-index: 10000;
}

/* Single product gallery should also allow overflow */
.single-product .woocommerce-product-gallery {
    overflow: visible !important;
}
