/* Woo Badges — frontend. :where() ma zerową specyficzność, więc motyw zawsze może to nadpisać. */
:where(ul.products li.product),
:where(.astra-shop-thumbnail-wrap) {
	position: relative;
}

.wbdg-badges {
	position: absolute;
	z-index: 9;
	display: flex;
	flex-direction: column;
	gap: 4px;
	max-width: calc(100% - 16px);
	pointer-events: none;
	line-height: 1;
}

.wbdg-badges--top-left     { top: 8px; left: 8px; align-items: flex-start; }
.wbdg-badges--top-right    { top: 8px; right: 8px; align-items: flex-end; }
.wbdg-badges--bottom-left  { bottom: 8px; left: 8px; align-items: flex-start; }
.wbdg-badges--bottom-right { bottom: 8px; right: 8px; align-items: flex-end; }

.wbdg-badges--shift.wbdg-badges--top-left,
.wbdg-badges--shift.wbdg-badges--top-right {
	top: calc(8px + var(--wbdg-shift, 36px));
}

.wbdg-badges--inline {
	position: static;
	flex-direction: row;
	flex-wrap: wrap;
	max-width: none;
	margin: 0 0 0.6em;
	pointer-events: auto;
}

.wbdg-badge {
	display: inline-block;
	box-sizing: border-box;
	max-width: 100%;
	margin: 0;
	padding: 0.4em 0.75em;
	overflow: hidden;
	background: var(--wbdg-bg, #e53935);
	color: var(--wbdg-color, #fff);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-transform: none;
	text-overflow: ellipsis;
	white-space: nowrap;
	border-radius: 0;
}

.wbdg-badge--sm { font-size: 11px; }
.wbdg-badge--md { font-size: 13px; }
.wbdg-badge--lg { font-size: 15px; }

.wbdg-badge--square  { border-radius: 0; }
.wbdg-badge--rounded { border-radius: 4px; }
.wbdg-badge--pill    { border-radius: 999px; padding-left: 0.9em; padding-right: 0.9em; }
.wbdg-badge--tag {
	padding-right: 1.3em;
	clip-path: polygon(0 0, calc(100% - 0.6em) 0, 100% 50%, calc(100% - 0.6em) 100%, 0 100%);
}

/* Modal wyszukiwarki AI-Style Search — nakładka na zdjęcie (zdjęcie jest na górze karty). */
:where(.ai-product-card) {
	position: relative;
}

.ai-product-card > .wbdg-badges--top-left  { top: 6px; left: 6px; }
.ai-product-card > .wbdg-badges--top-right { top: 6px; right: 6px; }
.ai-product-card > .wbdg-badges { gap: 3px; }
