.kbsc-countdown {
	--kbsc-accent: #ff3b25;
	--kbsc-amber: #ffb000;
	--kbsc-green: #0b3d13;
	position: relative;
	display: flex;
	align-items: center;
	gap: 9px;
	width: 100%;
	max-width: 340px;
	box-sizing: border-box;
	margin: 12px 0 16px auto;
	padding: 10px 11px;
	overflow: hidden;
	color: #fff;
	background:
		radial-gradient(circle at 92% 20%, rgba(255, 176, 0, .11), transparent 28%),
		linear-gradient(135deg, #061a0b 0%, #09260f 53%, #071509 100%);
	border: 1px solid rgba(255, 176, 0, .62);
	border-radius: 12px;
	box-shadow: 0 12px 26px rgba(5, 29, 10, .18), inset 0 1px 0 rgba(255, 255, 255, .08);
	font-family: inherit;
	isolation: isolate;
}

.kbsc-countdown.is-urgent {
	border-color: rgba(255, 59, 37, .92);
	box-shadow: 0 15px 36px rgba(222, 48, 30, .24), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.kbsc-countdown__glow {
	position: absolute;
	right: -54px;
	top: -68px;
	width: 190px;
	height: 190px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 176, 0, .18), transparent 68%);
	z-index: -1;
}

.kbsc-countdown.is-urgent .kbsc-countdown__glow {
	background: radial-gradient(circle, rgba(255, 59, 37, .25), transparent 68%);
}

.kbsc-countdown__icon {
	position: relative;
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	border: 1.5px solid var(--kbsc-amber);
	border-radius: 50%;
	background: rgba(0, 0, 0, .22);
	box-shadow: 0 0 0 4px rgba(255, 176, 0, .07), 0 0 18px rgba(255, 176, 0, .24);
}

.is-urgent .kbsc-countdown__icon {
	border-color: var(--kbsc-accent);
	box-shadow: 0 0 0 3px rgba(255, 59, 37, .07), 0 0 16px rgba(255, 59, 37, .28);
}

.kbsc-countdown__icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.kbsc-hourglass {
	fill: none;
	stroke: #ffc342;
	stroke-width: 2.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.kbsc-hourglass-rotor {
	-webkit-transform-origin: 32px 32px;
	transform-box: view-box;
	transform-origin: 32px 32px;
	will-change: transform;
	animation: kbsc-flip 4s cubic-bezier(.65, 0, .35, 1) infinite;
}

.kbsc-sand {
	fill: #ffbd2e;
	filter: drop-shadow(0 0 4px rgba(255, 189, 46, .45));
}

.kbsc-bolt {
	fill: #ffdb45;
	filter: drop-shadow(0 0 5px rgba(255, 219, 69, .7));
}

.kbsc-countdown__content {
	flex: 1 1 auto;
	min-width: 0;
}

.kbsc-countdown__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 5px;
}

.kbsc-countdown__header strong {
	color: #fff2ca;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.4;
}

.kbsc-countdown__badge {
	flex: 0 0 auto;
	padding: 3px 6px 4px;
	color: #fff6d5;
	background: rgba(216, 124, 0, .82);
	border: 1px solid rgba(255, 202, 92, .52);
	border-radius: 10px;
	font-size: 8px;
	font-weight: 800;
	line-height: 1;
}

.is-urgent .kbsc-countdown__badge {
	background: linear-gradient(135deg, #9f1212, #d82417);
	border-color: rgba(255, 100, 77, .82);
	box-shadow: 0 5px 14px rgba(216, 36, 23, .24);
}

.kbsc-countdown__timer {
	direction: ltr;
	display: grid;
	grid-template-columns: minmax(34px, 1fr) auto minmax(34px, 1fr) auto minmax(34px, 1fr) auto minmax(34px, 1fr);
	align-items: start;
	gap: 3px;
	text-align: center;
}

.kbsc-countdown__timer i {
	padding-top: 1px;
	color: rgba(255, 255, 255, .76);
	font-size: 19px;
	font-style: normal;
	font-weight: 500;
	line-height: 1;
}

.kbsc-countdown__unit b {
	display: block;
	color: #fff;
	font-size: 23px;
	font-variant-numeric: tabular-nums;
	font-weight: 900;
	letter-spacing: 1px;
	line-height: 1;
	text-shadow: 0 3px 12px rgba(0, 0, 0, .34);
}

.kbsc-countdown__unit span {
	direction: rtl;
	display: block;
	margin-top: 4px;
	color: rgba(255, 243, 210, .86);
	font-size: 8px;
	font-weight: 700;
	line-height: 1;
}

.kbsc-countdown__progress {
	direction: ltr;
	display: flex;
	justify-content: flex-end;
	height: 5px;
	margin-top: 8px;
	overflow: hidden;
	background: rgba(255, 255, 255, .12);
	border-radius: 999px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, .28);
}

.kbsc-countdown__progress span {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, var(--kbsc-accent), var(--kbsc-amber));
	border-radius: inherit;
	box-shadow: 0 0 12px rgba(255, 92, 37, .62);
	overflow: hidden;
	transition: width .85s linear;
}

