/*
 * Casetti: the sale badges as the red "YENİ" pill the owner liked (2026-12-02): rounded, white edge, bold, a short
 * wiggle now and then. Cards in the shop and categories, the product page, and the front page's cards. Loaded on every
 * page after the cards' and the product page's styles (inc/site/badge-pill.php).
 */
.woocommerce ul.products li.product .onsale,
.single-product.woocommerce div.product .casetti-product-top > span.onsale,
.ch-card__tag.ch-card__tag--sale,
.ch-card__off {
	display: inline-flex !important;
	align-items: center;
	gap: 4px;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	padding: 3px 9px 2px !important;
	border: 1.5px solid #fff !important;
	border-radius: 999px !important;
	background: #b42318 !important;
	color: #fff !important;
	font: 700 10.5px/1.35 var(--myco-font-sans, sans-serif) !important;
	letter-spacing: 0.06em !important;
	text-transform: uppercase;
	box-shadow: 0 4px 10px -4px rgba(180, 35, 24, 0.6) !important;
	transform-origin: 50% 100%;
	animation: casetti-pill-wiggle 4.5s ease-in-out infinite;
}
.single-product.woocommerce div.product .casetti-product-top > span.onsale { font-size: 12px !important; padding: 4px 11px 3px !important; }
.ch-card__off small { display: inline !important; margin: 0 !important; font: inherit !important; letter-spacing: inherit !important; opacity: 0.9; }
.ch-card__off small::after { content: ""; }
.woocommerce ul.products li.product:nth-child(2n) .onsale,
.ch-card:nth-child(2n) .ch-card__tag--sale,
.ch-card:nth-child(2n) .ch-card__off { animation-delay: 0.6s; }
.woocommerce ul.products li.product:nth-child(3n) .onsale,
.ch-card:nth-child(3n) .ch-card__tag--sale,
.ch-card:nth-child(3n) .ch-card__off { animation-delay: 1.2s; }
/* On a new card the sale pill waits until the "Yeni" one has moved */
.ch-card__tag--sale { animation-delay: 2.2s; }
@keyframes casetti-pill-wiggle {
	0%, 70%, 100% { transform: none; }
	76% { transform: translateY(-3px) rotate(-6deg); }
	82% { transform: none; }
	88% { transform: translateY(-2px) rotate(4deg); }
}
@media (prefers-reduced-motion: reduce) {
	.woocommerce ul.products li.product .onsale,
	.single-product.woocommerce div.product .casetti-product-top > span.onsale,
	.ch-card__tag--sale,
	.ch-card__off { animation: none; }
}

/* Owner, 2026-12-02: only the rate on the sale badge (no "İndirim" word), and the "Yeni" and sale badges stand still. */
.ch-card__off small { display: none !important; }
.woocommerce ul.products li.product .onsale,
.single-product.woocommerce div.product .casetti-product-top > span.onsale,
.ch-card__tag,
.ch-card__off { animation: none !important; }
