/* Konténer relatív kell legyen a termék képnél */
.product, .type-product, .woocommerce-loop-product__link {
    position: relative;
    display: block;
}

/* Elementor products widget override - ensure relative positioning */
.elementor-products-grid .woocommerce-loop-product__link,
.elementor-wc-products .woocommerce-loop-product__link {
    position: relative !important;
    display: block !important;
}

/* Badge container must be positioned relative to the image wrapper */
.wp-stack-badge-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Badge wrapper with background */
.badge-item {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0;
    overflow: visible;
    pointer-events: auto;
}

/* Badge wrapper positioned at corners */
.badge-item.top-left { top: 0; left: 0; }
.badge-item.top-right { top: 0; right: 0; }
.badge-item.bottom-left { bottom: 0; left: 0; }
.badge-item.bottom-right { bottom: 0; right: 0; }

/* Slot offsets - for stacking multiple badges in same corner */
.badge-item.top-left.slot-2 { top: 15%; }
.badge-item.top-right.slot-2 { top: 15%; }
.badge-item.bottom-left.slot-2 { bottom: 28px; }
.badge-item.bottom-right.slot-2 { bottom: 28px; }

/* SVG színezés kényszerítése - fixed size, not affected by badge width change */
.badge-item svg {
    fill: currentColor !important;
    color: inherit;
    flex-shrink: 0;
    width: 32px !important;
    height: 32px !important;
}

/* Ensure badge color is not overridden by Elementor or theme CSS */
.wp-stack-badge-container .badge-item {
    color: inherit;
}

/* Badge tooltip - hidden by default, shown inline next to icon on hover */
.badge-tooltip {
    display: none;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    padding: 0 8px;
    line-height: 1.2;
}

/* Expand badge background horizontally to fit content when tooltip is shown */
.badge-item:hover {
    width: max-content !important;
    height: auto !important;
}

/* Show tooltip text inside badge-item on hover */
.badge-item:hover .badge-tooltip {
    display: inline;
}