.kbsc-countdown__progress span::before {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(115deg, transparent 0 12px, rgba(255, 255, 255, .34) 12px 18px, transparent 18px 30px);
	background-size: 54px 100%;
	animation: kbsc-progress-flow 1.25s linear infinite;
}

.kbsc-countdown__progress span::after {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #ff4932;
	box-shadow: 0 0 12px 4px rgba(255, 73, 50, .75);
	transform: translateY(-50%);
}

.kbsc-countdown.kbsc-expired {
	display: none !important;
}

@keyframes kbsc-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.045); }
}

@keyframes kbsc-flip {
	0%, 17% { transform: rotate(0deg); }
	37%, 62% { transform: rotate(180deg); }
	82%, 100% { transform: rotate(0deg); }
}

@keyframes kbsc-progress-flow {
	from { background-position: 0 0; }
	to { background-position: -54px 0; }
}

@media (max-width: 600px) {
	.kbsc-countdown {
		gap: 8px;
		max-width: 340px;
		margin: 10px 0 14px auto;
		padding: 9px 10px;
		border-radius: 12px;
	}

	.kbsc-countdown__icon {
		flex-basis: 32px;
		width: 32px;
		height: 32px;
	}

	.kbsc-countdown__header {
		align-items: flex-start;
		margin-bottom: 9px;
	}

	.kbsc-countdown__header strong {
		font-size: 11px;
	}

	.kbsc-countdown__badge {
		padding: 3px 5px;
		font-size: 8px;
	}

	.kbsc-countdown__timer {
		gap: 3px;
		grid-template-columns: minmax(34px, 1fr) auto minmax(34px, 1fr) auto minmax(34px, 1fr) auto minmax(34px, 1fr);
	}

	.kbsc-countdown__unit b {
		font-size: clamp(20px, 6vw, 23px);
	}

	.kbsc-countdown__timer i {
		font-size: 18px;
	}

	.kbsc-countdown__unit span {
		font-size: 8px;
	}
}

@media (max-width: 420px) {
	.kbsc-countdown {
		align-items: flex-start;
	}

	.kbsc-countdown__icon {
		position: absolute;
		right: 13px;
		top: 12px;
	}

	.kbsc-countdown__content {
		width: 100%;
	}

	.kbsc-countdown__header {
		min-height: 36px;
		padding-right: 45px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kbsc-countdown__icon,
	.kbsc-hourglass-rotor,
	.kbsc-countdown__progress span::before,
	.kbsc-countdown__progress span {
		animation: none !important;
		transition: none !important;
	}
}

/* Animated fire marker on WooCommerce product cards. */
.woocommerce ul.products li.product.kbsc-fire-product,
.woocommerce-page ul.products li.product.kbsc-fire-product {
	position: relative;
}

.kbsc-fire-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 18;
	display: block;
	width: 24px;
	height: 24px;
	pointer-events: none;
	transform-origin: 50% 90%;
	animation: kbsc-fire-float 2.6s ease-in-out infinite;
	filter: drop-shadow(0 4px 6px rgba(166, 32, 0, .18));
}

.kbsc-fire-badge img {
	position: relative;
	z-index: 2;
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: contain;
	transform-origin: 50% 88%;
	animation: kbsc-fire-flicker 1.15s ease-in-out infinite alternate;
}

.kbsc-fire-badge__glow {
	position: absolute;
	left: 50%;
	top: 56%;
	z-index: 1;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 194, 52, .66) 0, rgba(255, 76, 24, .28) 44%, transparent 73%);
	transform: translate(-50%, -50%);
	animation: kbsc-fire-glow 1.35s ease-in-out infinite alternate;
}

.kbsc-fire-badge__sparks,
.kbsc-fire-badge__sparks::before,
.kbsc-fire-badge__sparks::after {
	position: absolute;
	z-index: 3;
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #ffd547;
	box-shadow: 0 0 5px rgba(255, 119, 24, .9);
	content: "";
}

.kbsc-fire-badge__sparks {
	display: none;
}

.kbsc-fire-badge__sparks::before {
	left: 25px;
	top: 5px;
	animation: kbsc-fire-spark 1.8s .55s ease-out infinite;
}

.kbsc-fire-badge__sparks::after {
	left: 15px;
	top: -2px;
	animation: kbsc-fire-spark 1.8s 1.05s ease-out infinite;
}

@keyframes kbsc-fire-float {
	0%, 100% { transform: translateY(0) rotate(-1deg); }
	50% { transform: translateY(-4px) rotate(1deg); }
}

@keyframes kbsc-fire-flicker {
	0% { transform: scale(.97, 1.03) skewX(-1deg); }
	55% { transform: scale(1.035, .98) skewX(1.2deg); }
	100% { transform: scale(.99, 1.06) skewX(-.5deg); }
}

