/* =========================================================
   DISCOUNT & URGENCY ENGINE – LUXURY UX
   Brand color: #ef9d2a (Pčelica Iva)
   ========================================================= */

/* === WRAPPER === */
.due-box {
	margin: 18px 0 28px;
	padding: 0;
}

/* === HEADLINE === */
.due-box > strong {
	display: block;
	margin-bottom: 14px;

	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;

	color: #ef9d2a;
}

/* === TIMER ROW === */
.due-timer {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* === TIME PILL === */
.due-time {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;

	min-width: 62px;
	padding: 10px 14px;

	border: 1.5px solid #ef9d2a;
	border-radius: 999px;
	background: #ffffff;
}

/* === NUMBER === */
.due-num {
	font-family: inherit;
	font-size: 22px;
	font-weight: 800;
	line-height: 1;

	color: #ef9d2a;
}

/* === LABEL === */
.due-time small {
	margin-top: 4px;

	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;

	color: #ef9d2a;
	opacity: 0.85;
}

/* === SEPARATOR === */
.due-sep {
	font-size: 20px;
	font-weight: 700;
	color: #ef9d2a;
	margin-top: -8px;
	user-select: none;
	opacity: 0.6;
}

/* === OPTIONAL TEXT BELOW TIMER === */
.due-box p {
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: #333;
}

/* === SALE BADGE (SHOP + PRODUCT IMAGE) === */
.onsale.due-onsale {
	background: #ef9d2a !important;
	color: #ffffff !important;

	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;

	border-radius: 6px;
	padding: 6px 10px;
}

/* === SUBTLE ANIMATION (NOT AGGRESSIVE) === */
.onsale.due-onsale--animate {
	animation: dueSoftPulse 2.6s infinite;
}

@keyframes dueSoftPulse {
	0%   { transform: scale(1); }
	50%  { transform: scale(1.03); }
	100% { transform: scale(1); }
}

/* === EXPIRED STATE === */
.due-ended {
	font-weight: 700;
	color: #ef9d2a;
	opacity: 0.75;
}
/* === FORCE HIDE DEFAULT WOO SALE BADGE === */
.onsale:not(.due-onsale) {
	display: none !important;
}
/* =========================================================
   FORCE BADGE POSITION – TOP LEFT (ALL PRODUCT GRIDS)
   ========================================================= */

/* osiguraj da je parent relativan */
.woocommerce ul.products li.product,
.woocommerce .wc-block-grid__product,
.kadence-product-loop {
	position: relative;
}

/* naš campaign badge */
.onsale.due-onsale {
	top: 12px !important;
	left: 12px !important;
	right: auto !important;
	bottom: auto !important;
}

/* sigurnosno – ako block koristi inline wrapper */
.woocommerce .wc-block-grid__product .onsale.due-onsale {
	top: 12px !important;
	left: 12px !important;
	right: auto !important;
}
/* =========================================================
   KILL ALL DEFAULT SALE BADGES (WOO + KADENCE)
   KEEP ONLY DUE BADGE
   ========================================================= */

/* sakrij SVE Woo/Kadence sale badgeove */
.woocommerce span.onsale,
.wc-block-grid__product span.onsale,
.kadence-product-loop span.onsale,
.kb-product-entry span.onsale,
.kadence-product-grid span.onsale {
	display: none !important;
	visibility: hidden !important;
	opacity: 0 !important;
}

/* ali PUSTI naš badge */
.woocommerce span.onsale.due-onsale,
.wc-block-grid__product span.onsale.due-onsale,
.kadence-product-loop span.onsale.due-onsale,
.kb-product-entry span.onsale.due-onsale,
.kadence-product-grid span.onsale.due-onsale {
	display: inline-flex !important;
	visibility: visible !important;
	opacity: 1 !important;
}
/* =========================================================
   KADENCE BLOCK – KILL PSEUDO SALE BADGE ("SNIŽENJE")
   ========================================================= */

/* Kadence Products / Latest Products badge via ::before / ::after */
.kb-product-entry::before,
.kb-product-entry::after,
.kadence-product-image::before,
.kadence-product-image::after,
.wc-block-grid__product-image::before,
.wc-block-grid__product-image::after {
	content: none !important;
	display: none !important;
}

/* dodatno osiguranje – ako Kadence koristi data-attribute */
[class*="sale"]::before,
[class*="sale"]::after {
	content: none !important;
}
/* =========================================================
   WOO BLOCKS – KILL DEFAULT "SNIŽENJE"
   (Latest Products / New Products block)
   ========================================================= */

/* =========================================================
   WOO BLOCKS – REPLACE "SNIŽENJE" WITH CAMPAIGN BADGE
   ========================================================= */

/* zadrži poziciju badge containera */
.wc-block-grid__product-onsale {
	position: absolute;
	top: 12px;
	left: 12px;
	right: auto;
	bottom: auto;
	z-index: 9;
}

/* sakrij originalni Woo tekst */
.wc-block-grid__product-onsale span {
	visibility: hidden;
}

/* inject naš badge tekst iz kampanje */
.wc-block-grid__product-onsale::after {
	content: attr(data-due-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;

	background: #ef9d2a;
	color: #ffffff;

	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;

	border-radius: 6px;
	padding: 6px 10px;

	box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* ako nema kampanje / data-attributea – nema badgea */
.wc-block-grid__product-onsale:not([data-due-text])::after {
	content: none;
}
/* =========================================================
   INJECT DUE BADGE TEXT INTO WOO BLOCKS (Latest / New)
   ========================================================= */

.wc-block-grid__product-onsale {
	position: absolute;
	top: 12px;
	left: 12px;
	background: transparent !important;
}

/* stvarni tekst badgea */
.wc-block-grid__product-onsale::after {
	content: attr(data-due-text);
	display: inline-block;

	background: #ef9d2a;
	color: #ffffff;

	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;

	padding: 6px 10px;
	border-radius: 6px;
	white-space: nowrap;
}
/* =========================================================
   FIX BADGE POSITION – WOO BLOCKS / KADENCE
   ========================================================= */

/* image wrapper mora biti anchor */
.wc-block-grid__product-image,
.wc-block-components-product-image,
.kadence-product-image,
.woocommerce-loop-product__link {
	position: relative !important;
}

/* naš badge – top left over image */
.wc-block-grid__product-image .due-onsale,
.wc-block-components-product-image .due-onsale,
.kadence-product-image .due-onsale,
.woocommerce-loop-product__link .due-onsale {
	position: absolute !important;
	top: 12px !important;
	left: 12px !important;
	z-index: 9;
}

