/* Public Stylesheet for Woodmart Discount & FOMO Timer */

/* Container wrapper to align price and timer side-by-side */
.wdft-price-container {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
	margin: 15px 0;
}

/* Woodmart single product override selectors to fit nicely */
.summary-inner .wdft-price-container {
	display: flex !important;
}

/* Fire Price Effect Wrapper */
.wdft-fire-wrapper {
	position: relative;
	display: inline-block;
	padding: 5px 15px;
	vertical-align: middle;
}

.wdft-fire-flames {
	position: absolute;
	bottom: -4px;
	left: 0;
	width: 100%;
	height: 140%;
	overflow: visible;
	pointer-events: none;
	z-index: 1;
	filter: url(#wdft-fire-filter);
	opacity: 0.9;
}

.wdft-flame {
	position: absolute;
	bottom: 0;
	border-radius: 50% 50% 50% 50%;
	background: radial-gradient(circle at bottom, #ffffff 0%, #ffeb3b 22%, var(--wdft-fire-color, #e65100) 55%, #f44336 85%, transparent 100%);
	opacity: 0;
}

/* 8 overlapping flame points with different sizes, delays and rates */
.wdft-flame:nth-child(1) { left: 8%; width: 26px; height: 32px; animation: wdftRise 1.3s infinite ease-in; animation-delay: 0.1s; }
.wdft-flame:nth-child(2) { left: 22%; width: 18px; height: 24px; animation: wdftRise 0.95s infinite ease-in; animation-delay: 0.3s; }
.wdft-flame:nth-child(3) { left: 38%; width: 30px; height: 40px; animation: wdftRise 1.45s infinite ease-in; animation-delay: 0s; }
.wdft-flame:nth-child(4) { left: 52%; width: 20px; height: 28px; animation: wdftRise 1.05s infinite ease-in; animation-delay: 0.4s; }
.wdft-flame:nth-child(5) { left: 66%; width: 24px; height: 32px; animation: wdftRise 1.2s infinite ease-in; animation-delay: 0.2s; }
.wdft-flame:nth-child(6) { left: 80%; width: 16px; height: 22px; animation: wdftRise 0.85s infinite ease-in; animation-delay: 0.5s; }
.wdft-flame:nth-child(7) { left: 30%; width: 22px; height: 30px; animation: wdftRise 1.25s infinite ease-in; animation-delay: 0.15s; }
.wdft-flame:nth-child(8) { left: 58%; width: 18px; height: 26px; animation: wdftRise 1.0s infinite ease-in; animation-delay: 0.35s; }

@keyframes wdftRise {
	0% {
		transform: translateY(0) scale(1.1);
		opacity: 0;
	}
	20% {
		opacity: 0.95;
	}
	70% {
		opacity: 0.7;
	}
	100% {
		transform: translateY(-36px) scale(0.15);
		opacity: 0;
	}
}

/* Floating Ember Sparks */
.wdft-embers {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 160%;
	pointer-events: none;
	z-index: 2;
}

.wdft-ember {
	position: absolute;
	bottom: 8%;
	width: 3px;
	height: 3px;
	background: #ffeb3b;
	border-radius: 50%;
	box-shadow: 0 0 5px var(--wdft-fire-color, #ff5722);
	opacity: 0;
}

.wdft-ember:nth-child(1) { left: 15%; animation: wdftEmberRise 1.7s infinite ease-out; animation-delay: 0.2s; }
.wdft-ember:nth-child(2) { left: 48%; animation: wdftEmberRise 2.1s infinite ease-out; animation-delay: 0.9s; }
.wdft-ember:nth-child(3) { left: 78%; animation: wdftEmberRise 1.9s infinite ease-out; animation-delay: 1.5s; }

@keyframes wdftEmberRise {
	0% {
		transform: translateY(0) translateX(0);
		opacity: 0;
	}
	20% {
		opacity: 1;
	}
	100% {
		transform: translateY(-55px) translateX(10px);
		opacity: 0;
	}
}

.wdft-price-content {
	position: relative;
	z-index: 2;
}


/* Apply vibrant orange-red color and glow only to the active discounted price */
.wdft-has-fire ins,
.wdft-has-fire ins .amount,
.wdft-has-fire ins bdi {
	color: #e64a19 !important; /* Vibrant fire red-orange */
	font-size: 1.15em !important;
	font-weight: 700 !important;
	text-shadow: 0 0 8px rgba(255, 255, 255, 0.85), 0 0 12px rgba(255, 87, 34, 0.3) !important;
}

/* Digital Countdown Clock Box styling */
.wdft-timer-box {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	background: var(--wdft-timer-bg, #ffffff);
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 10px 14px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.05);
	font-family: inherit;
	direction: rtl; /* RTL for Arabic text support */
}

.wdft-timer-header {
	font-size: 0.75rem;
	font-weight: 700;
	color: #616161;
	margin-bottom: 6px;
	text-align: center;
	letter-spacing: 0.5px;
	width: 100%;
}

.wdft-timer-digits-container {
	display: flex;
	align-items: center;
	gap: 6px;
	direction: ltr !important;
}

.wdft-timer-unit {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.wdft-timer-card {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wdft-digit-bg_color, #1e1e1e);
	color: var(--wdft-digit-color, #ffffff);
	font-size: 1.3rem;
	font-weight: 700;
	border-radius: 6px;
	width: auto;
	min-width: 32px;
	padding: 0 6px;
	height: 32px;
	font-family: 'Courier New', Courier, monospace;
	text-align: center;
	letter-spacing: 0px;
	box-shadow: inset 0 2px 5px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.1);
}

.wdft-timer-label {
	font-size: 0.65rem;
	color: #757575;
	font-weight: 600;
	margin-top: 4px;
}

.wdft-timer-colon {
	font-size: 1.1rem;
	font-weight: bold;
	color: #424242;
	animation: wdftBlink 1s infinite steps(1);
	margin-bottom: 12px;
}

@keyframes wdftBlink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0; }
}

/* Cart Countdown Styling */
.wdft-cart-countdown {
	font-family: 'Courier New', Courier, monospace;
	font-weight: bold;
	color: #d32f2f;
	margin-left: 2px;
}

/* ==========================================================================
   Alternative Price Highlight Effects
   ========================================================================== */

.wdft-effect-wrapper {
	position: relative;
	display: inline-block;
	vertical-align: middle;
}

/* 1. Pulse Neon Glow Effect */
.wdft-effect-glow ins,
.wdft-effect-glow ins .amount,
.wdft-effect-glow ins bdi {
	color: var(--wdft-fire-color, #e65100) !important;
	font-size: 1.15em !important;
	font-weight: 700 !important;
	animation: wdftNeonGlow 2s infinite ease-in-out;
}

@keyframes wdftNeonGlow {
	0%, 100% {
		text-shadow: 0 0 5px var(--wdft-fire-color, #e64a19), 0 0 10px var(--wdft-fire-color, #e64a19);
	}
	50% {
		text-shadow: 0 0 12px var(--wdft-fire-color, #e64a19), 0 0 22px #ffeb3b, 0 0 5px #ff5722;
	}
}

/* 2. Heartbeat Zoom Scaling Effect */
.wdft-effect-pulse ins,
.wdft-effect-pulse ins .amount,
.wdft-effect-pulse ins bdi {
	color: #e64a19 !important;
	font-size: 1.15em !important;
	font-weight: 700 !important;
	display: inline-block;
	animation: wdftHeartbeat 1.6s infinite ease-in-out;
	text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@keyframes wdftHeartbeat {
	0%, 100%, 70% { transform: scale(1); }
	20% { transform: scale(1.12); }
	40% { transform: scale(1.06); }
}

/* 3. Cyber Digital Glitch Effect */
.wdft-effect-glitch ins,
.wdft-effect-glitch ins .amount,
.wdft-effect-glitch ins bdi {
	color: #1a1a1a !important; /* cyberpunk contrast black */
	font-size: 1.15em !important;
	font-weight: 700 !important;
	position: relative;
	display: inline-block;
	animation: wdftGlitch 2.5s infinite steps(2);
}

@keyframes wdftGlitch {
	0%, 100% { text-shadow: 2px 0 0 #00e5ff, -2px 0 0 #ff007f; }
	25% { text-shadow: -2px 2px 0 #00e5ff, 2px -2px 0 #ff007f; }
	50% { text-shadow: 2px -2px 0 #00e5ff, -2px 2px 0 #ff007f; }
	75% { text-shadow: -2px -2px 0 #00e5ff, 2px 2px 0 #ff007f; }
}

/* ==========================================================================
   Catalog Page / Grid Responsive Tuning
   ========================================================================== */

/* Standard WooCommerce product lists, WooCommerce Blocks grids, and Woodmart shop loop grids */
.products .wdft-price-container,
.product-grid .wdft-price-container,
.woodmart-shop-loop .wdft-price-container,
.wc-block-grid__product-price .wdft-price-container,
.wc-block-components-product-price .wdft-price-container,
.wp-block-woocommerce-product-price .wdft-price-container {
	display: flex !important;
	flex-direction: row !important;
	justify-content: center !important;
	align-items: center !important;
	flex-wrap: wrap !important;
	gap: 12px !important;
	margin: 10px auto !important;
	text-align: center !important;
	width: 100% !important;
}

/* Ensure price tags (del, ins, amount, etc.) inside the loop container are centered and inline */
.products .wdft-price-container del,
.products .wdft-price-container ins,
.product-grid .wdft-price-container del,
.product-grid .wdft-price-container ins,
.woodmart-shop-loop .wdft-price-container del,
.woodmart-shop-loop .wdft-price-container ins,
.wc-block-grid__product-price .wdft-price-container del,
.wc-block-grid__product-price .wdft-price-container ins,
.wc-block-components-product-price .wdft-price-container del,
.wc-block-components-product-price .wdft-price-container ins,
.wp-block-woocommerce-product-price .wdft-price-container del,
.wp-block-woocommerce-product-price .wdft-price-container ins {
	display: inline-block !important;
	float: none !important;
	margin: 0 !important;
	text-align: center !important;
	vertical-align: middle !important;
}

/* Force the timer placeholder to take full width and center itself below the prices */
.products .wdft-price-container .wdft-timer-placeholder,
.product-grid .wdft-price-container .wdft-timer-placeholder,
.woodmart-shop-loop .wdft-price-container .wdft-timer-placeholder,
.wc-block-grid__product-price .wdft-price-container .wdft-timer-placeholder,
.wc-block-components-product-price .wdft-price-container .wdft-timer-placeholder,
.wp-block-woocommerce-product-price .wdft-price-container .wdft-timer-placeholder {
	flex-basis: 100% !important;
	width: 100% !important;
	display: flex !important;
	justify-content: center !important;
	margin-top: 8px !important;
}

.products .wdft-timer-box,
.product-grid .wdft-timer-box,
.woodmart-shop-loop .wdft-timer-box,
.wc-block-grid__product-price .wdft-timer-box,
.wc-block-components-product-price .wdft-timer-box,
.wp-block-woocommerce-product-price .wdft-timer-box {
	padding: 4px 6px !important;
	border-radius: 6px !important;
	box-shadow: none !important;
	border: 1px solid #e0e0e0 !important;
	max-width: 100% !important;
}

.products .wdft-timer-header,
.product-grid .wdft-timer-header,
.woodmart-shop-loop .wdft-timer-header,
.wc-block-grid__product-price .wdft-timer-header,
.wc-block-components-product-price .wdft-timer-header,
.wp-block-woocommerce-product-price .wdft-timer-header {
	font-size: 0.6rem !important;
	margin-bottom: 2px !important;
	text-align: center !important;
	width: 100% !important;
}

.products .wdft-timer-card,
.product-grid .wdft-timer-card,
.woodmart-shop-loop .wdft-timer-card,
.wc-block-grid__product-price .wdft-timer-card,
.wc-block-components-product-price .wdft-timer-card,
.wp-block-woocommerce-product-price .wdft-timer-card {
	font-size: 0.9rem !important;
	width: auto !important;
	min-width: 22px !important;
	padding: 0 4px !important;
	height: 22px !important;
	border-radius: 4px !important;
}

.products .wdft-timer-label,
.product-grid .wdft-timer-label,
.woodmart-shop-loop .wdft-timer-label,
.wc-block-grid__product-price .wdft-timer-label,
.wc-block-components-product-price .wdft-timer-label,
.wp-block-woocommerce-product-price .wdft-timer-label {
	font-size: 0.5rem !important;
	margin-top: 1px !important;
}

.products .wdft-timer-colon,
.product-grid .wdft-timer-colon,
.woodmart-shop-loop .wdft-timer-colon,
.wc-block-grid__product-price .wdft-timer-colon,
.wc-block-components-product-price .wdft-timer-colon,
.wp-block-woocommerce-product-price .wdft-timer-colon {
	font-size: 0.75rem !important;
	margin-bottom: 6px !important;
}