@keyframes kbsc-fire-glow {
	from { opacity: .62; transform: translate(-50%, -50%) scale(.88); }
	to { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
}

@keyframes kbsc-fire-spark {
	0% { opacity: 0; transform: translate(0, 5px) scale(.6); }
	25% { opacity: 1; }
	100% { opacity: 0; transform: translate(4px, -14px) scale(0); }
}

@media (max-width: 600px) {
	.kbsc-fire-badge {
		top: 10px;
		left: 10px;
		width: 22px;
		height: 22px;
	}
}

.kbsc-fire-gallery,
.kbsc-fire-target {
	position: relative !important;
}

.kbsc-fire-badge--single {
	top: 18px;
	right: 18px;
	left: auto;
	z-index: 40;
}

@media (max-width: 600px) {
	.kbsc-fire-badge--single {
		top: 12px;
		right: 12px;
		left: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kbsc-fire-badge,
	.kbsc-fire-badge img,
	.kbsc-fire-badge__glow,
	.kbsc-fire-badge__sparks,
	.kbsc-fire-badge__sparks::before,
	.kbsc-fire-badge__sparks::after {
		animation: none !important;
	}
}

/* Keep the hourglass flip reliable on mobile Safari and Chromium mobile. */
@media (max-width: 600px) {
	.kbsc-hourglass-rotor {
		-webkit-transform-origin: 32px 32px;
		transform-box: view-box;
		transform-origin: 32px 32px;
		-webkit-animation: kbsc-flip-mobile 4s cubic-bezier(.65, 0, .35, 1) infinite !important;
		animation: kbsc-flip-mobile 4s cubic-bezier(.65, 0, .35, 1) infinite !important;
	}
}

@-webkit-keyframes kbsc-flip-mobile {
	0%, 17% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
	37%, 62% { -webkit-transform: rotate(180deg); transform: rotate(180deg); }
	82%, 100% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
}

@keyframes kbsc-flip-mobile {
	0%, 17% { transform: rotate(0deg); }
	37%, 62% { transform: rotate(180deg); }
	82%, 100% { transform: rotate(0deg); }
}

/* Delayed sale popup. */
body.kbsc-popup-open {
	overflow: hidden;
}

.kbsc-sale-popup[hidden] {
	display: none !important;
}

.kbsc-sale-popup {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: grid;
	place-items: center;
	padding: 20px;
	box-sizing: border-box;
}

.kbsc-sale-popup__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(3, 8, 6, .78);
	-webkit-backdrop-filter: blur(7px);
	backdrop-filter: blur(7px);
	opacity: 0;
	transition: opacity .42s ease;
}

.kbsc-sale-popup__dialog {
	position: relative;
	z-index: 1;
	width: min(92vw, 1040px);
	max-height: 90vh;
	opacity: 0;
	transform: translateY(28px) scale(.935);
	filter: drop-shadow(0 30px 55px rgba(0, 0, 0, .55));
	transition: opacity .42s ease, transform .55s cubic-bezier(.2, .82, .25, 1.08);
	will-change: transform, opacity;
}

.kbsc-sale-popup.is-visible .kbsc-sale-popup__backdrop {
	opacity: 1;
}

.kbsc-sale-popup.is-visible .kbsc-sale-popup__dialog {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.kbsc-sale-popup.is-closing .kbsc-sale-popup__backdrop {
	opacity: 0;
}

.kbsc-sale-popup.is-closing .kbsc-sale-popup__dialog {
	opacity: 0;
	transform: translateY(15px) scale(.965);
	transition-duration: .28s;
}

.kbsc-sale-popup__link {
	display: block;
	width: 100%;
	line-height: 0;
	cursor: pointer;
}

.kbsc-sale-popup__link img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 90vh;
	margin: 0;
	object-fit: contain;
}

.kbsc-sale-popup__close {
	all: unset !important;
	position: absolute !important;
	top: 12.4% !important;
	right: 8.5% !important;
	bottom: auto !important;
	left: auto !important;
	z-index: 4 !important;
	display: block !important;
	width: clamp(34px, 6.4%, 68px) !important;
	height: clamp(34px, 5.9vw, 68px) !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: none !important;
	max-height: none !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	outline: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: transparent !important;
	font-size: 0 !important;
	line-height: 0 !important;
	text-indent: -9999px !important;
	opacity: 0 !important;
	transform: none !important;
	cursor: pointer !important;
	-webkit-tap-highlight-color: transparent;
}

.kbsc-sale-popup__close:hover,
.kbsc-sale-popup__close:focus-visible {
	background: transparent !important;
	box-shadow: none !important;
	opacity: 0 !important;
}

@media (max-width: 600px) {
	.kbsc-sale-popup {
		padding: 8px;
	}

	.kbsc-sale-popup__dialog {
		width: min(97vw, 1040px);
	}

	.kbsc-sale-popup__close {
		top: 10.5% !important;
		right: 7% !important;
		width: clamp(32px, 7.2%, 48px) !important;
		height: clamp(32px, 7.2vw, 48px) !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.kbsc-sale-popup__backdrop,
	.kbsc-sale-popup__dialog {
		transition-duration: .01ms !important;
	}
}
