/* Meshek Daniel Omer – תוויות "חדש!" ו"מבצע" בכרטיסי המוצרים.
   לשוניות קטנות שיורדות מהקצה העליון של הכרטיס, בצד ימין (בצד שמאל יש את כפתור ה-"+").
   "חדש!" צמודה לפינה, "מבצע" לידה. במוצר עם תווית אחת בלבד – היא יושבת בפינה.
   בתווית המבצע לא משנים צבע או טקסט – רק צורה, גודל ומיקום. */

:root {
	--mdo-flag-edge: 24px;      /* המרחק מהפינה הימנית (אחרי העיגול של הכרטיס) */
	--mdo-flag-new-w: 52px;     /* רוחב "חדש!" – כדי ש"מבצע" תדע איפה לשבת */
	--mdo-flag-gap: 6px;
	--mdo-flag-font: 13px;
	--mdo-flag-pad: 7px 10px;
}

li.product:has(> .mdo-flag),
li.product:has(.onsale) {
	position: relative;
}

/* צורה משותפת */
li.product > .mdo-flag,
li.product .onsale {
	position: absolute !important;
	z-index: 4 !important;
	top: 0 !important;
	right: var(--mdo-flag-edge) !important;
	left: auto !important;
	bottom: auto !important;
	box-sizing: border-box !important;
	display: inline-block !important;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: var(--mdo-flag-pad) !important;
	border-radius: 0 0 8px 8px !important;
	font-family: "Rubik", sans-serif !important;
	font-size: var(--mdo-flag-font) !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	letter-spacing: 0 !important;
	text-align: center !important;
	white-space: nowrap !important;
	box-shadow: none !important;
	transform: none !important;
	pointer-events: none;
}

/* "חדש!" – ירוק כהה של המשק, כתב קרם */
li.product > .mdo-flag-new {
	width: var(--mdo-flag-new-w) !important;
	background: #3E4A38;
	color: #FAF4E8;
}

/* כשיש גם "חדש!" – "מבצע" זזה שמאלה, לידה */
li.product:has(> .mdo-flag-new) .onsale {
	right: calc(var(--mdo-flag-edge) + var(--mdo-flag-new-w) + var(--mdo-flag-gap)) !important;
}

/* טלפון – כרטיסים צרים יותר */
@media (max-width: 767px) {
	:root {
		--mdo-flag-edge: 16px;
		--mdo-flag-new-w: 42px;
		--mdo-flag-gap: 4px;
		--mdo-flag-font: 11px;
		--mdo-flag-pad: 6px 7px;
	}
}
